diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..57aeeed7 Binary files /dev/null and b/.DS_Store differ diff --git a/.babelrc b/.babelrc new file mode 100644 index 00000000..67c4bf38 --- /dev/null +++ b/.babelrc @@ -0,0 +1,9 @@ +{ + "presets": [ + ["env", { + "targets": { + "node": true + } + }] + ] +} \ No newline at end of file diff --git a/.czrc b/.czrc new file mode 100644 index 00000000..a273d33c --- /dev/null +++ b/.czrc @@ -0,0 +1 @@ +{ "path": "cz-conventional-changelog" } \ No newline at end of file diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..9cc7dfe7 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +node_modules/* +browser/* +dist/* diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..a5b82de4 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,3 @@ +module.exports = { + "extends": "standard" +}; \ No newline at end of file diff --git a/.gitignore b/.gitignore index ad46b308..ad0d0e77 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,11 @@ bower_components build/Release # Dependency directories +<<<<<<< HEAD node_modules/ +======= +node_modules +>>>>>>> d8ce877... init first version jspm_packages/ # TypeScript v1 declaration files @@ -59,3 +63,6 @@ typings/ # next.js build output .next + +#lerna-changelog +.changelog diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..b28b04f6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ + + + diff --git a/README.md b/README.md new file mode 100644 index 00000000..099e4c05 --- /dev/null +++ b/README.md @@ -0,0 +1,96 @@ +
+ +
+
+ + npm + + + + + + license + + + commitizen + +
+ + +### Introduction + +xgplayer is a web video player library. it has designed a separate, detachable UI component based on the principle that everything is componentized. More importantly, it is not only flexible in the UI layer, but also bold in its functionality: it gets rid of video loading, buffering, and format support for video dependence. Especially on mp4 +it can be staged loading for that does not support streaming mp4. This means seamless switching with clarity, load control, and video savings. It also integrates on-demand and live support for FLV, HLS, and dash. [Document](http://h5player.bytedance.com/) + +### Start + +1. Install + + ``` + $ npm install xgplayer + ``` + +2. Usage + + Step 1: + + ```html +
+ ``` + Step 2: + + ```js + import Player from 'xgplayer' + + let player=new Player({ + id:'vs', + url:'http://s2.pstatp.com/cdn/expire-1-M/byted-player-videos/1.0.0/xgplayer-demo.mp4' + }) + ``` + + This is the easiest way to configure the player,then it runs with video. For more advanced content, see the plug-in section or documentation. [more config](http://h5player.bytedance.com/config) + + + + +### Plugins + +xgplayer provides more plugins, plugins are divided into two categories: one is self-starting, and another inherits the player's core class named xgplayer. In principle, the officially provided plug-ins are self-starting and the packaged third-party libraries are inherited. Some feature plug-ins themselves can provide a downgrade scenario that suggests a self-start approach, or an inheritance approach if not. The player supports custom plugins for more content viewing [plugins](http://h5player.bytedance.com/plugins/) + +The following is how to use a self-starting plug-in: + +```js +import Player from 'xgplayer' +import 'xgplyaer-mp4' + +let player=new Player({ + id:'video', + url:'//abc.com/test.mp4' +}) +``` + +xgplayer-mp4plugin is self-starting, It loads mp4 video itself, parses mp4 format, implements custom loading, buffering, seamless switching, and so on. it will automatically downgrade devices that do not support [MSE](https://www.w3.org/TR/media-source/). [details](http://h5player.bytedance.com/plugins/#xgplayer-mp4) + + + +### Mobile Support + +xgplayer supports mobile terminal, but android device brand and system are numerous, there are much compatibility problems, the player provides whitelist mechanism to ensure the perfect operation in mobile terminal. [whitelist](http://h5player.bytedance.com/config/#%E7%99%BD%E5%90%8D%E5%8D%95) + + + +### Dev + +``` +$ git clone git@github.com:bytedance/xgplayer.git +$ cd xgplayer +$ npm install +$ npm run dev +``` + +please visit [http://localhost:9090/examples/index.html](http://localhost:9090/examples/index.html) + +### License + +[MIT](http://opensource.org/licenses/MIT) + diff --git a/README.zh-CN.md b/README.zh-CN.md new file mode 100644 index 00000000..10baffc1 --- /dev/null +++ b/README.zh-CN.md @@ -0,0 +1,95 @@ +
+ +
+
+ + npm + + + + + + license + + + commitizen + +
+ + +### 概述 + + +西瓜播放器是一个Web视频播放器类库,它本着一切都是组件化的原则设计了独立可拆卸的 UI 组件。更重要的是它不只是在 UI 层有灵活的表现,在功能上也做了大胆的尝试:摆脱视频加载、缓冲、格式支持对 video 的依赖。尤其是在 mp4 点播上做了较大的努力,让本不支持流式播放的 mp4 能做到分段加载,这就意味着可以做到清晰度无缝切换、加载控制、节省视频流量。同时,它也集成了对 flv、hls、dash 的点播和直播支持。[文档](http://h5player.bytedance.com/) + + + +### 起步 + +1. 安装 + + ``` + $ npm install xgplayer + ``` + +2. 使用 + +- Step 1: + + ```html +
+ ``` + +- Step 2: + + ```js + import Player from 'xgplayer' + + let player=new Player({ + id:'vs', + url:'http://s2.pstatp.com/cdn/expire-1-M/byted-player-videos/1.0.0/xgplayer-demo.mp4' + }) + ``` + + 这是最简单的播放器配置方法,基本功能可以跑起来,如果想使用高级功能参考插件一节或者文档。[更多配置](http://h5player.bytedance.com/config/) + + +### 插件 + +西瓜播放器提供了较多的插件,插件分两类:一部分是自启动的,一部分是继承播放器核心类 xgplayer 的。原则上官方提供插件都是自启动的,封装的第三方类库都是继承方式。有些功能插件本身能提供降级方案建议使用自启动方式,否则建议使用继承方式。播放器支持自定义插件,更多内容查看 [插件](http://h5player.bytedance.com/plugins/) + +对于自启动的插件使用方法如下: + +```js +import Player from 'xgplayer' +import 'xgplyaer-mp4' + +let player=new Player({ + id:'video', + url:'//abc.com/test.mp4' +}) +``` + +xgplayer-mp4插件就是自启动的,它会自己加载 mp4 视频、解析 mp4 格式,实现自定义加载、缓冲、无缝切换等[详情]((http://h5player.bytedance.com/plugins/#xgplayer-mp4))。对于不支持 [MSE](https://www.w3.org/TR/media-source/) 的设备自动降级。 + + +### Mobile Support + +西瓜播放器支持移动端,不过安卓设备品牌和系统众多,兼容性问题很多,播放器提供白名单机制保证在移动端完美的运行。[白名单机制](http://h5player/bytedance.com/config/#白名单) + + +### Dev + +``` +$ git clone git@github.com:bytedance/xgplayer.git +$ cd xgplayer +$ npm install +$ npm run dev +``` + +访问 [http://localhost:9090/examples/index.html](http://localhost:9090/examples/index.html) + +### License + +[MIT](http://opensource.org/licenses/MIT) + diff --git a/app.js b/app.js new file mode 100644 index 00000000..ff21d112 --- /dev/null +++ b/app.js @@ -0,0 +1,13 @@ +import Koa from 'koa' +import Serve from 'koa-static' +import Cors from '@koa/cors' +import Range from 'koa-range' + +const app = new Koa() +app.use(Range) +app.use(Cors()) + +app.use(Serve('.')) +app.listen(9090) + +console.log(`server is ready,please visit http://localhost:9090/examples/index.html`) diff --git a/lerna.json b/lerna.json new file mode 100644 index 00000000..e986f48a --- /dev/null +++ b/lerna.json @@ -0,0 +1,14 @@ +{ + "packages": [ + "packages/*" + ], + "changelog": { + "repo": "cucygh/xgplayer", + "labels": { + "mp4": "xgplayer-mp4", + "hls": "xgplayer-hls" + }, + "cacheDir": ".changelog" + }, + "version": "1.0.2" +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..0e9469a5 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,10660 @@ +{ + "name": "xgplayer", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@koa/cors": { + "version": "2.2.1", + "resolved": "http://npm.byted.org/@koa%2fcors/-/cors-2.2.1.tgz", + "integrity": "sha1-wGocNNeH487nnA1MIOiVLRttdcU=", + "dev": true + }, + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "http://npm.byted.org/@mrmlnc%2freaddir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha1-UkryQNGjYFJ7cwR17PoTRKpUDd4=", + "dev": true, + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@nodelib/fs.stat": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/@nodelib%2ffs.stat/-/fs.stat-1.1.0.tgz", + "integrity": "sha1-UMHiJgrA7ZQ5oYHeNyWgFo1ZxIo=", + "dev": true + }, + "@samverschueren/stream-to-observable": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/@samverschueren%2fstream-to-observable/-/stream-to-observable-0.3.0.tgz", + "integrity": "sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg==", + "dev": true, + "requires": { + "any-observable": "^0.3.0" + } + }, + "@types/node": { + "version": "10.3.4", + "resolved": "http://npm.byted.org/@types%2fnode/-/node-10.3.4.tgz", + "integrity": "sha1-x06K7BnlVd9EYJuAVzEQUqLITZ4=", + "dev": true + }, + "@webassemblyjs/ast": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fast/-/ast-1.5.12.tgz", + "integrity": "sha1-qay8s/JTM8Tt+h/fMYaxzPZOZmQ=", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.5.12", + "@webassemblyjs/helper-wasm-bytecode": "1.5.12", + "@webassemblyjs/wast-parser": "1.5.12", + "debug": "^3.1.0", + "mamacro": "^0.0.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2ffloating-point-hex-parser/-/floating-point-hex-parser-1.5.12.tgz", + "integrity": "sha1-DzYET/6WUkaM565aCHFqTu/5zZw=", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-api-error/-/helper-api-error-1.5.12.tgz", + "integrity": "sha1-BUZoM/8vnYlToaMndG4dES6mKq8=", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-buffer/-/helper-buffer-1.5.12.tgz", + "integrity": "sha1-Hw3lqqvv74muwxT3+XAAnNFZxz0=", + "dev": true, + "requires": { + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-code-frame/-/helper-code-frame-1.5.12.tgz", + "integrity": "sha1-PNwZUwk3YNHA8Mr3RczWK9tmJ8c=", + "dev": true, + "requires": { + "@webassemblyjs/wast-printer": "1.5.12" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-fsm/-/helper-fsm-1.5.12.tgz", + "integrity": "sha1-a8FEKwN/jjDy5XuYfO5cgG3RUCc=", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-module-context/-/helper-module-context-1.5.12.tgz", + "integrity": "sha1-tViMp4szuKDadfmrjHaaNwe6qGE=", + "dev": true, + "requires": { + "debug": "^3.1.0", + "mamacro": "^0.0.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-wasm-bytecode/-/helper-wasm-bytecode-1.5.12.tgz", + "integrity": "sha1-0So4WduIKkSIkahmoF0L5jeFthY=", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-wasm-section/-/helper-wasm-section-1.5.12.tgz", + "integrity": "sha1-/5/hUH02itQ355adJejBaT2sGIQ=", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/helper-buffer": "1.5.12", + "@webassemblyjs/helper-wasm-bytecode": "1.5.12", + "@webassemblyjs/wasm-gen": "1.5.12", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/ieee754": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fieee754/-/ieee754-1.5.12.tgz", + "integrity": "sha1-7pV0vFWIiPEwl84+eQDf8jTqGaQ=", + "dev": true, + "requires": { + "ieee754": "^1.1.11" + } + }, + "@webassemblyjs/leb128": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fleb128/-/leb128-1.5.12.tgz", + "integrity": "sha1-AwjuxlJ2XuVn2KX6EItPCyW0WOE=", + "dev": true, + "requires": { + "leb": "^0.3.0" + } + }, + "@webassemblyjs/utf8": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2futf8/-/utf8-1.5.12.tgz", + "integrity": "sha1-1ZFiIu8xS/YNaAbtWsBFmJv9ks4=", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwasm-edit/-/wasm-edit-1.5.12.tgz", + "integrity": "sha1-ghyTWOZEoWbyyRDlrxtGznlaF6o=", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/helper-buffer": "1.5.12", + "@webassemblyjs/helper-wasm-bytecode": "1.5.12", + "@webassemblyjs/helper-wasm-section": "1.5.12", + "@webassemblyjs/wasm-gen": "1.5.12", + "@webassemblyjs/wasm-opt": "1.5.12", + "@webassemblyjs/wasm-parser": "1.5.12", + "@webassemblyjs/wast-printer": "1.5.12", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwasm-gen/-/wasm-gen-1.5.12.tgz", + "integrity": "sha1-C3zP25PauQLMAlEBTi4YuuMTm8s=", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/helper-wasm-bytecode": "1.5.12", + "@webassemblyjs/ieee754": "1.5.12", + "@webassemblyjs/leb128": "1.5.12", + "@webassemblyjs/utf8": "1.5.12" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwasm-opt/-/wasm-opt-1.5.12.tgz", + "integrity": "sha1-vXWKi8Zw9YX/GuhfhAlangIpy8k=", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/helper-buffer": "1.5.12", + "@webassemblyjs/wasm-gen": "1.5.12", + "@webassemblyjs/wasm-parser": "1.5.12", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwasm-parser/-/wasm-parser-1.5.12.tgz", + "integrity": "sha1-exC0OI7PmL16IucCqmLsL0bQx14=", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/helper-api-error": "1.5.12", + "@webassemblyjs/helper-wasm-bytecode": "1.5.12", + "@webassemblyjs/ieee754": "1.5.12", + "@webassemblyjs/leb128": "1.5.12", + "@webassemblyjs/utf8": "1.5.12" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwast-parser/-/wast-parser-1.5.12.tgz", + "integrity": "sha1-nPWuYA7K4GQEN7XU3l3WtgiNDYs=", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/floating-point-hex-parser": "1.5.12", + "@webassemblyjs/helper-api-error": "1.5.12", + "@webassemblyjs/helper-code-frame": "1.5.12", + "@webassemblyjs/helper-fsm": "1.5.12", + "long": "^3.2.0", + "mamacro": "^0.0.3" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.5.12", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwast-printer/-/wast-printer-1.5.12.tgz", + "integrity": "sha1-Vjyk0Bsi0hZAskY9xePX99naxSA=", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/wast-parser": "1.5.12", + "long": "^3.2.0" + } + }, + "JSONStream": { + "version": "1.3.3", + "resolved": "http://npm.byted.org/JSONStream/-/JSONStream-1.3.3.tgz", + "integrity": "sha1-J7S4+7/qtOcbz1Uefye+jZUiOb8=", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "accepts": { + "version": "1.3.5", + "resolved": "http://npm.byted.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "dev": true, + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, + "acorn": { + "version": "5.7.1", + "resolved": "http://npm.byted.org/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha1-8JWCkpdwanyXdpWMCvyJMKm52dg=", + "dev": true + }, + "acorn-dynamic-import": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", + "integrity": "sha1-kBzu5Mf6rvfgetKkfokGddpQong=", + "dev": true, + "requires": { + "acorn": "^5.0.0" + } + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "^3.0.4" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "http://npm.byted.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "agent-base": { + "version": "4.2.0", + "resolved": "http://npm.byted.org/agent-base/-/agent-base-4.2.0.tgz", + "integrity": "sha1-mDi1wzkrliutAx5qTF4QJKvsRc4=", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, + "agentkeepalive": { + "version": "3.4.1", + "resolved": "http://npm.byted.org/agentkeepalive/-/agentkeepalive-3.4.1.tgz", + "integrity": "sha1-qpWuvDp0m8pe1T44gKCfUjW0jww=", + "dev": true, + "requires": { + "humanize-ms": "^1.2.1" + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "http://npm.byted.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ajv-keywords": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + } + }, + "alphanum-sort": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", + "dev": true + }, + "amdefine": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha1-9zIHu4EgfXX9bIPxJa8m7qN4yjA=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "any-observable": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/any-observable/-/any-observable-0.3.0.tgz", + "integrity": "sha1-r5M0deWAamfQ198JDdXovvZdEZs=", + "dev": true + }, + "any-promise": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true + }, + "anymatch": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "app-root-path": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/app-root-path/-/app-root-path-2.0.1.tgz", + "integrity": "sha1-zWLc+OT9WkF+/GZNLlsQZTxlG0Y=", + "dev": true + }, + "aproba": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=", + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "http://npm.byted.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha1-SzXClE8GKov82mZBB2A1D+nd/CE=", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "http://npm.byted.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-ify": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "http://npm.byted.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "http://npm.byted.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha1-ucK/WAXx5kqt7tbfOiv6+1pz9aA=", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "http://npm.byted.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "http://npm.byted.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "atob": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", + "dev": true + }, + "autoprefixer": { + "version": "6.7.7", + "resolved": "http://npm.byted.org/autoprefixer/-/autoprefixer-6.7.7.tgz", + "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", + "dev": true, + "requires": { + "browserslist": "^1.7.6", + "caniuse-db": "^1.0.30000634", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^5.2.16", + "postcss-value-parser": "^3.2.3" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "http://npm.byted.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "^1.0.30000639", + "electron-to-chromium": "^1.2.7" + } + } + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "http://npm.byted.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha1-suLwnjQtDwyI4vAuBneUEl51wgc=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "http://npm.byted.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha1-GERAjTuPDTWkBOp6wYDwh6YBvZA=", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + }, + "dependencies": { + "detect-indent": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "jsesc": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", + "dev": true, + "requires": { + "babel-helper-explode-assignable-expression": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true, + "requires": { + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-loader": { + "version": "7.1.4", + "resolved": "http://npm.byted.org/babel-loader/-/babel-loader-7.1.4.tgz", + "integrity": "sha1-40Y5OL1ObVXRwXTFSF1AahiO0BU=", + "dev": true, + "requires": { + "find-cache-dir": "^1.0.0", + "loader-utils": "^1.0.2", + "mkdirp": "^0.5.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-add-module-exports": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-0.2.1.tgz", + "integrity": "sha1-mumh9KjcZ/DN7E9K7aHkOl/2XiU=", + "dev": true + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "http://npm.byted.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", + "dev": true + }, + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "http://npm.byted.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", + "dev": true + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", + "dev": true + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-functions": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "dev": true, + "requires": { + "babel-helper-define-map": "^6.24.1", + "babel-helper-function-name": "^6.24.1", + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-helper-replace-supers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha1-WKeThjqefKhwvcWogRF/+sJ9tvM=", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "dev": true, + "requires": { + "babel-helper-replace-supers": "^6.24.1", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true, + "requires": { + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" + } + }, + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "dev": true, + "requires": { + "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", + "babel-plugin-syntax-exponentiation-operator": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "dev": true, + "requires": { + "regenerator-transform": "^0.10.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-preset-env": { + "version": "1.7.0", + "resolved": "http://npm.byted.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz", + "integrity": "sha1-3qefpOvriDzTXasH4mDBycBN93o=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-syntax-trailing-function-commas": "^6.22.0", + "babel-plugin-transform-async-to-generator": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.23.0", + "babel-plugin-transform-es2015-classes": "^6.23.0", + "babel-plugin-transform-es2015-computed-properties": "^6.22.0", + "babel-plugin-transform-es2015-destructuring": "^6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0", + "babel-plugin-transform-es2015-for-of": "^6.23.0", + "babel-plugin-transform-es2015-function-name": "^6.22.0", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.22.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0", + "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0", + "babel-plugin-transform-es2015-modules-umd": "^6.23.0", + "babel-plugin-transform-es2015-object-super": "^6.22.0", + "babel-plugin-transform-es2015-parameters": "^6.23.0", + "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.22.0", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.22.0", + "babel-plugin-transform-exponentiation-operator": "^6.22.0", + "babel-plugin-transform-regenerator": "^6.22.0", + "browserslist": "^3.2.6", + "invariant": "^2.2.2", + "semver": "^5.3.0" + } + }, + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.24.1", + "babel-plugin-transform-es2015-classes": "^6.24.1", + "babel-plugin-transform-es2015-computed-properties": "^6.24.1", + "babel-plugin-transform-es2015-destructuring": "^6.22.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", + "babel-plugin-transform-es2015-for-of": "^6.22.0", + "babel-plugin-transform-es2015-function-name": "^6.24.1", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-umd": "^6.24.1", + "babel-plugin-transform-es2015-object-super": "^6.24.1", + "babel-plugin-transform-es2015-parameters": "^6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", + "babel-plugin-transform-regenerator": "^6.24.1" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "http://npm.byted.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha1-ry87iPpvXB5MY00aD46sT1WzleM=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "http://npm.byted.org/base/-/base-0.11.2.tgz", + "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "dev": true + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha1-yrHmEY8FEJXli1KBrqjBzSK/wOM=", + "dev": true + }, + "big.js": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha1-pfwpi4G54Nyi5FiCR4S2XFK6WI4=", + "dev": true + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "http://npm.byted.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "bluebird": { + "version": "3.5.1", + "resolved": "http://npm.byted.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha1-2VUfnemPH82h5oPRfukaBgLuLrk=", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "http://npm.byted.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha1-LN4J617jQfSEdGuwMJsyU7GxRC8=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "http://npm.byted.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "http://npm.byted.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha1-Mmc0ZC9APavDADIJhTu3CtQo70g=", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha1-jWR0wbhwv9q807z8wZNKEOlPFfA=", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/browserify-des/-/browserify-des-1.0.1.tgz", + "integrity": "sha1-M0MSTbbXrVPiaogmMYcSvchFD5w=", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "http://npm.byted.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha1-KGlFnZqjviRf6P4sofRuLn9U1z8=", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "browserslist": { + "version": "3.2.8", + "resolved": "http://npm.byted.org/browserslist/-/browserslist-3.2.8.tgz", + "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000844", + "electron-to-chromium": "^1.3.47" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "http://npm.byted.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-from": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha1-h/yqOimDWOCt5uRCz86EB0DRrQQ=", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "builtins": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", + "dev": true + }, + "byline": { + "version": "5.0.0", + "resolved": "http://npm.byted.org/byline/-/byline-5.0.0.tgz", + "integrity": "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=", + "dev": true + }, + "cacache": { + "version": "11.0.2", + "resolved": "http://npm.byted.org/cacache/-/cacache-11.0.2.tgz", + "integrity": "sha1-/zBUGgUwIgAQinWeZg4weG94h2Q=", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "figgy-pudding": "^3.1.0", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.2", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^6.0.0", + "unique-filename": "^1.1.0", + "y18n": "^4.0.0" + }, + "dependencies": { + "y18n": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=", + "dev": true + } + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "caller-path": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "^0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "http://npm.byted.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "http://npm.byted.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + } + } + }, + "caniuse-api": { + "version": "1.6.1", + "resolved": "http://npm.byted.org/caniuse-api/-/caniuse-api-1.6.1.tgz", + "integrity": "sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=", + "dev": true, + "requires": { + "browserslist": "^1.3.6", + "caniuse-db": "^1.0.30000529", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "http://npm.byted.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "^1.0.30000639", + "electron-to-chromium": "^1.2.7" + } + } + } + }, + "caniuse-db": { + "version": "1.0.30000856", + "resolved": "http://npm.byted.org/caniuse-db/-/caniuse-db-1.0.30000856.tgz", + "integrity": "sha1-++u5mr4VpWVPx3R+u1MVvf3jNY8=", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30000856", + "resolved": "http://npm.byted.org/caniuse-lite/-/caniuse-lite-1.0.30000856.tgz", + "integrity": "sha1-7MFpeBNabyGbE4mR62IAnSXujao=", + "dev": true + }, + "capture-stack-trace": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", + "integrity": "sha1-7Qoe24fAXU2xA3xfj0g9ijtfCCU=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "http://npm.byted.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "http://npm.byted.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "chokidar": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/chokidar/-/chokidar-2.0.4.tgz", + "integrity": "sha1-NW/04rDo5D4yLRijckYLvPOszSY=", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.2.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "lodash.debounce": "^4.0.8", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.5" + }, + "dependencies": { + "is-glob": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + } + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", + "integrity": "sha1-Rakb0sIMlBHwljtarrmhuV4JzEg=", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "ci-info": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/ci-info/-/ci-info-1.1.3.tgz", + "integrity": "sha1-cQGTJkuwXHe4yQ0C9aryIhamZ7I=", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "circular-json": { + "version": "0.3.3", + "resolved": "http://npm.byted.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha1-gVyZ6oT2gJUp0vRXkb34JxE1LWY=", + "dev": true + }, + "clap": { + "version": "1.2.3", + "resolved": "http://npm.byted.org/clap/-/clap-1.2.3.tgz", + "integrity": "sha1-TzZ0WzIAhJJVf0ZBLWbVDLmbzlE=", + "dev": true, + "requires": { + "chalk": "^1.1.3" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "http://npm.byted.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-highlight": { + "version": "1.2.3", + "resolved": "http://npm.byted.org/cli-highlight/-/cli-highlight-1.2.3.tgz", + "integrity": "sha1-sgD5ftDkPSRjPoneD0iaSLuH0r8=", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "highlight.js": "^9.6.0", + "mz": "^2.4.0", + "parse5": "^3.0.3", + "yargs": "^10.0.3" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cliui": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "yargs": { + "version": "10.1.2", + "resolved": "http://npm.byted.org/yargs/-/yargs-10.1.2.tgz", + "integrity": "sha1-RU0HTCsWpRpD4vt4B+T53mnMtcU=", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^8.1.0" + } + }, + "yargs-parser": { + "version": "8.1.0", + "resolved": "http://npm.byted.org/yargs-parser/-/yargs-parser-8.1.0.tgz", + "integrity": "sha1-8TdqM7Ziml0GN4KUTacyYx6WaVA=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "cli-spinners": { + "version": "0.1.2", + "resolved": "http://npm.byted.org/cli-spinners/-/cli-spinners-0.1.2.tgz", + "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=", + "dev": true + }, + "cli-truncate": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/cli-truncate/-/cli-truncate-0.2.1.tgz", + "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", + "dev": true, + "requires": { + "slice-ansi": "0.0.4", + "string-width": "^1.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "http://npm.byted.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "http://npm.byted.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "cmd-shim": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/cmd-shim/-/cmd-shim-2.0.2.tgz", + "integrity": "sha1-b8vamUg6j9FdfTChlspp1oii79s=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "mkdirp": "~0.5.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "http://npm.byted.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "coa": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/coa/-/coa-1.0.4.tgz", + "integrity": "sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=", + "dev": true, + "requires": { + "q": "^1.1.2" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color": { + "version": "0.11.4", + "resolved": "http://npm.byted.org/color/-/color-0.11.4.tgz", + "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", + "dev": true, + "requires": { + "clone": "^1.0.2", + "color-convert": "^1.3.0", + "color-string": "^0.3.0" + } + }, + "color-convert": { + "version": "1.9.2", + "resolved": "http://npm.byted.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha1-SYgbj7pn3xKpa98/VsCqueeRMUc=", + "dev": true, + "requires": { + "color-name": "1.1.1" + } + }, + "color-name": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", + "dev": true + }, + "color-string": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/color-string/-/color-string-0.3.0.tgz", + "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", + "dev": true, + "requires": { + "color-name": "^1.0.0" + } + }, + "colormin": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/colormin/-/colormin-1.1.2.tgz", + "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", + "dev": true, + "requires": { + "color": "^0.11.0", + "css-color-names": "0.0.4", + "has": "^1.0.1" + } + }, + "colors": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "columnify": { + "version": "1.5.4", + "resolved": "http://npm.byted.org/columnify/-/columnify-1.5.4.tgz", + "integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=", + "dev": true, + "requires": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + } + }, + "command-join": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/command-join/-/command-join-2.0.0.tgz", + "integrity": "sha1-Uui5hPSHLZUv8b3IuYOX0nxxRM8=", + "dev": true + }, + "commander": { + "version": "2.15.1", + "resolved": "http://npm.byted.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha1-30boZ9D8Kuxmo0ZitAapzK//Ww8=", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "compare-func": { + "version": "1.3.2", + "resolved": "http://npm.byted.org/compare-func/-/compare-func-1.3.2.tgz", + "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", + "dev": true, + "requires": { + "array-ify": "^1.0.0", + "dot-prop": "^3.0.0" + } + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "http://npm.byted.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "http://npm.byted.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "http://npm.byted.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "contains-path": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "http://npm.byted.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", + "dev": true + }, + "content-type": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=", + "dev": true + }, + "conventional-changelog-angular": { + "version": "1.6.6", + "resolved": "http://npm.byted.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz", + "integrity": "sha1-sn8rMVwW0KHyPrGBMJ0OakaY6g8=", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "q": "^1.5.1" + } + }, + "conventional-changelog-core": { + "version": "2.0.11", + "resolved": "http://npm.byted.org/conventional-changelog-core/-/conventional-changelog-core-2.0.11.tgz", + "integrity": "sha512-HvTE6RlqeEZ/NFPtQeFLsIDOLrGP3bXYr7lFLMhCVsbduF1MXIe8OODkwMFyo1i9ku9NWBwVnVn0jDmIFXjDRg==", + "dev": true, + "requires": { + "conventional-changelog-writer": "^3.0.9", + "conventional-commits-parser": "^2.1.7", + "dateformat": "^3.0.0", + "get-pkg-repo": "^1.0.0", + "git-raw-commits": "^1.3.6", + "git-remote-origin-url": "^2.0.0", + "git-semver-tags": "^1.3.6", + "lodash": "^4.2.1", + "normalize-package-data": "^2.3.5", + "q": "^1.5.1", + "read-pkg": "^1.1.0", + "read-pkg-up": "^1.0.1", + "through2": "^2.0.0" + }, + "dependencies": { + "load-json-file": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "conventional-changelog-preset-loader": { + "version": "1.1.8", + "resolved": "http://npm.byted.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.8.tgz", + "integrity": "sha512-MkksM4G4YdrMlT2MbTsV2F6LXu/hZR0Tc/yenRrDIKRwBl/SP7ER4ZDlglqJsCzLJi4UonBc52Bkm5hzrOVCcw==", + "dev": true + }, + "conventional-changelog-writer": { + "version": "3.0.9", + "resolved": "http://npm.byted.org/conventional-changelog-writer/-/conventional-changelog-writer-3.0.9.tgz", + "integrity": "sha1-Suzf7zP/KlO7DPO4BxziHw6ZRjQ=", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "conventional-commits-filter": "^1.1.6", + "dateformat": "^3.0.0", + "handlebars": "^4.0.2", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.2.1", + "meow": "^4.0.0", + "semver": "^5.5.0", + "split": "^1.0.0", + "through2": "^2.0.0" + } + }, + "conventional-commit-types": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/conventional-commit-types/-/conventional-commit-types-2.2.0.tgz", + "integrity": "sha1-XblXOdbCEqy+e29lahG5QLqmiUY=", + "dev": true + }, + "conventional-commits-filter": { + "version": "1.1.6", + "resolved": "http://npm.byted.org/conventional-commits-filter/-/conventional-commits-filter-1.1.6.tgz", + "integrity": "sha1-Q4nNjlj+iXUMC1+1jx1/DMitODE=", + "dev": true, + "requires": { + "is-subset": "^0.1.1", + "modify-values": "^1.0.0" + } + }, + "conventional-commits-parser": { + "version": "2.1.7", + "resolved": "http://npm.byted.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz", + "integrity": "sha1-7KRe1hQNcrqXIu5BMmdNY55kTo4=", + "dev": true, + "requires": { + "JSONStream": "^1.0.4", + "is-text-path": "^1.0.0", + "lodash": "^4.2.1", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^2.0.0", + "trim-off-newlines": "^1.0.0" + } + }, + "conventional-recommended-bump": { + "version": "2.0.9", + "resolved": "http://npm.byted.org/conventional-recommended-bump/-/conventional-recommended-bump-2.0.9.tgz", + "integrity": "sha1-c5JCHn0ONRXz3yBAVyojzHOmipM=", + "dev": true, + "requires": { + "concat-stream": "^1.6.0", + "conventional-changelog-preset-loader": "^1.1.8", + "conventional-commits-filter": "^1.1.6", + "conventional-commits-parser": "^2.1.7", + "git-raw-commits": "^1.3.6", + "git-semver-tags": "^1.3.6", + "meow": "^4.0.0", + "q": "^1.5.1" + } + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "http://npm.byted.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "cookies": { + "version": "0.7.1", + "resolved": "http://npm.byted.org/cookies/-/cookies-0.7.1.tgz", + "integrity": "sha1-fIphX1SBxhq58WyDNzG8uPZjuZs=", + "dev": true, + "requires": { + "depd": "~1.1.1", + "keygrip": "~1.0.2" + } + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha1-kilzmMrjSTf8r9bsgTnBgFHwteA=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js": { + "version": "2.5.7", + "resolved": "http://npm.byted.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha1-+XJgj/DOrWi4QaFqky0LGDeRgU4=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cosmiconfig": { + "version": "5.0.5", + "resolved": "http://npm.byted.org/cosmiconfig/-/cosmiconfig-5.0.5.tgz", + "integrity": "sha1-qAnjwjBokc4Xq3A1nci99mH+LNA=", + "dev": true, + "requires": { + "is-directory": "^0.3.1", + "js-yaml": "^3.9.0", + "parse-json": "^4.0.0" + }, + "dependencies": { + "parse-json": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + } + } + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "http://npm.byted.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha1-yREbbzMEXEaX8UR4f5JUzcd8Rf8=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "requires": { + "capture-stack-trace": "^1.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "http://npm.byted.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha1-aRcMeLOrlXFHsriwRXLkfq0iQ/8=", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "http://npm.byted.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "http://npm.byted.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha1-OWz58xN/A+S45TLFj2mCVOAPgOw=", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "css-color-names": { + "version": "0.0.4", + "resolved": "http://npm.byted.org/css-color-names/-/css-color-names-0.0.4.tgz", + "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", + "dev": true + }, + "css-loader": { + "version": "0.28.11", + "resolved": "http://npm.byted.org/css-loader/-/css-loader-0.28.11.tgz", + "integrity": "sha1-w/mGSnAL4nEbtaJGKyOJsaOS2rc=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "css-selector-tokenizer": "^0.7.0", + "cssnano": "^3.10.0", + "icss-utils": "^2.1.0", + "loader-utils": "^1.0.2", + "lodash.camelcase": "^4.3.0", + "object-assign": "^4.1.1", + "postcss": "^5.0.6", + "postcss-modules-extract-imports": "^1.2.0", + "postcss-modules-local-by-default": "^1.2.0", + "postcss-modules-scope": "^1.1.0", + "postcss-modules-values": "^1.3.0", + "postcss-value-parser": "^3.3.0", + "source-list-map": "^2.0.0" + } + }, + "css-selector-tokenizer": { + "version": "0.7.0", + "resolved": "http://npm.byted.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", + "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", + "dev": true, + "requires": { + "cssesc": "^0.1.0", + "fastparse": "^1.1.1", + "regexpu-core": "^1.0.0" + }, + "dependencies": { + "regexpu-core": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/regexpu-core/-/regexpu-core-1.0.0.tgz", + "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + } + } + }, + "cssesc": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/cssesc/-/cssesc-0.1.0.tgz", + "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", + "dev": true + }, + "cssnano": { + "version": "3.10.0", + "resolved": "http://npm.byted.org/cssnano/-/cssnano-3.10.0.tgz", + "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", + "dev": true, + "requires": { + "autoprefixer": "^6.3.1", + "decamelize": "^1.1.2", + "defined": "^1.0.0", + "has": "^1.0.1", + "object-assign": "^4.0.1", + "postcss": "^5.0.14", + "postcss-calc": "^5.2.0", + "postcss-colormin": "^2.1.8", + "postcss-convert-values": "^2.3.4", + "postcss-discard-comments": "^2.0.4", + "postcss-discard-duplicates": "^2.0.1", + "postcss-discard-empty": "^2.0.1", + "postcss-discard-overridden": "^0.1.1", + "postcss-discard-unused": "^2.2.1", + "postcss-filter-plugins": "^2.0.0", + "postcss-merge-idents": "^2.1.5", + "postcss-merge-longhand": "^2.0.1", + "postcss-merge-rules": "^2.0.3", + "postcss-minify-font-values": "^1.0.2", + "postcss-minify-gradients": "^1.0.1", + "postcss-minify-params": "^1.0.4", + "postcss-minify-selectors": "^2.0.4", + "postcss-normalize-charset": "^1.1.0", + "postcss-normalize-url": "^3.0.7", + "postcss-ordered-values": "^2.1.0", + "postcss-reduce-idents": "^2.2.2", + "postcss-reduce-initial": "^1.0.0", + "postcss-reduce-transforms": "^1.0.3", + "postcss-svgo": "^2.1.1", + "postcss-unique-selectors": "^2.0.2", + "postcss-value-parser": "^3.2.3", + "postcss-zindex": "^2.0.1" + } + }, + "csso": { + "version": "2.3.2", + "resolved": "http://npm.byted.org/csso/-/csso-2.3.2.tgz", + "integrity": "sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=", + "dev": true, + "requires": { + "clap": "^1.0.9", + "source-map": "^0.5.3" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "http://npm.byted.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "cyclist": { + "version": "0.2.2", + "resolved": "http://npm.byted.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "dev": true + }, + "cz-conventional-changelog": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/cz-conventional-changelog/-/cz-conventional-changelog-2.1.0.tgz", + "integrity": "sha1-L0vHOQ4yROTfKT5ro1Hkx0Cnx2Q=", + "dev": true, + "requires": { + "conventional-commit-types": "^2.0.0", + "lodash.map": "^4.5.1", + "longest": "^1.0.1", + "right-pad": "^1.0.1", + "word-wrap": "^1.0.3" + } + }, + "dargs": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/dargs/-/dargs-4.1.0.tgz", + "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "date-fns": { + "version": "1.29.0", + "resolved": "http://npm.byted.org/date-fns/-/date-fns-1.29.0.tgz", + "integrity": "sha1-EuYJzcuTUScxHQTTMzTilgoqVOY=", + "dev": true + }, + "date-now": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "dateformat": { + "version": "3.0.3", + "resolved": "http://npm.byted.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha1-puN0maTZqc+F71hyBE1ikByYia4=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "http://npm.byted.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "dedent": { + "version": "0.7.0", + "resolved": "http://npm.byted.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", + "dev": true + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "http://npm.byted.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha1-xPp8lUBKF6nD6Mp+FTcxK3NjMKw=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "http://npm.byted.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "defaults": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "define-properties": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "dev": true, + "requires": { + "foreach": "^2.0.5", + "object-keys": "^1.0.8" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "dev": true + } + } + }, + "defined": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "del": { + "version": "2.2.2", + "resolved": "http://npm.byted.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" + } + }, + "delegates": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "des.js": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-indent": { + "version": "5.0.0", + "resolved": "http://npm.byted.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "http://npm.byted.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha1-QOjumPVaIUlgcUaSHGPhrl89KHU=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "dir-glob": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha1-CyBdK2rvmCOMooZZioIE0p0KADQ=", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "path-type": "^3.0.0" + }, + "dependencies": { + "path-type": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha1-zvMdyOCho7sNEFwM2Xzzv0f0428=", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto=", + "dev": true + }, + "dot-prop": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/dot-prop/-/dot-prop-3.0.0.tgz", + "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "duplexer": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "duplexify": { + "version": "3.6.0", + "resolved": "http://npm.byted.org/duplexify/-/duplexify-3.6.0.tgz", + "integrity": "sha1-WSkD9dgLONA3IgVBJk1poZj7NBA=", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.49", + "resolved": "http://npm.byted.org/electron-to-chromium/-/electron-to-chromium-1.3.49.tgz", + "integrity": "sha1-ZROEsNgfB4qWY5srNpdRQbeRUAQ=", + "dev": true + }, + "elegant-spinner": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", + "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", + "dev": true + }, + "elliptic": { + "version": "6.4.0", + "resolved": "http://npm.byted.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "encoding": { + "version": "0.1.12", + "resolved": "http://npm.byted.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "dev": true, + "requires": { + "iconv-lite": "~0.4.13" + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha1-7SljTRm6ukY7bOa4CjchPqtx7EM=", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", + "integrity": "sha1-40puqnkPYvzNcdk5WfVrK0MtsQo=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" + } + }, + "err-code": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/err-code/-/err-code-1.1.2.tgz", + "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", + "dev": true + }, + "errno": { + "version": "0.1.7", + "resolved": "http://npm.byted.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg=", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "http://npm.byted.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "error-inject": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/error-inject/-/error-inject-1.0.0.tgz", + "integrity": "sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc=", + "dev": true + }, + "es-abstract": { + "version": "1.12.0", + "resolved": "http://npm.byted.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha1-nbvdJ8aFbwABQhyhh4LXhr+KYWU=", + "dev": true, + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "dev": true, + "requires": { + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" + } + }, + "es6-promise": { + "version": "4.2.4", + "resolved": "http://npm.byted.org/es6-promise/-/es6-promise-4.2.4.tgz", + "integrity": "sha1-3EIhwrFlGHYL2MOaUtjzVvwA7Sk=", + "dev": true + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "http://npm.byted.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "dev": true, + "requires": { + "es6-promise": "^4.0.3" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "4.19.1", + "resolved": "http://npm.byted.org/eslint/-/eslint-4.19.1.tgz", + "integrity": "sha1-MtHWU+HZBAiFS/spbwdux+GGowA=", + "dev": true, + "requires": { + "ajv": "^5.3.0", + "babel-code-frame": "^6.22.0", + "chalk": "^2.1.0", + "concat-stream": "^1.6.0", + "cross-spawn": "^5.1.0", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^3.7.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^3.5.4", + "esquery": "^1.0.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.0.1", + "ignore": "^3.3.3", + "imurmurhash": "^0.1.4", + "inquirer": "^3.0.6", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.9.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.4", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^1.0.1", + "require-uncached": "^1.0.3", + "semver": "^5.3.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "~2.0.1", + "table": "4.0.2", + "text-table": "~0.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "globals": { + "version": "11.7.0", + "resolved": "http://npm.byted.org/globals/-/globals-11.7.0.tgz", + "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "eslint-config-standard": { + "version": "11.0.0", + "resolved": "http://npm.byted.org/eslint-config-standard/-/eslint-config-standard-11.0.0.tgz", + "integrity": "sha1-h+4NPJ2VOC3HYZWMuyPanuox4Lo=", + "dev": true + }, + "eslint-import-resolver-node": { + "version": "0.3.2", + "resolved": "http://npm.byted.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", + "integrity": "sha1-WPFfuDm40FdsqYBBNHaqskcttmo=", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.5.0" + } + }, + "eslint-module-utils": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", + "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", + "dev": true, + "requires": { + "debug": "^2.6.8", + "pkg-dir": "^1.0.0" + } + }, + "eslint-plugin-import": { + "version": "2.12.0", + "resolved": "http://npm.byted.org/eslint-plugin-import/-/eslint-plugin-import-2.12.0.tgz", + "integrity": "sha1-2tMXgSktZmSyUxf9BJ0uKy8CIF0=", + "dev": true, + "requires": { + "contains-path": "^0.1.0", + "debug": "^2.6.8", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.1", + "eslint-module-utils": "^2.2.0", + "has": "^1.0.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.3", + "read-pkg-up": "^2.0.0", + "resolve": "^1.6.0" + }, + "dependencies": { + "doctrine": { + "version": "1.5.0", + "resolved": "http://npm.byted.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + } + } + }, + "eslint-plugin-node": { + "version": "6.0.1", + "resolved": "http://npm.byted.org/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz", + "integrity": "sha1-vxlkIpgGQ3kxXXpLKnWTc3b6BeQ=", + "dev": true, + "requires": { + "ignore": "^3.3.6", + "minimatch": "^3.0.4", + "resolve": "^1.3.3", + "semver": "^5.4.1" + } + }, + "eslint-plugin-promise": { + "version": "3.8.0", + "resolved": "http://npm.byted.org/eslint-plugin-promise/-/eslint-plugin-promise-3.8.0.tgz", + "integrity": "sha1-ZevyeoRePB6db2pWIt3TgBaUtiE=", + "dev": true + }, + "eslint-plugin-standard": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/eslint-plugin-standard/-/eslint-plugin-standard-3.1.0.tgz", + "integrity": "sha1-Kp4hJZukxHwC1TstDJE11LECLUc=", + "dev": true + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "http://npm.byted.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha1-PzGA+y4pEBdxastMnW1bXDSmqB0=", + "dev": true + }, + "espree": { + "version": "3.5.4", + "resolved": "http://npm.byted.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha1-sPRHGHyKi+2US4FaZgvd9d610ac=", + "dev": true, + "requires": { + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha1-RJnt3NERDgshi6zy+n9/WfVcqAQ=", + "dev": true + }, + "esquery": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha1-QGxRZYsfWZGl+bYrHcJbAOPlxwg=", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "http://npm.byted.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "http://npm.byted.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "events": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha1-f8vbGY3HGVlDLv4ThCaE4FJaywI=", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "0.9.0", + "resolved": "http://npm.byted.org/execa/-/execa-0.9.0.tgz", + "integrity": "sha1-rbfOYs+YUHH2BYDetKiLnjRxLQE=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "http://npm.byted.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "dev": true + } + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-glob": { + "version": "2.2.2", + "resolved": "http://npm.byted.org/fast-glob/-/fast-glob-2.2.2.tgz", + "integrity": "sha1-cXIzOKybTg4v/x1nSKKhPV7TUr8=", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.0.1", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.1", + "micromatch": "^3.1.10" + }, + "dependencies": { + "is-glob": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "http://npm.byted.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fastparse": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/fastparse/-/fastparse-1.1.1.tgz", + "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=", + "dev": true + }, + "figgy-pudding": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/figgy-pudding/-/figgy-pudding-3.1.0.tgz", + "integrity": "sha1-p37SKEF1l2xCSzkLKYVp6d+G3R4=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + } + } + }, + "find-parent-dir": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", + "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "^0.3.1", + "del": "^2.0.2", + "graceful-fs": "^4.1.2", + "write": "^0.2.1" + } + }, + "flatten": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/flatten/-/flatten-1.0.2.tgz", + "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", + "dev": true + }, + "flush-write-stream": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha1-xdWG7zivYJdlC0m8QbVfq7GfNb0=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "foreach": { + "version": "2.0.5", + "resolved": "http://npm.byted.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "http://npm.byted.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "from2": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-extra": { + "version": "5.0.0", + "resolved": "http://npm.byted.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha1-QU0BEM3QZwVzTQVWUsVBEmDDGr0=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "http://npm.byted.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.4", + "resolved": "http://npm.byted.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha1-9B3LGvJYKvNpLaNvxVy9jhBBxCY=", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "http://npm.byted.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "get-own-enumerable-property-symbols": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz", + "integrity": "sha1-XErYfyg0xLm06EVJ3B4GUPs4wks=", + "dev": true + }, + "get-pkg-repo": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", + "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "meow": "^3.3.0", + "normalize-package-data": "^2.3.0", + "parse-github-repo-url": "^1.3.0", + "through2": "^2.0.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "indent-string": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "meow": { + "version": "3.7.0", + "resolved": "http://npm.byted.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + } + } + }, + "get-port": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "http://npm.byted.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "git-raw-commits": { + "version": "1.3.6", + "resolved": "http://npm.byted.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz", + "integrity": "sha1-J8NaMqZ3d8Hs1BKiOabBnXG5Wv8=", + "dev": true, + "requires": { + "dargs": "^4.0.1", + "lodash.template": "^4.0.2", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^2.0.0" + } + }, + "git-remote-origin-url": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", + "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", + "dev": true, + "requires": { + "gitconfiglocal": "^1.0.0", + "pify": "^2.3.0" + } + }, + "git-semver-tags": { + "version": "1.3.6", + "resolved": "http://npm.byted.org/git-semver-tags/-/git-semver-tags-1.3.6.tgz", + "integrity": "sha1-NX6gH3KAeU/gkn8oBr7mQU0sq6U=", + "dev": true, + "requires": { + "meow": "^4.0.0", + "semver": "^5.5.0" + } + }, + "gitconfiglocal": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", + "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", + "dev": true, + "requires": { + "ini": "^1.3.2" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "http://npm.byted.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true + }, + "global-modules-path": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/global-modules-path/-/global-modules-path-2.1.0.tgz", + "integrity": "sha1-kj7FJOhya7DBpO1LjiHh/4DIi7s=", + "dev": true + }, + "globals": { + "version": "9.18.0", + "resolved": "http://npm.byted.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=", + "dev": true + }, + "globby": { + "version": "5.0.0", + "resolved": "http://npm.byted.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "got": { + "version": "6.7.1", + "resolved": "http://npm.byted.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "requires": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "http://npm.byted.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "handlebars": { + "version": "4.0.11", + "resolved": "http://npm.byted.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "dev": true, + "requires": { + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" + } + }, + "has": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/has/-/has-1.0.3.tgz", + "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "http://npm.byted.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.4", + "resolved": "http://npm.byted.org/hash.js/-/hash.js-1.1.4.tgz", + "integrity": "sha1-i1Dh811RvQHl7Z7OTb41Scz6Cjw=", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "highlight.js": { + "version": "9.12.0", + "resolved": "http://npm.byted.org/highlight.js/-/highlight.js-9.12.0.tgz", + "integrity": "sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4=", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.6.0", + "resolved": "http://npm.byted.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha1-IyNbKasjDFdqqw1PE/wEawsDgiI=", + "dev": true + }, + "html-comment-regex": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz", + "integrity": "sha1-ZouTd26q5V696POtRkswekljYl4=", + "dev": true + }, + "http-assert": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/http-assert/-/http-assert-1.3.0.tgz", + "integrity": "sha1-oxpc+IyHPsu1eWkH1NbxMujAHko=", + "dev": true, + "requires": { + "deep-equal": "~1.0.1", + "http-errors": "~1.6.1" + } + }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "http://npm.byted.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha1-ObDhat2bYFvwqe89nar0hDtMrNI=", + "dev": true + }, + "http-errors": { + "version": "1.6.3", + "resolved": "http://npm.byted.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "http-proxy-agent": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", + "integrity": "sha1-5IIb7vWyFCogJr1zkm/lN2McVAU=", + "dev": true, + "requires": { + "agent-base": "4", + "debug": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "https-proxy-agent": { + "version": "2.2.1", + "resolved": "http://npm.byted.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", + "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", + "dev": true, + "requires": { + "agent-base": "^4.1.0", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "humanize-ms": { + "version": "1.2.1", + "resolved": "http://npm.byted.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", + "dev": true, + "requires": { + "ms": "^2.0.0" + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "http://npm.byted.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha1-KXhx9jvlB63Pv8pxXQzQ7thOmmM=", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "icss-replace-symbols": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", + "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", + "dev": true + }, + "icss-utils": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/icss-utils/-/icss-utils-2.1.0.tgz", + "integrity": "sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "postcss": { + "version": "6.0.23", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha1-YcgswyisYOZ3ZF+XkFTrmLwOMyQ=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "ieee754": { + "version": "1.1.12", + "resolved": "http://npm.byted.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha1-UL8k5bnIu5ivSWTJQc2wkY2ntgs=", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "ignore": { + "version": "3.3.10", + "resolved": "http://npm.byted.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=", + "dev": true + }, + "import-local": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha1-Xk/9wD9P5sAJxnKb6yljHC+CJ7w=", + "dev": true, + "requires": { + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + } + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "http://npm.byted.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "http://npm.byted.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "http://npm.byted.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc=", + "dev": true + }, + "inquirer": { + "version": "3.3.0", + "resolved": "http://npm.byted.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha1-ndLyrXZdyrH/BEO0kUQqILoifck=", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "http://npm.byted.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "ip": { + "version": "1.1.5", + "resolved": "http://npm.byted.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "is-absolute-url": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", + "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "http://npm.byted.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-callable": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", + "dev": true + }, + "is-ci": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/is-ci/-/is-ci-1.1.0.tgz", + "integrity": "sha1-JH5BYueGDOu9rzC3dNawrH3P56U=", + "dev": true, + "requires": { + "ci-info": "^1.0.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", + "dev": true + } + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-generator-function": { + "version": "1.0.7", + "resolved": "http://npm.byted.org/is-generator-function/-/is-generator-function-1.0.7.tgz", + "integrity": "sha1-0hMuUpuwAAp/gHlNS99c1eWBNSI=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-observable": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/is-observable/-/is-observable-1.1.0.tgz", + "integrity": "sha1-s+mGyPRN6VCGfKtUA/WjRlAFl14=", + "dev": true, + "requires": { + "symbol-observable": "^1.1.0" + }, + "dependencies": { + "symbol-observable": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha1-wiaIrtTqs83C3+rLtWFmBWCgCAQ=", + "dev": true + } + } + }, + "is-odd": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha1-dkZiRnH9fqVYzNmieVGC8pWPGyQ=", + "dev": true, + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=", + "dev": true + } + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha1-WsSLNF72dTOb1sekipEhELJBz1I=", + "dev": true, + "requires": { + "is-path-inside": "^1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-regexp": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", + "dev": true + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg=", + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-subset": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/is-subset/-/is-subset-0.1.1.tgz", + "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=", + "dev": true + }, + "is-svg": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/is-svg/-/is-svg-2.1.0.tgz", + "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=", + "dev": true, + "requires": { + "html-comment-regex": "^1.1.0" + } + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "dev": true + }, + "is-text-path": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "dev": true, + "requires": { + "text-extensions": "^1.0.0" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "jest-get-type": { + "version": "22.4.3", + "resolved": "http://npm.byted.org/jest-get-type/-/jest-get-type-22.4.3.tgz", + "integrity": "sha1-46hQTYR5NC3UQgI2syKGnxiQDOQ=", + "dev": true + }, + "jest-validate": { + "version": "23.0.1", + "resolved": "http://npm.byted.org/jest-validate/-/jest-validate-23.0.1.tgz", + "integrity": "sha1-zZ8BqJ0mu4hfEqhmdxXpyGWldU8=", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-get-type": "^22.1.0", + "leven": "^2.1.0", + "pretty-format": "^23.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "js-base64": { + "version": "2.4.5", + "resolved": "http://npm.byted.org/js-base64/-/js-base64-2.4.5.tgz", + "integrity": "sha1-4pPNPHyC8HDXAPx6HKCi5p8QH5I=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "http://npm.byted.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha1-6u1lbsg0TxD1J8a/obbiJE3hZ9E=", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsesc": { + "version": "0.5.0", + "resolved": "http://npm.byted.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "http://npm.byted.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "http://npm.byted.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "keygrip": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/keygrip/-/keygrip-1.0.2.tgz", + "integrity": "sha1-rTKXxVcGneqLz+ek+kkbdcXd65E=", + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "koa": { + "version": "2.5.1", + "resolved": "http://npm.byted.org/koa/-/koa-2.5.1.tgz", + "integrity": "sha1-efi5X41y0E/ppYqNpevW00EQP5w=", + "dev": true, + "requires": { + "accepts": "^1.2.2", + "content-disposition": "~0.5.0", + "content-type": "^1.0.0", + "cookies": "~0.7.0", + "debug": "*", + "delegates": "^1.0.0", + "depd": "^1.1.0", + "destroy": "^1.0.3", + "error-inject": "~1.0.0", + "escape-html": "~1.0.1", + "fresh": "^0.5.2", + "http-assert": "^1.1.0", + "http-errors": "^1.2.8", + "is-generator-function": "^1.0.3", + "koa-compose": "^4.0.0", + "koa-convert": "^1.2.0", + "koa-is-json": "^1.0.0", + "mime-types": "^2.0.7", + "on-finished": "^2.1.0", + "only": "0.0.2", + "parseurl": "^1.3.0", + "statuses": "^1.2.0", + "type-is": "^1.5.5", + "vary": "^1.0.0" + } + }, + "koa-compose": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/koa-compose/-/koa-compose-4.1.0.tgz", + "integrity": "sha1-UHMGuTcZAdtBEhyBLpI9DWfT6Hc=", + "dev": true + }, + "koa-convert": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/koa-convert/-/koa-convert-1.2.0.tgz", + "integrity": "sha1-2kCHXfSd4FOQmNFwC1CCDOvNIdA=", + "dev": true, + "requires": { + "co": "^4.6.0", + "koa-compose": "^3.0.0" + }, + "dependencies": { + "koa-compose": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/koa-compose/-/koa-compose-3.2.1.tgz", + "integrity": "sha1-qFzLQLfZhtjlo0Wzoazo6rz1Tec=", + "dev": true, + "requires": { + "any-promise": "^1.1.0" + } + } + } + }, + "koa-is-json": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/koa-is-json/-/koa-is-json-1.0.0.tgz", + "integrity": "sha1-JzwH7c3Ljfaiwat9We52SRRR7BQ=", + "dev": true + }, + "koa-range": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/koa-range/-/koa-range-0.3.0.tgz", + "integrity": "sha1-NYjjSWRzqDmhvSZNKkKx2FvX/qw=", + "dev": true, + "requires": { + "stream-slice": "^0.1.2" + } + }, + "koa-send": { + "version": "4.1.3", + "resolved": "http://npm.byted.org/koa-send/-/koa-send-4.1.3.tgz", + "integrity": "sha1-CCIge79SU6QUyPF2Xrwp+kE1PLY=", + "dev": true, + "requires": { + "debug": "^2.6.3", + "http-errors": "^1.6.1", + "mz": "^2.6.0", + "resolve-path": "^1.4.0" + } + }, + "koa-static": { + "version": "4.0.3", + "resolved": "http://npm.byted.org/koa-static/-/koa-static-4.0.3.tgz", + "integrity": "sha1-X5OtAPsZBduc5GZnwOi7fSKr/Ng=", + "dev": true, + "requires": { + "debug": "^3.1.0", + "koa-send": "^4.1.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "leb": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/leb/-/leb-0.3.0.tgz", + "integrity": "sha1-Mr7p+tFoMo1q6oUi2DP0GA7tHaM=", + "dev": true + }, + "lerna": { + "version": "3.0.0-alpha.1", + "resolved": "http://npm.byted.org/lerna/-/lerna-3.0.0-alpha.1.tgz", + "integrity": "sha1-r0Wi62s0vQUxGezYuLRVmHAVwaY=", + "dev": true, + "requires": { + "chalk": "^2.3.1", + "cmd-shim": "^2.0.2", + "columnify": "^1.5.4", + "command-join": "^2.0.0", + "conventional-changelog-angular": "^1.6.6", + "conventional-changelog-core": "^2.0.5", + "conventional-recommended-bump": "^2.0.6", + "dedent": "^0.7.0", + "escape-string-regexp": "^1.0.5", + "execa": "^0.9.0", + "find-up": "^2.1.0", + "fs-extra": "^5.0.0", + "get-port": "^3.2.0", + "get-stream": "^3.0.0", + "glob-parent": "^3.1.0", + "globby": "^8.0.1", + "graceful-fs": "^4.1.11", + "import-local": "^1.0.0", + "inquirer": "^5.1.0", + "is-ci": "^1.0.10", + "load-json-file": "^4.0.0", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", + "npm-package-arg": "^6.0.0", + "npmlog": "^4.1.2", + "p-finally": "^1.0.0", + "p-map": "^1.2.0", + "p-map-series": "^1.0.0", + "p-reduce": "^1.0.0", + "p-waterfall": "^1.0.0", + "package-json": "^4.0.1", + "path-exists": "^3.0.0", + "read-cmd-shim": "^1.0.1", + "read-pkg": "^3.0.0", + "rimraf": "^2.6.1", + "safe-buffer": "^5.1.1", + "semver": "^5.5.0", + "signal-exit": "^3.0.2", + "slash": "^1.0.0", + "strong-log-transformer": "^1.0.6", + "temp-write": "^3.3.0", + "write-file-atomic": "^2.3.0", + "write-json-file": "^2.2.0", + "write-pkg": "^3.1.0", + "yargs": "^11.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "globby": { + "version": "8.0.1", + "resolved": "http://npm.byted.org/globby/-/globby-8.0.1.tgz", + "integrity": "sha1-ta1IuKqAs1uBT8EoHsyFHx0rW1A=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + }, + "inquirer": { + "version": "5.2.0", + "resolved": "http://npm.byted.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha1-2zUMK3Paynf/EkOWLp8i8JloVyY=", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha1-zvMdyOCho7sNEFwM2Xzzv0f0428=", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "lerna-changelog": { + "version": "0.8.0", + "resolved": "http://npm.byted.org/lerna-changelog/-/lerna-changelog-0.8.0.tgz", + "integrity": "sha1-pSVTHoUPA8olUSrMU1pxL84yzIY=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "cli-highlight": "^1.2.3", + "execa": "^0.10.0", + "make-fetch-happen": "^4.0.1", + "normalize-git-url": "^3.0.2", + "p-map": "^1.2.0", + "progress": "^2.0.0", + "string.prototype.padend": "^3.0.0", + "yargs": "^11.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "http://npm.byted.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "0.10.0", + "resolved": "http://npm.byted.org/execa/-/execa-0.10.0.tgz", + "integrity": "sha1-/0Vqj1P5D47MxxqW0Rvfx/CCy1A=", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "leven": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lint-staged": { + "version": "7.2.0", + "resolved": "http://npm.byted.org/lint-staged/-/lint-staged-7.2.0.tgz", + "integrity": "sha512-jPoIMbmgtWMUrz/l0rhBVa1j6H71zr0rEoxDWBA333PZcaqBvELdg0Sf4tdGHlwrBM0GXaXMVgTRkLTm2vA7Jg==", + "dev": true, + "requires": { + "app-root-path": "^2.0.1", + "chalk": "^2.3.1", + "commander": "^2.14.1", + "cosmiconfig": "^5.0.2", + "debug": "^3.1.0", + "dedent": "^0.7.0", + "execa": "^0.9.0", + "find-parent-dir": "^0.3.0", + "is-glob": "^4.0.0", + "is-windows": "^1.0.2", + "jest-validate": "^23.0.0", + "listr": "^0.14.1", + "lodash": "^4.17.5", + "log-symbols": "^2.2.0", + "micromatch": "^3.1.8", + "npm-which": "^3.0.1", + "p-map": "^1.1.1", + "path-is-inside": "^1.0.2", + "pify": "^3.0.0", + "please-upgrade-node": "^3.0.2", + "staged-git-files": "1.1.1", + "string-argv": "^0.0.2", + "stringify-object": "^3.2.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "is-glob": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "listr": { + "version": "0.14.1", + "resolved": "http://npm.byted.org/listr/-/listr-0.14.1.tgz", + "integrity": "sha1-inr6SnE1zuTJIdEo4LffxuUi1D0=", + "dev": true, + "requires": { + "@samverschueren/stream-to-observable": "^0.3.0", + "cli-truncate": "^0.2.1", + "figures": "^1.7.0", + "indent-string": "^2.1.0", + "is-observable": "^1.1.0", + "is-promise": "^2.1.0", + "is-stream": "^1.1.0", + "listr-silent-renderer": "^1.1.1", + "listr-update-renderer": "^0.4.0", + "listr-verbose-renderer": "^0.4.0", + "log-symbols": "^1.0.2", + "log-update": "^1.0.2", + "ora": "^0.2.3", + "p-map": "^1.1.1", + "rxjs": "^6.1.0", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "figures": { + "version": "1.7.0", + "resolved": "http://npm.byted.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "indent-string": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "dev": true, + "requires": { + "chalk": "^1.0.0" + } + }, + "rxjs": { + "version": "6.2.1", + "resolved": "http://npm.byted.org/rxjs/-/rxjs-6.2.1.tgz", + "integrity": "sha1-JGzr7BiabLwUOj759i1vTJGBPKE=", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + } + } + }, + "listr-silent-renderer": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", + "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=", + "dev": true + }, + "listr-update-renderer": { + "version": "0.4.0", + "resolved": "http://npm.byted.org/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz", + "integrity": "sha1-NE2YDaLKLosUW6MFkI8yrj9MyKc=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "cli-truncate": "^0.2.1", + "elegant-spinner": "^1.0.1", + "figures": "^1.7.0", + "indent-string": "^3.0.0", + "log-symbols": "^1.0.2", + "log-update": "^1.0.2", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "figures": { + "version": "1.7.0", + "resolved": "http://npm.byted.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "dev": true, + "requires": { + "chalk": "^1.0.0" + } + } + } + }, + "listr-verbose-renderer": { + "version": "0.4.1", + "resolved": "http://npm.byted.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", + "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "cli-cursor": "^1.0.2", + "date-fns": "^1.27.2", + "figures": "^1.7.0" + }, + "dependencies": { + "cli-cursor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "http://npm.byted.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + } + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "dev": true + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "http://npm.byted.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha1-G3eTz3JZ6jj7NmHU04syYK+K5Oc=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "http://npm.byted.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "http://npm.byted.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.map": { + "version": "4.6.0", + "resolved": "http://npm.byted.org/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=", + "dev": true + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "http://npm.byted.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "lodash.template": { + "version": "4.4.0", + "resolved": "http://npm.byted.org/lodash.template/-/lodash.template-4.4.0.tgz", + "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", + "dev": true, + "requires": { + "lodash._reinterpolate": "~3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", + "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", + "dev": true, + "requires": { + "lodash._reinterpolate": "~3.0.0" + } + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "http://npm.byted.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha1-V0Dhxdbw39pK2TI7UzIQfva0xAo=", + "dev": true, + "requires": { + "chalk": "^2.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "log-update": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/log-update/-/log-update-1.0.2.tgz", + "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", + "dev": true, + "requires": { + "ansi-escapes": "^1.0.0", + "cli-cursor": "^1.0.2" + }, + "dependencies": { + "ansi-escapes": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + } + } + }, + "long": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "^3.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "http://npm.byted.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha1-oRdc80lt/IQ2wVbDNLSVWZK85pw=", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "make-fetch-happen": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz", + "integrity": "sha1-FBSXy4ePJDupMTbIPYq6EsIWwIM=", + "dev": true, + "requires": { + "agentkeepalive": "^3.4.1", + "cacache": "^11.0.1", + "http-cache-semantics": "^3.8.1", + "http-proxy-agent": "^2.1.0", + "https-proxy-agent": "^2.2.1", + "lru-cache": "^4.1.2", + "mississippi": "^3.0.0", + "node-fetch-npm": "^2.0.2", + "promise-retry": "^1.1.1", + "socks-proxy-agent": "^4.0.0", + "ssri": "^6.0.0" + } + }, + "mamacro": { + "version": "0.0.3", + "resolved": "http://npm.byted.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha1-rSyVdhl8nxq/MI0Hh4Zb2XWj8+Q=", + "dev": true + }, + "map-cache": { + "version": "0.2.2", + "resolved": "http://npm.byted.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "math-expression-evaluator": { + "version": "1.2.17", + "resolved": "http://npm.byted.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", + "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=", + "dev": true + }, + "md5.js": { + "version": "1.3.4", + "resolved": "http://npm.byted.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "mem": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "http://npm.byted.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "meow": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha1-1IWY9vSxRy81v2MXqVlFrONH+XU=", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha1-zvMdyOCho7sNEFwM2Xzzv0f0428=", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + } + } + }, + "merge2": { + "version": "1.2.2", + "resolved": "http://npm.byted.org/merge2/-/merge2-1.2.2.tgz", + "integrity": "sha1-AyEuPajYbE2FI869YxgZNBT5TjQ=", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "http://npm.byted.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "dev": true + } + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha1-8IA1HIZbDcViqEYpZtqlNUPHik0=", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime-db": { + "version": "1.33.0", + "resolved": "http://npm.byted.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha1-o0kgUKXLm2NFBUHjnZeI0icng9s=", + "dev": true + }, + "mime-types": { + "version": "2.1.18", + "resolved": "http://npm.byted.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha1-bzI/YKg9ERRvgx/xH9ZuL+VQO7g=", + "dev": true, + "requires": { + "mime-db": "~1.33.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha1-LhlN4ERibUoQ5/f7wAznPoPk1cc=", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "http://npm.byted.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "http://npm.byted.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha1-+6TIGRM54T7PTWG+sD8HAQPz2VQ=", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" + } + }, + "mississippi": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha1-6goykfl+C16HdrNj1fChLZTGcCI=", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha1-pJ5yaNzhoNlpjkUybFYm3zVD0P4=", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://npm.byted.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "modify-values": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/modify-values/-/modify-values-1.0.1.tgz", + "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", + "dev": true + }, + "moment": { + "version": "2.22.2", + "resolved": "http://npm.byted.org/moment/-/moment-2.22.2.tgz", + "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=", + "dev": true + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "http://npm.byted.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "mz": { + "version": "2.7.0", + "resolved": "http://npm.byted.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha1-lQCAV6Vsr63CvGPd5/n/aVWUjjI=", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "nan": { + "version": "2.10.0", + "resolved": "http://npm.byted.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha1-ltDNYQ69WNS03pzAxoKM2pnHVI8=", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.9", + "resolved": "http://npm.byted.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha1-h59xUMstq3pHElkGbBBO7m4Pp8I=", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "dev": true + } + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "negotiator": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", + "dev": true + }, + "neo-async": { + "version": "2.5.1", + "resolved": "http://npm.byted.org/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha1-rLkJ4yex6H7J7xX0G4omlRKtQe4=", + "dev": true + }, + "nice-try": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/nice-try/-/nice-try-1.0.4.tgz", + "integrity": "sha1-2Tli9sUvLBVYwPvabVEoGfHv4cQ=", + "dev": true + }, + "node-fetch-npm": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", + "integrity": "sha1-cljJBGGC3KNFtCCO2pGNrzNpf/c=", + "dev": true, + "requires": { + "encoding": "^0.1.11", + "json-parse-better-errors": "^1.0.0", + "safe-buffer": "^5.1.1" + } + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha1-X5QmPUBPbkR2fXJpAf/wVHjWAN8=", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^1.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.0", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "normalize-git-url": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/normalize-git-url/-/normalize-git-url-3.0.2.tgz", + "integrity": "sha1-jl8Uvgva7bc+ByADEKpBbCc1D8Q=", + "dev": true + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "http://npm.byted.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "http://npm.byted.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true + }, + "normalize-url": { + "version": "1.9.1", + "resolved": "http://npm.byted.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" + }, + "dependencies": { + "sort-keys": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + } + } + }, + "npm-package-arg": { + "version": "6.1.0", + "resolved": "http://npm.byted.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", + "integrity": "sha1-Fa4eJ1ilAn77TCUFVLhac323/ME=", + "dev": true, + "requires": { + "hosted-git-info": "^2.6.0", + "osenv": "^0.1.5", + "semver": "^5.5.0", + "validate-npm-package-name": "^3.0.0" + } + }, + "npm-path": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/npm-path/-/npm-path-2.0.4.tgz", + "integrity": "sha1-xkE0el/51qCeTZvOVYDE9QUnjmQ=", + "dev": true, + "requires": { + "which": "^1.2.10" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npm-which": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/npm-which/-/npm-which-3.0.1.tgz", + "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=", + "dev": true, + "requires": { + "commander": "^2.9.0", + "npm-path": "^2.0.2", + "which": "^1.2.10" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "http://npm.byted.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=", + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "http://npm.byted.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "http://npm.byted.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "object-keys": { + "version": "1.0.12", + "resolved": "http://npm.byted.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha1-CcU4VTd1dTEMymL1W7M0q/97PtI=", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "only": { + "version": "0.0.2", + "resolved": "http://npm.byted.org/only/-/only-0.0.2.tgz", + "integrity": "sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q=", + "dev": true + }, + "optimist": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.3", + "resolved": "http://npm.byted.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "http://npm.byted.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "ora": { + "version": "0.2.3", + "resolved": "http://npm.byted.org/ora/-/ora-0.2.3.tgz", + "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "cli-cursor": "^1.0.2", + "cli-spinners": "^0.1.2", + "object-assign": "^4.0.1" + }, + "dependencies": { + "cli-cursor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + } + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha1-QrwpAKa1uL0XN2yOiCtlr8zyS/I=", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + }, + "dependencies": { + "execa": { + "version": "0.7.0", + "resolved": "http://npm.byted.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + } + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha1-hc36+uso6Gd/QW4odZK18/SepBA=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha1-uGvV8MJWkJEcdZD8v8IBDVSzzLg=", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-map": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha1-5OlPMR6rvIYzoeeZCBZfyiYkG2s=", + "dev": true + }, + "p-map-series": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-map-series/-/p-map-series-1.0.0.tgz", + "integrity": "sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=", + "dev": true, + "requires": { + "p-reduce": "^1.0.0" + } + }, + "p-reduce": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-reduce/-/p-reduce-1.0.0.tgz", + "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", + "dev": true + }, + "p-try": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "p-waterfall": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-waterfall/-/p-waterfall-1.0.0.tgz", + "integrity": "sha1-ftlLPOszMngjU69qrhGqn8I1uwA=", + "dev": true, + "requires": { + "p-reduce": "^1.0.0" + } + }, + "package-json": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "requires": { + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" + } + }, + "pako": { + "version": "1.0.6", + "resolved": "http://npm.byted.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha1-AQEhG6pwxLykoPY/Igbpe3368lg=", + "dev": true + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "dev": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "http://npm.byted.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha1-9r8pOBgzK9DatU77Fgh3JHRebKg=", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" + } + }, + "parse-github-repo-url": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz", + "integrity": "sha1-nn2LslKmy2ukJZUGC3v23z28H1A=", + "dev": true + }, + "parse-json": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse5": { + "version": "3.0.3", + "resolved": "http://npm.byted.org/parse5/-/parse5-3.0.3.tgz", + "integrity": "sha1-BC95L/3TaFFVHPTp4Gazh0q0W1w=", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "http://npm.byted.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "http://npm.byted.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-type": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pbkdf2": { + "version": "3.0.16", + "resolved": "http://npm.byted.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha1-dAQgjsawG2LYW/g4U6gGT42cKlw=", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "dev": true, + "requires": { + "find-up": "^1.0.0" + } + }, + "please-upgrade-node": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/please-upgrade-node/-/please-upgrade-node-3.0.2.tgz", + "integrity": "sha1-e56uyjWqSkPW69/RBhbAQvmoOsw=", + "dev": true, + "requires": { + "semver-compare": "^1.0.0" + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "http://npm.byted.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha1-KYuJ34uTsCIdv0Ia0rGx6iP8Z3c=", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "http://npm.byted.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "js-base64": "^2.1.9", + "source-map": "^0.5.6", + "supports-color": "^3.2.3" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "postcss-calc": { + "version": "5.3.1", + "resolved": "http://npm.byted.org/postcss-calc/-/postcss-calc-5.3.1.tgz", + "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", + "dev": true, + "requires": { + "postcss": "^5.0.2", + "postcss-message-helpers": "^2.0.0", + "reduce-css-calc": "^1.2.6" + } + }, + "postcss-colormin": { + "version": "2.2.2", + "resolved": "http://npm.byted.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz", + "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", + "dev": true, + "requires": { + "colormin": "^1.0.5", + "postcss": "^5.0.13", + "postcss-value-parser": "^3.2.3" + } + }, + "postcss-convert-values": { + "version": "2.6.1", + "resolved": "http://npm.byted.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", + "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", + "dev": true, + "requires": { + "postcss": "^5.0.11", + "postcss-value-parser": "^3.1.2" + } + }, + "postcss-discard-comments": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", + "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", + "dev": true, + "requires": { + "postcss": "^5.0.14" + } + }, + "postcss-discard-duplicates": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", + "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-discard-empty": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", + "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", + "dev": true, + "requires": { + "postcss": "^5.0.14" + } + }, + "postcss-discard-overridden": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", + "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", + "dev": true, + "requires": { + "postcss": "^5.0.16" + } + }, + "postcss-discard-unused": { + "version": "2.2.3", + "resolved": "http://npm.byted.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", + "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", + "dev": true, + "requires": { + "postcss": "^5.0.14", + "uniqs": "^2.0.0" + } + }, + "postcss-filter-plugins": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz", + "integrity": "sha1-giRf34IzcEFkXkdxFNjlk6oYuOw=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-merge-idents": { + "version": "2.1.7", + "resolved": "http://npm.byted.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", + "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.10", + "postcss-value-parser": "^3.1.1" + } + }, + "postcss-merge-longhand": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", + "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-merge-rules": { + "version": "2.1.2", + "resolved": "http://npm.byted.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", + "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", + "dev": true, + "requires": { + "browserslist": "^1.5.2", + "caniuse-api": "^1.5.2", + "postcss": "^5.0.4", + "postcss-selector-parser": "^2.2.2", + "vendors": "^1.0.0" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "http://npm.byted.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "^1.0.30000639", + "electron-to-chromium": "^1.2.7" + } + } + } + }, + "postcss-message-helpers": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", + "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=", + "dev": true + }, + "postcss-minify-font-values": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", + "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.2" + } + }, + "postcss-minify-gradients": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", + "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", + "dev": true, + "requires": { + "postcss": "^5.0.12", + "postcss-value-parser": "^3.3.0" + } + }, + "postcss-minify-params": { + "version": "1.2.2", + "resolved": "http://npm.byted.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", + "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.1", + "postcss": "^5.0.2", + "postcss-value-parser": "^3.0.2", + "uniqs": "^2.0.0" + } + }, + "postcss-minify-selectors": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", + "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.2", + "has": "^1.0.1", + "postcss": "^5.0.14", + "postcss-selector-parser": "^2.0.0" + } + }, + "postcss-modules-extract-imports": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz", + "integrity": "sha1-ZhQOzs447wa/DT41XWm/WdFB6oU=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "postcss": { + "version": "6.0.23", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha1-YcgswyisYOZ3ZF+XkFTrmLwOMyQ=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-local-by-default": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz", + "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=", + "dev": true, + "requires": { + "css-selector-tokenizer": "^0.7.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "postcss": { + "version": "6.0.23", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha1-YcgswyisYOZ3ZF+XkFTrmLwOMyQ=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-scope": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz", + "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=", + "dev": true, + "requires": { + "css-selector-tokenizer": "^0.7.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "postcss": { + "version": "6.0.23", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha1-YcgswyisYOZ3ZF+XkFTrmLwOMyQ=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-values": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz", + "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=", + "dev": true, + "requires": { + "icss-replace-symbols": "^1.1.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "postcss": { + "version": "6.0.23", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha1-YcgswyisYOZ3ZF+XkFTrmLwOMyQ=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-normalize-charset": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", + "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", + "dev": true, + "requires": { + "postcss": "^5.0.5" + } + }, + "postcss-normalize-url": { + "version": "3.0.8", + "resolved": "http://npm.byted.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", + "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", + "dev": true, + "requires": { + "is-absolute-url": "^2.0.0", + "normalize-url": "^1.4.0", + "postcss": "^5.0.14", + "postcss-value-parser": "^3.2.3" + } + }, + "postcss-ordered-values": { + "version": "2.2.3", + "resolved": "http://npm.byted.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", + "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", + "dev": true, + "requires": { + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.1" + } + }, + "postcss-reduce-idents": { + "version": "2.4.0", + "resolved": "http://npm.byted.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", + "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", + "dev": true, + "requires": { + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.2" + } + }, + "postcss-reduce-initial": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", + "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-reduce-transforms": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", + "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.8", + "postcss-value-parser": "^3.0.1" + } + }, + "postcss-selector-parser": { + "version": "2.2.3", + "resolved": "http://npm.byted.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", + "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", + "dev": true, + "requires": { + "flatten": "^1.0.2", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-svgo": { + "version": "2.1.6", + "resolved": "http://npm.byted.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", + "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", + "dev": true, + "requires": { + "is-svg": "^2.0.0", + "postcss": "^5.0.14", + "postcss-value-parser": "^3.2.3", + "svgo": "^0.7.0" + } + }, + "postcss-unique-selectors": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", + "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.1", + "postcss": "^5.0.4", + "uniqs": "^2.0.0" + } + }, + "postcss-value-parser": { + "version": "3.3.0", + "resolved": "http://npm.byted.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", + "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", + "dev": true + }, + "postcss-zindex": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", + "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.4", + "uniqs": "^2.0.0" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "pretty-format": { + "version": "23.0.1", + "resolved": "http://npm.byted.org/pretty-format/-/pretty-format-23.0.1.tgz", + "integrity": "sha1-1h0GUmjkx1kIO8y8onoBrXx2AfQ=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0", + "ansi-styles": "^3.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + } + } + }, + "private": { + "version": "0.1.8", + "resolved": "http://npm.byted.org/private/-/private-0.1.8.tgz", + "integrity": "sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "http://npm.byted.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=", + "dev": true + }, + "progress": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "promise-retry": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/promise-retry/-/promise-retry-1.1.1.tgz", + "integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=", + "dev": true, + "requires": { + "err-code": "^1.0.0", + "retry": "^0.10.0" + } + }, + "prr": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "http://npm.byted.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha1-RuuRByBr9zSJ+LhbadkTNMZhCZQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "http://npm.byted.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha1-NlE74karJ1cLGjdKXOJ4v9dDcM4=", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "http://npm.byted.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "query-string": { + "version": "4.3.4", + "resolved": "http://npm.byted.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dev": true, + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "querystring": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, + "randombytes": { + "version": "2.0.6", + "resolved": "http://npm.byted.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha1-0wLFIpSFiISKjTAMkytEwkIx2oA=", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha1-ySGW/IarQr6YPxvzF3giSTHWFFg=", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "rc": { + "version": "1.2.8", + "resolved": "http://npm.byted.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "read-cmd-shim": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz", + "integrity": "sha1-LV0Vd4ajfAVdIgd8MsU/gynpHHs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://npm.byted.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "reduce-css-calc": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2", + "math-expression-evaluator": "^1.2.14", + "reduce-function-call": "^1.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "http://npm.byted.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "reduce-function-call": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz", + "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "http://npm.byted.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "regenerate": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha1-SoVuxLVuQHfFV1icroXnpMiGmhE=", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "http://npm.byted.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=", + "dev": true + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "http://npm.byted.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha1-HkmWg3Ix2ot/PPQRTXG1aRoGgN0=", + "dev": true, + "requires": { + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpp": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/regexpp/-/regexpp-1.1.0.tgz", + "integrity": "sha1-DjUW3Qt5BPQT0tQZPc5GGMOmias=", + "dev": true + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "registry-auth-token": { + "version": "3.3.2", + "resolved": "http://npm.byted.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha1-hR/UkDjuy1hpERFa+EUmDuyYPyA=", + "dev": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "^1.0.1" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "http://npm.byted.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" + } + }, + "resolve": { + "version": "1.8.1", + "resolved": "http://npm.byted.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha1-gvHsGaQjrB+9CAsLqwa6NuhKeiY=", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + } + } + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + }, + "resolve-path": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/resolve-path/-/resolve-path-1.4.0.tgz", + "integrity": "sha1-xL2p9e+y/OZSR4c6s2u02DT+Fvc=", + "dev": true, + "requires": { + "http-errors": "~1.6.2", + "path-is-absolute": "1.0.1" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "http://npm.byted.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", + "dev": true + }, + "retry": { + "version": "0.10.1", + "resolved": "http://npm.byted.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "http://npm.byted.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "right-pad": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/right-pad/-/right-pad-1.0.1.tgz", + "integrity": "sha1-jKCMLLtbVedNr6lr9/0aJ9VoyNA=", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "http://npm.byted.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha1-ocGm9iR1FXe6XQeRTLyShQWFiQw=", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "http://npm.byted.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", + "dev": true + }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "http://npm.byted.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true, + "requires": { + "rx-lite": "*" + } + }, + "rxjs": { + "version": "5.5.11", + "resolved": "http://npm.byted.org/rxjs/-/rxjs-5.5.11.tgz", + "integrity": "sha1-9zMCfKQ+O+xrmURzvkq5itQ87Yc=", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "http://npm.byted.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "http://npm.byted.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", + "dev": true + }, + "sax": { + "version": "1.2.4", + "resolved": "http://npm.byted.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", + "dev": true + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "http://npm.byted.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha1-IYNvBgiqwXt4+ePiTa/xSlyhOj4=", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + }, + "dependencies": { + "ajv": { + "version": "6.5.1", + "resolved": "http://npm.byted.org/ajv/-/ajv-6.5.1.tgz", + "integrity": "sha1-iOvBJjxxM5N9EIuAxVcuZOHZMi0=", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" + } + }, + "ajv-keywords": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "dev": true + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "http://npm.byted.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", + "dev": true + } + } + }, + "semver": { + "version": "5.5.0", + "resolved": "http://npm.byted.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha1-3Eu8emyp2Rbe5dQ1FvAJK1j3uKs=", + "dev": true + }, + "semver-compare": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true + }, + "serialize-javascript": { + "version": "1.5.0", + "resolved": "http://npm.byted.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", + "integrity": "sha1-GqM2FiyIqJDdrVOEuuvJOmVRYf4=", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "http://npm.byted.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha1-N6XPC4HsvGlD3hCbopYNGyZYSuc=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha1-BE8aSdiEL/MHqta1Be0Xi9lQE00=", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0" + } + }, + "smart-buffer": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/smart-buffer/-/smart-buffer-4.0.1.tgz", + "integrity": "sha1-B+ocqNTbJOtMrIZTfX0YmVIhrOM=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "http://npm.byted.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + } + }, + "socks": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/socks/-/socks-2.2.0.tgz", + "integrity": "sha1-FEmFszMc7Tq1zL7mQKt8t9Q/3R8=", + "dev": true, + "requires": { + "ip": "^1.1.5", + "smart-buffer": "^4.0.1" + } + }, + "socks-proxy-agent": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz", + "integrity": "sha1-WTa/i3B6mTB5xvN9sgkYIb/6ZHM=", + "dev": true, + "requires": { + "agent-base": "~4.2.0", + "socks": "~2.2.0" + } + }, + "sort-keys": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha1-qqR0A/eyRakvvJfqCPJQ1gh+0IU=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "http://npm.byted.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha1-cuLMNAlVQ+Q7LGKyxMENSpBU8lk=", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "http://npm.byted.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha1-Aoam3ovkJkEzhZTpfM6nXwosWF8=", + "dev": true, + "requires": { + "source-map": "^0.5.6" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "http://npm.byted.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha1-BaW01xU6GVvJLDxCW2nzsqlSTII=", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha1-LHrmEFbHFKW5ubKyr30xHvXHj+k=", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha1-meEZt6XaAOBUkcn6M4t5BII7QdA=", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha1-enzShHDMbToc/m1miG9rxDDTrIc=", + "dev": true + }, + "split": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/split/-/split-1.0.1.tgz", + "integrity": "sha1-YFvZvjA6pZ+zX5Ip++oN3snqB9k=", + "dev": true, + "requires": { + "through": "2" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "split2": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/split2/-/split2-2.2.0.tgz", + "integrity": "sha1-GGsldbz4PoW30YRldWI47k7kJJM=", + "dev": true, + "requires": { + "through2": "^2.0.2" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "ssri": { + "version": "6.0.0", + "resolved": "http://npm.byted.org/ssri/-/ssri-6.0.0.tgz", + "integrity": "sha1-/CG/yQ4DJ1rD4j1aQuOLihy8Ew0=", + "dev": true + }, + "staged-git-files": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/staged-git-files/-/staged-git-files-1.1.1.tgz", + "integrity": "sha512-H89UNKr1rQJvI1c/PIR3kiAMBV23yvR7LItZiV74HWZwzt7f3YHuujJ9nJZlt58WlFox7XQsOahexwk7nTe69A==", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "http://npm.byted.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "http://npm.byted.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.2", + "resolved": "http://npm.byted.org/stream-each/-/stream-each-1.2.2.tgz", + "integrity": "sha1-joxGP5HaiZF3h2WHP+TZYNj2Fr0=", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "http://npm.byted.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "stream-slice": { + "version": "0.1.2", + "resolved": "http://npm.byted.org/stream-slice/-/stream-slice-0.1.2.tgz", + "integrity": "sha1-LcT04bk2+xPz6zmi3vGTJ5jQeks=", + "dev": true + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, + "string-argv": { + "version": "0.0.2", + "resolved": "http://npm.byted.org/string-argv/-/string-argv-0.0.2.tgz", + "integrity": "sha1-2sMECGkMIfPDYwo/86BYd73L1zY=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string.prototype.padend": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz", + "integrity": "sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.4.3", + "function-bind": "^1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "stringify-object": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/stringify-object/-/stringify-object-3.2.2.tgz", + "integrity": "sha1-mFMFLlqI+2BaRM0nRFqiV61/+80=", + "dev": true, + "requires": { + "get-own-enumerable-property-symbols": "^2.0.1", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "strong-log-transformer": { + "version": "1.0.6", + "resolved": "http://npm.byted.org/strong-log-transformer/-/strong-log-transformer-1.0.6.tgz", + "integrity": "sha1-9/uTdYpppXEUAYEnfuoMLrEwH6M=", + "dev": true, + "requires": { + "byline": "^5.0.0", + "duplexer": "^0.1.1", + "minimist": "^0.1.0", + "moment": "^2.6.0", + "through": "^2.3.4" + }, + "dependencies": { + "minimist": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/minimist/-/minimist-0.1.0.tgz", + "integrity": "sha1-md9lelJXTCHJBXSX33QnkLK0wN4=", + "dev": true + } + } + }, + "style-loader": { + "version": "0.21.0", + "resolved": "http://npm.byted.org/style-loader/-/style-loader-0.21.0.tgz", + "integrity": "sha1-aMUuXrKvycqStidL4nfuWa6jqFI=", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "schema-utils": "^0.4.5" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "svgo": { + "version": "0.7.2", + "resolved": "http://npm.byted.org/svgo/-/svgo-0.7.2.tgz", + "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", + "dev": true, + "requires": { + "coa": "~1.0.1", + "colors": "~1.1.2", + "csso": "~2.3.1", + "js-yaml": "~3.7.0", + "mkdirp": "~0.5.1", + "sax": "~1.2.1", + "whet.extend": "~0.9.9" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "http://npm.byted.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "js-yaml": { + "version": "3.7.0", + "resolved": "http://npm.byted.org/js-yaml/-/js-yaml-3.7.0.tgz", + "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^2.6.0" + } + } + } + }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + }, + "table": { + "version": "4.0.2", + "resolved": "http://npm.byted.org/table/-/table-4.0.2.tgz", + "integrity": "sha1-ozRHN1OR52atNNNIbm4q7chNLjY=", + "dev": true, + "requires": { + "ajv": "^5.2.3", + "ajv-keywords": "^2.1.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "tapable": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/tapable/-/tapable-1.0.0.tgz", + "integrity": "sha1-y7Y52QAu7ZxrWXXrIFmNeTbx+fI=", + "dev": true + }, + "temp-dir": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/temp-dir/-/temp-dir-1.0.0.tgz", + "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=", + "dev": true + }, + "temp-write": { + "version": "3.4.0", + "resolved": "http://npm.byted.org/temp-write/-/temp-write-3.4.0.tgz", + "integrity": "sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "is-stream": "^1.1.0", + "make-dir": "^1.0.0", + "pify": "^3.0.0", + "temp-dir": "^1.0.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "text-extensions": { + "version": "1.7.0", + "resolved": "http://npm.byted.org/text-extensions/-/text-extensions-1.7.0.tgz", + "integrity": "sha1-+qq6JiXtdG1WiiPk0KrNm/CKizk=", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "thenify": { + "version": "3.3.0", + "resolved": "http://npm.byted.org/thenify/-/thenify-3.3.0.tgz", + "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, + "through": { + "version": "2.3.8", + "resolved": "http://npm.byted.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "http://npm.byted.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha1-HSjj0qrfHVpZlsTp+VYBzQU0gK4=", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "http://npm.byted.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha1-bTQzWIl2jSGyvNoKonfO07G/rfk=", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "dev": true + }, + "trim-off-newlines": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", + "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "tslib": { + "version": "1.9.2", + "resolved": "http://npm.byted.org/tslib/-/tslib-1.9.2.tgz", + "integrity": "sha1-i+DMmh9tx3J8ON6xbC69GiiSmI4=", + "dev": true + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "http://npm.byted.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "http://npm.byted.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-is": { + "version": "1.6.16", + "resolved": "http://npm.byted.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha1-+JzjQVQcZysl7nrjxz3uOyvlAZQ=", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "http://npm.byted.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "http://npm.byted.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "optional": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "http://npm.byted.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "uglifyjs-webpack-plugin": { + "version": "1.2.6", + "resolved": "http://npm.byted.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.6.tgz", + "integrity": "sha1-9LtE8CQx6CswHY1GJDMKajVyk4E=", + "dev": true, + "requires": { + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "schema-utils": "^0.4.5", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "uglify-es": "^3.3.4", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "dependencies": { + "cacache": { + "version": "10.0.4", + "resolved": "http://npm.byted.org/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha1-ZFI2eZnv+dQYiu/ZoU6dfGomNGA=", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.1", + "mississippi": "^2.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^5.2.4", + "unique-filename": "^1.1.0", + "y18n": "^4.0.0" + } + }, + "commander": { + "version": "2.14.1", + "resolved": "http://npm.byted.org/commander/-/commander-2.14.1.tgz", + "integrity": "sha1-IjUSPjevjKPGXfRbAm29NXsBuao=", + "dev": true + }, + "mississippi": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha1-NEKlCPr8KFAEhv7qmUCWduTuWm8=", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^2.0.1", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "ssri": { + "version": "5.3.0", + "resolved": "http://npm.byted.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha1-ujhyycbTOgcEp9cf8EXl7EiZnQY=", + "dev": true, + "requires": { + "safe-buffer": "^5.1.1" + } + }, + "uglify-es": { + "version": "3.3.10", + "resolved": "http://npm.byted.org/uglify-es/-/uglify-es-3.3.10.tgz", + "integrity": "sha1-iwt5ks6+IO3CbeG/MlzveXuPP6U=", + "dev": true, + "requires": { + "commander": "~2.14.1", + "source-map": "~0.6.1" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=", + "dev": true + } + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "http://npm.byted.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "uniqs": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", + "dev": true + }, + "unique-filename": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/unique-slug/-/unique-slug-2.0.0.tgz", + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "http://npm.byted.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, + "upath": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha1-NSVll+RqWB20eT0M5H+prr/J+r0=", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "http://npm.byted.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "http://npm.byted.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "http://npm.byted.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, + "use": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/use/-/use-3.1.0.tgz", + "integrity": "sha1-FHFr8D/f79AwQK71jYtLhfOnxUQ=", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "dev": true + } + } + }, + "util": { + "version": "0.10.4", + "resolved": "http://npm.byted.org/util/-/util-0.10.4.tgz", + "integrity": "sha1-OqASW/5mikZy3liFfTrOJ+y3aQE=", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha1-EsUou51Y0LkmXZovbw/ovhf/HxQ=", + "dev": true + }, + "v8-compile-cache": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/v8-compile-cache/-/v8-compile-cache-2.0.0.tgz", + "integrity": "sha1-UmSS41/GFoZChHALcEPgG67gnwo=", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.3", + "resolved": "http://npm.byted.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha1-gWQ7y+8b3+zUYjeT3EZIlIupgzg=", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validate-npm-package-name": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "dev": true, + "requires": { + "builtins": "^1.0.3" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "vendors": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/vendors/-/vendors-1.0.2.tgz", + "integrity": "sha1-f8te759WI7FWvOqJ7DfWNnbyGAE=", + "dev": true + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "http://npm.byted.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha1-S8EsLr6KonenHx0/FNaFx7RGzQA=", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "webpack": { + "version": "4.12.0", + "resolved": "http://npm.byted.org/webpack/-/webpack-4.12.0.tgz", + "integrity": "sha1-FHWOA1rml0f2jdDt88Wlcqgr3uk=", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/helper-module-context": "1.5.12", + "@webassemblyjs/wasm-edit": "1.5.12", + "@webassemblyjs/wasm-opt": "1.5.12", + "@webassemblyjs/wasm-parser": "1.5.12", + "acorn": "^5.6.2", + "acorn-dynamic-import": "^3.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^1.0.0", + "enhanced-resolve": "^4.0.0", + "eslint-scope": "^3.7.1", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^0.4.4", + "tapable": "^1.0.0", + "uglifyjs-webpack-plugin": "^1.2.4", + "watchpack": "^1.5.0", + "webpack-sources": "^1.0.1" + }, + "dependencies": { + "ajv": { + "version": "6.5.1", + "resolved": "http://npm.byted.org/ajv/-/ajv-6.5.1.tgz", + "integrity": "sha1-iOvBJjxxM5N9EIuAxVcuZOHZMi0=", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" + } + }, + "ajv-keywords": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "dev": true + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "http://npm.byted.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", + "dev": true + } + } + }, + "webpack-cli": { + "version": "3.0.8", + "resolved": "http://npm.byted.org/webpack-cli/-/webpack-cli-3.0.8.tgz", + "integrity": "sha1-kO3c8EpL/DGqjA7cTHZ4W8TxzNk=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "enhanced-resolve": "^4.0.0", + "global-modules-path": "^2.1.0", + "import-local": "^1.0.0", + "inquirer": "^6.0.0", + "interpret": "^1.1.0", + "loader-utils": "^1.1.0", + "supports-color": "^5.4.0", + "v8-compile-cache": "^2.0.0", + "yargs": "^11.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.5.0", + "resolved": "http://npm.byted.org/chardet/-/chardet-0.5.0.tgz", + "integrity": "sha1-/jrHPADD2GX/zAKgaC4sILagYCk=", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "http://npm.byted.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "external-editor": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/external-editor/-/external-editor-3.0.0.tgz", + "integrity": "sha1-3DXEjG+YowyieiDpaH1/PHdwS7Y=", + "dev": true, + "requires": { + "chardet": "^0.5.0", + "iconv-lite": "^0.4.22", + "tmp": "^0.0.33" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "inquirer": { + "version": "6.0.0", + "resolved": "http://npm.byted.org/inquirer/-/inquirer-6.0.0.tgz", + "integrity": "sha1-6MIDA93BW7/CwSpiE3EMzZ4UE9g=", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.1.0", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "rxjs": { + "version": "6.2.1", + "resolved": "http://npm.byted.org/rxjs/-/rxjs-6.2.1.tgz", + "integrity": "sha1-JGzr7BiabLwUOj759i1vTJGBPKE=", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "yargs": { + "version": "11.1.0", + "resolved": "http://npm.byted.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha1-kLhpk07W6HERXqL/WLA/RyTtLXc=", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + } + } + }, + "webpack-sources": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha1-oQHrrlnWUHNU1x2AE5UKOot6WlQ=", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + } + } + }, + "webworkify-webpack-dropin": { + "version": "1.1.9", + "resolved": "http://npm.byted.org/webworkify-webpack-dropin/-/webworkify-webpack-dropin-1.1.9.tgz", + "integrity": "sha1-HRm5gXYWMZ7iOKRTfGYQ899U8/8=", + "dev": true + }, + "whet.extend": { + "version": "0.9.9", + "resolved": "http://npm.byted.org/whet.extend/-/whet.extend-0.9.9.tgz", + "integrity": "sha1-+HfVv2SMl+WqVC+twW1qJZucEaE=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/which/-/which-1.3.1.tgz", + "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha1-rgdOa9wMFKQx6ATmJFScYzsABFc=", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "http://npm.byted.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha1-YQY29rH3A4kb00dxzLF/uTtHB5w=", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha1-rsxAWXb6talVJhgIRvDboojzpKA=", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha1-H/YVdcLipOjlENb6TiQ8zhg5mas=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "write-json-file": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/write-json-file/-/write-json-file-2.3.0.tgz", + "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", + "dev": true, + "requires": { + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "pify": "^3.0.0", + "sort-keys": "^2.0.0", + "write-file-atomic": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "write-pkg": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/write-pkg/-/write-pkg-3.2.0.tgz", + "integrity": "sha1-DheP6Xgg04mokovHlTXb5ows/yE=", + "dev": true, + "requires": { + "sort-keys": "^2.0.0", + "write-json-file": "^2.2.0" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "http://npm.byted.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "11.0.0", + "resolved": "http://npm.byted.org/yargs/-/yargs-11.0.0.tgz", + "integrity": "sha1-wFKTEAbF7udGEOX8A1S+39CKIBs=", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "http://npm.byted.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..6952d558 --- /dev/null +++ b/package.json @@ -0,0 +1,65 @@ +{ + "devDependencies": { + "@koa/cors": "^2.2.1", + "babel-core": "^6.26.3", + "babel-loader": "^7.1.4", + "babel-plugin-add-module-exports": "^0.2.1", + "babel-preset-env": "^1.7.0", + "babel-preset-es2015": "^6.24.1", + "css-loader": "^0.28.11", + "cz-conventional-changelog": "^2.1.0", + "eslint": "^4.19.1", + "eslint-config-standard": "^11.0.0", + "eslint-plugin-import": "^2.12.0", + "eslint-plugin-node": "^6.0.1", + "eslint-plugin-promise": "^3.8.0", + "eslint-plugin-standard": "^3.1.0", + "koa": "^2.5.1", + "koa-range": "^0.3.0", + "koa-static": "^4.0.3", + "lerna": "^3.0.0-alpha.1", + "lerna-changelog": "^0.8.0", + "lint-staged": "^7.2.0", + "style-loader": "^0.21.0", + "webpack": "^4.12.0", + "webpack-cli": "^3.0.8", + "webworkify-webpack-dropin": "^1.1.9" + }, + "name": "xgplayer", + "version": "0.0.1", + "description": "xgplayer for video player", + "main": "index.js", + "scripts": { + "test": "node_modules/.bin/lerna-changelog", + "dev": "babel-node app.js", + "publish": "lerna publish", + "cz": "git cz", + "precz": "lint-staged", + "remove": "lerna run clean", + "clean": "lerna clean" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/bytedance/xgplayer.git" + }, + "keywords": [ + "xgplayer", + "mp4", + "hls", + "flv", + "dash" + ], + "lint-staged": { + "src/**/*.js": [ + "eslint -c .eslintrc --fix", + "git add" + ] + }, + "author": "yinguohui@bytedance.com", + "license": "MIT", + "bugs": { + "url": "https://github.com/bytedance/xgplayer/issues" + }, + "homepage": "https://github.com/bytedance/xgplayer#readme", + "dependencies": {} +} diff --git a/packages/xgplayer-flv.js/.DS_Store b/packages/xgplayer-flv.js/.DS_Store new file mode 100644 index 00000000..aa348001 Binary files /dev/null and b/packages/xgplayer-flv.js/.DS_Store differ diff --git a/packages/xgplayer-flv.js/.babelrc b/packages/xgplayer-flv.js/.babelrc new file mode 100644 index 00000000..021639d3 --- /dev/null +++ b/packages/xgplayer-flv.js/.babelrc @@ -0,0 +1,9 @@ +{ + "presets": [ + "es2015" + ], + "plugins": [ + "add-module-exports", + "babel-plugin-bulk-import" + ] +} diff --git a/packages/xgplayer-flv.js/browser/xgplayer-flvjs.js b/packages/xgplayer-flv.js/browser/xgplayer-flvjs.js new file mode 100644 index 00000000..fe7cb14d --- /dev/null +++ b/packages/xgplayer-flv.js/browser/xgplayer-flvjs.js @@ -0,0 +1,9 @@ +window.FlvJsPlayer=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=46)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","error",i),e.ENABLE_ERROR&&(console.error?console.error(i):console.warn?console.warn(i):console.log(i))}},{key:"i",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","info",i),e.ENABLE_INFO&&(console.info?console.info(i):console.log(i))}},{key:"w",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",i),e.ENABLE_WARN&&(console.warn?console.warn(i):console.log(i))}},{key:"d",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",i),e.ENABLE_DEBUG&&(console.debug?console.debug(i):console.log(i))}},{key:"v",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",i),e.ENABLE_VERBOSE&&console.log(i)}}]),e}();a.GLOBAL_TAG="flv.js",a.FORCE_GLOBAL_TAG=!1,a.ENABLE_ERROR=!0,a.ENABLE_INFO=!0,a.ENABLE_WARN=!0,a.ENABLE_DEBUG=!0,a.ENABLE_VERBOSE=!0,a.ENABLE_CALLBACK=!1,a.emitter=new r.default,t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseLoader=t.LoaderErrors=t.LoaderStatus=void 0;var i=function(){function e(e,t){for(var n=0;n0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},i.prototype.removeListener=function(e,t){var n,i,s,o;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(n=this._events[e]).length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(o=s;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){i=o;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:n[0]||""},a={};if(r.browser){a[r.browser]=!0;var s=r.majorVersion.split(".");a.version={major:parseInt(r.majorVersion,10),string:r.version},s.length>1&&(a.version.minor=parseInt(s[1],10)),s.length>2&&(a.version.build=parseInt(s[2],10))}r.platform&&(a[r.platform]=!0),(a.chrome||a.opr||a.safari)&&(a.webkit=!0),(a.rv||a.iemobile)&&(a.rv&&delete a.rv,r.browser="msie",a.msie=!0);a.edge&&(delete a.edge,r.browser="msedge",a.msedge=!0);a.opr&&(r.browser="opera",a.opera=!0);a.safari&&a.android&&(r.browser="android",a.android=!0);for(var o in a.name=r.browser,a.platform=r.platform,i)i.hasOwnProperty(o)&&delete i[o];Object.assign(i,a)}(),t.default=i,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=e[r]&&t0){var n=e.getConfig();t.emit("change",n)}}},{key:"registerListener",value:function(t){e.emitter.addListener("change",t)}},{key:"removeListener",value:function(t){e.emitter.removeListener("change",t)}},{key:"addLogListener",value:function(t){a.default.emitter.addListener("log",t),a.default.emitter.listenerCount("log")>0&&(a.default.ENABLE_CALLBACK=!0,e._notifyChange())}},{key:"removeLogListener",value:function(t){a.default.emitter.removeListener("log",t),0===a.default.emitter.listenerCount("log")&&(a.default.ENABLE_CALLBACK=!1,e._notifyChange())}},{key:"forceGlobalTag",get:function(){return a.default.FORCE_GLOBAL_TAG},set:function(t){a.default.FORCE_GLOBAL_TAG=t,e._notifyChange()}},{key:"globalTag",get:function(){return a.default.GLOBAL_TAG},set:function(t){a.default.GLOBAL_TAG=t,e._notifyChange()}},{key:"enableAll",get:function(){return a.default.ENABLE_VERBOSE&&a.default.ENABLE_DEBUG&&a.default.ENABLE_INFO&&a.default.ENABLE_WARN&&a.default.ENABLE_ERROR},set:function(t){a.default.ENABLE_VERBOSE=t,a.default.ENABLE_DEBUG=t,a.default.ENABLE_INFO=t,a.default.ENABLE_WARN=t,a.default.ENABLE_ERROR=t,e._notifyChange()}},{key:"enableDebug",get:function(){return a.default.ENABLE_DEBUG},set:function(t){a.default.ENABLE_DEBUG=t,e._notifyChange()}},{key:"enableVerbose",get:function(){return a.default.ENABLE_VERBOSE},set:function(t){a.default.ENABLE_VERBOSE=t,e._notifyChange()}},{key:"enableInfo",get:function(){return a.default.ENABLE_INFO},set:function(t){a.default.ENABLE_INFO=t,e._notifyChange()}},{key:"enableWarn",get:function(){return a.default.ENABLE_WARN},set:function(t){a.default.ENABLE_WARN=t,e._notifyChange()}},{key:"enableError",get:function(){return a.default.ENABLE_ERROR},set:function(t){a.default.ENABLE_ERROR=t,e._notifyChange()}}]),e}();o.emitter=new r.default,t.default=o,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",STATISTICS_INFO:"statistics_info"},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDefaultConfig=function(){return Object.assign({},i)};var i=t.defaultConfig={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetails=t.ErrorTypes=void 0;var i=n(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n(6));t.ErrorTypes={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},t.ErrorDetails={NETWORK_EXCEPTION:i.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:i.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:i.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:i.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:r.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:r.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:r.default.CODEC_UNSUPPORTED}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&e[0].originalDts=t[r].dts&&et[i].lastSample.originalDts&&e=t[i].lastSample.originalDts&&(i===t.length-1||i0&&(r=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=r,this._list.splice(r,0,n)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].syncPoints;0===n.length&&t>0;)t--,n=this._list[t].syncPoints;return n.length>0?n[n.length-1]:null}},{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,r=this._demuxer.parseChunks(e,t);else if((i=u.default.probe(e)).match){this._demuxer=new u.default(i,this._config),this._remuxer||(this._remuxer=new l.default(this._config));var s=this._mediaDataSource;null==s.duration||isNaN(s.duration)||(this._demuxer.overridedDuration=s.duration),"boolean"==typeof s.hasAudio&&(this._demuxer.overridedHasAudio=s.hasAudio),"boolean"==typeof s.hasVideo&&(this._demuxer.overridedHasVideo=s.hasVideo),this._demuxer.timestampBase=s.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),r=this._demuxer.parseChunks(e,t)}else i=null,a.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){n._internalAbort()}),this._emitter.emit(f.default.DEMUX_ERROR,d.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),r=0;return r}},{key:"_onMediaInfo",value:function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,o.default.prototype));var n=Object.assign({},e);Object.setPrototypeOf(n,o.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then(function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)})}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(e){var t=e+1;t0&&n[0].originalDts===i&&(i=n[0].pts),this._emitter.emit(f.default.RECOMMEND_SEEKPOINT,i)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(e){var t=this._mediaInfo.segments[e],n=Object.assign({},t);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(f.default.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(f.default.STATISTICS_INFO,e)}}]),e}();t.default=_,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}]),e}();t.default=r,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===n.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new a.default,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return i(e,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"_selectSeekHandler",value:function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new h.default(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",n=e.seekParamEnd||"bend";this._seekHandler=new f.default(t,n)}else{if("custom"!==e.seekType)throw new c.InvalidArgumentException("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new c.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}},{key:"_selectLoader",value:function(){if(this._isWebSocketURL)this._loaderClass=d.default;else if(o.default.isSupported())this._loaderClass=o.default;else if(u.default.isSupported())this._loaderClass=u.default;else{if(!l.default.isSupported())throw new c.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=l.default}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}},{key:"seek",value:function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}},{key:"_internalSeek",value:function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var n={from:e,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(e){if(!e||"string"!=typeof e||0===e.length)throw new c.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=e}},{key:"_expandBuffer",value:function(e){for(var t=this._stashSize;t+10485760){var i=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(n,0,t).set(i,0)}this._stashBuffer=n,this._bufferSize=t}}},{key:"_normalizeSpeed",value:function(e){var t=this._speedNormalizeList,n=t.length-1,i=0,r=0,a=n;if(e=t[i]&&e=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var n=1024*t+1048576;this._bufferSize0){var s=this._stashBuffer.slice(0,this._stashUsed),o=this._dispatchChunks(s,this._stashByteStart);if(o0){var u=new Uint8Array(s,o);a.set(u,0),this._stashUsed=u.byteLength,this._stashByteStart+=o}}else this._stashUsed=0,this._stashByteStart+=o;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var l=this._dispatchChunks(e,t);if(lthis._bufferSize&&(this._expandBuffer(d),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e,l),0),this._stashUsed+=d,this._stashByteStart=t+l}}}else if(0===this._stashUsed){var h=this._dispatchChunks(e,t);if(hthis._bufferSize&&this._expandBuffer(f),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(e,h),0),this._stashUsed+=f,this._stashByteStart=t+h}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var _=new Uint8Array(this._stashBuffer,0,this._bufferSize);_.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var m=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(m0){var p=new Uint8Array(this._stashBuffer,m);_.set(p,0)}this._stashUsed-=m,this._stashByteStart+=m}}}},{key:"_flushStashBuffer",value:function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(t,this._stashByteStart),i=t.byteLength-n;if(n0){var a=new Uint8Array(this._stashBuffer,0,this._bufferSize),s=new Uint8Array(t,n);a.set(s,0),this._stashUsed=s.byteLength,this._stashByteStart+=n}return 0}r.default.w(this.TAG,i+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,i}return 0}},{key:"_onLoaderComplete",value:function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(e,t){switch(r.default.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=s.LoaderErrors.UNRECOVERABLE_EARLY_EOF),e){case s.LoaderErrors.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(s.default.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(s.default.STATISTICS_INFO,this.statisticsInfo)}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){var e={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e}},{key:"statisticsInfo",get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=i),e}}]),e}();t.default=d,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&(n+=";codecs="+t.codec);var i=this._pendingSegments[t.type];i.splice(0,i.length),this._pendingSegments[t.type]=[],this._pendingRemoveRanges[t.type]=[],this._lastInitSegments[t.type]=[];var r=this._mediaSource;if(this.definitionChange=!0,this._sourceBuffers[t.type]){r.removeSourceBuffer(this._sourceBuffers[t.type]);var a=this._sourceBuffers[t.type]=this._mediaSource.addSourceBuffer(n);a.addEventListener("error",this.e.onSourceBufferError),a.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}}},{key:"appendInitSegment",value:function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var n=e,i=""+n.container;n.codec&&n.codec.length>0&&(i+=";codecs="+n.codec);var r=!1;if(a.default.v(this.TAG,"Received Initialization Segment, mimeType: "+i),this._lastInitSegments[n.type]=n,i!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])a.default.v(this.TAG,"Notice: "+n.type+" mimeType changed, origin: "+this._mimeTypes[n.type]+", target: "+i);else{r=!0;try{var u=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(i);u.addEventListener("error",this.e.onSourceBufferError),u.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return a.default.e(this.TAG,e.message),void this._emitter.emit(o.default.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[n.type]=i}t||this._pendingSegments[n.type].push(n),r||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),s.default.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[t.type];!n||n.updating||this._hasPendingRemoveRanges()||!1!==this.definitionChange||this._doAppendSegments()}},{key:"seek",value:function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var n=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{n.abort()}catch(e){a.default.e(this.TAG,e.message)}this._idrList.clear();var i=this._pendingSegments[t];if(i.splice(0,i.length),"closed"!==this._mediaSource.readyState){for(var r=0;r=1&&e-i.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){for(var i=n.buffered,r=!1,a=0;a=this._config.autoCleanupMaxBackwardDuration){r=!0;var u=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:s,end:u})}}else o0&&(isNaN(t)||n>t)&&(a.default.v(this.TAG,"Update MediaSource duration from "+t+" to "+n),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],n=this._pendingRemoveRanges[e];n.length&&!t.updating;){var i=n.shift();t.remove(i.start,i.end)}}},{key:"_doAppendSegments",value:function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var n=e[t].shift();if(n.timestampOffset){var i=this._sourceBuffers[t].timestampOffset,r=n.timestampOffset/1e3;Math.abs(i-r)>.1&&(a.default.v(this.TAG,"Update MPEG audio timestampOffset from "+i+" to "+r),this._sourceBuffers[t].timestampOffset=r),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(n.data),this._isBufferFull=!1,"video"===t&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(n),22===e.code?(this._isBufferFull||this._emitter.emit(o.default.BUFFER_FULL),this._isBufferFull=!0):(a.default.e(this.TAG,e.message),this._emitter.emit(o.default.ERROR,{code:e.code,msg:e.message}))}}}},{key:"_onSourceOpen",value:function(){if(a.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(o.default.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){a.default.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){a.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(o.default.UPDATE_END)}},{key:"_onSourceBufferError",value:function(e){a.default.e(this.TAG,"SourceBuffer Error: "+e)}}]),e}();t.default=h,e.exports=t.default},function(e,t,n){"use strict";var i=arguments[3],r=arguments[4],a=arguments[5],s=JSON.stringify;e.exports=function(e,t){for(var n,o=Object.keys(a),u=0,l=o.length;u>>24&255,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n.set(e,4);for(var s=8,o=0;o>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var n=t.id,i=t.duration,r=t.presentWidth,a=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>>8&255,255&r,0,0,a>>>8&255,255&a,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var n=t.timescale,i=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}},{key:"hdlr",value:function(t){var n=null;return n="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,n)}},{key:"minf",value:function(t){var n=null;return n="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,n,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))}},{key:"stsd",value:function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp3",value:function(t){var n=t.channelCount,i=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types[".mp3"],r)}},{key:"mp4a",value:function(t){var n=t.channelCount,i=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types.mp4a,r,e.esds(t))}},{key:"esds",value:function(t){var n=t.config||[],i=n.length,r=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(n).concat([6,1,2]));return e.box(e.types.esds,r)}},{key:"avc1",value:function(t){var n=t.avcc,i=t.codecWidth,r=t.codecHeight,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,a,e.box(e.types.avcC,n))}},{key:"mvex",value:function(t){return e.box(e.types.mvex,e.trex(t))}},{key:"trex",value:function(t){var n=t.id,i=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,i)}},{key:"moof",value:function(t,n){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,n))}},{key:"mfhd",value:function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,n)}},{key:"traf",value:function(t,n){var i=t.id,r=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),a=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),s=e.sdtp(t),o=e.trun(t,s.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,r,a,o,s)}},{key:"sdtp",value:function(t){for(var n=t.samples||[],i=n.length,r=new Uint8Array(4+i),a=0;a>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var o=0;o>>24&255,u>>>16&255,u>>>8&255,255&u,l>>>24&255,l>>>16&255,l>>>8&255,255&l,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.isNonSync,0,0,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*o)}return e.box(e.types.trun,s)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();r.init(),t.default=r,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&(g-=(y=l.pop()).length),null!=this._audioStashedLastSample){var E=this._audioStashedLastSample;this._audioStashedLastSample=null,l.unshift(E),g+=E.length}null!=y&&(this._audioStashedLastSample=y);var b=l[0].dts-this._dtsBase;if(this._audioNextDts)d=b-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())d=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(m=!0);else{var S=this._audioSegmentInfoList.getLastSampleBefore(b);if(null!=S){var k=b-(S.originalDts+S.duration);k<=3&&(k=0),d=b-(S.dts+S.duration+k)}else d=0}if(m){var L=b-d,R=this._videoSegmentInfoList.getLastSegmentBefore(b);if(null!=R&&R.beginDts=1?T[T.length-1].duration:Math.floor(f);var P=!1,U=null;if(B>1.5*f&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!o.default.safari){P=!0;var N=Math.abs(B-f),F=Math.ceil(N/f),j=D+f;r.default.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\ndts: "+(D+B)+" ms, expected: "+(D+Math.round(f))+" ms, delta: "+Math.round(N)+" ms, generate: "+F+" frames");var G=s.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==G&&(r.default.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),G=x),U=[];for(var V=0;V0){var K=U[U.length-1];K.duration=z-K.dts}var H={dts:z,pts:z,cts:0,unit:G,size:G.byteLength,duration:0,originalDts:M,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};U.push(H),g+=x.byteLength,j+=f}var q=U[U.length-1];q.duration=D+B-q.dts,B=Math.round(f)}T.push({dts:D,pts:D,cts:0,unit:I.unit,size:I.unit.byteLength,duration:B,originalDts:M,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),P&&T.push.apply(T,U)}c?v=new Uint8Array(g):((v=new Uint8Array(g))[0]=g>>>24&255,v[1]=g>>>16&255,v[2]=g>>>8&255,v[3]=255&g,v.set(a.default.types.mdat,4));for(var W=0;W1&&(c-=(_=s.pop()).length),null!=this._videoStashedLastSample){var m=this._videoStashedLastSample;this._videoStashedLastSample=null,s.unshift(m),c+=m.length}null!=_&&(this._videoStashedLastSample=_);var p=s[0].dts-this._dtsBase;if(this._videoNextDts)o=p-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())o=0;else{var v=this._videoSegmentInfoList.getLastSampleBefore(p);if(null!=v){var g=p-(v.originalDts+v.duration);g<=3&&(g=0),o=p-(v.dts+v.duration+g)}else o=0}for(var y=new u.MediaSegmentInfo,E=[],b=0;b=1?E[E.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(L){var T=new u.SampleInfo(R,A,O,S.dts,!0);T.fileposition=S.fileposition,y.appendSyncPoint(T)}E.push({dts:R,pts:A,cts:w,units:S.units,size:S.length,isKeyframe:L,duration:O,originalDts:k,flags:{isLeading:0,dependsOn:L?2:1,isDependedOn:L?1:0,hasRedundancy:0,isNonSync:L?0:1}})}(f=new Uint8Array(c))[0]=c>>>24&255,f[1]=c>>>16&255,f[2]=c>>>8&255,f[3]=255&c,f.set(a.default.types.mdat,4);for(var C=0;C32)throw new r.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var i=e-this._current_word_bits_left;this._fillCurrentWord();var a=Math.min(i,this._current_word_bits_left),s=this._current_word>>>32-a;return this._current_word<<=a,this._current_word_bits_left-=a,n=n<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=2&&3===t[a]&&0===t[a-1]&&0===t[a-2]||(i[r]=t[a],r++);return new Uint8Array(i.buffer,0,r)}},{key:"parseSPS",value:function(t){var n=e._ebsp2rbsp(t),i=new r.default(n);i.readByte();var a=i.readByte();i.readByte();var s=i.readByte();i.readUEG();var o=e.getProfileString(a),u=e.getLevelString(s),l=1,d=420,h=8;if((100===a||110===a||122===a||244===a||44===a||83===a||86===a||118===a||128===a||138===a||144===a)&&(3===(l=i.readUEG())&&i.readBits(1),l<=3&&(d=[0,420,422,444][l]),h=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool()))for(var f=3!==l?8:12,c=0;c0&&I<16?(R=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][I-1],w=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][I-1]):255===I&&(R=i.readByte()<<8|i.readByte(),w=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){var x=i.readBits(32),M=i.readBits(32);O=i.readBool(),A=(T=M)/(C=2*x)}}var D=1;1===R&&1===w||(D=R/w);var B=0,P=0;0===l?(B=1,P=2-E):(B=3===l?1:2,P=(1===l?2:1)*(2-E));var U=16*(g+1),N=16*(y+1)*(2-E);U-=(b+S)*B,N-=(k+L)*P;var F=Math.ceil(U*D);return i.destroy(),i=null,{profile_string:o,level_string:u,bit_depth:h,ref_frames:v,chroma_format:d,chroma_format_string:e.getChromaFormatString(d),frame_rate:{fixed:O,fps:A,fps_den:C,fps_num:T},sar_ratio:{width:R,height:w},codec_size:{width:U,height:N},present_size:{width:F,height:N}}}},{key:"_skipScalingList",value:function(e,t){for(var n=8,i=8,r=0;r=128){t.push(String.fromCharCode(65535&s)),r+=2;continue}}}else if(n[r]<240){if(i(n,r,2)){var o=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(o>=2048&&55296!=(63488&o)){t.push(String.fromCharCode(65535&o)),r+=3;continue}}}else if(n[r]<248&&i(n,r,3)){var u=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(u>65536&&u<1114112){u-=65536,t.push(String.fromCharCode(u>>>10|55296)),t.push(String.fromCharCode(1023&u|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0?(0,a.default)(new Uint8Array(e,t+2,i)):"",size:2+i}}},{key:"parseLongString",value:function(e,t,n){if(n<4)throw new s.IllegalStateException("Data not enough when parse LongString");var i=new DataView(e,t,n).getUint32(0,!u);return{data:i>0?(0,a.default)(new Uint8Array(e,t+4,i)):"",size:4+i}}},{key:"parseDate",value:function(e,t,n){if(n<10)throw new s.IllegalStateException("Data size invalid when parse Date");var i=new DataView(e,t,n),r=i.getFloat64(0,!u),a=i.getInt16(8,!u);return{data:new Date(r+=60*a*1e3),size:10}}},{key:"parseValue",value:function(t,n,i){if(i<1)throw new s.IllegalStateException("Data not enough when parse Value");var a=new DataView(t,n,i),o=1,l=a.getUint8(0),d=void 0,h=!1;try{switch(l){case 0:d=a.getFloat64(1,!u),o+=8;break;case 1:d=!!a.getUint8(1),o+=1;break;case 2:var f=e.parseString(t,n+1,i-1);d=f.data,o+=f.size;break;case 3:d={};var c=0;for(9==(16777215&a.getUint32(i-4,!u))&&(c=3);o13))return 0;i=e.probe(t).dataOffset}this._firstParse&&(this._firstParse=!1,n+i!==this._dataOffset&&a.default.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(t,i).getUint32(0,!r)&&a.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),i+=4);for(;it.byteLength)break;var o=s.getUint8(0),u=16777215&s.getUint32(0,!r);if(i+11+u+4>t.byteLength)break;if(8===o||9===o||18===o){var l=s.getUint8(4),h=s.getUint8(5),f=s.getUint8(6)|h<<8|l<<16|s.getUint8(7)<<24;0!==(16777215&s.getUint32(7,!r))&&a.default.w(this.TAG,"Meet tag which has StreamID != 0!");var c=i+11;switch(o){case 8:this._parseAudioData(t,c,u,f);break;case 9:this._parseVideoData(t,c,u,f,n+i);break;case 18:this._parseScriptData(t,c,u)}var _=s.getUint32(11+u,!r);_!==11+u&&a.default.w(this.TAG,"Invalid PrevTagSize "+_),i+=11+u+4}else a.default.w(this.TAG,"Unsupported tag type "+o+", skipped"),i+=11+u+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),i}},{key:"_parseScriptData",value:function(e,t,n){var r=s.default.parseScriptData(e,t,n);if(r.hasOwnProperty("onMetaData")){if(null==r.onMetaData||"object"!==i(r.onMetaData))return void a.default.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&a.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=r;var o=this._metadata.onMetaData;if("boolean"==typeof o.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=o.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof o.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=o.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof o.audiodatarate&&(this._mediaInfo.audioDataRate=o.audiodatarate),"number"==typeof o.videodatarate&&(this._mediaInfo.videoDataRate=o.videodatarate),"number"==typeof o.width&&(this._mediaInfo.width=o.width),"number"==typeof o.height&&(this._mediaInfo.height=o.height),"number"==typeof o.duration){if(!this._durationOverrided){var u=Math.floor(o.duration*this._timescale);this._duration=u,this._mediaInfo.duration=u}}else this._mediaInfo.duration=0;if("number"==typeof o.framerate){var l=Math.floor(1e3*o.framerate);if(l>0){var d=l/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=d,this._referenceFrameRate.fps_num=l,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=d}}if("object"===i(o.keyframes)){this._mediaInfo.hasKeyframesIndex=!0;var h=o.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(h),o.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=o,a.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],n=[],i=1;i>>4;if(2===s||10===s){var o=0,l=(12&r)>>>2;if(l>=0&&l<=4){o=this._flvSoundRateTable[l];var d=1&r,h=this._audioMetadata,f=this._audioTrack;if(h||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(h=this._audioMetadata={}).type="audio",h.id=f.id,h.timescale=this._timescale,h.duration=this._duration,h.audioSampleRate=o,h.channelCount=0===d?1:2),10===s){var c=this._parseAACAudioData(e,t+1,n-1);if(null==c)return;if(0===c.packetType){h.config&&a.default.w(this.TAG,"Found another AudioSpecificConfig!");var _=c.data;h.audioSampleRate=_.samplingRate,h.channelCount=_.channelCount,h.codec=_.codec,h.originalCodec=_.originalCodec,h.config=_.config,h.refSampleDuration=1024/h.audioSampleRate*h.timescale,a.default.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",h);var m=this._mediaInfo;m.audioCodec=h.originalCodec,m.audioSampleRate=h.audioSampleRate,m.audioChannelCount=h.channelCount,m.hasVideo?null!=m.videoCodec&&(m.mimeType='video/x-flv; codecs="'+m.videoCodec+","+m.audioCodec+'"'):m.mimeType='video/x-flv; codecs="'+m.audioCodec+'"',m.isComplete()&&this._onMediaInfo(m)}else if(1===c.packetType){var p=this._timestampBase+i,v={unit:c.data,length:c.data.byteLength,dts:p,pts:p};f.samples.push(v),f.length+=c.data.length}else a.default.e(this.TAG,"Flv: Unsupported AAC data type "+c.packetType)}else if(2===s){if(!h.codec){var g=this._parseMP3AudioData(e,t+1,n-1,!0);if(null==g)return;h.audioSampleRate=g.samplingRate,h.channelCount=g.channelCount,h.codec=g.codec,h.originalCodec=g.originalCodec,h.refSampleDuration=1152/h.audioSampleRate*h.timescale,a.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",h);var y=this._mediaInfo;y.audioCodec=h.codec,y.audioSampleRate=h.audioSampleRate,y.audioChannelCount=h.channelCount,y.audioDataRate=g.bitRate,y.hasVideo?null!=y.videoCodec&&(y.mimeType='video/x-flv; codecs="'+y.videoCodec+","+y.audioCodec+'"'):y.mimeType='video/x-flv; codecs="'+y.audioCodec+'"',y.isComplete()&&this._onMediaInfo(y)}var E=this._parseMP3AudioData(e,t+1,n-1,!1);if(null==E)return;var b=this._timestampBase+i,S={unit:E,length:E.byteLength,dts:b,pts:b};f.samples.push(S),f.length+=E.length}}else this._onError(u.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+l)}else this._onError(u.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+s)}}},{key:"_parseAACAudioData",value:function(e,t,n){if(!(n<=1)){var i={},r=new Uint8Array(e,t,n);return i.packetType=r[0],0===r[0]?i.data=this._parseAACAudioSpecificConfig(e,t+1,n-1):i.data=r.subarray(1),i}a.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,n){var i,r,a=new Uint8Array(e,t,n),s=null,o=0,l=null;if(o=i=a[0]>>>3,(r=(7&a[0])<<1|a[1]>>>7)<0||r>=this._mpegSamplingRates.length)this._onError(u.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var d=this._mpegSamplingRates[r],h=(120&a[1])>>>3;if(!(h<0||h>=8)){5===o&&(l=(7&a[1])<<1|a[2]>>>7,(124&a[2])>>>2);var f=self.navigator.userAgent.toLowerCase();return-1!==f.indexOf("firefox")?r>=6?(o=5,s=new Array(4),l=r-3):(o=2,s=new Array(2),l=r):-1!==f.indexOf("android")?(o=2,s=new Array(2),l=r):(o=5,l=r,s=new Array(4),r>=6?l=r-3:1===h&&(o=2,s=new Array(2),l=r)),s[0]=o<<3,s[0]|=(15&r)>>>1,s[1]=(15&r)<<7,s[1]|=(15&h)<<3,5===o&&(s[1]|=(15&l)>>>1,s[2]=(1&l)<<7,s[2]|=8,s[3]=0),{config:s,samplingRate:d,channelCount:h,codec:"mp4a.40."+o,originalCodec:"mp4a.40."+i}}this._onError(u.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}}},{key:"_parseMP3AudioData",value:function(e,t,n,i){if(!(n<4)){this._littleEndian;var r=new Uint8Array(e,t,n),s=null;if(i){if(255!==r[0])return;var o=r[1]>>>3&3,u=(6&r[1])>>1,l=(240&r[2])>>>4,d=(12&r[2])>>>2,h=3!==(r[3]>>>6&3)?2:1,f=0,c=0;switch(o){case 0:f=this._mpegAudioV25SampleRateTable[d];break;case 2:f=this._mpegAudioV20SampleRateTable[d];break;case 3:f=this._mpegAudioV10SampleRateTable[d]}switch(u){case 1:34,l>>4,l=15&s;7===l?this._parseAVCVideoPacket(e,t+1,n-1,i,r,o):this._onError(u.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+l)}}},{key:"_parseAVCVideoPacket",value:function(e,t,n,i,r,s){if(n<4)a.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var o=this._littleEndian,l=new DataView(e,t,n),d=l.getUint8(0),h=(16777215&l.getUint32(0,!o))<<8>>8;if(0===d)this._parseAVCDecoderConfigurationRecord(e,t+4,n-4);else if(1===d)this._parseAVCVideoData(e,t+4,n-4,i,r,s,h);else if(2!==d)return void this._onError(u.default.FORMAT_ERROR,"Flv: Invalid video packet type "+d)}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,n){if(n<7)a.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var i=this._videoMetadata,r=this._videoTrack,s=this._littleEndian,l=new DataView(e,t,n);i?void 0!==i.avcc&&a.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(i=this._videoMetadata={}).type="video",i.id=r.id,i.timescale=this._timescale,i.duration=this._duration);var d=l.getUint8(0),h=l.getUint8(1);l.getUint8(2),l.getUint8(3);if(1===d&&0!==h)if(this._naluLengthSize=1+(3&l.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var f=31&l.getUint8(5);if(0!==f){f>1&&a.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+f);for(var c=6,_=0;_1&&a.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+R),c++;for(var w=0;w=n){a.default.w(this.TAG,"Malformed Nalu near timestamp "+_+", offset = "+f+", dataSize = "+n);break}var p=l.getUint32(f,!u);if(3===c&&(p>>>=8),p>n-c)return void a.default.w(this.TAG,"Malformed Nalus near timestamp "+_+", NaluSize > DataSize!");var v=31&l.getUint8(f+c);5===v&&(m=!0);var g=new Uint8Array(e,t+f,c+p),y={type:v,data:g};d.push(y),h+=g.byteLength,f+=c+p}if(d.length){var E=this._videoTrack,b={units:d,length:h,isKeyframe:m,dts:_,cts:o,pts:_+o};m&&(b.fileposition=r),E.samples.push(b),E.length+=h}}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(e){this._timestampBase=e}},{key:"overridedDuration",get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e}},{key:"overridedHasAudio",set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e}},{key:"overridedHasVideo",set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e}}],[{key:"probe",value:function(e){var t=new Uint8Array(e),n={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return n;var i=(4&t[4])>>>2!=0,r=0!=(1&t[4]),a=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}(t,5);return a<9?n:{match:!0,consumed:a,dataOffset:a,hasAudioTrack:i,hasVideoTrack:r}}}]),e}();t.default=f,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:3;setTimeout(function(){!t.isDefinitionDataReady&&t._definitionRetryTimes<3?(t._definitionRetryTimes+=1,t.onDefinitionChange(e,n)):t.isDefinitionDataReady?(t._transmuxer.destroy(),Object.keys(t._tempPendingSegments).forEach(function(e){t._msectl._pendingSegments[e]=t._tempPendingSegments[e]}),t._tempPendingSegments={audio:[],video:[]},t._transmuxer=t._tempTransmuxer,t._definitionRetryTimes=0):t._definitionRetryTimes>=3&&(t._definitionRetryTimes=0,t._tempTransmuxer&&(t._tempTransmuxer.destroy(),t._tempTransmuxer=null,t._emitter.emit(u.default.ERROR,c.ErrorTypes.NETWORK_ERROR,"","清晰度切换失败!")),t._definitionRetryTimes=0),t._tempPendingSegments={audio:[],video:[]}},1e3*n),this._mediaDataSource.segments[0].url=e,this._tempMds=Object.assign({},this._mediaDataSource,{url:e}),this._tempTransmuxer=new l.default(this._tempMds,this._config),this._tempTransmuxer.on(d.default.INIT_SEGMENT,function(e,n){t._config.isLive?(t._msectl.doClearSourceBuffer(),t._msectl.appendInitSegment(n),t._transmuxer!==t._tempTransmuxer&&t._transmuxer.destroy(),t._transmuxer=t._tempTransmuxer):t._tempPendingSegments[e]=[n]}),this._tempTransmuxer.on(d.default.MEDIA_SEGMENT,function(e,n){if(t._config.isLive?t._msectl.appendMediaSegment(n):t._transmuxer===t._tempTransmuxer?t._msectl.appendMediaSegment(n):t._tempPendingSegments[e]&&t._tempPendingSegments[e].push(n),t._config.lazyLoad&&!t._config.isLive){var i=t._mediaElement.currentTime;n.info.endDts>=1e3*(i+t._config.lazyLoadMaxDuration)&&null==t._progressChecker&&(s.default.v(t.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),t._suspendTransmuxer())}}),this._tempTransmuxer.on(d.default.LOADING_COMPLETE,function(){t._msectl.endOfStream(),t._emitter.emit(u.default.LOADING_COMPLETE)}),this._tempTransmuxer.on(d.default.RECOVERED_EARLY_EOF,function(){t._emitter.emit(u.default.RECOVERED_EARLY_EOF)}),this._tempTransmuxer.on(d.default.IO_ERROR,function(e,n){t._emitter.emit(u.default.ERROR,c.ErrorTypes.NETWORK_ERROR,e,n)}),this._tempTransmuxer.on(d.default.DEMUX_ERROR,function(e,n){t._emitter.emit(u.default.ERROR,c.ErrorTypes.MEDIA_ERROR,e,{code:-1,msg:n})}),this._tempTransmuxer.on(d.default.MEDIA_INFO,function(e){t._mediaInfo=e,t._tempTransmuxer.seek(1e3*(t._mediaElement.currentTime+n)),t._emitter.emit(u.default.MEDIA_INFO,Object.assign({},e))}),this._tempTransmuxer.on(d.default.STATISTICS_INFO,function(e){t._statisticsInfo=t._fillStatisticsInfo(e),t._emitter.emit(u.default.STATISTICS_INFO,Object.assign({},t._statisticsInfo))}),this._tempTransmuxer.on(d.default.RECOMMEND_SEEKPOINT,function(e){t._transmuxer===t._tempTransmuxer&&t._mediaElement&&!t._config.accurateSeek&&(t._requestSetTime=!0,t._mediaElement.currentTime=e/1e3)}),this._tempTransmuxer.open()}},{key:"load",value:function(){var e=this;if(!this._mediaElement)throw new m.IllegalStateException("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new m.IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new l.default(this._mediaDataSource,this._config),this._transmuxer.on(d.default.INIT_SEGMENT,function(t,n){e._msectl.appendInitSegment(n)}),this._transmuxer.on(d.default.MEDIA_SEGMENT,function(t,n){if(e._msectl.appendMediaSegment(n),e._config.lazyLoad&&!e._config.isLive){var i=e._mediaElement.currentTime;n.info.endDts>=1e3*(i+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(s.default.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}}),this._transmuxer.on(d.default.LOADING_COMPLETE,function(){e._msectl.endOfStream(),e._emitter.emit(u.default.LOADING_COMPLETE)}),this._transmuxer.on(d.default.RECOVERED_EARLY_EOF,function(){e._emitter.emit(u.default.RECOVERED_EARLY_EOF)}),this._transmuxer.on(d.default.IO_ERROR,function(t,n){e._emitter.emit(u.default.ERROR,c.ErrorTypes.NETWORK_ERROR,t,n)}),this._transmuxer.on(d.default.DEMUX_ERROR,function(t,n){e._emitter.emit(u.default.ERROR,c.ErrorTypes.MEDIA_ERROR,t,{code:-1,msg:n})}),this._transmuxer.on(d.default.MEDIA_INFO,function(t){e._mediaInfo=t,e._emitter.emit(u.default.MEDIA_INFO,Object.assign({},t))}),this._transmuxer.on(d.default.STATISTICS_INFO,function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(u.default.STATISTICS_INFO,Object.assign({},e._statisticsInfo))}),this._transmuxer.on(d.default.RECOMMEND_SEEKPOINT,function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)}),this._transmuxer.open()))}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_fillStatisticsInfo",value:function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=i),e}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,n=0,i=0;i=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(s.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){s.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,n=!1,i=0;i=r&&e=a-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(s.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(e){for(var t=this._mediaElement.buffered,n=0;n=i&&e0){var r=this._mediaElement.buffered.start(0);(r<1&&e0&&t.currentTime0){var i=n.start(0);if(i<1&&t=t})}}]),e}();t.default=v,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0)for(var a=n.split("&"),s=0;s0;o[0]!==this._startName&&o[0]!==this._endName&&(u&&(r+="&"),r+=a[s])}return 0===r.length?t:t+"?"+r}}]),e}();t.default=r,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(e,t){this._lastTimeLoaded=0;var n=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?n=this._currentRedirectedURL:null!=e.redirectedURL&&(n=e.redirectedURL));var r=this._seekHandler.getConfig(n,t);this._currentRequestURL=r.url;var a=this._xhr=new XMLHttpRequest;if(a.open("GET",r.url,!0),a.responseType="arraybuffer",a.onreadystatechange=this._onReadyStateChange.bind(this),a.onprogress=this._onProgress.bind(this),a.onload=this._onLoad.bind(this),a.onerror=this._onXhrError.bind(this),e.withCredentials&&(a.withCredentials=!0),"object"===i(r.headers)){var s=r.headers;for(var o in s)s.hasOwnProperty(o)&&a.setRequestHeader(o,s[o])}a.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=o.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=o.LoaderStatus.kBuffering}else{if(this._status=o.LoaderStatus.kError,!this._onError)throw new u.RuntimeException("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(o.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}},{key:"_onProgress",value:function(e){if(this._status!==o.LoaderStatus.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var n=e.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var i=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(i)}}},{key:"_normalizeSpeed",value:function(e){var t=this._chunkSizeKBList,n=t.length-1,i=0,r=0,a=n;if(e=t[i]&&e=3&&(t=this._speedSampler.currentKBps)),0!==t){var n=this._normalizeSpeed(t);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var i=e.target.response,r=this._range.from+this._receivedLength;this._receivedLength+=i.byteLength;var a=!1;null!=this._contentLength&&this._receivedLength0&&this._receivedLength=200&&t.status<=299){if(this._status=s.LoaderStatus.kBuffering,null!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}var i=t.getResponseHeader("Content-Length");if(null!=i&&null==this._contentLength){var r=parseInt(i);r>0&&(this._contentLength=r,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else{if(this._status=s.LoaderStatus.kError,!this._onError)throw new o.RuntimeException("MSStreamLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(s.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else if(3===t.readyState&&t.status>=200&&t.status<=299){this._status=s.LoaderStatus.kBuffering;var a=t.response;this._reader.readAsArrayBuffer(a)}}},{key:"_xhrOnError",value:function(e){this._status=s.LoaderStatus.kError;var t=s.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type};if(!this._onError)throw new o.RuntimeException(n.msg);this._onError(t,n)}},{key:"_msrOnProgress",value:function(e){var t=e.target.result;if(null!=t){var n=t.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=t.byteLength;var i=this._totalRange.from+this._receivedLength;this._receivedLength+=n.byteLength,this._onDataArrival&&this._onDataArrival(n,i,this._receivedLength),t.byteLength>=this._bufferLimit&&(a.default.v(this.TAG,"MSStream buffer exceeded max size near "+(i+n.byteLength)+", reconnecting..."),this._doReconnectIfNeeded())}else this._doReconnectIfNeeded()}},{key:"_doReconnectIfNeeded",value:function(){if(null==this._contentLength||this._receivedLength299)){if(this._status=s.LoaderStatus.kError,!this._onError)throw new o.RuntimeException("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(s.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=s.LoaderStatus.kBuffering}}},{key:"_onProgress",value:function(e){if(this._status!==s.LoaderStatus.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(e){!0!==this._requestAbort?this._status!==s.LoaderStatus.kError&&(this._status=s.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1}},{key:"_onXhrError",value:function(e){this._status=s.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&e.loaded=15048,t=!a.default.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}}}]),r(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){var n=this;this._dataSource=e,this._range=t;var r=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(r=e.redirectedURL);var a=this._seekHandler.getConfig(r,t),u=new self.Headers;if("object"===i(a.headers)){var l=a.headers;for(var d in l)l.hasOwnProperty(d)&&u.append(d,l[d])}var h={method:"GET",headers:u,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};!1===e.cors&&(h.mode="same-origin"),e.withCredentials&&(h.credentials="include"),e.referrerPolicy&&(h.referrerPolicy=e.referrerPolicy),this._status=s.LoaderStatus.kConnecting,self.fetch(a.url,h).then(function(e){if(n._requestAbort)return n._requestAbort=!1,void(n._status=s.LoaderStatus.kIdle);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==a.url&&n._onURLRedirect){var t=n._seekHandler.removeURLParameters(e.url);n._onURLRedirect(t)}var i=e.headers.get("Content-Length");return null!=i&&(n._contentLength=parseInt(i),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,e.body.getReader())}if(n._status=s.LoaderStatus.kError,!n._onError)throw new o.RuntimeException("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);n._onError(s.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}).catch(function(e){if(n._status=s.LoaderStatus.kError,!n._onError)throw e;n._onError(s.LoaderErrors.EXCEPTION,{code:-1,msg:e.message})})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(e){var t=this;return e.read().then(function(n){if(n.done)t._status=s.LoaderStatus.kComplete,t._onComplete&&t._onComplete(t._range.from,t._range.from+t._receivedLength-1);else{if(!0===t._requestAbort)return t._requestAbort=!1,t._status=s.LoaderStatus.kComplete,e.cancel();t._status=s.LoaderStatus.kBuffering;var i=n.value.buffer,r=t._range.from+t._receivedLength;t._receivedLength+=i.byteLength,t._onDataArrival&&t._onDataArrival(i,r,t._receivedLength),t._pump(e)}}).catch(function(e){if(11!==e.code||!a.default.msedge){t._status=s.LoaderStatus.kError;var n=0,i=null;if(19!==e.code&&"network error"!==e.message||!(null===t._contentLength||null!==t._contentLength&&t._receivedLength1)for(var n=1;n "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","error",i),e.ENABLE_ERROR&&(console.error?console.error(i):console.warn?console.warn(i):console.log(i))}},{key:"i",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","info",i),e.ENABLE_INFO&&(console.info?console.info(i):console.log(i))}},{key:"w",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",i),e.ENABLE_WARN&&(console.warn?console.warn(i):console.log(i))}},{key:"d",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",i),e.ENABLE_DEBUG&&(console.debug?console.debug(i):console.log(i))}},{key:"v",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",i),e.ENABLE_VERBOSE&&console.log(i)}}]),e}();a.GLOBAL_TAG="flv.js",a.FORCE_GLOBAL_TAG=!1,a.ENABLE_ERROR=!0,a.ENABLE_INFO=!0,a.ENABLE_WARN=!0,a.ENABLE_DEBUG=!0,a.ENABLE_VERBOSE=!0,a.ENABLE_CALLBACK=!1,a.emitter=new r.default,t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseLoader=t.LoaderErrors=t.LoaderStatus=void 0;var i=function(){function e(e,t){for(var n=0;n0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},i.prototype.removeListener=function(e,t){var n,i,s,o;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(n=this._events[e]).length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(o=s;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){i=o;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:n[0]||""},a={};if(r.browser){a[r.browser]=!0;var s=r.majorVersion.split(".");a.version={major:parseInt(r.majorVersion,10),string:r.version},s.length>1&&(a.version.minor=parseInt(s[1],10)),s.length>2&&(a.version.build=parseInt(s[2],10))}r.platform&&(a[r.platform]=!0),(a.chrome||a.opr||a.safari)&&(a.webkit=!0),(a.rv||a.iemobile)&&(a.rv&&delete a.rv,r.browser="msie",a.msie=!0);a.edge&&(delete a.edge,r.browser="msedge",a.msedge=!0);a.opr&&(r.browser="opera",a.opera=!0);a.safari&&a.android&&(r.browser="android",a.android=!0);for(var o in a.name=r.browser,a.platform=r.platform,i)i.hasOwnProperty(o)&&delete i[o];Object.assign(i,a)}(),t.default=i,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=e[r]&&t0){var n=e.getConfig();t.emit("change",n)}}},{key:"registerListener",value:function(t){e.emitter.addListener("change",t)}},{key:"removeListener",value:function(t){e.emitter.removeListener("change",t)}},{key:"addLogListener",value:function(t){a.default.emitter.addListener("log",t),a.default.emitter.listenerCount("log")>0&&(a.default.ENABLE_CALLBACK=!0,e._notifyChange())}},{key:"removeLogListener",value:function(t){a.default.emitter.removeListener("log",t),0===a.default.emitter.listenerCount("log")&&(a.default.ENABLE_CALLBACK=!1,e._notifyChange())}},{key:"forceGlobalTag",get:function(){return a.default.FORCE_GLOBAL_TAG},set:function(t){a.default.FORCE_GLOBAL_TAG=t,e._notifyChange()}},{key:"globalTag",get:function(){return a.default.GLOBAL_TAG},set:function(t){a.default.GLOBAL_TAG=t,e._notifyChange()}},{key:"enableAll",get:function(){return a.default.ENABLE_VERBOSE&&a.default.ENABLE_DEBUG&&a.default.ENABLE_INFO&&a.default.ENABLE_WARN&&a.default.ENABLE_ERROR},set:function(t){a.default.ENABLE_VERBOSE=t,a.default.ENABLE_DEBUG=t,a.default.ENABLE_INFO=t,a.default.ENABLE_WARN=t,a.default.ENABLE_ERROR=t,e._notifyChange()}},{key:"enableDebug",get:function(){return a.default.ENABLE_DEBUG},set:function(t){a.default.ENABLE_DEBUG=t,e._notifyChange()}},{key:"enableVerbose",get:function(){return a.default.ENABLE_VERBOSE},set:function(t){a.default.ENABLE_VERBOSE=t,e._notifyChange()}},{key:"enableInfo",get:function(){return a.default.ENABLE_INFO},set:function(t){a.default.ENABLE_INFO=t,e._notifyChange()}},{key:"enableWarn",get:function(){return a.default.ENABLE_WARN},set:function(t){a.default.ENABLE_WARN=t,e._notifyChange()}},{key:"enableError",get:function(){return a.default.ENABLE_ERROR},set:function(t){a.default.ENABLE_ERROR=t,e._notifyChange()}}]),e}();o.emitter=new r.default,t.default=o,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",STATISTICS_INFO:"statistics_info"},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDefaultConfig=function(){return Object.assign({},i)};var i=t.defaultConfig={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetails=t.ErrorTypes=void 0;var i=n(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n(6));t.ErrorTypes={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},t.ErrorDetails={NETWORK_EXCEPTION:i.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:i.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:i.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:i.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:r.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:r.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:r.default.CODEC_UNSUPPORTED}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&e[0].originalDts=t[r].dts&&et[i].lastSample.originalDts&&e=t[i].lastSample.originalDts&&(i===t.length-1||i0&&(r=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=r,this._list.splice(r,0,n)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].syncPoints;0===n.length&&t>0;)t--,n=this._list[t].syncPoints;return n.length>0?n[n.length-1]:null}},{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,r=this._demuxer.parseChunks(e,t);else if((i=u.default.probe(e)).match){this._demuxer=new u.default(i,this._config),this._remuxer||(this._remuxer=new l.default(this._config));var s=this._mediaDataSource;null==s.duration||isNaN(s.duration)||(this._demuxer.overridedDuration=s.duration),"boolean"==typeof s.hasAudio&&(this._demuxer.overridedHasAudio=s.hasAudio),"boolean"==typeof s.hasVideo&&(this._demuxer.overridedHasVideo=s.hasVideo),this._demuxer.timestampBase=s.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),r=this._demuxer.parseChunks(e,t)}else i=null,a.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){n._internalAbort()}),this._emitter.emit(f.default.DEMUX_ERROR,d.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),r=0;return r}},{key:"_onMediaInfo",value:function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,o.default.prototype));var n=Object.assign({},e);Object.setPrototypeOf(n,o.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then(function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)})}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(e){var t=e+1;t0&&n[0].originalDts===i&&(i=n[0].pts),this._emitter.emit(f.default.RECOMMEND_SEEKPOINT,i)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(e){var t=this._mediaInfo.segments[e],n=Object.assign({},t);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(f.default.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(f.default.STATISTICS_INFO,e)}}]),e}();t.default=_,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}]),e}();t.default=r,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===n.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new a.default,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return i(e,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"_selectSeekHandler",value:function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new h.default(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",n=e.seekParamEnd||"bend";this._seekHandler=new f.default(t,n)}else{if("custom"!==e.seekType)throw new c.InvalidArgumentException("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new c.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}},{key:"_selectLoader",value:function(){if(this._isWebSocketURL)this._loaderClass=d.default;else if(o.default.isSupported())this._loaderClass=o.default;else if(u.default.isSupported())this._loaderClass=u.default;else{if(!l.default.isSupported())throw new c.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=l.default}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}},{key:"seek",value:function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}},{key:"_internalSeek",value:function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var n={from:e,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(e){if(!e||"string"!=typeof e||0===e.length)throw new c.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=e}},{key:"_expandBuffer",value:function(e){for(var t=this._stashSize;t+10485760){var i=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(n,0,t).set(i,0)}this._stashBuffer=n,this._bufferSize=t}}},{key:"_normalizeSpeed",value:function(e){var t=this._speedNormalizeList,n=t.length-1,i=0,r=0,a=n;if(e=t[i]&&e=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var n=1024*t+1048576;this._bufferSize0){var s=this._stashBuffer.slice(0,this._stashUsed),o=this._dispatchChunks(s,this._stashByteStart);if(o0){var u=new Uint8Array(s,o);a.set(u,0),this._stashUsed=u.byteLength,this._stashByteStart+=o}}else this._stashUsed=0,this._stashByteStart+=o;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var l=this._dispatchChunks(e,t);if(lthis._bufferSize&&(this._expandBuffer(d),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e,l),0),this._stashUsed+=d,this._stashByteStart=t+l}}}else if(0===this._stashUsed){var h=this._dispatchChunks(e,t);if(hthis._bufferSize&&this._expandBuffer(f),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(e,h),0),this._stashUsed+=f,this._stashByteStart=t+h}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var _=new Uint8Array(this._stashBuffer,0,this._bufferSize);_.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var m=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(m0){var p=new Uint8Array(this._stashBuffer,m);_.set(p,0)}this._stashUsed-=m,this._stashByteStart+=m}}}},{key:"_flushStashBuffer",value:function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(t,this._stashByteStart),i=t.byteLength-n;if(n0){var a=new Uint8Array(this._stashBuffer,0,this._bufferSize),s=new Uint8Array(t,n);a.set(s,0),this._stashUsed=s.byteLength,this._stashByteStart+=n}return 0}r.default.w(this.TAG,i+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,i}return 0}},{key:"_onLoaderComplete",value:function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(e,t){switch(r.default.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=s.LoaderErrors.UNRECOVERABLE_EARLY_EOF),e){case s.LoaderErrors.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(s.default.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(s.default.STATISTICS_INFO,this.statisticsInfo)}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){var e={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e}},{key:"statisticsInfo",get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=i),e}}]),e}();t.default=d,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&(n+=";codecs="+t.codec);var i=this._pendingSegments[t.type];i.splice(0,i.length),this._pendingSegments[t.type]=[],this._pendingRemoveRanges[t.type]=[],this._lastInitSegments[t.type]=[];var r=this._mediaSource;if(this.definitionChange=!0,this._sourceBuffers[t.type]){r.removeSourceBuffer(this._sourceBuffers[t.type]);var a=this._sourceBuffers[t.type]=this._mediaSource.addSourceBuffer(n);a.addEventListener("error",this.e.onSourceBufferError),a.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}}},{key:"appendInitSegment",value:function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var n=e,i=""+n.container;n.codec&&n.codec.length>0&&(i+=";codecs="+n.codec);var r=!1;if(a.default.v(this.TAG,"Received Initialization Segment, mimeType: "+i),this._lastInitSegments[n.type]=n,i!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])a.default.v(this.TAG,"Notice: "+n.type+" mimeType changed, origin: "+this._mimeTypes[n.type]+", target: "+i);else{r=!0;try{var u=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(i);u.addEventListener("error",this.e.onSourceBufferError),u.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return a.default.e(this.TAG,e.message),void this._emitter.emit(o.default.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[n.type]=i}t||this._pendingSegments[n.type].push(n),r||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),s.default.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[t.type];!n||n.updating||this._hasPendingRemoveRanges()||!1!==this.definitionChange||this._doAppendSegments()}},{key:"seek",value:function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var n=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{n.abort()}catch(e){a.default.e(this.TAG,e.message)}this._idrList.clear();var i=this._pendingSegments[t];if(i.splice(0,i.length),"closed"!==this._mediaSource.readyState){for(var r=0;r=1&&e-i.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){for(var i=n.buffered,r=!1,a=0;a=this._config.autoCleanupMaxBackwardDuration){r=!0;var u=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:s,end:u})}}else o0&&(isNaN(t)||n>t)&&(a.default.v(this.TAG,"Update MediaSource duration from "+t+" to "+n),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],n=this._pendingRemoveRanges[e];n.length&&!t.updating;){var i=n.shift();t.remove(i.start,i.end)}}},{key:"_doAppendSegments",value:function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var n=e[t].shift();if(n.timestampOffset){var i=this._sourceBuffers[t].timestampOffset,r=n.timestampOffset/1e3;Math.abs(i-r)>.1&&(a.default.v(this.TAG,"Update MPEG audio timestampOffset from "+i+" to "+r),this._sourceBuffers[t].timestampOffset=r),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(n.data),this._isBufferFull=!1,"video"===t&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(n),22===e.code?(this._isBufferFull||this._emitter.emit(o.default.BUFFER_FULL),this._isBufferFull=!0):(a.default.e(this.TAG,e.message),this._emitter.emit(o.default.ERROR,{code:e.code,msg:e.message}))}}}},{key:"_onSourceOpen",value:function(){if(a.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(o.default.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){a.default.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){a.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(o.default.UPDATE_END)}},{key:"_onSourceBufferError",value:function(e){a.default.e(this.TAG,"SourceBuffer Error: "+e)}}]),e}();t.default=h,e.exports=t.default},function(e,t,n){"use strict";var i=arguments[3],r=arguments[4],a=arguments[5],s=JSON.stringify;e.exports=function(e,t){for(var n,o=Object.keys(a),u=0,l=o.length;u>>24&255,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n.set(e,4);for(var s=8,o=0;o>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var n=t.id,i=t.duration,r=t.presentWidth,a=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>>8&255,255&r,0,0,a>>>8&255,255&a,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var n=t.timescale,i=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}},{key:"hdlr",value:function(t){var n=null;return n="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,n)}},{key:"minf",value:function(t){var n=null;return n="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,n,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))}},{key:"stsd",value:function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp3",value:function(t){var n=t.channelCount,i=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types[".mp3"],r)}},{key:"mp4a",value:function(t){var n=t.channelCount,i=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types.mp4a,r,e.esds(t))}},{key:"esds",value:function(t){var n=t.config||[],i=n.length,r=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(n).concat([6,1,2]));return e.box(e.types.esds,r)}},{key:"avc1",value:function(t){var n=t.avcc,i=t.codecWidth,r=t.codecHeight,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,a,e.box(e.types.avcC,n))}},{key:"mvex",value:function(t){return e.box(e.types.mvex,e.trex(t))}},{key:"trex",value:function(t){var n=t.id,i=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,i)}},{key:"moof",value:function(t,n){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,n))}},{key:"mfhd",value:function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,n)}},{key:"traf",value:function(t,n){var i=t.id,r=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),a=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),s=e.sdtp(t),o=e.trun(t,s.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,r,a,o,s)}},{key:"sdtp",value:function(t){for(var n=t.samples||[],i=n.length,r=new Uint8Array(4+i),a=0;a>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var o=0;o>>24&255,u>>>16&255,u>>>8&255,255&u,l>>>24&255,l>>>16&255,l>>>8&255,255&l,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.isNonSync,0,0,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*o)}return e.box(e.types.trun,s)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();r.init(),t.default=r,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&(g-=(y=l.pop()).length),null!=this._audioStashedLastSample){var E=this._audioStashedLastSample;this._audioStashedLastSample=null,l.unshift(E),g+=E.length}null!=y&&(this._audioStashedLastSample=y);var b=l[0].dts-this._dtsBase;if(this._audioNextDts)d=b-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())d=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(m=!0);else{var S=this._audioSegmentInfoList.getLastSampleBefore(b);if(null!=S){var k=b-(S.originalDts+S.duration);k<=3&&(k=0),d=b-(S.dts+S.duration+k)}else d=0}if(m){var L=b-d,R=this._videoSegmentInfoList.getLastSegmentBefore(b);if(null!=R&&R.beginDts=1?T[T.length-1].duration:Math.floor(f);var P=!1,U=null;if(B>1.5*f&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!o.default.safari){P=!0;var N=Math.abs(B-f),F=Math.ceil(N/f),j=D+f;r.default.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\ndts: "+(D+B)+" ms, expected: "+(D+Math.round(f))+" ms, delta: "+Math.round(N)+" ms, generate: "+F+" frames");var G=s.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==G&&(r.default.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),G=x),U=[];for(var V=0;V0){var K=U[U.length-1];K.duration=z-K.dts}var H={dts:z,pts:z,cts:0,unit:G,size:G.byteLength,duration:0,originalDts:M,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};U.push(H),g+=x.byteLength,j+=f}var q=U[U.length-1];q.duration=D+B-q.dts,B=Math.round(f)}T.push({dts:D,pts:D,cts:0,unit:I.unit,size:I.unit.byteLength,duration:B,originalDts:M,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),P&&T.push.apply(T,U)}c?v=new Uint8Array(g):((v=new Uint8Array(g))[0]=g>>>24&255,v[1]=g>>>16&255,v[2]=g>>>8&255,v[3]=255&g,v.set(a.default.types.mdat,4));for(var W=0;W1&&(c-=(_=s.pop()).length),null!=this._videoStashedLastSample){var m=this._videoStashedLastSample;this._videoStashedLastSample=null,s.unshift(m),c+=m.length}null!=_&&(this._videoStashedLastSample=_);var p=s[0].dts-this._dtsBase;if(this._videoNextDts)o=p-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())o=0;else{var v=this._videoSegmentInfoList.getLastSampleBefore(p);if(null!=v){var g=p-(v.originalDts+v.duration);g<=3&&(g=0),o=p-(v.dts+v.duration+g)}else o=0}for(var y=new u.MediaSegmentInfo,E=[],b=0;b=1?E[E.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(L){var T=new u.SampleInfo(R,A,O,S.dts,!0);T.fileposition=S.fileposition,y.appendSyncPoint(T)}E.push({dts:R,pts:A,cts:w,units:S.units,size:S.length,isKeyframe:L,duration:O,originalDts:k,flags:{isLeading:0,dependsOn:L?2:1,isDependedOn:L?1:0,hasRedundancy:0,isNonSync:L?0:1}})}(f=new Uint8Array(c))[0]=c>>>24&255,f[1]=c>>>16&255,f[2]=c>>>8&255,f[3]=255&c,f.set(a.default.types.mdat,4);for(var C=0;C32)throw new r.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var i=e-this._current_word_bits_left;this._fillCurrentWord();var a=Math.min(i,this._current_word_bits_left),s=this._current_word>>>32-a;return this._current_word<<=a,this._current_word_bits_left-=a,n=n<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=2&&3===t[a]&&0===t[a-1]&&0===t[a-2]||(i[r]=t[a],r++);return new Uint8Array(i.buffer,0,r)}},{key:"parseSPS",value:function(t){var n=e._ebsp2rbsp(t),i=new r.default(n);i.readByte();var a=i.readByte();i.readByte();var s=i.readByte();i.readUEG();var o=e.getProfileString(a),u=e.getLevelString(s),l=1,d=420,h=8;if((100===a||110===a||122===a||244===a||44===a||83===a||86===a||118===a||128===a||138===a||144===a)&&(3===(l=i.readUEG())&&i.readBits(1),l<=3&&(d=[0,420,422,444][l]),h=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool()))for(var f=3!==l?8:12,c=0;c0&&I<16?(R=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][I-1],w=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][I-1]):255===I&&(R=i.readByte()<<8|i.readByte(),w=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){var x=i.readBits(32),M=i.readBits(32);O=i.readBool(),A=(T=M)/(C=2*x)}}var D=1;1===R&&1===w||(D=R/w);var B=0,P=0;0===l?(B=1,P=2-E):(B=3===l?1:2,P=(1===l?2:1)*(2-E));var U=16*(g+1),N=16*(y+1)*(2-E);U-=(b+S)*B,N-=(k+L)*P;var F=Math.ceil(U*D);return i.destroy(),i=null,{profile_string:o,level_string:u,bit_depth:h,ref_frames:v,chroma_format:d,chroma_format_string:e.getChromaFormatString(d),frame_rate:{fixed:O,fps:A,fps_den:C,fps_num:T},sar_ratio:{width:R,height:w},codec_size:{width:U,height:N},present_size:{width:F,height:N}}}},{key:"_skipScalingList",value:function(e,t){for(var n=8,i=8,r=0;r=128){t.push(String.fromCharCode(65535&s)),r+=2;continue}}}else if(n[r]<240){if(i(n,r,2)){var o=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(o>=2048&&55296!=(63488&o)){t.push(String.fromCharCode(65535&o)),r+=3;continue}}}else if(n[r]<248&&i(n,r,3)){var u=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(u>65536&&u<1114112){u-=65536,t.push(String.fromCharCode(u>>>10|55296)),t.push(String.fromCharCode(1023&u|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0?(0,a.default)(new Uint8Array(e,t+2,i)):"",size:2+i}}},{key:"parseLongString",value:function(e,t,n){if(n<4)throw new s.IllegalStateException("Data not enough when parse LongString");var i=new DataView(e,t,n).getUint32(0,!u);return{data:i>0?(0,a.default)(new Uint8Array(e,t+4,i)):"",size:4+i}}},{key:"parseDate",value:function(e,t,n){if(n<10)throw new s.IllegalStateException("Data size invalid when parse Date");var i=new DataView(e,t,n),r=i.getFloat64(0,!u),a=i.getInt16(8,!u);return{data:new Date(r+=60*a*1e3),size:10}}},{key:"parseValue",value:function(t,n,i){if(i<1)throw new s.IllegalStateException("Data not enough when parse Value");var a=new DataView(t,n,i),o=1,l=a.getUint8(0),d=void 0,h=!1;try{switch(l){case 0:d=a.getFloat64(1,!u),o+=8;break;case 1:d=!!a.getUint8(1),o+=1;break;case 2:var f=e.parseString(t,n+1,i-1);d=f.data,o+=f.size;break;case 3:d={};var c=0;for(9==(16777215&a.getUint32(i-4,!u))&&(c=3);o13))return 0;i=e.probe(t).dataOffset}this._firstParse&&(this._firstParse=!1,n+i!==this._dataOffset&&a.default.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(t,i).getUint32(0,!r)&&a.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),i+=4);for(;it.byteLength)break;var o=s.getUint8(0),u=16777215&s.getUint32(0,!r);if(i+11+u+4>t.byteLength)break;if(8===o||9===o||18===o){var l=s.getUint8(4),h=s.getUint8(5),f=s.getUint8(6)|h<<8|l<<16|s.getUint8(7)<<24;0!==(16777215&s.getUint32(7,!r))&&a.default.w(this.TAG,"Meet tag which has StreamID != 0!");var c=i+11;switch(o){case 8:this._parseAudioData(t,c,u,f);break;case 9:this._parseVideoData(t,c,u,f,n+i);break;case 18:this._parseScriptData(t,c,u)}var _=s.getUint32(11+u,!r);_!==11+u&&a.default.w(this.TAG,"Invalid PrevTagSize "+_),i+=11+u+4}else a.default.w(this.TAG,"Unsupported tag type "+o+", skipped"),i+=11+u+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),i}},{key:"_parseScriptData",value:function(e,t,n){var r=s.default.parseScriptData(e,t,n);if(r.hasOwnProperty("onMetaData")){if(null==r.onMetaData||"object"!==i(r.onMetaData))return void a.default.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&a.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=r;var o=this._metadata.onMetaData;if("boolean"==typeof o.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=o.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof o.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=o.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof o.audiodatarate&&(this._mediaInfo.audioDataRate=o.audiodatarate),"number"==typeof o.videodatarate&&(this._mediaInfo.videoDataRate=o.videodatarate),"number"==typeof o.width&&(this._mediaInfo.width=o.width),"number"==typeof o.height&&(this._mediaInfo.height=o.height),"number"==typeof o.duration){if(!this._durationOverrided){var u=Math.floor(o.duration*this._timescale);this._duration=u,this._mediaInfo.duration=u}}else this._mediaInfo.duration=0;if("number"==typeof o.framerate){var l=Math.floor(1e3*o.framerate);if(l>0){var d=l/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=d,this._referenceFrameRate.fps_num=l,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=d}}if("object"===i(o.keyframes)){this._mediaInfo.hasKeyframesIndex=!0;var h=o.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(h),o.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=o,a.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],n=[],i=1;i>>4;if(2===s||10===s){var o=0,l=(12&r)>>>2;if(l>=0&&l<=4){o=this._flvSoundRateTable[l];var d=1&r,h=this._audioMetadata,f=this._audioTrack;if(h||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(h=this._audioMetadata={}).type="audio",h.id=f.id,h.timescale=this._timescale,h.duration=this._duration,h.audioSampleRate=o,h.channelCount=0===d?1:2),10===s){var c=this._parseAACAudioData(e,t+1,n-1);if(null==c)return;if(0===c.packetType){h.config&&a.default.w(this.TAG,"Found another AudioSpecificConfig!");var _=c.data;h.audioSampleRate=_.samplingRate,h.channelCount=_.channelCount,h.codec=_.codec,h.originalCodec=_.originalCodec,h.config=_.config,h.refSampleDuration=1024/h.audioSampleRate*h.timescale,a.default.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",h);var m=this._mediaInfo;m.audioCodec=h.originalCodec,m.audioSampleRate=h.audioSampleRate,m.audioChannelCount=h.channelCount,m.hasVideo?null!=m.videoCodec&&(m.mimeType='video/x-flv; codecs="'+m.videoCodec+","+m.audioCodec+'"'):m.mimeType='video/x-flv; codecs="'+m.audioCodec+'"',m.isComplete()&&this._onMediaInfo(m)}else if(1===c.packetType){var p=this._timestampBase+i,v={unit:c.data,length:c.data.byteLength,dts:p,pts:p};f.samples.push(v),f.length+=c.data.length}else a.default.e(this.TAG,"Flv: Unsupported AAC data type "+c.packetType)}else if(2===s){if(!h.codec){var g=this._parseMP3AudioData(e,t+1,n-1,!0);if(null==g)return;h.audioSampleRate=g.samplingRate,h.channelCount=g.channelCount,h.codec=g.codec,h.originalCodec=g.originalCodec,h.refSampleDuration=1152/h.audioSampleRate*h.timescale,a.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",h);var y=this._mediaInfo;y.audioCodec=h.codec,y.audioSampleRate=h.audioSampleRate,y.audioChannelCount=h.channelCount,y.audioDataRate=g.bitRate,y.hasVideo?null!=y.videoCodec&&(y.mimeType='video/x-flv; codecs="'+y.videoCodec+","+y.audioCodec+'"'):y.mimeType='video/x-flv; codecs="'+y.audioCodec+'"',y.isComplete()&&this._onMediaInfo(y)}var E=this._parseMP3AudioData(e,t+1,n-1,!1);if(null==E)return;var b=this._timestampBase+i,S={unit:E,length:E.byteLength,dts:b,pts:b};f.samples.push(S),f.length+=E.length}}else this._onError(u.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+l)}else this._onError(u.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+s)}}},{key:"_parseAACAudioData",value:function(e,t,n){if(!(n<=1)){var i={},r=new Uint8Array(e,t,n);return i.packetType=r[0],0===r[0]?i.data=this._parseAACAudioSpecificConfig(e,t+1,n-1):i.data=r.subarray(1),i}a.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,n){var i,r,a=new Uint8Array(e,t,n),s=null,o=0,l=null;if(o=i=a[0]>>>3,(r=(7&a[0])<<1|a[1]>>>7)<0||r>=this._mpegSamplingRates.length)this._onError(u.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var d=this._mpegSamplingRates[r],h=(120&a[1])>>>3;if(!(h<0||h>=8)){5===o&&(l=(7&a[1])<<1|a[2]>>>7,(124&a[2])>>>2);var f=self.navigator.userAgent.toLowerCase();return-1!==f.indexOf("firefox")?r>=6?(o=5,s=new Array(4),l=r-3):(o=2,s=new Array(2),l=r):-1!==f.indexOf("android")?(o=2,s=new Array(2),l=r):(o=5,l=r,s=new Array(4),r>=6?l=r-3:1===h&&(o=2,s=new Array(2),l=r)),s[0]=o<<3,s[0]|=(15&r)>>>1,s[1]=(15&r)<<7,s[1]|=(15&h)<<3,5===o&&(s[1]|=(15&l)>>>1,s[2]=(1&l)<<7,s[2]|=8,s[3]=0),{config:s,samplingRate:d,channelCount:h,codec:"mp4a.40."+o,originalCodec:"mp4a.40."+i}}this._onError(u.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}}},{key:"_parseMP3AudioData",value:function(e,t,n,i){if(!(n<4)){this._littleEndian;var r=new Uint8Array(e,t,n),s=null;if(i){if(255!==r[0])return;var o=r[1]>>>3&3,u=(6&r[1])>>1,l=(240&r[2])>>>4,d=(12&r[2])>>>2,h=3!==(r[3]>>>6&3)?2:1,f=0,c=0;switch(o){case 0:f=this._mpegAudioV25SampleRateTable[d];break;case 2:f=this._mpegAudioV20SampleRateTable[d];break;case 3:f=this._mpegAudioV10SampleRateTable[d]}switch(u){case 1:34,l>>4,l=15&s;7===l?this._parseAVCVideoPacket(e,t+1,n-1,i,r,o):this._onError(u.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+l)}}},{key:"_parseAVCVideoPacket",value:function(e,t,n,i,r,s){if(n<4)a.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var o=this._littleEndian,l=new DataView(e,t,n),d=l.getUint8(0),h=(16777215&l.getUint32(0,!o))<<8>>8;if(0===d)this._parseAVCDecoderConfigurationRecord(e,t+4,n-4);else if(1===d)this._parseAVCVideoData(e,t+4,n-4,i,r,s,h);else if(2!==d)return void this._onError(u.default.FORMAT_ERROR,"Flv: Invalid video packet type "+d)}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,n){if(n<7)a.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var i=this._videoMetadata,r=this._videoTrack,s=this._littleEndian,l=new DataView(e,t,n);i?void 0!==i.avcc&&a.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(i=this._videoMetadata={}).type="video",i.id=r.id,i.timescale=this._timescale,i.duration=this._duration);var d=l.getUint8(0),h=l.getUint8(1);l.getUint8(2),l.getUint8(3);if(1===d&&0!==h)if(this._naluLengthSize=1+(3&l.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var f=31&l.getUint8(5);if(0!==f){f>1&&a.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+f);for(var c=6,_=0;_1&&a.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+R),c++;for(var w=0;w=n){a.default.w(this.TAG,"Malformed Nalu near timestamp "+_+", offset = "+f+", dataSize = "+n);break}var p=l.getUint32(f,!u);if(3===c&&(p>>>=8),p>n-c)return void a.default.w(this.TAG,"Malformed Nalus near timestamp "+_+", NaluSize > DataSize!");var v=31&l.getUint8(f+c);5===v&&(m=!0);var g=new Uint8Array(e,t+f,c+p),y={type:v,data:g};d.push(y),h+=g.byteLength,f+=c+p}if(d.length){var E=this._videoTrack,b={units:d,length:h,isKeyframe:m,dts:_,cts:o,pts:_+o};m&&(b.fileposition=r),E.samples.push(b),E.length+=h}}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(e){this._timestampBase=e}},{key:"overridedDuration",get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e}},{key:"overridedHasAudio",set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e}},{key:"overridedHasVideo",set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e}}],[{key:"probe",value:function(e){var t=new Uint8Array(e),n={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return n;var i=(4&t[4])>>>2!=0,r=0!=(1&t[4]),a=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}(t,5);return a<9?n:{match:!0,consumed:a,dataOffset:a,hasAudioTrack:i,hasVideoTrack:r}}}]),e}();t.default=f,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:3;setTimeout(function(){!t.isDefinitionDataReady&&t._definitionRetryTimes<3?(t._definitionRetryTimes+=1,t.onDefinitionChange(e,n)):t.isDefinitionDataReady?(t._transmuxer.destroy(),Object.keys(t._tempPendingSegments).forEach(function(e){t._msectl._pendingSegments[e]=t._tempPendingSegments[e]}),t._tempPendingSegments={audio:[],video:[]},t._transmuxer=t._tempTransmuxer,t._definitionRetryTimes=0):t._definitionRetryTimes>=3&&(t._definitionRetryTimes=0,t._tempTransmuxer&&(t._tempTransmuxer.destroy(),t._tempTransmuxer=null,t._emitter.emit(u.default.ERROR,c.ErrorTypes.NETWORK_ERROR,"","清晰度切换失败!")),t._definitionRetryTimes=0),t._tempPendingSegments={audio:[],video:[]}},1e3*n),this._mediaDataSource.segments[0].url=e,this._tempMds=Object.assign({},this._mediaDataSource,{url:e}),this._tempTransmuxer=new l.default(this._tempMds,this._config),this._tempTransmuxer.on(d.default.INIT_SEGMENT,function(e,n){t._config.isLive?(t._msectl.doClearSourceBuffer(),t._msectl.appendInitSegment(n),t._transmuxer!==t._tempTransmuxer&&t._transmuxer.destroy(),t._transmuxer=t._tempTransmuxer):t._tempPendingSegments[e]=[n]}),this._tempTransmuxer.on(d.default.MEDIA_SEGMENT,function(e,n){if(t._config.isLive?t._msectl.appendMediaSegment(n):t._transmuxer===t._tempTransmuxer?t._msectl.appendMediaSegment(n):t._tempPendingSegments[e]&&t._tempPendingSegments[e].push(n),t._config.lazyLoad&&!t._config.isLive){var i=t._mediaElement.currentTime;n.info.endDts>=1e3*(i+t._config.lazyLoadMaxDuration)&&null==t._progressChecker&&(s.default.v(t.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),t._suspendTransmuxer())}}),this._tempTransmuxer.on(d.default.LOADING_COMPLETE,function(){t._msectl.endOfStream(),t._emitter.emit(u.default.LOADING_COMPLETE)}),this._tempTransmuxer.on(d.default.RECOVERED_EARLY_EOF,function(){t._emitter.emit(u.default.RECOVERED_EARLY_EOF)}),this._tempTransmuxer.on(d.default.IO_ERROR,function(e,n){t._emitter.emit(u.default.ERROR,c.ErrorTypes.NETWORK_ERROR,e,n)}),this._tempTransmuxer.on(d.default.DEMUX_ERROR,function(e,n){t._emitter.emit(u.default.ERROR,c.ErrorTypes.MEDIA_ERROR,e,{code:-1,msg:n})}),this._tempTransmuxer.on(d.default.MEDIA_INFO,function(e){t._mediaInfo=e,t._tempTransmuxer.seek(1e3*(t._mediaElement.currentTime+n)),t._emitter.emit(u.default.MEDIA_INFO,Object.assign({},e))}),this._tempTransmuxer.on(d.default.STATISTICS_INFO,function(e){t._statisticsInfo=t._fillStatisticsInfo(e),t._emitter.emit(u.default.STATISTICS_INFO,Object.assign({},t._statisticsInfo))}),this._tempTransmuxer.on(d.default.RECOMMEND_SEEKPOINT,function(e){t._transmuxer===t._tempTransmuxer&&t._mediaElement&&!t._config.accurateSeek&&(t._requestSetTime=!0,t._mediaElement.currentTime=e/1e3)}),this._tempTransmuxer.open()}},{key:"load",value:function(){var e=this;if(!this._mediaElement)throw new m.IllegalStateException("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new m.IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new l.default(this._mediaDataSource,this._config),this._transmuxer.on(d.default.INIT_SEGMENT,function(t,n){e._msectl.appendInitSegment(n)}),this._transmuxer.on(d.default.MEDIA_SEGMENT,function(t,n){if(e._msectl.appendMediaSegment(n),e._config.lazyLoad&&!e._config.isLive){var i=e._mediaElement.currentTime;n.info.endDts>=1e3*(i+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(s.default.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}}),this._transmuxer.on(d.default.LOADING_COMPLETE,function(){e._msectl.endOfStream(),e._emitter.emit(u.default.LOADING_COMPLETE)}),this._transmuxer.on(d.default.RECOVERED_EARLY_EOF,function(){e._emitter.emit(u.default.RECOVERED_EARLY_EOF)}),this._transmuxer.on(d.default.IO_ERROR,function(t,n){e._emitter.emit(u.default.ERROR,c.ErrorTypes.NETWORK_ERROR,t,n)}),this._transmuxer.on(d.default.DEMUX_ERROR,function(t,n){e._emitter.emit(u.default.ERROR,c.ErrorTypes.MEDIA_ERROR,t,{code:-1,msg:n})}),this._transmuxer.on(d.default.MEDIA_INFO,function(t){e._mediaInfo=t,e._emitter.emit(u.default.MEDIA_INFO,Object.assign({},t))}),this._transmuxer.on(d.default.STATISTICS_INFO,function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(u.default.STATISTICS_INFO,Object.assign({},e._statisticsInfo))}),this._transmuxer.on(d.default.RECOMMEND_SEEKPOINT,function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)}),this._transmuxer.open()))}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_fillStatisticsInfo",value:function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=i),e}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,n=0,i=0;i=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(s.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){s.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,n=!1,i=0;i=r&&e=a-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(s.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(e){for(var t=this._mediaElement.buffered,n=0;n=i&&e0){var r=this._mediaElement.buffered.start(0);(r<1&&e0&&t.currentTime0){var i=n.start(0);if(i<1&&t=t})}}]),e}();t.default=v,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0)for(var a=n.split("&"),s=0;s0;o[0]!==this._startName&&o[0]!==this._endName&&(u&&(r+="&"),r+=a[s])}return 0===r.length?t:t+"?"+r}}]),e}();t.default=r,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(e,t){this._lastTimeLoaded=0;var n=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?n=this._currentRedirectedURL:null!=e.redirectedURL&&(n=e.redirectedURL));var r=this._seekHandler.getConfig(n,t);this._currentRequestURL=r.url;var a=this._xhr=new XMLHttpRequest;if(a.open("GET",r.url,!0),a.responseType="arraybuffer",a.onreadystatechange=this._onReadyStateChange.bind(this),a.onprogress=this._onProgress.bind(this),a.onload=this._onLoad.bind(this),a.onerror=this._onXhrError.bind(this),e.withCredentials&&(a.withCredentials=!0),"object"===i(r.headers)){var s=r.headers;for(var o in s)s.hasOwnProperty(o)&&a.setRequestHeader(o,s[o])}a.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=o.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=o.LoaderStatus.kBuffering}else{if(this._status=o.LoaderStatus.kError,!this._onError)throw new u.RuntimeException("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(o.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}},{key:"_onProgress",value:function(e){if(this._status!==o.LoaderStatus.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var n=e.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var i=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(i)}}},{key:"_normalizeSpeed",value:function(e){var t=this._chunkSizeKBList,n=t.length-1,i=0,r=0,a=n;if(e=t[i]&&e=3&&(t=this._speedSampler.currentKBps)),0!==t){var n=this._normalizeSpeed(t);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var i=e.target.response,r=this._range.from+this._receivedLength;this._receivedLength+=i.byteLength;var a=!1;null!=this._contentLength&&this._receivedLength0&&this._receivedLength=200&&t.status<=299){if(this._status=s.LoaderStatus.kBuffering,null!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}var i=t.getResponseHeader("Content-Length");if(null!=i&&null==this._contentLength){var r=parseInt(i);r>0&&(this._contentLength=r,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else{if(this._status=s.LoaderStatus.kError,!this._onError)throw new o.RuntimeException("MSStreamLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(s.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else if(3===t.readyState&&t.status>=200&&t.status<=299){this._status=s.LoaderStatus.kBuffering;var a=t.response;this._reader.readAsArrayBuffer(a)}}},{key:"_xhrOnError",value:function(e){this._status=s.LoaderStatus.kError;var t=s.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type};if(!this._onError)throw new o.RuntimeException(n.msg);this._onError(t,n)}},{key:"_msrOnProgress",value:function(e){var t=e.target.result;if(null!=t){var n=t.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=t.byteLength;var i=this._totalRange.from+this._receivedLength;this._receivedLength+=n.byteLength,this._onDataArrival&&this._onDataArrival(n,i,this._receivedLength),t.byteLength>=this._bufferLimit&&(a.default.v(this.TAG,"MSStream buffer exceeded max size near "+(i+n.byteLength)+", reconnecting..."),this._doReconnectIfNeeded())}else this._doReconnectIfNeeded()}},{key:"_doReconnectIfNeeded",value:function(){if(null==this._contentLength||this._receivedLength299)){if(this._status=s.LoaderStatus.kError,!this._onError)throw new o.RuntimeException("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(s.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=s.LoaderStatus.kBuffering}}},{key:"_onProgress",value:function(e){if(this._status!==s.LoaderStatus.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(e){!0!==this._requestAbort?this._status!==s.LoaderStatus.kError&&(this._status=s.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1}},{key:"_onXhrError",value:function(e){this._status=s.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&e.loaded=15048,t=!a.default.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}}}]),r(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,i)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(i):void 0}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){var n=this;this._dataSource=e,this._range=t;var r=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(r=e.redirectedURL);var a=this._seekHandler.getConfig(r,t),u=new self.Headers;if("object"===i(a.headers)){var l=a.headers;for(var d in l)l.hasOwnProperty(d)&&u.append(d,l[d])}var h={method:"GET",headers:u,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};!1===e.cors&&(h.mode="same-origin"),e.withCredentials&&(h.credentials="include"),e.referrerPolicy&&(h.referrerPolicy=e.referrerPolicy),this._status=s.LoaderStatus.kConnecting,self.fetch(a.url,h).then(function(e){if(n._requestAbort)return n._requestAbort=!1,void(n._status=s.LoaderStatus.kIdle);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==a.url&&n._onURLRedirect){var t=n._seekHandler.removeURLParameters(e.url);n._onURLRedirect(t)}var i=e.headers.get("Content-Length");return null!=i&&(n._contentLength=parseInt(i),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,e.body.getReader())}if(n._status=s.LoaderStatus.kError,!n._onError)throw new o.RuntimeException("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);n._onError(s.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}).catch(function(e){if(n._status=s.LoaderStatus.kError,!n._onError)throw e;n._onError(s.LoaderErrors.EXCEPTION,{code:-1,msg:e.message})})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(e){var t=this;return e.read().then(function(n){if(n.done)t._status=s.LoaderStatus.kComplete,t._onComplete&&t._onComplete(t._range.from,t._range.from+t._receivedLength-1);else{if(!0===t._requestAbort)return t._requestAbort=!1,t._status=s.LoaderStatus.kComplete,e.cancel();t._status=s.LoaderStatus.kBuffering;var i=n.value.buffer,r=t._range.from+t._receivedLength;t._receivedLength+=i.byteLength,t._onDataArrival&&t._onDataArrival(i,r,t._receivedLength),t._pump(e)}}).catch(function(e){if(11!==e.code||!a.default.msedge){t._status=s.LoaderStatus.kError;var n=0,i=null;if(19!==e.code&&"network error"!==e.message||!(null===t._contentLength||null!==t._contentLength&&t._receivedLength1)for(var n=1;n + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export const defaultConfig = { + enableWorker: false, + enableStashBuffer: true, + stashInitialSize: undefined, + + isLive: false, + + lazyLoad: true, + lazyLoadMaxDuration: 3 * 60, + lazyLoadRecoverDuration: 30, + deferLoadAfterSourceOpen: true, + + // autoCleanupSourceBuffer: default as false, leave unspecified + autoCleanupMaxBackwardDuration: 3 * 60, + autoCleanupMinBackwardDuration: 2 * 60, + + statisticsInfoReportInterval: 600, + + fixAudioTimestampGap: true, + + accurateSeek: false, + seekType: 'range', // [range, param, custom] + seekParamStart: 'bstart', + seekParamEnd: 'bend', + rangeLoadZeroStart: false, + customSeekHandler: undefined, + reuseRedirectedURL: false + // referrerPolicy: leave as unspecified +}; + +export function createDefaultConfig() { + return Object.assign({}, defaultConfig); +} \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/core/features.js b/packages/xgplayer-flv.js/src/flv/core/features.js new file mode 100644 index 00000000..34047097 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/core/features.js @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import IOController from '../io/io-controller.js'; +import {createDefaultConfig} from '../config.js'; + +class Features { + + static supportMSEH264Playback() { + return window.MediaSource && + window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'); + } + + static supportNetworkStreamIO() { + let ioctl = new IOController({}, createDefaultConfig()); + let loaderType = ioctl.loaderType; + ioctl.destroy(); + return loaderType == 'fetch-stream-loader' || loaderType == 'xhr-moz-chunked-loader'; + } + + static getNetworkLoaderTypeName() { + let ioctl = new IOController({}, createDefaultConfig()); + let loaderType = ioctl.loaderType; + ioctl.destroy(); + return loaderType; + } + + static supportNativeMediaPlayback(mimeType) { + if (Features.videoElement == undefined) { + Features.videoElement = window.document.createElement('video'); + } + let canPlay = Features.videoElement.canPlayType(mimeType); + return canPlay === 'probably' || canPlay == 'maybe'; + } + + static getFeatureList() { + let features = { + mseFlvPlayback: false, + mseLiveFlvPlayback: false, + networkStreamIO: false, + networkLoaderName: '', + nativeMP4H264Playback: false, + nativeWebmVP8Playback: false, + nativeWebmVP9Playback: false + }; + + features.mseFlvPlayback = Features.supportMSEH264Playback(); + features.networkStreamIO = Features.supportNetworkStreamIO(); + features.networkLoaderName = Features.getNetworkLoaderTypeName(); + features.mseLiveFlvPlayback = features.mseFlvPlayback && features.networkStreamIO; + features.nativeMP4H264Playback = Features.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'); + features.nativeWebmVP8Playback = Features.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'); + features.nativeWebmVP9Playback = Features.supportNativeMediaPlayback('video/webm; codecs="vp9"'); + + return features; + } + +} + +export default Features; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/core/media-info.js b/packages/xgplayer-flv.js/src/flv/core/media-info.js new file mode 100644 index 00000000..70b8f618 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/core/media-info.js @@ -0,0 +1,130 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class MediaInfo { + + constructor() { + this.mimeType = null; + this.duration = null; + + this.hasAudio = null; + this.hasVideo = null; + this.audioCodec = null; + this.videoCodec = null; + this.audioDataRate = null; + this.videoDataRate = null; + + this.audioSampleRate = null; + this.audioChannelCount = null; + + this.width = null; + this.height = null; + this.fps = null; + this.profile = null; + this.level = null; + this.refFrames = null; + this.chromaFormat = null; + this.sarNum = null; + this.sarDen = null; + + this.metadata = null; + this.segments = null; // MediaInfo[] + this.segmentCount = null; + this.hasKeyframesIndex = null; + this.keyframesIndex = null; + } + + isComplete() { + let audioInfoComplete = (this.hasAudio === false) || + (this.hasAudio === true && + this.audioCodec != null && + this.audioSampleRate != null && + this.audioChannelCount != null); + + let videoInfoComplete = (this.hasVideo === false) || + (this.hasVideo === true && + this.videoCodec != null && + this.width != null && + this.height != null && + this.fps != null && + this.profile != null && + this.level != null && + this.refFrames != null && + this.chromaFormat != null && + this.sarNum != null && + this.sarDen != null); + + // keyframesIndex may not be present + return this.mimeType != null && + this.duration != null && + this.metadata != null && + this.hasKeyframesIndex != null && + audioInfoComplete && + videoInfoComplete; + } + + isSeekable() { + return this.hasKeyframesIndex === true; + } + + getNearestKeyframe(milliseconds) { + if (this.keyframesIndex == null) { + return null; + } + + let table = this.keyframesIndex; + let keyframeIdx = this._search(table.times, milliseconds); + + return { + index: keyframeIdx, + milliseconds: table.times[keyframeIdx], + fileposition: table.filepositions[keyframeIdx] + }; + } + + _search(list, value) { + let idx = 0; + + let last = list.length - 1; + let mid = 0; + let lbound = 0; + let ubound = last; + + if (value < list[0]) { + idx = 0; + lbound = ubound + 1; // skip search + } + + while (lbound <= ubound) { + mid = lbound + Math.floor((ubound - lbound) / 2); + if (mid === last || (value >= list[mid] && value < list[mid + 1])) { + idx = mid; + break; + } else if (list[mid] < value) { + lbound = mid + 1; + } else { + ubound = mid - 1; + } + } + + return idx; + } + +} + +export default MediaInfo; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/core/media-segment-info.js b/packages/xgplayer-flv.js/src/flv/core/media-segment-info.js new file mode 100644 index 00000000..9aafa750 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/core/media-segment-info.js @@ -0,0 +1,230 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Represents an media sample (audio / video) +export class SampleInfo { + + constructor(dts, pts, duration, originalDts, isSync) { + this.dts = dts; + this.pts = pts; + this.duration = duration; + this.originalDts = originalDts; + this.isSyncPoint = isSync; + this.fileposition = null; + } + +} + +// Media Segment concept is defined in Media Source Extensions spec. +// Particularly in ISO BMFF format, an Media Segment contains a moof box followed by a mdat box. +export class MediaSegmentInfo { + + constructor() { + this.beginDts = 0; + this.endDts = 0; + this.beginPts = 0; + this.endPts = 0; + this.originalBeginDts = 0; + this.originalEndDts = 0; + this.syncPoints = []; // SampleInfo[n], for video IDR frames only + this.firstSample = null; // SampleInfo + this.lastSample = null; // SampleInfo + } + + appendSyncPoint(sampleInfo) { // also called Random Access Point + sampleInfo.isSyncPoint = true; + this.syncPoints.push(sampleInfo); + } + +} + +// Ordered list for recording video IDR frames, sorted by originalDts +export class IDRSampleList { + + constructor() { + this._list = []; + } + + clear() { + this._list = []; + } + + appendArray(syncPoints) { + let list = this._list; + + if (syncPoints.length === 0) { + return; + } + + if (list.length > 0 && syncPoints[0].originalDts < list[list.length - 1].originalDts) { + this.clear(); + } + + Array.prototype.push.apply(list, syncPoints); + } + + getLastSyncPointBeforeDts(dts) { + if (this._list.length == 0) { + return null; + } + + let list = this._list; + let idx = 0; + let last = list.length - 1; + let mid = 0; + let lbound = 0; + let ubound = last; + + if (dts < list[0].dts) { + idx = 0; + lbound = ubound + 1; + } + + while (lbound <= ubound) { + mid = lbound + Math.floor((ubound - lbound) / 2); + if (mid === last || (dts >= list[mid].dts && dts < list[mid + 1].dts)) { + idx = mid; + break; + } else if (list[mid].dts < dts) { + lbound = mid + 1; + } else { + ubound = mid - 1; + } + } + return this._list[idx]; + } + +} + +// Data structure for recording information of media segments in single track. +export class MediaSegmentInfoList { + + constructor(type) { + this._type = type; + this._list = []; + this._lastAppendLocation = -1; // cached last insert location + } + + get type() { + return this._type; + } + + get length() { + return this._list.length; + } + + isEmpty() { + return this._list.length === 0; + } + + clear() { + this._list = []; + this._lastAppendLocation = -1; + } + + _searchNearestSegmentBefore(originalBeginDts) { + let list = this._list; + if (list.length === 0) { + return -2; + } + let last = list.length - 1; + let mid = 0; + let lbound = 0; + let ubound = last; + + let idx = 0; + + if (originalBeginDts < list[0].originalBeginDts) { + idx = -1; + return idx; + } + + while (lbound <= ubound) { + mid = lbound + Math.floor((ubound - lbound) / 2); + if (mid === last || (originalBeginDts > list[mid].lastSample.originalDts && + (originalBeginDts < list[mid + 1].originalBeginDts))) { + idx = mid; + break; + } else if (list[mid].originalBeginDts < originalBeginDts) { + lbound = mid + 1; + } else { + ubound = mid - 1; + } + } + return idx; + } + + _searchNearestSegmentAfter(originalBeginDts) { + return this._searchNearestSegmentBefore(originalBeginDts) + 1; + } + + append(mediaSegmentInfo) { + let list = this._list; + let msi = mediaSegmentInfo; + let lastAppendIdx = this._lastAppendLocation; + let insertIdx = 0; + + if (lastAppendIdx !== -1 && lastAppendIdx < list.length && + msi.originalBeginDts >= list[lastAppendIdx].lastSample.originalDts && + ((lastAppendIdx === list.length - 1) || + (lastAppendIdx < list.length - 1 && + msi.originalBeginDts < list[lastAppendIdx + 1].originalBeginDts))) { + insertIdx = lastAppendIdx + 1; // use cached location idx + } else { + if (list.length > 0) { + insertIdx = this._searchNearestSegmentBefore(msi.originalBeginDts) + 1; + } + } + + this._lastAppendLocation = insertIdx; + this._list.splice(insertIdx, 0, msi); + } + + getLastSegmentBefore(originalBeginDts) { + let idx = this._searchNearestSegmentBefore(originalBeginDts); + if (idx >= 0) { + return this._list[idx]; + } else { // -1 + return null; + } + } + + getLastSampleBefore(originalBeginDts) { + let segment = this.getLastSegmentBefore(originalBeginDts); + if (segment != null) { + return segment.lastSample; + } else { + return null; + } + } + + getLastSyncPointBefore(originalBeginDts) { + let segmentIdx = this._searchNearestSegmentBefore(originalBeginDts); + let syncPoints = this._list[segmentIdx].syncPoints; + while (syncPoints.length === 0 && segmentIdx > 0) { + segmentIdx--; + syncPoints = this._list[segmentIdx].syncPoints; + } + if (syncPoints.length > 0) { + return syncPoints[syncPoints.length - 1]; + } else { + return null; + } + } + +} \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/core/mse-controller.js b/packages/xgplayer-flv.js/src/flv/core/mse-controller.js new file mode 100644 index 00000000..824b7803 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/core/mse-controller.js @@ -0,0 +1,556 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EventEmitter from 'events'; +import Log from '../utils/logger.js'; +import Browser from '../utils/browser.js'; +import MSEEvents from './mse-events.js'; +import {SampleInfo, IDRSampleList} from './media-segment-info.js'; +import {IllegalStateException} from '../utils/exception.js'; + +// Media Source Extensions controller +class MSEController { + + constructor(config) { + this.TAG = 'MSEController'; + + this._config = config; + this._emitter = new EventEmitter(); + + if (this._config.isLive && this._config.autoCleanupSourceBuffer == undefined) { + // For live stream, do auto cleanup by default + this._config.autoCleanupSourceBuffer = true; + } + this.definitionChange = false; + this.e = { + onSourceOpen: this._onSourceOpen.bind(this), + onSourceEnded: this._onSourceEnded.bind(this), + onSourceClose: this._onSourceClose.bind(this), + onSourceBufferError: this._onSourceBufferError.bind(this), + onSourceBufferUpdateEnd: this._onSourceBufferUpdateEnd.bind(this) + }; + + this._mediaSource = null; + this._mediaSourceObjectURL = null; + this._mediaElement = null; + + this._isBufferFull = false; + this._hasPendingEos = false; + + this._requireSetMediaDuration = false; + this._pendingMediaDuration = 0; + + this._pendingSourceBufferInit = []; + this._mimeTypes = { + video: null, + audio: null + }; + this._sourceBuffers = { + video: null, + audio: null + }; + this._lastInitSegments = { + video: null, + audio: null + }; + this._pendingSegments = { + video: [], + audio: [] + }; + this._pendingRemoveRanges = { + video: [], + audio: [] + }; + this._idrList = new IDRSampleList(); + } + + destroy() { + if (this._mediaElement || this._mediaSource) { + this.detachMediaElement(); + } + this.e = null; + this._emitter.removeAllListeners(); + this._emitter = null; + } + + on(event, listener) { + this._emitter.addListener(event, listener); + } + + off(event, listener) { + this._emitter.removeListener(event, listener); + } + + attachMediaElement(mediaElement) { + if (this._mediaSource) { + throw new IllegalStateException('MediaSource has been attached to an HTMLMediaElement!'); + } + let ms = this._mediaSource = new window.MediaSource(); + ms.addEventListener('sourceopen', this.e.onSourceOpen); + ms.addEventListener('sourceended', this.e.onSourceEnded); + ms.addEventListener('sourceclose', this.e.onSourceClose); + + this._mediaElement = mediaElement; + this._mediaSourceObjectURL = window.URL.createObjectURL(this._mediaSource); + mediaElement.src = this._mediaSourceObjectURL; + } + + detachMediaElement() { + if (this._mediaSource) { + let ms = this._mediaSource; + for (let type in this._sourceBuffers) { + // pending segments should be discard + let ps = this._pendingSegments[type]; + ps.splice(0, ps.length); + this._pendingSegments[type] = null; + this._pendingRemoveRanges[type] = null; + this._lastInitSegments[type] = null; + + // remove all sourcebuffers + let sb = this._sourceBuffers[type]; + if (sb) { + if (ms.readyState !== 'closed') { + ms.removeSourceBuffer(sb); + sb.removeEventListener('error', this.e.onSourceBufferError); + sb.removeEventListener('updateend', this.e.onSourceBufferUpdateEnd); + } + this._mimeTypes[type] = null; + this._sourceBuffers[type] = null; + } + } + if (ms.readyState === 'open') { + try { + ms.endOfStream(); + } catch (error) { + Log.e(this.TAG, error.message); + } + } + ms.removeEventListener('sourceopen', this.e.onSourceOpen); + ms.removeEventListener('sourceended', this.e.onSourceEnded); + ms.removeEventListener('sourceclose', this.e.onSourceClose); + this._pendingSourceBufferInit = []; + this._isBufferFull = false; + this._idrList.clear(); + this._mediaSource = null; + } + + if (this._mediaElement) { + this._mediaElement.src = ''; + this._mediaElement.removeAttribute('src'); + this._mediaElement = null; + } + if (this._mediaSourceObjectURL) { + window.URL.revokeObjectURL(this._mediaSourceObjectURL); + this._mediaSourceObjectURL = null; + } + } + newSourceInitSegment (initSegment) { + let is = initSegment; + let mimeType = `${is.container}`; + if (is.codec && is.codec.length > 0) { + mimeType += `;codecs=${is.codec}`; + } + + let ps = this._pendingSegments[is.type]; + ps.splice(0, ps.length); + this._pendingSegments[is.type] = []; + this._pendingRemoveRanges[is.type] = []; + this._lastInitSegments[is.type] = []; + let ms = this._mediaSource; + this.definitionChange = true; + if (this._sourceBuffers[is.type]) { + ms.removeSourceBuffer(this._sourceBuffers[is.type]); + let sb = this._sourceBuffers[is.type] = this._mediaSource.addSourceBuffer(mimeType); + sb.addEventListener('error', this.e.onSourceBufferError); + sb.addEventListener('updateend', this.e.onSourceBufferUpdateEnd); + } + // this.definitionChange = false; + + } + + appendInitSegment(initSegment, deferred) { + if (!this._mediaSource || this._mediaSource.readyState !== 'open') { + // sourcebuffer creation requires mediaSource.readyState === 'open' + // so we defer the sourcebuffer creation, until sourceopen event triggered + this._pendingSourceBufferInit.push(initSegment); + // make sure that this InitSegment is in the front of pending segments queue + this._pendingSegments[initSegment.type].push(initSegment); + return; + } + + let is = initSegment; + let mimeType = `${is.container}`; + if (is.codec && is.codec.length > 0) { + mimeType += `;codecs=${is.codec}`; + } + + let firstInitSegment = false; + + Log.v(this.TAG, 'Received Initialization Segment, mimeType: ' + mimeType); + this._lastInitSegments[is.type] = is; + + if (mimeType !== this._mimeTypes[is.type]) { + if (!this._mimeTypes[is.type]) { // empty, first chance create sourcebuffer + firstInitSegment = true; + try { + let sb = this._sourceBuffers[is.type] = this._mediaSource.addSourceBuffer(mimeType); + sb.addEventListener('error', this.e.onSourceBufferError); + sb.addEventListener('updateend', this.e.onSourceBufferUpdateEnd); + } catch (error) { + Log.e(this.TAG, error.message); + this._emitter.emit(MSEEvents.ERROR, {code: error.code, msg: error.message}); + return; + } + } else { + Log.v(this.TAG, `Notice: ${is.type} mimeType changed, origin: ${this._mimeTypes[is.type]}, target: ${mimeType}`); + } + this._mimeTypes[is.type] = mimeType; + } + + if (!deferred) { + // deferred means this InitSegment has been pushed to pendingSegments queue + this._pendingSegments[is.type].push(is); + } + if (!firstInitSegment) { // append immediately only if init segment in subsequence + if (this._sourceBuffers[is.type] && !this._sourceBuffers[is.type].updating) { + this._doAppendSegments(); + } + } + if (Browser.safari && is.container === 'audio/mpeg' && is.mediaDuration > 0) { + // 'audio/mpeg' track under Safari may cause MediaElement's duration to be NaN + // Manually correct MediaSource.duration to make progress bar seekable, and report right duration + this._requireSetMediaDuration = true; + this._pendingMediaDuration = is.mediaDuration / 1000; // in seconds + this._updateMediaSourceDuration(); + } + } + + appendMediaSegment(mediaSegment) { + let ms = mediaSegment; + this._pendingSegments[ms.type].push(ms); + + if (this._config.autoCleanupSourceBuffer && this._needCleanupSourceBuffer()) { + this._doCleanupSourceBuffer(); + } + + let sb = this._sourceBuffers[ms.type]; + if (sb && !sb.updating && !this._hasPendingRemoveRanges() && this.definitionChange === false) { + this._doAppendSegments(); + } + } + + seek(seconds) { + // remove all appended buffers + for (let type in this._sourceBuffers) { + if (!this._sourceBuffers[type]) { + continue; + } + + // abort current buffer append algorithm + let sb = this._sourceBuffers[type]; + if (this._mediaSource.readyState === 'open') { + try { + // If range removal algorithm is running, InvalidStateError will be throwed + // Ignore it. + sb.abort(); + } catch (error) { + Log.e(this.TAG, error.message); + } + } + + // IDRList should be clear + this._idrList.clear(); + + // pending segments should be discard + let ps = this._pendingSegments[type]; + ps.splice(0, ps.length); + + if (this._mediaSource.readyState === 'closed') { + // Parent MediaSource object has been detached from HTMLMediaElement + continue; + } + + // record ranges to be remove from SourceBuffer + for (let i = 0; i < sb.buffered.length; i++) { + let start = sb.buffered.start(i); + let end = sb.buffered.end(i); + this._pendingRemoveRanges[type].push({start, end}); + } + + // if sb is not updating, let's remove ranges now! + if (!sb.updating) { + this._doRemoveRanges(); + } + + // Safari 10 may get InvalidStateError in the later appendBuffer() after SourceBuffer.remove() call + // Internal parser's state may be invalid at this time. Re-append last InitSegment to workaround. + // Related issue: https://bugs.webkit.org/show_bug.cgi?id=159230 + if (Browser.safari) { + let lastInitSegment = this._lastInitSegments[type]; + if (lastInitSegment) { + this._pendingSegments[type].push(lastInitSegment); + if (!sb.updating) { + this._doAppendSegments(); + } + } + } + } + } + + endOfStream() { + let ms = this._mediaSource; + let sb = this._sourceBuffers; + if (!ms || ms.readyState !== 'open') { + if (ms && ms.readyState === 'closed' && this._hasPendingSegments()) { + // If MediaSource hasn't turned into open state, and there're pending segments + // Mark pending endOfStream, defer call until all pending segments appended complete + this._hasPendingEos = true; + } + return; + } + if (sb.video && sb.video.updating || sb.audio && sb.audio.updating) { + // If any sourcebuffer is updating, defer endOfStream operation + // See _onSourceBufferUpdateEnd() + this._hasPendingEos = true; + } else { + this._hasPendingEos = false; + // Notify media data loading complete + // This is helpful for correcting total duration to match last media segment + // Otherwise MediaElement's ended event may not be triggered + ms.endOfStream(); + } + } + + getNearestKeyframe(dts) { + return this._idrList.getLastSyncPointBeforeDts(dts); + } + + _needCleanupSourceBuffer() { + if (!this._config.autoCleanupSourceBuffer) { + return false; + } + + let currentTime = this._mediaElement.currentTime; + + for (let type in this._sourceBuffers) { + let sb = this._sourceBuffers[type]; + if (sb) { + let buffered = sb.buffered; + if (buffered.length >= 1) { + if (currentTime - buffered.start(0) >= this._config.autoCleanupMaxBackwardDuration) { + return true; + } + } + } + } + + return false; + } + + _doCleanupSourceBuffer() { + let currentTime = this._mediaElement.currentTime; + + for (let type in this._sourceBuffers) { + let sb = this._sourceBuffers[type]; + if (sb) { + let buffered = sb.buffered; + let doRemove = false; + + for (let i = 0; i < buffered.length; i++) { + let start = buffered.start(i); + let end = buffered.end(i); + + if (start <= currentTime && currentTime < end + 3) { // padding 3 seconds + if (currentTime - start >= this._config.autoCleanupMaxBackwardDuration) { + doRemove = true; + let removeEnd = currentTime - this._config.autoCleanupMinBackwardDuration; + this._pendingRemoveRanges[type].push({start: start, end: removeEnd}); + } + } else if (end < currentTime) { + doRemove = true; + this._pendingRemoveRanges[type].push({start: start, end: end}); + } + } + + if (doRemove && !sb.updating) { + this._doRemoveRanges(); + } + } + } + } + + _updateMediaSourceDuration() { + let sb = this._sourceBuffers; + if (this._mediaElement.readyState === 0 || this._mediaSource.readyState !== 'open') { + return; + } + if ((sb.video && sb.video.updating) || (sb.audio && sb.audio.updating)) { + return; + } + + let current = this._mediaSource.duration; + let target = this._pendingMediaDuration; + + if (target > 0 && (isNaN(current) || target > current)) { + Log.v(this.TAG, `Update MediaSource duration from ${current} to ${target}`); + this._mediaSource.duration = target; + } + + this._requireSetMediaDuration = false; + this._pendingMediaDuration = 0; + } + + _doRemoveRanges() { + for (let type in this._pendingRemoveRanges) { + if (!this._sourceBuffers[type] || this._sourceBuffers[type].updating) { + continue; + } + let sb = this._sourceBuffers[type]; + let ranges = this._pendingRemoveRanges[type]; + while (ranges.length && !sb.updating) { + let range = ranges.shift(); + sb.remove(range.start, range.end); + } + } + } + + _doAppendSegments() { + let pendingSegments = this._pendingSegments; + for (let type in pendingSegments) { + if (!this._sourceBuffers[type] || this._sourceBuffers[type].updating) { + continue; + } + + if (pendingSegments[type].length > 0) { + let segment = pendingSegments[type].shift(); + + if (segment.timestampOffset) { + // For MPEG audio stream in MSE, if unbuffered-seeking occurred + // We need explicitly set timestampOffset to the desired point in timeline for mpeg SourceBuffer. + let currentOffset = this._sourceBuffers[type].timestampOffset; + let targetOffset = segment.timestampOffset / 1000; // in seconds + + let delta = Math.abs(currentOffset - targetOffset); + if (delta > 0.1) { // If time delta > 100ms + Log.v(this.TAG, `Update MPEG audio timestampOffset from ${currentOffset} to ${targetOffset}`); + this._sourceBuffers[type].timestampOffset = targetOffset; + } + delete segment.timestampOffset; + } + + if (!segment.data || segment.data.byteLength === 0) { + // Ignore empty buffer + continue; + } + + try { + this._sourceBuffers[type].appendBuffer(segment.data); + this._isBufferFull = false; + if (type === 'video' && segment.hasOwnProperty('info')) { + this._idrList.appendArray(segment.info.syncPoints); + } + } catch (error) { + this._pendingSegments[type].unshift(segment); + if (error.code === 22) { // QuotaExceededError + /* Notice that FireFox may not throw QuotaExceededError if SourceBuffer is full + * Currently we can only do lazy-load to avoid SourceBuffer become scattered. + * SourceBuffer eviction policy may be changed in future version of FireFox. + * + * Related issues: + * https://bugzilla.mozilla.org/show_bug.cgi?id=1279885 + * https://bugzilla.mozilla.org/show_bug.cgi?id=1280023 + */ + + // report buffer full, abort network IO + if (!this._isBufferFull) { + this._emitter.emit(MSEEvents.BUFFER_FULL); + } + this._isBufferFull = true; + } else { + Log.e(this.TAG, error.message); + this._emitter.emit(MSEEvents.ERROR, {code: error.code, msg: error.message}); + } + } + } + } + } + + _onSourceOpen() { + Log.v(this.TAG, 'MediaSource onSourceOpen'); + this._mediaSource.removeEventListener('sourceopen', this.e.onSourceOpen); + // deferred sourcebuffer creation / initialization + if (this._pendingSourceBufferInit.length > 0) { + let pendings = this._pendingSourceBufferInit; + while (pendings.length) { + let segment = pendings.shift(); + this.appendInitSegment(segment, true); + } + } + // there may be some pending media segments, append them + if (this._hasPendingSegments()) { + this._doAppendSegments(); + } + this._emitter.emit(MSEEvents.SOURCE_OPEN); + } + + _onSourceEnded() { + // fired on endOfStream + Log.v(this.TAG, 'MediaSource onSourceEnded'); + } + + _onSourceClose() { + // fired on detaching from media element + Log.v(this.TAG, 'MediaSource onSourceClose'); + if (this._mediaSource && this.e != null) { + this._mediaSource.removeEventListener('sourceopen', this.e.onSourceOpen); + this._mediaSource.removeEventListener('sourceended', this.e.onSourceEnded); + this._mediaSource.removeEventListener('sourceclose', this.e.onSourceClose); + } + } + + _hasPendingSegments() { + let ps = this._pendingSegments; + return ps.video.length > 0 || ps.audio.length > 0; + } + + _hasPendingRemoveRanges() { + let prr = this._pendingRemoveRanges; + return prr.video.length > 0 || prr.audio.length > 0; + } + + _onSourceBufferUpdateEnd() { + if (this._requireSetMediaDuration) { + this._updateMediaSourceDuration(); + } else if (this._hasPendingRemoveRanges()) { + this._doRemoveRanges(); + } else if (this._hasPendingSegments()) { + this._doAppendSegments(); + } else if (this._hasPendingEos) { + this.endOfStream(); + } + this._emitter.emit(MSEEvents.UPDATE_END); + } + + _onSourceBufferError(e) { + Log.e(this.TAG, `SourceBuffer Error: ${e}`); + // this error might not always be fatal, just ignore it + } + +} + +export default MSEController; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/core/mse-events.js b/packages/xgplayer-flv.js/src/flv/core/mse-events.js new file mode 100644 index 00000000..e2e34528 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/core/mse-events.js @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const MSEEvents = { + ERROR: 'error', + SOURCE_OPEN: 'source_open', + UPDATE_END: 'update_end', + BUFFER_FULL: 'buffer_full' +}; + +export default MSEEvents; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/core/transmuxer.js b/packages/xgplayer-flv.js/src/flv/core/transmuxer.js new file mode 100644 index 00000000..2fe329aa --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/core/transmuxer.js @@ -0,0 +1,241 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EventEmitter from 'events'; +import Log from '../utils/logger.js'; +import LoggingControl from '../utils/logging-control.js'; +import TransmuxingController from './transmuxing-controller.js'; +import TransmuxingEvents from './transmuxing-events.js'; +import TransmuxingWorker from './transmuxing-worker.js'; +import MediaInfo from './media-info.js'; + +class Transmuxer { + + constructor(mediaDataSource, config) { + this.TAG = 'Transmuxer'; + this._emitter = new EventEmitter(); + this.isDefinitionChanging = false; + if (config.enableWorker && typeof (Worker) !== 'undefined') { + try { + let work = require('webworkify'); + this._worker = work(TransmuxingWorker); + this._workerDestroying = false; + this._worker.addEventListener('message', this._onWorkerMessage.bind(this)); + this._worker.postMessage({cmd: 'init', param: [mediaDataSource, config]}); + this.e = { + onLoggingConfigChanged: this._onLoggingConfigChanged.bind(this) + }; + LoggingControl.registerListener(this.e.onLoggingConfigChanged); + this._worker.postMessage({cmd: 'logging_config', param: LoggingControl.getConfig()}); + } catch (error) { + Log.e(this.TAG, 'Error while initialize transmuxing worker, fallback to inline transmuxing'); + this._worker = null; + this._controller = new TransmuxingController(mediaDataSource, config); + } + } else { + this._controller = new TransmuxingController(mediaDataSource, config); + } + + if (this._controller) { + let ctl = this._controller; + ctl.on(TransmuxingEvents.IO_ERROR, this._onIOError.bind(this)); + ctl.on(TransmuxingEvents.DEMUX_ERROR, this._onDemuxError.bind(this)); + ctl.on(TransmuxingEvents.INIT_SEGMENT, this._onInitSegment.bind(this)); + ctl.on(TransmuxingEvents.MEDIA_SEGMENT, this._onMediaSegment.bind(this)); + ctl.on(TransmuxingEvents.LOADING_COMPLETE, this._onLoadingComplete.bind(this)); + ctl.on(TransmuxingEvents.RECOVERED_EARLY_EOF, this._onRecoveredEarlyEof.bind(this)); + ctl.on(TransmuxingEvents.MEDIA_INFO, this._onMediaInfo.bind(this)); + ctl.on(TransmuxingEvents.STATISTICS_INFO, this._onStatisticsInfo.bind(this)); + ctl.on(TransmuxingEvents.RECOMMEND_SEEKPOINT, this._onRecommendSeekpoint.bind(this)); + } + } + + destroy() { + if (this._worker) { + if (!this._workerDestroying) { + this._workerDestroying = true; + this._worker.postMessage({cmd: 'destroy'}); + LoggingControl.removeListener(this.e.onLoggingConfigChanged); + this.e = null; + } + } else { + this._controller.destroy(); + this._controller = null; + } + this._emitter.removeAllListeners(); + this._emitter = null; + } + + on(event, listener) { + this._emitter && this._emitter.addListener(event, listener); + } + + off(event, listener) { + this._emitter && this._emitter.removeListener(event, listener); + } + + hasWorker() { + return this._worker != null; + } + + open() { + if (this._worker) { + this._worker.postMessage({cmd: 'start'}); + } else { + this._controller.start(); + } + } + + close() { + if (this._worker) { + this._worker.postMessage({cmd: 'stop'}); + } else { + this._controller.stop(); + } + } + + seek(milliseconds) { + if (this._worker) { + this._worker.postMessage({cmd: 'seek', param: milliseconds}); + } else { + this._controller.seek(milliseconds); + } + } + + pause() { + if (this._worker) { + this._worker.postMessage({cmd: 'pause'}); + } else { + this._controller.pause(); + } + } + + resume() { + if (this._worker) { + this._worker.postMessage({cmd: 'resume'}); + } else { + this._controller.resume(); + } + } + + _onInitSegment(type, initSegment) { + // do async invoke + Promise.resolve().then(() => { + this._emitter && this._emitter.emit(TransmuxingEvents.INIT_SEGMENT, type, initSegment); + }); + } + + _onMediaSegment(type, mediaSegment) { + Promise.resolve().then(() => { + this._emitter && this._emitter.emit(TransmuxingEvents.MEDIA_SEGMENT, type, mediaSegment); + }); + } + + _onLoadingComplete() { + Promise.resolve().then(() => { + this._emitter && this._emitter.emit(TransmuxingEvents.LOADING_COMPLETE); + }); + } + + _onRecoveredEarlyEof() { + Promise.resolve().then(() => { + this._emitter && this._emitter.emit(TransmuxingEvents.RECOVERED_EARLY_EOF); + }); + } + + _onMediaInfo(mediaInfo) { + Promise.resolve().then(() => { + this._emitter && this._emitter.emit(TransmuxingEvents.MEDIA_INFO, mediaInfo); + }); + } + + _onStatisticsInfo(statisticsInfo) { + Promise.resolve().then(() => { + this._emitter && this._emitter.emit(TransmuxingEvents.STATISTICS_INFO, statisticsInfo); + }); + } + + _onIOError(type, info) { + Promise.resolve().then(() => { + this._emitter && this._emitter.emit(TransmuxingEvents.IO_ERROR, type, info); + }); + } + + _onDemuxError(type, info) { + Promise.resolve().then(() => { + this._emitter && this._emitter.emit(TransmuxingEvents.DEMUX_ERROR, type, info); + }); + } + + _onRecommendSeekpoint(milliseconds) { + Promise.resolve().then(() => { + this._emitter && this._emitter.emit(TransmuxingEvents.RECOMMEND_SEEKPOINT, milliseconds); + }); + } + + _onLoggingConfigChanged(config) { + if (this._worker) { + this._worker.postMessage({cmd: 'logging_config', param: config}); + } + } + + _onWorkerMessage(e) { + let message = e.data; + let data = message.data; + + if (message.msg === 'destroyed' || this._workerDestroying) { + this._workerDestroying = false; + this._worker.terminate(); + this._worker = null; + return; + } + + switch (message.msg) { + case TransmuxingEvents.INIT_SEGMENT: + case TransmuxingEvents.MEDIA_SEGMENT: + this._emitter.emit(message.msg, data.type, data.data); + break; + case TransmuxingEvents.LOADING_COMPLETE: + case TransmuxingEvents.RECOVERED_EARLY_EOF: + this._emitter.emit(message.msg); + break; + case TransmuxingEvents.MEDIA_INFO: + Object.setPrototypeOf(data, MediaInfo.prototype); + this._emitter.emit(message.msg, data); + break; + case TransmuxingEvents.STATISTICS_INFO: + this._emitter.emit(message.msg, data); + break; + case TransmuxingEvents.IO_ERROR: + case TransmuxingEvents.DEMUX_ERROR: + this._emitter.emit(message.msg, data.type, data.info); + break; + case TransmuxingEvents.RECOMMEND_SEEKPOINT: + this._emitter.emit(message.msg, data); + break; + case 'logcat_callback': + Log.emitter.emit('log', data.type, data.logcat); + break; + default: + break; + } + } + +} + +export default Transmuxer; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/core/transmuxing-controller.js b/packages/xgplayer-flv.js/src/flv/core/transmuxing-controller.js new file mode 100644 index 00000000..a252c10e --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/core/transmuxing-controller.js @@ -0,0 +1,428 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EventEmitter from 'events'; +import Log from '../utils/logger.js'; +import Browser from '../utils/browser.js'; +import MediaInfo from './media-info.js'; +import FLVDemuxer from '../demux/flv-demuxer.js'; +import MP4Remuxer from '../remux/mp4-remuxer.js'; +import DemuxErrors from '../demux/demux-errors.js'; +import IOController from '../io/io-controller.js'; +import TransmuxingEvents from './transmuxing-events.js'; +import {LoaderStatus, LoaderErrors} from '../io/loader.js'; + +// Transmuxing (IO, Demuxing, Remuxing) controller, with multipart support +class TransmuxingController { + + constructor(mediaDataSource, config) { + this.TAG = 'TransmuxingController'; + this._emitter = new EventEmitter(); + + this._config = config; + + // treat single part media as multipart media, which has only one segment + if (!mediaDataSource.segments) { + mediaDataSource.segments = [{ + duration: mediaDataSource.duration, + filesize: mediaDataSource.filesize, + url: mediaDataSource.url + }]; + } + + // fill in default IO params if not exists + if (typeof mediaDataSource.cors !== 'boolean') { + mediaDataSource.cors = true; + } + if (typeof mediaDataSource.withCredentials !== 'boolean') { + mediaDataSource.withCredentials = false; + } + + this._mediaDataSource = mediaDataSource; + this._currentSegmentIndex = 0; + let totalDuration = 0; + + this._mediaDataSource.segments.forEach((segment) => { + // timestampBase for each segment, and calculate total duration + segment.timestampBase = totalDuration; + totalDuration += segment.duration; + // params needed by IOController + segment.cors = mediaDataSource.cors; + segment.withCredentials = mediaDataSource.withCredentials; + // referrer policy control, if exist + if (config.referrerPolicy) { + segment.referrerPolicy = config.referrerPolicy; + } + }); + + if (!isNaN(totalDuration) && this._mediaDataSource.duration !== totalDuration) { + this._mediaDataSource.duration = totalDuration; + } + + this._mediaInfo = null; + this._demuxer = null; + this._remuxer = null; + this._ioctl = null; + + this._pendingSeekTime = null; + this._pendingResolveSeekPoint = null; + + this._statisticsReporter = null; + } + + destroy() { + this._mediaInfo = null; + this._mediaDataSource = null; + + if (this._statisticsReporter) { + this._disableStatisticsReporter(); + } + if (this._ioctl) { + this._ioctl.destroy(); + this._ioctl = null; + } + if (this._demuxer) { + this._demuxer.destroy(); + this._demuxer = null; + } + if (this._remuxer) { + this._remuxer.destroy(); + this._remuxer = null; + } + + this._emitter.removeAllListeners(); + this._emitter = null; + } + + on(event, listener) { + this._emitter.addListener(event, listener); + } + + off(event, listener) { + this._emitter.removeListener(event, listener); + } + + start() { + this._loadSegment(0); + this._enableStatisticsReporter(); + } + + _loadSegment(segmentIndex, optionalFrom) { + this._currentSegmentIndex = segmentIndex; + let dataSource = this._mediaDataSource.segments[segmentIndex]; + + let ioctl = this._ioctl = new IOController(dataSource, this._config, segmentIndex); + ioctl.onError = this._onIOException.bind(this); + ioctl.onSeeked = this._onIOSeeked.bind(this); + ioctl.onComplete = this._onIOComplete.bind(this); + ioctl.onRedirect = this._onIORedirect.bind(this); + ioctl.onRecoveredEarlyEof = this._onIORecoveredEarlyEof.bind(this); + + if (optionalFrom) { + this._demuxer.bindDataSource(this._ioctl); + } else { + ioctl.onDataArrival = this._onInitChunkArrival.bind(this); + } + + ioctl.open(optionalFrom); + } + + stop() { + this._internalAbort(); + this._disableStatisticsReporter(); + } + + _internalAbort() { + if (this._ioctl) { + this._ioctl.destroy(); + this._ioctl = null; + } + } + + pause() { // take a rest + if (this._ioctl && this._ioctl.isWorking()) { + this._ioctl.pause(); + this._disableStatisticsReporter(); + } + } + + resume() { + if (this._ioctl && this._ioctl.isPaused()) { + this._ioctl.resume(); + this._enableStatisticsReporter(); + } + } + + seek(milliseconds) { + if (this._mediaInfo == null || !this._mediaInfo.isSeekable()) { + return; + } + + let targetSegmentIndex = this._searchSegmentIndexContains(milliseconds); + + if (targetSegmentIndex === this._currentSegmentIndex) { + // intra-segment seeking + let segmentInfo = this._mediaInfo.segments[targetSegmentIndex]; + + if (segmentInfo == undefined) { + // current segment loading started, but mediainfo hasn't received yet + // wait for the metadata loaded, then seek to expected position + this._pendingSeekTime = milliseconds; + } else { + let keyframe = segmentInfo.getNearestKeyframe(milliseconds); + this._remuxer.seek(keyframe.milliseconds); + this._ioctl.seek(keyframe.fileposition); + // Will be resolved in _onRemuxerMediaSegmentArrival() + this._pendingResolveSeekPoint = keyframe.milliseconds; + } + } else { + // cross-segment seeking + let targetSegmentInfo = this._mediaInfo.segments[targetSegmentIndex]; + + if (targetSegmentInfo == undefined) { + // target segment hasn't been loaded. We need metadata then seek to expected time + this._pendingSeekTime = milliseconds; + this._internalAbort(); + this._remuxer.seek(); + this._remuxer.insertDiscontinuity(); + this._loadSegment(targetSegmentIndex); + // Here we wait for the metadata loaded, then seek to expected position + } else { + // We have target segment's metadata, direct seek to target position + let keyframe = targetSegmentInfo.getNearestKeyframe(milliseconds); + this._internalAbort(); + this._remuxer.seek(milliseconds); + this._remuxer.insertDiscontinuity(); + this._demuxer.resetMediaInfo(); + this._demuxer.timestampBase = this._mediaDataSource.segments[targetSegmentIndex].timestampBase; + this._loadSegment(targetSegmentIndex, keyframe.fileposition); + this._pendingResolveSeekPoint = keyframe.milliseconds; + this._reportSegmentMediaInfo(targetSegmentIndex); + } + } + + this._enableStatisticsReporter(); + } + + _searchSegmentIndexContains(milliseconds) { + let segments = this._mediaDataSource.segments; + let idx = segments.length - 1; + + for (let i = 0; i < segments.length; i++) { + if (milliseconds < segments[i].timestampBase) { + idx = i - 1; + break; + } + } + return idx; + } + + _onInitChunkArrival(data, byteStart) { + let probeData = null; + let consumed = 0; + + if (byteStart > 0) { + // IOController seeked immediately after opened, byteStart > 0 callback may received + this._demuxer.bindDataSource(this._ioctl); + this._demuxer.timestampBase = this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase; + + consumed = this._demuxer.parseChunks(data, byteStart); + } else if ((probeData = FLVDemuxer.probe(data)).match) { + // Always create new FLVDemuxer + this._demuxer = new FLVDemuxer(probeData, this._config); + + if (!this._remuxer) { + this._remuxer = new MP4Remuxer(this._config); + } + + let mds = this._mediaDataSource; + if (mds.duration != undefined && !isNaN(mds.duration)) { + this._demuxer.overridedDuration = mds.duration; + } + if (typeof mds.hasAudio === 'boolean') { + this._demuxer.overridedHasAudio = mds.hasAudio; + } + if (typeof mds.hasVideo === 'boolean') { + this._demuxer.overridedHasVideo = mds.hasVideo; + } + + this._demuxer.timestampBase = mds.segments[this._currentSegmentIndex].timestampBase; + + this._demuxer.onError = this._onDemuxException.bind(this); + this._demuxer.onMediaInfo = this._onMediaInfo.bind(this); + + this._remuxer.bindDataSource(this._demuxer + .bindDataSource(this._ioctl + )); + + this._remuxer.onInitSegment = this._onRemuxerInitSegmentArrival.bind(this); + this._remuxer.onMediaSegment = this._onRemuxerMediaSegmentArrival.bind(this); + + consumed = this._demuxer.parseChunks(data, byteStart); + } else { + probeData = null; + Log.e(this.TAG, 'Non-FLV, Unsupported media type!'); + Promise.resolve().then(() => { + this._internalAbort(); + }); + this._emitter.emit(TransmuxingEvents.DEMUX_ERROR, DemuxErrors.FORMAT_UNSUPPORTED, 'Non-FLV, Unsupported media type'); + + consumed = 0; + } + + return consumed; + } + + _onMediaInfo(mediaInfo) { + if (this._mediaInfo == null) { + // Store first segment's mediainfo as global mediaInfo + this._mediaInfo = Object.assign({}, mediaInfo); + this._mediaInfo.keyframesIndex = null; + this._mediaInfo.segments = []; + this._mediaInfo.segmentCount = this._mediaDataSource.segments.length; + Object.setPrototypeOf(this._mediaInfo, MediaInfo.prototype); + } + + let segmentInfo = Object.assign({}, mediaInfo); + Object.setPrototypeOf(segmentInfo, MediaInfo.prototype); + this._mediaInfo.segments[this._currentSegmentIndex] = segmentInfo; + + // notify mediaInfo update + this._reportSegmentMediaInfo(this._currentSegmentIndex); + + if (this._pendingSeekTime != null) { + Promise.resolve().then(() => { + let target = this._pendingSeekTime; + this._pendingSeekTime = null; + this.seek(target); + }); + } + } + + _onIOSeeked() { + this._remuxer.insertDiscontinuity(); + } + + _onIOComplete(extraData) { + let segmentIndex = extraData; + let nextSegmentIndex = segmentIndex + 1; + + if (nextSegmentIndex < this._mediaDataSource.segments.length) { + this._internalAbort(); + this._loadSegment(nextSegmentIndex); + } else { + this._remuxer.flushStashedSamples(); + this._emitter.emit(TransmuxingEvents.LOADING_COMPLETE); + this._disableStatisticsReporter(); + } + } + + _onIORedirect(redirectedURL) { + let segmentIndex = this._ioctl.extraData; + this._mediaDataSource.segments[segmentIndex].redirectedURL = redirectedURL; + } + + _onIORecoveredEarlyEof() { + this._emitter.emit(TransmuxingEvents.RECOVERED_EARLY_EOF); + } + + _onIOException(type, info) { + Log.e(this.TAG, `IOException: type = ${type}, code = ${info.code}, msg = ${info.msg}`); + this._emitter.emit(TransmuxingEvents.IO_ERROR, type, info); + this._disableStatisticsReporter(); + } + + _onDemuxException(type, info) { + Log.e(this.TAG, `DemuxException: type = ${type}, info = ${info}`); + this._emitter.emit(TransmuxingEvents.DEMUX_ERROR, type, info); + } + + _onRemuxerInitSegmentArrival(type, initSegment) { + this._emitter.emit(TransmuxingEvents.INIT_SEGMENT, type, initSegment); + } + + _onRemuxerMediaSegmentArrival(type, mediaSegment) { + if (this._pendingSeekTime != null) { + // Media segments after new-segment cross-seeking should be dropped. + return; + } + this._emitter.emit(TransmuxingEvents.MEDIA_SEGMENT, type, mediaSegment); + + // Resolve pending seekPoint + if (this._pendingResolveSeekPoint != null && type === 'video') { + let syncPoints = mediaSegment.info.syncPoints; + let seekpoint = this._pendingResolveSeekPoint; + this._pendingResolveSeekPoint = null; + + // Safari: Pass PTS for recommend_seekpoint + if (Browser.safari && syncPoints.length > 0 && syncPoints[0].originalDts === seekpoint) { + seekpoint = syncPoints[0].pts; + } + // else: use original DTS (keyframe.milliseconds) + + this._emitter.emit(TransmuxingEvents.RECOMMEND_SEEKPOINT, seekpoint); + } + } + + _enableStatisticsReporter() { + if (this._statisticsReporter == null) { + this._statisticsReporter = self.setInterval( + this._reportStatisticsInfo.bind(this), + this._config.statisticsInfoReportInterval); + } + } + + _disableStatisticsReporter() { + if (this._statisticsReporter) { + self.clearInterval(this._statisticsReporter); + this._statisticsReporter = null; + } + } + + _reportSegmentMediaInfo(segmentIndex) { + let segmentInfo = this._mediaInfo.segments[segmentIndex]; + let exportInfo = Object.assign({}, segmentInfo); + + exportInfo.duration = this._mediaInfo.duration; + exportInfo.segmentCount = this._mediaInfo.segmentCount; + delete exportInfo.segments; + delete exportInfo.keyframesIndex; + + this._emitter.emit(TransmuxingEvents.MEDIA_INFO, exportInfo); + } + + _reportStatisticsInfo() { + let info = {}; + + info.url = this._ioctl.currentURL; + info.hasRedirect = this._ioctl.hasRedirect; + if (info.hasRedirect) { + info.redirectedURL = this._ioctl.currentRedirectedURL; + } + + info.speed = this._ioctl.currentSpeed; + info.loaderType = this._ioctl.loaderType; + info.currentSegmentIndex = this._currentSegmentIndex; + info.totalSegmentCount = this._mediaDataSource.segments.length; + + this._emitter.emit(TransmuxingEvents.STATISTICS_INFO, info); + } + +} + +export default TransmuxingController; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/core/transmuxing-events.js b/packages/xgplayer-flv.js/src/flv/core/transmuxing-events.js new file mode 100644 index 00000000..78c0232b --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/core/transmuxing-events.js @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const TransmuxingEvents = { + IO_ERROR: 'io_error', + DEMUX_ERROR: 'demux_error', + INIT_SEGMENT: 'init_segment', + MEDIA_SEGMENT: 'media_segment', + LOADING_COMPLETE: 'loading_complete', + RECOVERED_EARLY_EOF: 'recovered_early_eof', + MEDIA_INFO: 'media_info', + STATISTICS_INFO: 'statistics_info', + RECOMMEND_SEEKPOINT: 'recommend_seekpoint' +}; + +export default TransmuxingEvents; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/core/transmuxing-worker.js b/packages/xgplayer-flv.js/src/flv/core/transmuxing-worker.js new file mode 100644 index 00000000..50ac6862 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/core/transmuxing-worker.js @@ -0,0 +1,187 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Log from '../utils/logger.js'; +import LoggingControl from '../utils/logging-control.js'; +import Polyfill from '../utils/polyfill.js'; +import TransmuxingController from './transmuxing-controller.js'; +import TransmuxingEvents from './transmuxing-events.js'; + +/* post message to worker: + data: { + cmd: string + param: any + } + + receive message from worker: + data: { + msg: string, + data: any + } + */ + +let TransmuxingWorker = function (self) { + + let TAG = 'TransmuxingWorker'; + let controller = null; + let logcatListener = onLogcatCallback.bind(this); + + Polyfill.install(); + + self.addEventListener('message', function (e) { + switch (e.data.cmd) { + case 'init': + controller = new TransmuxingController(e.data.param[0], e.data.param[1]); + controller.on(TransmuxingEvents.IO_ERROR, onIOError.bind(this)); + controller.on(TransmuxingEvents.DEMUX_ERROR, onDemuxError.bind(this)); + controller.on(TransmuxingEvents.INIT_SEGMENT, onInitSegment.bind(this)); + controller.on(TransmuxingEvents.MEDIA_SEGMENT, onMediaSegment.bind(this)); + controller.on(TransmuxingEvents.LOADING_COMPLETE, onLoadingComplete.bind(this)); + controller.on(TransmuxingEvents.RECOVERED_EARLY_EOF, onRecoveredEarlyEof.bind(this)); + controller.on(TransmuxingEvents.MEDIA_INFO, onMediaInfo.bind(this)); + controller.on(TransmuxingEvents.STATISTICS_INFO, onStatisticsInfo.bind(this)); + controller.on(TransmuxingEvents.RECOMMEND_SEEKPOINT, onRecommendSeekpoint.bind(this)); + break; + case 'destroy': + if (controller) { + controller.destroy(); + controller = null; + } + self.postMessage({msg: 'destroyed'}); + break; + case 'start': + controller.start(); + break; + case 'stop': + controller.stop(); + break; + case 'seek': + controller.seek(e.data.param); + break; + case 'pause': + controller.pause(); + break; + case 'resume': + controller.resume(); + break; + case 'logging_config': { + let config = e.data.param; + LoggingControl.applyConfig(config); + + if (config.enableCallback === true) { + LoggingControl.addLogListener(logcatListener); + } else { + LoggingControl.removeLogListener(logcatListener); + } + break; + } + } + }); + + function onInitSegment(type, initSegment) { + let obj = { + msg: TransmuxingEvents.INIT_SEGMENT, + data: { + type: type, + data: initSegment + } + }; + self.postMessage(obj, [initSegment.data]); // data: ArrayBuffer + } + + function onMediaSegment(type, mediaSegment) { + let obj = { + msg: TransmuxingEvents.MEDIA_SEGMENT, + data: { + type: type, + data: mediaSegment + } + }; + self.postMessage(obj, [mediaSegment.data]); // data: ArrayBuffer + } + + function onLoadingComplete() { + let obj = { + msg: TransmuxingEvents.LOADING_COMPLETE + }; + self.postMessage(obj); + } + + function onRecoveredEarlyEof() { + let obj = { + msg: TransmuxingEvents.RECOVERED_EARLY_EOF + }; + self.postMessage(obj); + } + + function onMediaInfo(mediaInfo) { + let obj = { + msg: TransmuxingEvents.MEDIA_INFO, + data: mediaInfo + }; + self.postMessage(obj); + } + + function onStatisticsInfo(statInfo) { + let obj = { + msg: TransmuxingEvents.STATISTICS_INFO, + data: statInfo + }; + self.postMessage(obj); + } + + function onIOError(type, info) { + self.postMessage({ + msg: TransmuxingEvents.IO_ERROR, + data: { + type: type, + info: info + } + }); + } + + function onDemuxError(type, info) { + self.postMessage({ + msg: TransmuxingEvents.DEMUX_ERROR, + data: { + type: type, + info: info + } + }); + } + + function onRecommendSeekpoint(milliseconds) { + self.postMessage({ + msg: TransmuxingEvents.RECOMMEND_SEEKPOINT, + data: milliseconds + }); + } + + function onLogcatCallback(type, str) { + self.postMessage({ + msg: 'logcat_callback', + data: { + type: type, + logcat: str + } + }); + } + +}; + +export default TransmuxingWorker; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/demux/amf-parser.js b/packages/xgplayer-flv.js/src/flv/demux/amf-parser.js new file mode 100644 index 00000000..b2e2c608 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/demux/amf-parser.js @@ -0,0 +1,243 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Log from '../utils/logger.js'; +import decodeUTF8 from '../utils/utf8-conv.js'; +import {IllegalStateException} from '../utils/exception.js'; + +let le = (function () { + let buf = new ArrayBuffer(2); + (new DataView(buf)).setInt16(0, 256, true); // little-endian write + return (new Int16Array(buf))[0] === 256; // platform-spec read, if equal then LE +})(); + +class AMF { + + static parseScriptData(arrayBuffer, dataOffset, dataSize) { + let data = {}; + + try { + let name = AMF.parseValue(arrayBuffer, dataOffset, dataSize); + let value = AMF.parseValue(arrayBuffer, dataOffset + name.size, dataSize - name.size); + + data[name.data] = value.data; + } catch (e) { + Log.e('AMF', e.toString()); + } + + return data; + } + + static parseObject(arrayBuffer, dataOffset, dataSize) { + if (dataSize < 3) { + throw new IllegalStateException('Data not enough when parse ScriptDataObject'); + } + let name = AMF.parseString(arrayBuffer, dataOffset, dataSize); + let value = AMF.parseValue(arrayBuffer, dataOffset + name.size, dataSize - name.size); + let isObjectEnd = value.objectEnd; + + return { + data: { + name: name.data, + value: value.data + }, + size: name.size + value.size, + objectEnd: isObjectEnd + }; + } + + static parseVariable(arrayBuffer, dataOffset, dataSize) { + return AMF.parseObject(arrayBuffer, dataOffset, dataSize); + } + + static parseString(arrayBuffer, dataOffset, dataSize) { + if (dataSize < 2) { + throw new IllegalStateException('Data not enough when parse String'); + } + let v = new DataView(arrayBuffer, dataOffset, dataSize); + let length = v.getUint16(0, !le); + + let str; + if (length > 0) { + str = decodeUTF8(new Uint8Array(arrayBuffer, dataOffset + 2, length)); + } else { + str = ''; + } + + return { + data: str, + size: 2 + length + }; + } + + static parseLongString(arrayBuffer, dataOffset, dataSize) { + if (dataSize < 4) { + throw new IllegalStateException('Data not enough when parse LongString'); + } + let v = new DataView(arrayBuffer, dataOffset, dataSize); + let length = v.getUint32(0, !le); + + let str; + if (length > 0) { + str = decodeUTF8(new Uint8Array(arrayBuffer, dataOffset + 4, length)); + } else { + str = ''; + } + + return { + data: str, + size: 4 + length + }; + } + + static parseDate(arrayBuffer, dataOffset, dataSize) { + if (dataSize < 10) { + throw new IllegalStateException('Data size invalid when parse Date'); + } + let v = new DataView(arrayBuffer, dataOffset, dataSize); + let timestamp = v.getFloat64(0, !le); + let localTimeOffset = v.getInt16(8, !le); + timestamp += localTimeOffset * 60 * 1000; // get UTC time + + return { + data: new Date(timestamp), + size: 8 + 2 + }; + } + + static parseValue(arrayBuffer, dataOffset, dataSize) { + if (dataSize < 1) { + throw new IllegalStateException('Data not enough when parse Value'); + } + + let v = new DataView(arrayBuffer, dataOffset, dataSize); + + let offset = 1; + let type = v.getUint8(0); + let value; + let objectEnd = false; + + try { + switch (type) { + case 0: // Number(Double) type + value = v.getFloat64(1, !le); + offset += 8; + break; + case 1: { // Boolean type + let b = v.getUint8(1); + value = b ? true : false; + offset += 1; + break; + } + case 2: { // String type + let amfstr = AMF.parseString(arrayBuffer, dataOffset + 1, dataSize - 1); + value = amfstr.data; + offset += amfstr.size; + break; + } + case 3: { // Object(s) type + value = {}; + let terminal = 0; // workaround for malformed Objects which has missing ScriptDataObjectEnd + if ((v.getUint32(dataSize - 4, !le) & 0x00FFFFFF) === 9) { + terminal = 3; + } + while (offset < dataSize - 4) { // 4 === type(UI8) + ScriptDataObjectEnd(UI24) + let amfobj = AMF.parseObject(arrayBuffer, dataOffset + offset, dataSize - offset - terminal); + if (amfobj.objectEnd) + break; + value[amfobj.data.name] = amfobj.data.value; + offset += amfobj.size; + } + if (offset <= dataSize - 3) { + let marker = v.getUint32(offset - 1, !le) & 0x00FFFFFF; + if (marker === 9) { + offset += 3; + } + } + break; + } + case 8: { // ECMA array type (Mixed array) + value = {}; + offset += 4; // ECMAArrayLength(UI32) + let terminal = 0; // workaround for malformed MixedArrays which has missing ScriptDataObjectEnd + if ((v.getUint32(dataSize - 4, !le) & 0x00FFFFFF) === 9) { + terminal = 3; + } + while (offset < dataSize - 8) { // 8 === type(UI8) + ECMAArrayLength(UI32) + ScriptDataVariableEnd(UI24) + let amfvar = AMF.parseVariable(arrayBuffer, dataOffset + offset, dataSize - offset - terminal); + if (amfvar.objectEnd) + break; + value[amfvar.data.name] = amfvar.data.value; + offset += amfvar.size; + } + if (offset <= dataSize - 3) { + let marker = v.getUint32(offset - 1, !le) & 0x00FFFFFF; + if (marker === 9) { + offset += 3; + } + } + break; + } + case 9: // ScriptDataObjectEnd + value = undefined; + offset = 1; + objectEnd = true; + break; + case 10: { // Strict array type + // ScriptDataValue[n]. NOTE: according to video_file_format_spec_v10_1.pdf + value = []; + let strictArrayLength = v.getUint32(1, !le); + offset += 4; + for (let i = 0; i < strictArrayLength; i++) { + let val = AMF.parseValue(arrayBuffer, dataOffset + offset, dataSize - offset); + value.push(val.data); + offset += val.size; + } + break; + } + case 11: { // Date type + let date = AMF.parseDate(arrayBuffer, dataOffset + 1, dataSize - 1); + value = date.data; + offset += date.size; + break; + } + case 12: { // Long string type + let amfLongStr = AMF.parseString(arrayBuffer, dataOffset + 1, dataSize - 1); + value = amfLongStr.data; + offset += amfLongStr.size; + break; + } + default: + // ignore and skip + offset = dataSize; + Log.w('AMF', 'Unsupported AMF value type ' + type); + } + } catch (e) { + Log.e('AMF', e.toString()); + } + + return { + data: value, + size: offset, + objectEnd: objectEnd + }; + } + +} + +export default AMF; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/demux/demux-errors.js b/packages/xgplayer-flv.js/src/flv/demux/demux-errors.js new file mode 100644 index 00000000..31bf3d5c --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/demux/demux-errors.js @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const DemuxErrors = { + OK: 'OK', + FORMAT_ERROR: 'FormatError', + FORMAT_UNSUPPORTED: 'FormatUnsupported', + CODEC_UNSUPPORTED: 'CodecUnsupported' +}; + +export default DemuxErrors; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/demux/exp-golomb.js b/packages/xgplayer-flv.js/src/flv/demux/exp-golomb.js new file mode 100644 index 00000000..9604af90 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/demux/exp-golomb.js @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {IllegalStateException, InvalidArgumentException} from '../utils/exception.js'; + +// Exponential-Golomb buffer decoder +class ExpGolomb { + + constructor(uint8array) { + this.TAG = 'ExpGolomb'; + + this._buffer = uint8array; + this._buffer_index = 0; + this._total_bytes = uint8array.byteLength; + this._total_bits = uint8array.byteLength * 8; + this._current_word = 0; + this._current_word_bits_left = 0; + } + + destroy() { + this._buffer = null; + } + + _fillCurrentWord() { + let buffer_bytes_left = this._total_bytes - this._buffer_index; + if (buffer_bytes_left <= 0) + throw new IllegalStateException('ExpGolomb: _fillCurrentWord() but no bytes available'); + + let bytes_read = Math.min(4, buffer_bytes_left); + let word = new Uint8Array(4); + word.set(this._buffer.subarray(this._buffer_index, this._buffer_index + bytes_read)); + this._current_word = new DataView(word.buffer).getUint32(0, false); + + this._buffer_index += bytes_read; + this._current_word_bits_left = bytes_read * 8; + } + + readBits(bits) { + if (bits > 32) + throw new InvalidArgumentException('ExpGolomb: readBits() bits exceeded max 32bits!'); + + if (bits <= this._current_word_bits_left) { + let result = this._current_word >>> (32 - bits); + this._current_word <<= bits; + this._current_word_bits_left -= bits; + return result; + } + + let result = this._current_word_bits_left ? this._current_word : 0; + result = result >>> (32 - this._current_word_bits_left); + let bits_need_left = bits - this._current_word_bits_left; + + this._fillCurrentWord(); + let bits_read_next = Math.min(bits_need_left, this._current_word_bits_left); + + let result2 = this._current_word >>> (32 - bits_read_next); + this._current_word <<= bits_read_next; + this._current_word_bits_left -= bits_read_next; + + result = (result << bits_read_next) | result2; + return result; + } + + readBool() { + return this.readBits(1) === 1; + } + + readByte() { + return this.readBits(8); + } + + _skipLeadingZero() { + let zero_count; + for (zero_count = 0; zero_count < this._current_word_bits_left; zero_count++) { + if (0 !== (this._current_word & (0x80000000 >>> zero_count))) { + this._current_word <<= zero_count; + this._current_word_bits_left -= zero_count; + return zero_count; + } + } + this._fillCurrentWord(); + return zero_count + this._skipLeadingZero(); + } + + readUEG() { // unsigned exponential golomb + let leading_zeros = this._skipLeadingZero(); + return this.readBits(leading_zeros + 1) - 1; + } + + readSEG() { // signed exponential golomb + let value = this.readUEG(); + if (value & 0x01) { + return (value + 1) >>> 1; + } else { + return -1 * (value >>> 1); + } + } + +} + +export default ExpGolomb; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/demux/flv-demuxer.js b/packages/xgplayer-flv.js/src/flv/demux/flv-demuxer.js new file mode 100644 index 00000000..e4d36419 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/demux/flv-demuxer.js @@ -0,0 +1,1071 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Log from '../utils/logger.js'; +import AMF from './amf-parser.js'; +import SPSParser from './sps-parser.js'; +import DemuxErrors from './demux-errors.js'; +import MediaInfo from '../core/media-info.js'; +import {IllegalStateException} from '../utils/exception.js'; + +function Swap16(src) { + return (((src >>> 8) & 0xFF) | + ((src & 0xFF) << 8)); +} + +function Swap32(src) { + return (((src & 0xFF000000) >>> 24) | + ((src & 0x00FF0000) >>> 8) | + ((src & 0x0000FF00) << 8) | + ((src & 0x000000FF) << 24)); +} + +function ReadBig32(array, index) { + return ((array[index] << 24) | + (array[index + 1] << 16) | + (array[index + 2] << 8) | + (array[index + 3])); +} + + +class FLVDemuxer { + + constructor(probeData, config) { + this.TAG = 'FLVDemuxer'; + + this._config = config; + + this._onError = null; + this._onMediaInfo = null; + this._onTrackMetadata = null; + this._onDataAvailable = null; + + this._dataOffset = probeData.dataOffset; + this._firstParse = true; + this._dispatch = false; + + this._hasAudio = probeData.hasAudioTrack; + this._hasVideo = probeData.hasVideoTrack; + + this._hasAudioFlagOverrided = false; + this._hasVideoFlagOverrided = false; + + this._audioInitialMetadataDispatched = false; + this._videoInitialMetadataDispatched = false; + + this._mediaInfo = new MediaInfo(); + this._mediaInfo.hasAudio = this._hasAudio; + this._mediaInfo.hasVideo = this._hasVideo; + this._metadata = null; + this._audioMetadata = null; + this._videoMetadata = null; + + this._naluLengthSize = 4; + this._timestampBase = 0; // int32, in milliseconds + this._timescale = 1000; + this._duration = 0; // int32, in milliseconds + this._durationOverrided = false; + this._referenceFrameRate = { + fixed: true, + fps: 23.976, + fps_num: 23976, + fps_den: 1000 + }; + + this._flvSoundRateTable = [5500, 11025, 22050, 44100, 48000]; + + this._mpegSamplingRates = [ + 96000, 88200, 64000, 48000, 44100, 32000, + 24000, 22050, 16000, 12000, 11025, 8000, 7350 + ]; + + this._mpegAudioV10SampleRateTable = [44100, 48000, 32000, 0]; + this._mpegAudioV20SampleRateTable = [22050, 24000, 16000, 0]; + this._mpegAudioV25SampleRateTable = [11025, 12000, 8000, 0]; + + this._mpegAudioL1BitRateTable = [0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1]; + this._mpegAudioL2BitRateTable = [0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, -1]; + this._mpegAudioL3BitRateTable = [0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1]; + + this._videoTrack = {type: 'video', id: 1, sequenceNumber: 0, samples: [], length: 0}; + this._audioTrack = {type: 'audio', id: 2, sequenceNumber: 0, samples: [], length: 0}; + + this._littleEndian = (function () { + let buf = new ArrayBuffer(2); + (new DataView(buf)).setInt16(0, 256, true); // little-endian write + return (new Int16Array(buf))[0] === 256; // platform-spec read, if equal then LE + })(); + } + + destroy() { + this._mediaInfo = null; + this._metadata = null; + this._audioMetadata = null; + this._videoMetadata = null; + this._videoTrack = null; + this._audioTrack = null; + + this._onError = null; + this._onMediaInfo = null; + this._onTrackMetadata = null; + this._onDataAvailable = null; + } + + static probe(buffer) { + let data = new Uint8Array(buffer); + let mismatch = {match: false}; + + if (data[0] !== 0x46 || data[1] !== 0x4C || data[2] !== 0x56 || data[3] !== 0x01) { + return mismatch; + } + + let hasAudio = ((data[4] & 4) >>> 2) !== 0; + let hasVideo = (data[4] & 1) !== 0; + + let offset = ReadBig32(data, 5); + + if (offset < 9) { + return mismatch; + } + + return { + match: true, + consumed: offset, + dataOffset: offset, + hasAudioTrack: hasAudio, + hasVideoTrack: hasVideo + }; + } + + bindDataSource(loader) { + loader.onDataArrival = this.parseChunks.bind(this); + return this; + } + + // prototype: function(type: string, metadata: any): void + get onTrackMetadata() { + return this._onTrackMetadata; + } + + set onTrackMetadata(callback) { + this._onTrackMetadata = callback; + } + + // prototype: function(mediaInfo: MediaInfo): void + get onMediaInfo() { + return this._onMediaInfo; + } + + set onMediaInfo(callback) { + this._onMediaInfo = callback; + } + + // prototype: function(type: number, info: string): void + get onError() { + return this._onError; + } + + set onError(callback) { + this._onError = callback; + } + + // prototype: function(videoTrack: any, audioTrack: any): void + get onDataAvailable() { + return this._onDataAvailable; + } + + set onDataAvailable(callback) { + this._onDataAvailable = callback; + } + + // timestamp base for output samples, must be in milliseconds + get timestampBase() { + return this._timestampBase; + } + + set timestampBase(base) { + this._timestampBase = base; + } + + get overridedDuration() { + return this._duration; + } + + // Force-override media duration. Must be in milliseconds, int32 + set overridedDuration(duration) { + this._durationOverrided = true; + this._duration = duration; + this._mediaInfo.duration = duration; + } + + // Force-override audio track present flag, boolean + set overridedHasAudio(hasAudio) { + this._hasAudioFlagOverrided = true; + this._hasAudio = hasAudio; + this._mediaInfo.hasAudio = hasAudio; + } + + // Force-override video track present flag, boolean + set overridedHasVideo(hasVideo) { + this._hasVideoFlagOverrided = true; + this._hasVideo = hasVideo; + this._mediaInfo.hasVideo = hasVideo; + } + + resetMediaInfo() { + this._mediaInfo = new MediaInfo(); + } + + _isInitialMetadataDispatched() { + if (this._hasAudio && this._hasVideo) { // both audio & video + return this._audioInitialMetadataDispatched && this._videoInitialMetadataDispatched; + } + if (this._hasAudio && !this._hasVideo) { // audio only + return this._audioInitialMetadataDispatched; + } + if (!this._hasAudio && this._hasVideo) { // video only + return this._videoInitialMetadataDispatched; + } + return false; + } + + // function parseChunks(chunk: ArrayBuffer, byteStart: number): number; + parseChunks(chunk, byteStart) { + if (!this._onError || !this._onMediaInfo || !this._onTrackMetadata || !this._onDataAvailable) { + throw new IllegalStateException('Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified'); + } + + let offset = 0; + let le = this._littleEndian; + + if (byteStart === 0) { // buffer with FLV header + if (chunk.byteLength > 13) { + let probeData = FLVDemuxer.probe(chunk); + offset = probeData.dataOffset; + } else { + return 0; + } + } + + if (this._firstParse) { // handle PreviousTagSize0 before Tag1 + this._firstParse = false; + if (byteStart + offset !== this._dataOffset) { + Log.w(this.TAG, 'First time parsing but chunk byteStart invalid!'); + } + + let v = new DataView(chunk, offset); + let prevTagSize0 = v.getUint32(0, !le); + if (prevTagSize0 !== 0) { + Log.w(this.TAG, 'PrevTagSize0 !== 0 !!!'); + } + offset += 4; + } + + while (offset < chunk.byteLength) { + this._dispatch = true; + + let v = new DataView(chunk, offset); + + if (offset + 11 + 4 > chunk.byteLength) { + // data not enough for parsing an flv tag + break; + } + + let tagType = v.getUint8(0); + let dataSize = v.getUint32(0, !le) & 0x00FFFFFF; + + if (offset + 11 + dataSize + 4 > chunk.byteLength) { + // data not enough for parsing actual data body + break; + } + + if (tagType !== 8 && tagType !== 9 && tagType !== 18) { + Log.w(this.TAG, `Unsupported tag type ${tagType}, skipped`); + // consume the whole tag (skip it) + offset += 11 + dataSize + 4; + continue; + } + + let ts2 = v.getUint8(4); + let ts1 = v.getUint8(5); + let ts0 = v.getUint8(6); + let ts3 = v.getUint8(7); + + let timestamp = ts0 | (ts1 << 8) | (ts2 << 16) | (ts3 << 24); + + let streamId = v.getUint32(7, !le) & 0x00FFFFFF; + if (streamId !== 0) { + Log.w(this.TAG, 'Meet tag which has StreamID != 0!'); + } + + let dataOffset = offset + 11; + + switch (tagType) { + case 8: // Audio + this._parseAudioData(chunk, dataOffset, dataSize, timestamp); + break; + case 9: // Video + this._parseVideoData(chunk, dataOffset, dataSize, timestamp, byteStart + offset); + break; + case 18: // ScriptDataObject + this._parseScriptData(chunk, dataOffset, dataSize); + break; + } + + let prevTagSize = v.getUint32(11 + dataSize, !le); + if (prevTagSize !== 11 + dataSize) { + Log.w(this.TAG, `Invalid PrevTagSize ${prevTagSize}`); + } + + offset += 11 + dataSize + 4; // tagBody + dataSize + prevTagSize + } + + // dispatch parsed frames to consumer (typically, the remuxer) + if (this._isInitialMetadataDispatched()) { + if (this._dispatch && (this._audioTrack.length || this._videoTrack.length)) { + this._onDataAvailable(this._audioTrack, this._videoTrack); + } + } + + return offset; // consumed bytes, just equals latest offset index + } + + _parseScriptData(arrayBuffer, dataOffset, dataSize) { + let scriptData = AMF.parseScriptData(arrayBuffer, dataOffset, dataSize); + + if (scriptData.hasOwnProperty('onMetaData')) { + if (scriptData.onMetaData == null || typeof scriptData.onMetaData !== 'object') { + Log.w(this.TAG, 'Invalid onMetaData structure!'); + return; + } + if (this._metadata) { + Log.w(this.TAG, 'Found another onMetaData tag!'); + } + this._metadata = scriptData; + let onMetaData = this._metadata.onMetaData; + + if (typeof onMetaData.hasAudio === 'boolean') { // hasAudio + if (this._hasAudioFlagOverrided === false) { + this._hasAudio = onMetaData.hasAudio; + this._mediaInfo.hasAudio = this._hasAudio; + } + } + if (typeof onMetaData.hasVideo === 'boolean') { // hasVideo + if (this._hasVideoFlagOverrided === false) { + this._hasVideo = onMetaData.hasVideo; + this._mediaInfo.hasVideo = this._hasVideo; + } + } + if (typeof onMetaData.audiodatarate === 'number') { // audiodatarate + this._mediaInfo.audioDataRate = onMetaData.audiodatarate; + } + if (typeof onMetaData.videodatarate === 'number') { // videodatarate + this._mediaInfo.videoDataRate = onMetaData.videodatarate; + } + if (typeof onMetaData.width === 'number') { // width + this._mediaInfo.width = onMetaData.width; + } + if (typeof onMetaData.height === 'number') { // height + this._mediaInfo.height = onMetaData.height; + } + if (typeof onMetaData.duration === 'number') { // duration + if (!this._durationOverrided) { + let duration = Math.floor(onMetaData.duration * this._timescale); + this._duration = duration; + this._mediaInfo.duration = duration; + } + } else { + this._mediaInfo.duration = 0; + } + if (typeof onMetaData.framerate === 'number') { // framerate + let fps_num = Math.floor(onMetaData.framerate * 1000); + if (fps_num > 0) { + let fps = fps_num / 1000; + this._referenceFrameRate.fixed = true; + this._referenceFrameRate.fps = fps; + this._referenceFrameRate.fps_num = fps_num; + this._referenceFrameRate.fps_den = 1000; + this._mediaInfo.fps = fps; + } + } + if (typeof onMetaData.keyframes === 'object') { // keyframes + this._mediaInfo.hasKeyframesIndex = true; + let keyframes = onMetaData.keyframes; + this._mediaInfo.keyframesIndex = this._parseKeyframesIndex(keyframes); + onMetaData.keyframes = null; // keyframes has been extracted, remove it + } else { + this._mediaInfo.hasKeyframesIndex = false; + } + this._dispatch = false; + this._mediaInfo.metadata = onMetaData; + Log.v(this.TAG, 'Parsed onMetaData'); + if (this._mediaInfo.isComplete()) { + this._onMediaInfo(this._mediaInfo); + } + } + } + + _parseKeyframesIndex(keyframes) { + let times = []; + let filepositions = []; + + // ignore first keyframe which is actually AVC Sequence Header (AVCDecoderConfigurationRecord) + for (let i = 1; i < keyframes.times.length; i++) { + let time = this._timestampBase + Math.floor(keyframes.times[i] * 1000); + times.push(time); + filepositions.push(keyframes.filepositions[i]); + } + + return { + times: times, + filepositions: filepositions + }; + } + + _parseAudioData(arrayBuffer, dataOffset, dataSize, tagTimestamp) { + if (dataSize <= 1) { + Log.w(this.TAG, 'Flv: Invalid audio packet, missing SoundData payload!'); + return; + } + + if (this._hasAudioFlagOverrided === true && this._hasAudio === false) { + // If hasAudio: false indicated explicitly in MediaDataSource, + // Ignore all the audio packets + return; + } + + let le = this._littleEndian; + let v = new DataView(arrayBuffer, dataOffset, dataSize); + + let soundSpec = v.getUint8(0); + + let soundFormat = soundSpec >>> 4; + if (soundFormat !== 2 && soundFormat !== 10) { // MP3 or AAC + this._onError(DemuxErrors.CODEC_UNSUPPORTED, 'Flv: Unsupported audio codec idx: ' + soundFormat); + return; + } + + let soundRate = 0; + let soundRateIndex = (soundSpec & 12) >>> 2; + if (soundRateIndex >= 0 && soundRateIndex <= 4) { + soundRate = this._flvSoundRateTable[soundRateIndex]; + } else { + this._onError(DemuxErrors.FORMAT_ERROR, 'Flv: Invalid audio sample rate idx: ' + soundRateIndex); + return; + } + + let soundSize = (soundSpec & 2) >>> 1; // unused + let soundType = (soundSpec & 1); + + + let meta = this._audioMetadata; + let track = this._audioTrack; + + if (!meta) { + if (this._hasAudio === false && this._hasAudioFlagOverrided === false) { + this._hasAudio = true; + this._mediaInfo.hasAudio = true; + } + + // initial metadata + meta = this._audioMetadata = {}; + meta.type = 'audio'; + meta.id = track.id; + meta.timescale = this._timescale; + meta.duration = this._duration; + meta.audioSampleRate = soundRate; + meta.channelCount = (soundType === 0 ? 1 : 2); + } + + if (soundFormat === 10) { // AAC + let aacData = this._parseAACAudioData(arrayBuffer, dataOffset + 1, dataSize - 1); + if (aacData == undefined) { + return; + } + + if (aacData.packetType === 0) { // AAC sequence header (AudioSpecificConfig) + if (meta.config) { + Log.w(this.TAG, 'Found another AudioSpecificConfig!'); + } + let misc = aacData.data; + meta.audioSampleRate = misc.samplingRate; + meta.channelCount = misc.channelCount; + meta.codec = misc.codec; + meta.originalCodec = misc.originalCodec; + meta.config = misc.config; + // The decode result of an aac sample is 1024 PCM samples + meta.refSampleDuration = 1024 / meta.audioSampleRate * meta.timescale; + Log.v(this.TAG, 'Parsed AudioSpecificConfig'); + + if (this._isInitialMetadataDispatched()) { + // Non-initial metadata, force dispatch (or flush) parsed frames to remuxer + if (this._dispatch && (this._audioTrack.length || this._videoTrack.length)) { + this._onDataAvailable(this._audioTrack, this._videoTrack); + } + } else { + this._audioInitialMetadataDispatched = true; + } + // then notify new metadata + this._dispatch = false; + this._onTrackMetadata('audio', meta); + + let mi = this._mediaInfo; + mi.audioCodec = meta.originalCodec; + mi.audioSampleRate = meta.audioSampleRate; + mi.audioChannelCount = meta.channelCount; + if (mi.hasVideo) { + if (mi.videoCodec != null) { + mi.mimeType = 'video/x-flv; codecs="' + mi.videoCodec + ',' + mi.audioCodec + '"'; + } + } else { + mi.mimeType = 'video/x-flv; codecs="' + mi.audioCodec + '"'; + } + if (mi.isComplete()) { + this._onMediaInfo(mi); + } + } else if (aacData.packetType === 1) { // AAC raw frame data + let dts = this._timestampBase + tagTimestamp; + let aacSample = {unit: aacData.data, length: aacData.data.byteLength, dts: dts, pts: dts}; + track.samples.push(aacSample); + track.length += aacData.data.length; + } else { + Log.e(this.TAG, `Flv: Unsupported AAC data type ${aacData.packetType}`); + } + } else if (soundFormat === 2) { // MP3 + if (!meta.codec) { + // We need metadata for mp3 audio track, extract info from frame header + let misc = this._parseMP3AudioData(arrayBuffer, dataOffset + 1, dataSize - 1, true); + if (misc == undefined) { + return; + } + meta.audioSampleRate = misc.samplingRate; + meta.channelCount = misc.channelCount; + meta.codec = misc.codec; + meta.originalCodec = misc.originalCodec; + // The decode result of an mp3 sample is 1152 PCM samples + meta.refSampleDuration = 1152 / meta.audioSampleRate * meta.timescale; + Log.v(this.TAG, 'Parsed MPEG Audio Frame Header'); + + this._audioInitialMetadataDispatched = true; + this._onTrackMetadata('audio', meta); + + let mi = this._mediaInfo; + mi.audioCodec = meta.codec; + mi.audioSampleRate = meta.audioSampleRate; + mi.audioChannelCount = meta.channelCount; + mi.audioDataRate = misc.bitRate; + if (mi.hasVideo) { + if (mi.videoCodec != null) { + mi.mimeType = 'video/x-flv; codecs="' + mi.videoCodec + ',' + mi.audioCodec + '"'; + } + } else { + mi.mimeType = 'video/x-flv; codecs="' + mi.audioCodec + '"'; + } + if (mi.isComplete()) { + this._onMediaInfo(mi); + } + } + + // This packet is always a valid audio packet, extract it + let data = this._parseMP3AudioData(arrayBuffer, dataOffset + 1, dataSize - 1, false); + if (data == undefined) { + return; + } + let dts = this._timestampBase + tagTimestamp; + let mp3Sample = {unit: data, length: data.byteLength, dts: dts, pts: dts}; + track.samples.push(mp3Sample); + track.length += data.length; + } + } + + _parseAACAudioData(arrayBuffer, dataOffset, dataSize) { + if (dataSize <= 1) { + Log.w(this.TAG, 'Flv: Invalid AAC packet, missing AACPacketType or/and Data!'); + return; + } + + let result = {}; + let array = new Uint8Array(arrayBuffer, dataOffset, dataSize); + + result.packetType = array[0]; + + if (array[0] === 0) { + result.data = this._parseAACAudioSpecificConfig(arrayBuffer, dataOffset + 1, dataSize - 1); + } else { + result.data = array.subarray(1); + } + + return result; + } + + _parseAACAudioSpecificConfig(arrayBuffer, dataOffset, dataSize) { + let array = new Uint8Array(arrayBuffer, dataOffset, dataSize); + let config = null; + + /* Audio Object Type: + 0: Null + 1: AAC Main + 2: AAC LC + 3: AAC SSR (Scalable Sample Rate) + 4: AAC LTP (Long Term Prediction) + 5: HE-AAC / SBR (Spectral Band Replication) + 6: AAC Scalable + */ + + let audioObjectType = 0; + let originalAudioObjectType = 0; + let audioExtensionObjectType = null; + let samplingIndex = 0; + let extensionSamplingIndex = null; + + // 5 bits + audioObjectType = originalAudioObjectType = array[0] >>> 3; + // 4 bits + samplingIndex = ((array[0] & 0x07) << 1) | (array[1] >>> 7); + if (samplingIndex < 0 || samplingIndex >= this._mpegSamplingRates.length) { + this._onError(DemuxErrors.FORMAT_ERROR, 'Flv: AAC invalid sampling frequency index!'); + return; + } + + let samplingFrequence = this._mpegSamplingRates[samplingIndex]; + + // 4 bits + let channelConfig = (array[1] & 0x78) >>> 3; + if (channelConfig < 0 || channelConfig >= 8) { + this._onError(DemuxErrors.FORMAT_ERROR, 'Flv: AAC invalid channel configuration'); + return; + } + + if (audioObjectType === 5) { // HE-AAC? + // 4 bits + extensionSamplingIndex = ((array[1] & 0x07) << 1) | (array[2] >>> 7); + // 5 bits + audioExtensionObjectType = (array[2] & 0x7C) >>> 2; + } + + // workarounds for various browsers + let userAgent = self.navigator.userAgent.toLowerCase(); + + if (userAgent.indexOf('firefox') !== -1) { + // firefox: use SBR (HE-AAC) if freq less than 24kHz + if (samplingIndex >= 6) { + audioObjectType = 5; + config = new Array(4); + extensionSamplingIndex = samplingIndex - 3; + } else { // use LC-AAC + audioObjectType = 2; + config = new Array(2); + extensionSamplingIndex = samplingIndex; + } + } else if (userAgent.indexOf('android') !== -1) { + // android: always use LC-AAC + audioObjectType = 2; + config = new Array(2); + extensionSamplingIndex = samplingIndex; + } else { + // for other browsers, e.g. chrome... + // Always use HE-AAC to make it easier to switch aac codec profile + audioObjectType = 5; + extensionSamplingIndex = samplingIndex; + config = new Array(4); + + if (samplingIndex >= 6) { + extensionSamplingIndex = samplingIndex - 3; + } else if (channelConfig === 1) { // Mono channel + audioObjectType = 2; + config = new Array(2); + extensionSamplingIndex = samplingIndex; + } + } + + config[0] = audioObjectType << 3; + config[0] |= (samplingIndex & 0x0F) >>> 1; + config[1] = (samplingIndex & 0x0F) << 7; + config[1] |= (channelConfig & 0x0F) << 3; + if (audioObjectType === 5) { + config[1] |= ((extensionSamplingIndex & 0x0F) >>> 1); + config[2] = (extensionSamplingIndex & 0x01) << 7; + // extended audio object type: force to 2 (LC-AAC) + config[2] |= (2 << 2); + config[3] = 0; + } + + return { + config: config, + samplingRate: samplingFrequence, + channelCount: channelConfig, + codec: 'mp4a.40.' + audioObjectType, + originalCodec: 'mp4a.40.' + originalAudioObjectType + }; + } + + _parseMP3AudioData(arrayBuffer, dataOffset, dataSize, requestHeader) { + if (dataSize < 4) { + Log.w(this.TAG, 'Flv: Invalid MP3 packet, header missing!'); + return; + } + + let le = this._littleEndian; + let array = new Uint8Array(arrayBuffer, dataOffset, dataSize); + let result = null; + + if (requestHeader) { + if (array[0] !== 0xFF) { + return; + } + let ver = (array[1] >>> 3) & 0x03; + let layer = (array[1] & 0x06) >> 1; + + let bitrate_index = (array[2] & 0xF0) >>> 4; + let sampling_freq_index = (array[2] & 0x0C) >>> 2; + + let channel_mode = (array[3] >>> 6) & 0x03; + let channel_count = channel_mode !== 3 ? 2 : 1; + + let sample_rate = 0; + let bit_rate = 0; + let object_type = 34; // Layer-3, listed in MPEG-4 Audio Object Types + + let codec = 'mp3'; + + switch (ver) { + case 0: // MPEG 2.5 + sample_rate = this._mpegAudioV25SampleRateTable[sampling_freq_index]; + break; + case 2: // MPEG 2 + sample_rate = this._mpegAudioV20SampleRateTable[sampling_freq_index]; + break; + case 3: // MPEG 1 + sample_rate = this._mpegAudioV10SampleRateTable[sampling_freq_index]; + break; + } + + switch (layer) { + case 1: // Layer 3 + object_type = 34; + if (bitrate_index < this._mpegAudioL3BitRateTable.length) { + bit_rate = this._mpegAudioL3BitRateTable[bitrate_index]; + } + break; + case 2: // Layer 2 + object_type = 33; + if (bitrate_index < this._mpegAudioL2BitRateTable.length) { + bit_rate = this._mpegAudioL2BitRateTable[bitrate_index]; + } + break; + case 3: // Layer 1 + object_type = 32; + if (bitrate_index < this._mpegAudioL1BitRateTable.length) { + bit_rate = this._mpegAudioL1BitRateTable[bitrate_index]; + } + break; + } + + result = { + bitRate: bit_rate, + samplingRate: sample_rate, + channelCount: channel_count, + codec: codec, + originalCodec: codec + }; + } else { + result = array; + } + + return result; + } + + _parseVideoData(arrayBuffer, dataOffset, dataSize, tagTimestamp, tagPosition) { + if (dataSize <= 1) { + Log.w(this.TAG, 'Flv: Invalid video packet, missing VideoData payload!'); + return; + } + + if (this._hasVideoFlagOverrided === true && this._hasVideo === false) { + // If hasVideo: false indicated explicitly in MediaDataSource, + // Ignore all the video packets + return; + } + + let spec = (new Uint8Array(arrayBuffer, dataOffset, dataSize))[0]; + + let frameType = (spec & 240) >>> 4; + let codecId = spec & 15; + + if (codecId !== 7) { + this._onError(DemuxErrors.CODEC_UNSUPPORTED, `Flv: Unsupported codec in video frame: ${codecId}`); + return; + } + + this._parseAVCVideoPacket(arrayBuffer, dataOffset + 1, dataSize - 1, tagTimestamp, tagPosition, frameType); + } + + _parseAVCVideoPacket(arrayBuffer, dataOffset, dataSize, tagTimestamp, tagPosition, frameType) { + if (dataSize < 4) { + Log.w(this.TAG, 'Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime'); + return; + } + + let le = this._littleEndian; + let v = new DataView(arrayBuffer, dataOffset, dataSize); + + let packetType = v.getUint8(0); + let cts_unsigned = v.getUint32(0, !le) & 0x00FFFFFF; + let cts = (cts_unsigned << 8) >> 8; // convert to 24-bit signed int + + if (packetType === 0) { // AVCDecoderConfigurationRecord + this._parseAVCDecoderConfigurationRecord(arrayBuffer, dataOffset + 4, dataSize - 4); + } else if (packetType === 1) { // One or more Nalus + this._parseAVCVideoData(arrayBuffer, dataOffset + 4, dataSize - 4, tagTimestamp, tagPosition, frameType, cts); + } else if (packetType === 2) { + // empty, AVC end of sequence + } else { + this._onError(DemuxErrors.FORMAT_ERROR, `Flv: Invalid video packet type ${packetType}`); + return; + } + } + + _parseAVCDecoderConfigurationRecord(arrayBuffer, dataOffset, dataSize) { + if (dataSize < 7) { + Log.w(this.TAG, 'Flv: Invalid AVCDecoderConfigurationRecord, lack of data!'); + return; + } + + let meta = this._videoMetadata; + let track = this._videoTrack; + let le = this._littleEndian; + let v = new DataView(arrayBuffer, dataOffset, dataSize); + + if (!meta) { + if (this._hasVideo === false && this._hasVideoFlagOverrided === false) { + this._hasVideo = true; + this._mediaInfo.hasVideo = true; + } + + meta = this._videoMetadata = {}; + meta.type = 'video'; + meta.id = track.id; + meta.timescale = this._timescale; + meta.duration = this._duration; + } else { + if (typeof meta.avcc !== 'undefined') { + Log.w(this.TAG, 'Found another AVCDecoderConfigurationRecord!'); + } + } + + let version = v.getUint8(0); // configurationVersion + let avcProfile = v.getUint8(1); // avcProfileIndication + let profileCompatibility = v.getUint8(2); // profile_compatibility + let avcLevel = v.getUint8(3); // AVCLevelIndication + + if (version !== 1 || avcProfile === 0) { + this._onError(DemuxErrors.FORMAT_ERROR, 'Flv: Invalid AVCDecoderConfigurationRecord'); + return; + } + + this._naluLengthSize = (v.getUint8(4) & 3) + 1; // lengthSizeMinusOne + if (this._naluLengthSize !== 3 && this._naluLengthSize !== 4) { // holy shit!!! + this._onError(DemuxErrors.FORMAT_ERROR, `Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize - 1}`); + return; + } + + let spsCount = v.getUint8(5) & 31; // numOfSequenceParameterSets + if (spsCount === 0) { + this._onError(DemuxErrors.FORMAT_ERROR, 'Flv: Invalid AVCDecoderConfigurationRecord: No SPS'); + return; + } else if (spsCount > 1) { + Log.w(this.TAG, `Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${spsCount}`); + } + + let offset = 6; + + for (let i = 0; i < spsCount; i++) { + let len = v.getUint16(offset, !le); // sequenceParameterSetLength + offset += 2; + + if (len === 0) { + continue; + } + + // Notice: Nalu without startcode header (00 00 00 01) + let sps = new Uint8Array(arrayBuffer, dataOffset + offset, len); + offset += len; + + let config = SPSParser.parseSPS(sps); + if (i !== 0) { + // ignore other sps's config + continue; + } + + meta.codecWidth = config.codec_size.width; + meta.codecHeight = config.codec_size.height; + meta.presentWidth = config.present_size.width; + meta.presentHeight = config.present_size.height; + + meta.profile = config.profile_string; + meta.level = config.level_string; + meta.bitDepth = config.bit_depth; + meta.chromaFormat = config.chroma_format; + meta.sarRatio = config.sar_ratio; + meta.frameRate = config.frame_rate; + + if (config.frame_rate.fixed === false || + config.frame_rate.fps_num === 0 || + config.frame_rate.fps_den === 0) { + meta.frameRate = this._referenceFrameRate; + } + + let fps_den = meta.frameRate.fps_den; + let fps_num = meta.frameRate.fps_num; + meta.refSampleDuration = meta.timescale * (fps_den / fps_num); + + let codecArray = sps.subarray(1, 4); + let codecString = 'avc1.'; + for (let j = 0; j < 3; j++) { + let h = codecArray[j].toString(16); + if (h.length < 2) { + h = '0' + h; + } + codecString += h; + } + meta.codec = codecString; + + let mi = this._mediaInfo; + mi.width = meta.codecWidth; + mi.height = meta.codecHeight; + mi.fps = meta.frameRate.fps; + mi.profile = meta.profile; + mi.level = meta.level; + mi.refFrames = config.ref_frames; + mi.chromaFormat = config.chroma_format_string; + mi.sarNum = meta.sarRatio.width; + mi.sarDen = meta.sarRatio.height; + mi.videoCodec = codecString; + + if (mi.hasAudio) { + if (mi.audioCodec != null) { + mi.mimeType = 'video/x-flv; codecs="' + mi.videoCodec + ',' + mi.audioCodec + '"'; + } + } else { + mi.mimeType = 'video/x-flv; codecs="' + mi.videoCodec + '"'; + } + if (mi.isComplete()) { + this._onMediaInfo(mi); + } + } + + let ppsCount = v.getUint8(offset); // numOfPictureParameterSets + if (ppsCount === 0) { + this._onError(DemuxErrors.FORMAT_ERROR, 'Flv: Invalid AVCDecoderConfigurationRecord: No PPS'); + return; + } else if (ppsCount > 1) { + Log.w(this.TAG, `Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${ppsCount}`); + } + + offset++; + + for (let i = 0; i < ppsCount; i++) { + let len = v.getUint16(offset, !le); // pictureParameterSetLength + offset += 2; + + if (len === 0) { + continue; + } + + // pps is useless for extracting video information + offset += len; + } + + meta.avcc = new Uint8Array(dataSize); + meta.avcc.set(new Uint8Array(arrayBuffer, dataOffset, dataSize), 0); + Log.v(this.TAG, 'Parsed AVCDecoderConfigurationRecord'); + + if (this._isInitialMetadataDispatched()) { + // flush parsed frames + if (this._dispatch && (this._audioTrack.length || this._videoTrack.length)) { + this._onDataAvailable(this._audioTrack, this._videoTrack); + } + } else { + this._videoInitialMetadataDispatched = true; + } + // notify new metadata + this._dispatch = false; + this._onTrackMetadata('video', meta); + } + + _parseAVCVideoData(arrayBuffer, dataOffset, dataSize, tagTimestamp, tagPosition, frameType, cts) { + let le = this._littleEndian; + let v = new DataView(arrayBuffer, dataOffset, dataSize); + + let units = [], length = 0; + + let offset = 0; + const lengthSize = this._naluLengthSize; + let dts = this._timestampBase + tagTimestamp; + let keyframe = (frameType === 1); // from FLV Frame Type constants + + while (offset < dataSize) { + if (offset + 4 >= dataSize) { + Log.w(this.TAG, `Malformed Nalu near timestamp ${dts}, offset = ${offset}, dataSize = ${dataSize}`); + break; // data not enough for next Nalu + } + // Nalu with length-header (AVC1) + let naluSize = v.getUint32(offset, !le); // Big-Endian read + if (lengthSize === 3) { + naluSize >>>= 8; + } + if (naluSize > dataSize - lengthSize) { + Log.w(this.TAG, `Malformed Nalus near timestamp ${dts}, NaluSize > DataSize!`); + return; + } + + let unitType = v.getUint8(offset + lengthSize) & 0x1F; + + if (unitType === 5) { // IDR + keyframe = true; + } + + let data = new Uint8Array(arrayBuffer, dataOffset + offset, lengthSize + naluSize); + let unit = {type: unitType, data: data}; + units.push(unit); + length += data.byteLength; + + offset += lengthSize + naluSize; + } + + if (units.length) { + let track = this._videoTrack; + let avcSample = { + units: units, + length: length, + isKeyframe: keyframe, + dts: dts, + cts: cts, + pts: (dts + cts) + }; + if (keyframe) { + avcSample.fileposition = tagPosition; + } + track.samples.push(avcSample); + track.length += length; + } + } + +} + +export default FLVDemuxer; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/demux/sps-parser.js b/packages/xgplayer-flv.js/src/flv/demux/sps-parser.js new file mode 100644 index 00000000..c5e5b878 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/demux/sps-parser.js @@ -0,0 +1,281 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import ExpGolomb from './exp-golomb.js'; + +class SPSParser { + + static _ebsp2rbsp(uint8array) { + let src = uint8array; + let src_length = src.byteLength; + let dst = new Uint8Array(src_length); + let dst_idx = 0; + + for (let i = 0; i < src_length; i++) { + if (i >= 2) { + // Unescape: Skip 0x03 after 00 00 + if (src[i] === 0x03 && src[i - 1] === 0x00 && src[i - 2] === 0x00) { + continue; + } + } + dst[dst_idx] = src[i]; + dst_idx++; + } + + return new Uint8Array(dst.buffer, 0, dst_idx); + } + + static parseSPS(uint8array) { + let rbsp = SPSParser._ebsp2rbsp(uint8array); + let gb = new ExpGolomb(rbsp); + + gb.readByte(); + let profile_idc = gb.readByte(); // profile_idc + gb.readByte(); // constraint_set_flags[5] + reserved_zero[3] + let level_idc = gb.readByte(); // level_idc + gb.readUEG(); // seq_parameter_set_id + + let profile_string = SPSParser.getProfileString(profile_idc); + let level_string = SPSParser.getLevelString(level_idc); + let chroma_format_idc = 1; + let chroma_format = 420; + let chroma_format_table = [0, 420, 422, 444]; + let bit_depth = 8; + + if (profile_idc === 100 || profile_idc === 110 || profile_idc === 122 || + profile_idc === 244 || profile_idc === 44 || profile_idc === 83 || + profile_idc === 86 || profile_idc === 118 || profile_idc === 128 || + profile_idc === 138 || profile_idc === 144) { + + chroma_format_idc = gb.readUEG(); + if (chroma_format_idc === 3) { + gb.readBits(1); // separate_colour_plane_flag + } + if (chroma_format_idc <= 3) { + chroma_format = chroma_format_table[chroma_format_idc]; + } + + bit_depth = gb.readUEG() + 8; // bit_depth_luma_minus8 + gb.readUEG(); // bit_depth_chroma_minus8 + gb.readBits(1); // qpprime_y_zero_transform_bypass_flag + if (gb.readBool()) { // seq_scaling_matrix_present_flag + let scaling_list_count = (chroma_format_idc !== 3) ? 8 : 12; + for (let i = 0; i < scaling_list_count; i++) { + if (gb.readBool()) { // seq_scaling_list_present_flag + if (i < 6) { + SPSParser._skipScalingList(gb, 16); + } else { + SPSParser._skipScalingList(gb, 64); + } + } + } + } + } + gb.readUEG(); // log2_max_frame_num_minus4 + let pic_order_cnt_type = gb.readUEG(); + if (pic_order_cnt_type === 0) { + gb.readUEG(); // log2_max_pic_order_cnt_lsb_minus_4 + } else if (pic_order_cnt_type === 1) { + gb.readBits(1); // delta_pic_order_always_zero_flag + gb.readSEG(); // offset_for_non_ref_pic + gb.readSEG(); // offset_for_top_to_bottom_field + let num_ref_frames_in_pic_order_cnt_cycle = gb.readUEG(); + for (let i = 0; i < num_ref_frames_in_pic_order_cnt_cycle; i++) { + gb.readSEG(); // offset_for_ref_frame + } + } + let ref_frames = gb.readUEG(); // max_num_ref_frames + gb.readBits(1); // gaps_in_frame_num_value_allowed_flag + + let pic_width_in_mbs_minus1 = gb.readUEG(); + let pic_height_in_map_units_minus1 = gb.readUEG(); + + let frame_mbs_only_flag = gb.readBits(1); + if (frame_mbs_only_flag === 0) { + gb.readBits(1); // mb_adaptive_frame_field_flag + } + gb.readBits(1); // direct_8x8_inference_flag + + let frame_crop_left_offset = 0; + let frame_crop_right_offset = 0; + let frame_crop_top_offset = 0; + let frame_crop_bottom_offset = 0; + + let frame_cropping_flag = gb.readBool(); + if (frame_cropping_flag) { + frame_crop_left_offset = gb.readUEG(); + frame_crop_right_offset = gb.readUEG(); + frame_crop_top_offset = gb.readUEG(); + frame_crop_bottom_offset = gb.readUEG(); + } + + let sar_width = 1, sar_height = 1; + let fps = 0, fps_fixed = true, fps_num = 0, fps_den = 0; + + let vui_parameters_present_flag = gb.readBool(); + if (vui_parameters_present_flag) { + if (gb.readBool()) { // aspect_ratio_info_present_flag + let aspect_ratio_idc = gb.readByte(); + let sar_w_table = [1, 12, 10, 16, 40, 24, 20, 32, 80, 18, 15, 64, 160, 4, 3, 2]; + let sar_h_table = [1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1]; + + if (aspect_ratio_idc > 0 && aspect_ratio_idc < 16) { + sar_width = sar_w_table[aspect_ratio_idc - 1]; + sar_height = sar_h_table[aspect_ratio_idc - 1]; + } else if (aspect_ratio_idc === 255) { + sar_width = gb.readByte() << 8 | gb.readByte(); + sar_height = gb.readByte() << 8 | gb.readByte(); + } + } + + if (gb.readBool()) { // overscan_info_present_flag + gb.readBool(); // overscan_appropriate_flag + } + if (gb.readBool()) { // video_signal_type_present_flag + gb.readBits(4); // video_format & video_full_range_flag + if (gb.readBool()) { // colour_description_present_flag + gb.readBits(24); // colour_primaries & transfer_characteristics & matrix_coefficients + } + } + if (gb.readBool()) { // chroma_loc_info_present_flag + gb.readUEG(); // chroma_sample_loc_type_top_field + gb.readUEG(); // chroma_sample_loc_type_bottom_field + } + if (gb.readBool()) { // timing_info_present_flag + let num_units_in_tick = gb.readBits(32); + let time_scale = gb.readBits(32); + fps_fixed = gb.readBool(); // fixed_frame_rate_flag + + fps_num = time_scale; + fps_den = num_units_in_tick * 2; + fps = fps_num / fps_den; + } + } + + let sarScale = 1; + if (sar_width !== 1 || sar_height !== 1) { + sarScale = sar_width / sar_height; + } + + let crop_unit_x = 0, crop_unit_y = 0; + if (chroma_format_idc === 0) { + crop_unit_x = 1; + crop_unit_y = 2 - frame_mbs_only_flag; + } else { + let sub_wc = (chroma_format_idc === 3) ? 1 : 2; + let sub_hc = (chroma_format_idc === 1) ? 2 : 1; + crop_unit_x = sub_wc; + crop_unit_y = sub_hc * (2 - frame_mbs_only_flag); + } + + let codec_width = (pic_width_in_mbs_minus1 + 1) * 16; + let codec_height = (2 - frame_mbs_only_flag) * ((pic_height_in_map_units_minus1 + 1) * 16); + + codec_width -= (frame_crop_left_offset + frame_crop_right_offset) * crop_unit_x; + codec_height -= (frame_crop_top_offset + frame_crop_bottom_offset) * crop_unit_y; + + let present_width = Math.ceil(codec_width * sarScale); + + gb.destroy(); + gb = null; + + return { + profile_string: profile_string, // baseline, high, high10, ... + level_string: level_string, // 3, 3.1, 4, 4.1, 5, 5.1, ... + bit_depth: bit_depth, // 8bit, 10bit, ... + ref_frames: ref_frames, + chroma_format: chroma_format, // 4:2:0, 4:2:2, ... + chroma_format_string: SPSParser.getChromaFormatString(chroma_format), + + frame_rate: { + fixed: fps_fixed, + fps: fps, + fps_den: fps_den, + fps_num: fps_num + }, + + sar_ratio: { + width: sar_width, + height: sar_height + }, + + codec_size: { + width: codec_width, + height: codec_height + }, + + present_size: { + width: present_width, + height: codec_height + } + }; + } + + static _skipScalingList(gb, count) { + let last_scale = 8, next_scale = 8; + let delta_scale = 0; + for (let i = 0; i < count; i++) { + if (next_scale !== 0) { + delta_scale = gb.readSEG(); + next_scale = (last_scale + delta_scale + 256) % 256; + } + last_scale = (next_scale === 0) ? last_scale : next_scale; + } + } + + static getProfileString(profile_idc) { + switch (profile_idc) { + case 66: + return 'Baseline'; + case 77: + return 'Main'; + case 88: + return 'Extended'; + case 100: + return 'High'; + case 110: + return 'High10'; + case 122: + return 'High422'; + case 244: + return 'High444'; + default: + return 'Unknown'; + } + } + + static getLevelString(level_idc) { + return (level_idc / 10).toFixed(1); + } + + static getChromaFormatString(chroma) { + switch (chroma) { + case 420: + return '4:2:0'; + case 422: + return '4:2:2'; + case 444: + return '4:4:4'; + default: + return 'Unknown'; + } + } + +} + +export default SPSParser; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/flv.js b/packages/xgplayer-flv.js/src/flv/flv.js new file mode 100644 index 00000000..536eb809 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/flv.js @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Polyfill from './utils/polyfill.js'; +import Features from './core/features.js'; +import FlvPlayer from './player/flv-player.js'; +import NativePlayer from './player/native-player.js'; +import PlayerEvents from './player/player-events.js'; +import {ErrorTypes, ErrorDetails} from './player/player-errors.js'; +import LoggingControl from './utils/logging-control.js'; +import {InvalidArgumentException} from './utils/exception.js'; + +// here are all the interfaces + +// install polyfills +Polyfill.install(); + + +// factory method +function createPlayer(mediaDataSource, optionalConfig) { + let mds = mediaDataSource; + if (mds == null || typeof mds !== 'object') { + throw new InvalidArgumentException('MediaDataSource must be an javascript object!'); + } + + if (!mds.hasOwnProperty('type')) { + throw new InvalidArgumentException('MediaDataSource must has type field to indicate video file type!'); + } + + switch (mds.type) { + case 'flv': + return new FlvPlayer(mds, optionalConfig); + default: + return new NativePlayer(mds, optionalConfig); + } +} + + +// feature detection +function isSupported() { + return Features.supportMSEH264Playback(); +} + +function getFeatureList() { + return Features.getFeatureList(); +} + + +// interfaces +let flvjs = {}; + +flvjs.createPlayer = createPlayer; +flvjs.isSupported = isSupported; +flvjs.getFeatureList = getFeatureList; + +flvjs.Events = PlayerEvents; +flvjs.ErrorTypes = ErrorTypes; +flvjs.ErrorDetails = ErrorDetails; + +flvjs.FlvPlayer = FlvPlayer; +flvjs.NativePlayer = NativePlayer; +flvjs.LoggingControl = LoggingControl; + +Object.defineProperty(flvjs, 'version', { + enumerable: true, + get: function () { + // replaced by browserify-versionify transform + return '__VERSION__'; + } +}); + +export default flvjs; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/index.js b/packages/xgplayer-flv.js/src/flv/index.js new file mode 100644 index 00000000..d4d84734 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/index.js @@ -0,0 +1,4 @@ +// entry/index file + +// make it compatible with browserify's umd wrapper +module.exports = require('./flv.js').default; diff --git a/packages/xgplayer-flv.js/src/flv/io/fetch-stream-loader.js b/packages/xgplayer-flv.js/src/flv/io/fetch-stream-loader.js new file mode 100644 index 00000000..25acc2c9 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/io/fetch-stream-loader.js @@ -0,0 +1,219 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Log from '../utils/logger.js'; +import Browser from '../utils/browser.js'; +import {BaseLoader, LoaderStatus, LoaderErrors} from './loader.js'; +import {RuntimeException} from '../utils/exception.js'; + +/* fetch + stream IO loader. Currently working on chrome 43+. + * fetch provides a better alternative http API to XMLHttpRequest + * + * fetch spec https://fetch.spec.whatwg.org/ + * stream spec https://streams.spec.whatwg.org/ + */ +class FetchStreamLoader extends BaseLoader { + + static isSupported() { + try { + // fetch + stream is broken on Microsoft Edge. Disable before build 15048. + // see https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8196907/ + // Fixed in Jan 10, 2017. Build 15048+ removed from blacklist. + let isWorkWellEdge = Browser.msedge && Browser.version.minor >= 15048; + let browserNotBlacklisted = Browser.msedge ? isWorkWellEdge : true; + return (self.fetch && self.ReadableStream && browserNotBlacklisted); + } catch (e) { + return false; + } + } + + constructor(seekHandler, config) { + super('fetch-stream-loader'); + this.TAG = 'FetchStreamLoader'; + + this._seekHandler = seekHandler; + this._config = config; + this._needStash = true; + + this._requestAbort = false; + this._contentLength = null; + this._receivedLength = 0; + } + + destroy() { + if (this.isWorking()) { + this.abort(); + } + super.destroy(); + } + + open(dataSource, range) { + this._dataSource = dataSource; + this._range = range; + + let sourceURL = dataSource.url; + if (this._config.reuseRedirectedURL && dataSource.redirectedURL != undefined) { + sourceURL = dataSource.redirectedURL; + } + + let seekConfig = this._seekHandler.getConfig(sourceURL, range); + + let headers = new self.Headers(); + + if (typeof seekConfig.headers === 'object') { + let configHeaders = seekConfig.headers; + for (let key in configHeaders) { + if (configHeaders.hasOwnProperty(key)) { + headers.append(key, configHeaders[key]); + } + } + } + + let params = { + method: 'GET', + headers: headers, + mode: 'cors', + cache: 'default', + // The default policy of Fetch API in the whatwg standard + // Safari incorrectly indicates 'no-referrer' as default policy, fuck it + referrerPolicy: 'no-referrer-when-downgrade' + }; + + // cors is enabled by default + if (dataSource.cors === false) { + // no-cors means 'disregard cors policy', which can only be used in ServiceWorker + params.mode = 'same-origin'; + } + + // withCredentials is disabled by default + if (dataSource.withCredentials) { + params.credentials = 'include'; + } + + // referrerPolicy from config + if (dataSource.referrerPolicy) { + params.referrerPolicy = dataSource.referrerPolicy; + } + + this._status = LoaderStatus.kConnecting; + self.fetch(seekConfig.url, params).then((res) => { + if (this._requestAbort) { + this._requestAbort = false; + this._status = LoaderStatus.kIdle; + return; + } + if (res.ok && (res.status >= 200 && res.status <= 299)) { + if (res.url !== seekConfig.url) { + if (this._onURLRedirect) { + let redirectedURL = this._seekHandler.removeURLParameters(res.url); + this._onURLRedirect(redirectedURL); + } + } + + let lengthHeader = res.headers.get('Content-Length'); + if (lengthHeader != null) { + this._contentLength = parseInt(lengthHeader); + if (this._contentLength !== 0) { + if (this._onContentLengthKnown) { + this._onContentLengthKnown(this._contentLength); + } + } + } + + return this._pump.call(this, res.body.getReader()); + } else { + this._status = LoaderStatus.kError; + if (this._onError) { + this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID, {code: res.status, msg: res.statusText}); + } else { + throw new RuntimeException('FetchStreamLoader: Http code invalid, ' + res.status + ' ' + res.statusText); + } + } + }).catch((e) => { + this._status = LoaderStatus.kError; + if (this._onError) { + this._onError(LoaderErrors.EXCEPTION, {code: -1, msg: e.message}); + } else { + throw e; + } + }); + } + + abort() { + this._requestAbort = true; + } + + _pump(reader) { // ReadableStreamReader + return reader.read().then((result) => { + if (result.done) { + this._status = LoaderStatus.kComplete; + if (this._onComplete) { + this._onComplete(this._range.from, this._range.from + this._receivedLength - 1); + } + } else { + if (this._requestAbort === true) { + this._requestAbort = false; + this._status = LoaderStatus.kComplete; + return reader.cancel(); + } + + this._status = LoaderStatus.kBuffering; + + let chunk = result.value.buffer; + let byteStart = this._range.from + this._receivedLength; + this._receivedLength += chunk.byteLength; + + if (this._onDataArrival) { + this._onDataArrival(chunk, byteStart, this._receivedLength); + } + + this._pump(reader); + } + }).catch((e) => { + if (e.code === 11 && Browser.msedge) { // InvalidStateError on Microsoft Edge + // Workaround: Edge may throw InvalidStateError after ReadableStreamReader.cancel() call + // Ignore the unknown exception. + // Related issue: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11265202/ + return; + } + + this._status = LoaderStatus.kError; + let type = 0; + let info = null; + + if ((e.code === 19 || e.message === 'network error') && // NETWORK_ERR + (this._contentLength === null || + (this._contentLength !== null && this._receivedLength < this._contentLength))) { + type = LoaderErrors.EARLY_EOF; + info = {code: e.code, msg: 'Fetch stream meet Early-EOF'}; + } else { + type = LoaderErrors.EXCEPTION; + info = {code: e.code, msg: e.message}; + } + + if (this._onError) { + this._onError(type, info); + } else { + throw new RuntimeException(info.msg); + } + }); + } + +} + +export default FetchStreamLoader; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/io/io-controller.js b/packages/xgplayer-flv.js/src/flv/io/io-controller.js new file mode 100644 index 00000000..fe9e756c --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/io/io-controller.js @@ -0,0 +1,645 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Log from '../utils/logger.js'; +import SpeedSampler from './speed-sampler.js'; +import {LoaderStatus, LoaderErrors} from './loader.js'; +import FetchStreamLoader from './fetch-stream-loader.js'; +import MozChunkedLoader from './xhr-moz-chunked-loader.js'; +import MSStreamLoader from './xhr-msstream-loader.js'; +import RangeLoader from './xhr-range-loader.js'; +import WebSocketLoader from './websocket-loader.js'; +import RangeSeekHandler from './range-seek-handler.js'; +import ParamSeekHandler from './param-seek-handler.js'; +import {RuntimeException, IllegalStateException, InvalidArgumentException} from '../utils/exception.js'; + +/** + * DataSource: { + * url: string, + * filesize: number, + * cors: boolean, + * withCredentials: boolean + * } + * + */ + +// Manage IO Loaders +class IOController { + + constructor(dataSource, config, extraData) { + this.TAG = 'IOController'; + + this._config = config; + this._extraData = extraData; + + this._stashInitialSize = 1024 * 384; // default initial size: 384KB + if (config.stashInitialSize != undefined && config.stashInitialSize > 0) { + // apply from config + this._stashInitialSize = config.stashInitialSize; + } + + this._stashUsed = 0; + this._stashSize = this._stashInitialSize; + this._bufferSize = 1024 * 1024 * 3; // initial size: 3MB + this._stashBuffer = new ArrayBuffer(this._bufferSize); + this._stashByteStart = 0; + this._enableStash = true; + if (config.enableStashBuffer === false) { + this._enableStash = false; + } + + this._loader = null; + this._loaderClass = null; + this._seekHandler = null; + + this._dataSource = dataSource; + this._isWebSocketURL = /wss?:\/\/(.+?)/.test(dataSource.url); + this._refTotalLength = dataSource.filesize ? dataSource.filesize : null; + this._totalLength = this._refTotalLength; + this._fullRequestFlag = false; + this._currentRange = null; + this._redirectedURL = null; + + this._speedNormalized = 0; + this._speedSampler = new SpeedSampler(); + this._speedNormalizeList = [64, 128, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096]; + + this._isEarlyEofReconnecting = false; + + this._paused = false; + this._resumeFrom = 0; + + this._onDataArrival = null; + this._onSeeked = null; + this._onError = null; + this._onComplete = null; + this._onRedirect = null; + this._onRecoveredEarlyEof = null; + + this._selectSeekHandler(); + this._selectLoader(); + this._createLoader(); + } + + destroy() { + if (this._loader.isWorking()) { + this._loader.abort(); + } + this._loader.destroy(); + this._loader = null; + this._loaderClass = null; + this._dataSource = null; + this._stashBuffer = null; + this._stashUsed = this._stashSize = this._bufferSize = this._stashByteStart = 0; + this._currentRange = null; + this._speedSampler = null; + + this._isEarlyEofReconnecting = false; + + this._onDataArrival = null; + this._onSeeked = null; + this._onError = null; + this._onComplete = null; + this._onRedirect = null; + this._onRecoveredEarlyEof = null; + + this._extraData = null; + } + + isWorking() { + return this._loader && this._loader.isWorking() && !this._paused; + } + + isPaused() { + return this._paused; + } + + get status() { + return this._loader.status; + } + + get extraData() { + return this._extraData; + } + + set extraData(data) { + this._extraData = data; + } + + // prototype: function onDataArrival(chunks: ArrayBuffer, byteStart: number): number + get onDataArrival() { + return this._onDataArrival; + } + + set onDataArrival(callback) { + this._onDataArrival = callback; + } + + get onSeeked() { + return this._onSeeked; + } + + set onSeeked(callback) { + this._onSeeked = callback; + } + + // prototype: function onError(type: number, info: {code: number, msg: string}): void + get onError() { + return this._onError; + } + + set onError(callback) { + this._onError = callback; + } + + get onComplete() { + return this._onComplete; + } + + set onComplete(callback) { + this._onComplete = callback; + } + + get onRedirect() { + return this._onRedirect; + } + + set onRedirect(callback) { + this._onRedirect = callback; + } + + get onRecoveredEarlyEof() { + return this._onRecoveredEarlyEof; + } + + set onRecoveredEarlyEof(callback) { + this._onRecoveredEarlyEof = callback; + } + + get currentURL() { + return this._dataSource.url; + } + + get hasRedirect() { + return (this._redirectedURL != null || this._dataSource.redirectedURL != undefined); + } + + get currentRedirectedURL() { + return this._redirectedURL || this._dataSource.redirectedURL; + } + + // in KB/s + get currentSpeed() { + if (this._loaderClass === RangeLoader) { + // SpeedSampler is inaccuracy if loader is RangeLoader + return this._loader.currentSpeed; + } + return this._speedSampler.lastSecondKBps; + } + + get loaderType() { + return this._loader.type; + } + + _selectSeekHandler() { + let config = this._config; + + if (config.seekType === 'range') { + this._seekHandler = new RangeSeekHandler(this._config.rangeLoadZeroStart); + } else if (config.seekType === 'param') { + let paramStart = config.seekParamStart || 'bstart'; + let paramEnd = config.seekParamEnd || 'bend'; + + this._seekHandler = new ParamSeekHandler(paramStart, paramEnd); + } else if (config.seekType === 'custom') { + if (typeof config.customSeekHandler !== 'function') { + throw new InvalidArgumentException('Custom seekType specified in config but invalid customSeekHandler!'); + } + this._seekHandler = new config.customSeekHandler(); + } else { + throw new InvalidArgumentException(`Invalid seekType in config: ${config.seekType}`); + } + } + + _selectLoader() { + if (this._isWebSocketURL) { + this._loaderClass = WebSocketLoader; + } else if (FetchStreamLoader.isSupported()) { + this._loaderClass = FetchStreamLoader; + } else if (MozChunkedLoader.isSupported()) { + this._loaderClass = MozChunkedLoader; + } else if (RangeLoader.isSupported()) { + this._loaderClass = RangeLoader; + } else { + throw new RuntimeException('Your browser doesn\'t support xhr with arraybuffer responseType!'); + } + } + + _createLoader() { + this._loader = new this._loaderClass(this._seekHandler, this._config); + if (this._loader.needStashBuffer === false) { + this._enableStash = false; + } + this._loader.onContentLengthKnown = this._onContentLengthKnown.bind(this); + this._loader.onURLRedirect = this._onURLRedirect.bind(this); + this._loader.onDataArrival = this._onLoaderChunkArrival.bind(this); + this._loader.onComplete = this._onLoaderComplete.bind(this); + this._loader.onError = this._onLoaderError.bind(this); + } + + open(optionalFrom) { + this._currentRange = {from: 0, to: -1}; + if (optionalFrom) { + this._currentRange.from = optionalFrom; + } + + this._speedSampler.reset(); + if (!optionalFrom) { + this._fullRequestFlag = true; + } + + this._loader.open(this._dataSource, Object.assign({}, this._currentRange)); + } + + abort() { + this._loader.abort(); + + if (this._paused) { + this._paused = false; + this._resumeFrom = 0; + } + } + + pause() { + if (this.isWorking()) { + this._loader.abort(); + + if (this._stashUsed !== 0) { + this._resumeFrom = this._stashByteStart; + this._currentRange.to = this._stashByteStart - 1; + } else { + this._resumeFrom = this._currentRange.to + 1; + } + this._stashUsed = 0; + this._stashByteStart = 0; + this._paused = true; + } + } + + resume() { + if (this._paused) { + this._paused = false; + let bytes = this._resumeFrom; + this._resumeFrom = 0; + this._internalSeek(bytes, true); + } + } + + seek(bytes) { + this._paused = false; + this._stashUsed = 0; + this._stashByteStart = 0; + this._internalSeek(bytes, true); + } + + /** + * When seeking request is from media seeking, unconsumed stash data should be dropped + * However, stash data shouldn't be dropped if seeking requested from http reconnection + * + * @dropUnconsumed: Ignore and discard all unconsumed data in stash buffer + */ + _internalSeek(bytes, dropUnconsumed) { + if (this._loader.isWorking()) { + this._loader.abort(); + } + + // dispatch & flush stash buffer before seek + this._flushStashBuffer(dropUnconsumed); + + this._loader.destroy(); + this._loader = null; + + let requestRange = {from: bytes, to: -1}; + this._currentRange = {from: requestRange.from, to: -1}; + + this._speedSampler.reset(); + this._stashSize = this._stashInitialSize; + this._createLoader(); + this._loader.open(this._dataSource, requestRange); + + if (this._onSeeked) { + this._onSeeked(); + } + } + + updateUrl(url) { + if (!url || typeof url !== 'string' || url.length === 0) { + throw new InvalidArgumentException('Url must be a non-empty string!'); + } + + this._dataSource.url = url; + + // TODO: replace with new url + } + + _expandBuffer(expectedBytes) { + let bufferNewSize = this._stashSize; + while (bufferNewSize + 1024 * 1024 * 1 < expectedBytes) { + bufferNewSize *= 2; + } + + bufferNewSize += 1024 * 1024 * 1; // bufferSize = stashSize + 1MB + if (bufferNewSize === this._bufferSize) { + return; + } + + let newBuffer = new ArrayBuffer(bufferNewSize); + + if (this._stashUsed > 0) { // copy existing data into new buffer + let stashOldArray = new Uint8Array(this._stashBuffer, 0, this._stashUsed); + let stashNewArray = new Uint8Array(newBuffer, 0, bufferNewSize); + stashNewArray.set(stashOldArray, 0); + } + + this._stashBuffer = newBuffer; + this._bufferSize = bufferNewSize; + } + + _normalizeSpeed(input) { + let list = this._speedNormalizeList; + let last = list.length - 1; + let mid = 0; + let lbound = 0; + let ubound = last; + + if (input < list[0]) { + return list[0]; + } + + // binary search + while (lbound <= ubound) { + mid = lbound + Math.floor((ubound - lbound) / 2); + if (mid === last || (input >= list[mid] && input < list[mid + 1])) { + return list[mid]; + } else if (list[mid] < input) { + lbound = mid + 1; + } else { + ubound = mid - 1; + } + } + } + + _adjustStashSize(normalized) { + let stashSizeKB = 0; + + if (this._config.isLive) { + // live stream: always use single normalized speed for size of stashSizeKB + stashSizeKB = normalized; + } else { + if (normalized < 512) { + stashSizeKB = normalized; + } else if (normalized >= 512 && normalized <= 1024) { + stashSizeKB = Math.floor(normalized * 1.5); + } else { + stashSizeKB = normalized * 2; + } + } + + if (stashSizeKB > 8192) { + stashSizeKB = 8192; + } + + let bufferSize = stashSizeKB * 1024 + 1024 * 1024 * 1; // stashSize + 1MB + if (this._bufferSize < bufferSize) { + this._expandBuffer(bufferSize); + } + this._stashSize = stashSizeKB * 1024; + } + + _dispatchChunks(chunks, byteStart) { + this._currentRange.to = byteStart + chunks.byteLength - 1; + return this._onDataArrival(chunks, byteStart); + } + + _onURLRedirect(redirectedURL) { + this._redirectedURL = redirectedURL; + if (this._onRedirect) { + this._onRedirect(redirectedURL); + } + } + + _onContentLengthKnown(contentLength) { + if (contentLength && this._fullRequestFlag) { + this._totalLength = contentLength; + this._fullRequestFlag = false; + } + } + + _onLoaderChunkArrival(chunk, byteStart, receivedLength) { + if (!this._onDataArrival) { + throw new IllegalStateException('IOController: No existing consumer (onDataArrival) callback!'); + } + if (this._paused) { + return; + } + if (this._isEarlyEofReconnecting) { + // Auto-reconnect for EarlyEof succeed, notify to upper-layer by callback + this._isEarlyEofReconnecting = false; + if (this._onRecoveredEarlyEof) { + this._onRecoveredEarlyEof(); + } + } + + this._speedSampler.addBytes(chunk.byteLength); + + // adjust stash buffer size according to network speed dynamically + let KBps = this._speedSampler.lastSecondKBps; + if (KBps !== 0) { + let normalized = this._normalizeSpeed(KBps); + if (this._speedNormalized !== normalized) { + this._speedNormalized = normalized; + this._adjustStashSize(normalized); + } + } + + if (!this._enableStash) { // disable stash + if (this._stashUsed === 0) { + // dispatch chunk directly to consumer; + // check ret value (consumed bytes) and stash unconsumed to stashBuffer + let consumed = this._dispatchChunks(chunk, byteStart); + if (consumed < chunk.byteLength) { // unconsumed data remain. + let remain = chunk.byteLength - consumed; + if (remain > this._bufferSize) { + this._expandBuffer(remain); + } + let stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize); + stashArray.set(new Uint8Array(chunk, consumed), 0); + this._stashUsed += remain; + this._stashByteStart = byteStart + consumed; + } + } else { + // else: Merge chunk into stashBuffer, and dispatch stashBuffer to consumer. + if (this._stashUsed + chunk.byteLength > this._bufferSize) { + this._expandBuffer(this._stashUsed + chunk.byteLength); + } + let stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize); + stashArray.set(new Uint8Array(chunk), this._stashUsed); + this._stashUsed += chunk.byteLength; + let consumed = this._dispatchChunks(this._stashBuffer.slice(0, this._stashUsed), this._stashByteStart); + if (consumed < this._stashUsed && consumed > 0) { // unconsumed data remain + let remainArray = new Uint8Array(this._stashBuffer, consumed); + stashArray.set(remainArray, 0); + } + this._stashUsed -= consumed; + this._stashByteStart += consumed; + } + } else { // enable stash + if (this._stashUsed === 0 && this._stashByteStart === 0) { // seeked? or init chunk? + // This is the first chunk after seek action + this._stashByteStart = byteStart; + } + if (this._stashUsed + chunk.byteLength <= this._stashSize) { + // just stash + let stashArray = new Uint8Array(this._stashBuffer, 0, this._stashSize); + stashArray.set(new Uint8Array(chunk), this._stashUsed); + this._stashUsed += chunk.byteLength; + } else { // stashUsed + chunkSize > stashSize, size limit exceeded + let stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize); + if (this._stashUsed > 0) { // There're stash datas in buffer + // dispatch the whole stashBuffer, and stash remain data + // then append chunk to stashBuffer (stash) + let buffer = this._stashBuffer.slice(0, this._stashUsed); + let consumed = this._dispatchChunks(buffer, this._stashByteStart); + if (consumed < buffer.byteLength) { + if (consumed > 0) { + let remainArray = new Uint8Array(buffer, consumed); + stashArray.set(remainArray, 0); + this._stashUsed = remainArray.byteLength; + this._stashByteStart += consumed; + } + } else { + this._stashUsed = 0; + this._stashByteStart += consumed; + } + if (this._stashUsed + chunk.byteLength > this._bufferSize) { + this._expandBuffer(this._stashUsed + chunk.byteLength); + stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize); + } + stashArray.set(new Uint8Array(chunk), this._stashUsed); + this._stashUsed += chunk.byteLength; + } else { // stash buffer empty, but chunkSize > stashSize (oh, holy shit) + // dispatch chunk directly and stash remain data + let consumed = this._dispatchChunks(chunk, byteStart); + if (consumed < chunk.byteLength) { + let remain = chunk.byteLength - consumed; + if (remain > this._bufferSize) { + this._expandBuffer(remain); + stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize); + } + stashArray.set(new Uint8Array(chunk, consumed), 0); + this._stashUsed += remain; + this._stashByteStart = byteStart + consumed; + } + } + } + } + } + + _flushStashBuffer(dropUnconsumed) { + if (this._stashUsed > 0) { + let buffer = this._stashBuffer.slice(0, this._stashUsed); + let consumed = this._dispatchChunks(buffer, this._stashByteStart); + let remain = buffer.byteLength - consumed; + + if (consumed < buffer.byteLength) { + if (dropUnconsumed) { + Log.w(this.TAG, `${remain} bytes unconsumed data remain when flush buffer, dropped`); + } else { + if (consumed > 0) { + let stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize); + let remainArray = new Uint8Array(buffer, consumed); + stashArray.set(remainArray, 0); + this._stashUsed = remainArray.byteLength; + this._stashByteStart += consumed; + } + return 0; + } + } + this._stashUsed = 0; + this._stashByteStart = 0; + return remain; + } + return 0; + } + + _onLoaderComplete(from, to) { + // Force-flush stash buffer, and drop unconsumed data + this._flushStashBuffer(true); + + if (this._onComplete) { + this._onComplete(this._extraData); + } + } + + _onLoaderError(type, data) { + Log.e(this.TAG, `Loader error, code = ${data.code}, msg = ${data.msg}`); + + this._flushStashBuffer(false); + + if (this._isEarlyEofReconnecting) { + // Auto-reconnect for EarlyEof failed, throw UnrecoverableEarlyEof error to upper-layer + this._isEarlyEofReconnecting = false; + type = LoaderErrors.UNRECOVERABLE_EARLY_EOF; + } + + switch (type) { + case LoaderErrors.EARLY_EOF: { + if (!this._config.isLive) { + // Do internal http reconnect if not live stream + if (this._totalLength) { + let nextFrom = this._currentRange.to + 1; + if (nextFrom < this._totalLength) { + Log.w(this.TAG, 'Connection lost, trying reconnect...'); + this._isEarlyEofReconnecting = true; + this._internalSeek(nextFrom, false); + } + return; + } + // else: We don't know totalLength, throw UnrecoverableEarlyEof + } + // live stream: throw UnrecoverableEarlyEof error to upper-layer + type = LoaderErrors.UNRECOVERABLE_EARLY_EOF; + break; + } + case LoaderErrors.UNRECOVERABLE_EARLY_EOF: + case LoaderErrors.CONNECTING_TIMEOUT: + case LoaderErrors.HTTP_STATUS_CODE_INVALID: + case LoaderErrors.EXCEPTION: + break; + } + + if (this._onError) { + this._onError(type, data); + } else { + throw new RuntimeException('IOException: ' + data.msg); + } + } + +} + +export default IOController; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/io/loader.js b/packages/xgplayer-flv.js/src/flv/io/loader.js new file mode 100644 index 00000000..e22bf5d5 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/io/loader.js @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {NotImplementedException} from '../utils/exception.js'; + +export const LoaderStatus = { + kIdle: 0, + kConnecting: 1, + kBuffering: 2, + kError: 3, + kComplete: 4 +}; + +export const LoaderErrors = { + OK: 'OK', + EXCEPTION: 'Exception', + HTTP_STATUS_CODE_INVALID: 'HttpStatusCodeInvalid', + CONNECTING_TIMEOUT: 'ConnectingTimeout', + EARLY_EOF: 'EarlyEof', + UNRECOVERABLE_EARLY_EOF: 'UnrecoverableEarlyEof' +}; + +/* Loader has callbacks which have following prototypes: + * function onContentLengthKnown(contentLength: number): void + * function onURLRedirect(url: string): void + * function onDataArrival(chunk: ArrayBuffer, byteStart: number, receivedLength: number): void + * function onError(errorType: number, errorInfo: {code: number, msg: string}): void + * function onComplete(rangeFrom: number, rangeTo: number): void + */ +export class BaseLoader { + + constructor(typeName) { + this._type = typeName || 'undefined'; + this._status = LoaderStatus.kIdle; + this._needStash = false; + // callbacks + this._onContentLengthKnown = null; + this._onURLRedirect = null; + this._onDataArrival = null; + this._onError = null; + this._onComplete = null; + } + + destroy() { + this._status = LoaderStatus.kIdle; + this._onContentLengthKnown = null; + this._onURLRedirect = null; + this._onDataArrival = null; + this._onError = null; + this._onComplete = null; + } + + isWorking() { + return this._status === LoaderStatus.kConnecting || this._status === LoaderStatus.kBuffering; + } + + get type() { + return this._type; + } + + get status() { + return this._status; + } + + get needStashBuffer() { + return this._needStash; + } + + get onContentLengthKnown() { + return this._onContentLengthKnown; + } + + set onContentLengthKnown(callback) { + this._onContentLengthKnown = callback; + } + + get onURLRedirect() { + return this._onURLRedirect; + } + + set onURLRedirect(callback) { + this._onURLRedirect = callback; + } + + get onDataArrival() { + return this._onDataArrival; + } + + set onDataArrival(callback) { + this._onDataArrival = callback; + } + + get onError() { + return this._onError; + } + + set onError(callback) { + this._onError = callback; + } + + get onComplete() { + return this._onComplete; + } + + set onComplete(callback) { + this._onComplete = callback; + } + + // pure virtual + open(dataSource, range) { + throw new NotImplementedException('Unimplemented abstract function!'); + } + + abort() { + throw new NotImplementedException('Unimplemented abstract function!'); + } + + +} \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/io/param-seek-handler.js b/packages/xgplayer-flv.js/src/flv/io/param-seek-handler.js new file mode 100644 index 00000000..1372d109 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/io/param-seek-handler.js @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class ParamSeekHandler { + + constructor(paramStart, paramEnd) { + this._startName = paramStart; + this._endName = paramEnd; + } + + getConfig(baseUrl, range) { + let url = baseUrl; + + if (range.from !== 0 || range.to !== -1) { + let needAnd = true; + if (url.indexOf('?') === -1) { + url += '?'; + needAnd = false; + } + + if (needAnd) { + url += '&'; + } + + url += `${this._startName}=${range.from.toString()}`; + + if (range.to !== -1) { + url += `&${this._endName}=${range.to.toString()}`; + } + } + + return { + url: url, + headers: {} + }; + } + + removeURLParameters(seekedURL) { + let baseURL = seekedURL.split('?')[0]; + let params = undefined; + + let queryIndex = seekedURL.indexOf('?'); + if (queryIndex !== -1) { + params = seekedURL.substring(queryIndex + 1); + } + + let resultParams = ''; + + if (params != undefined && params.length > 0) { + let pairs = params.split('&'); + + for (let i = 0; i < pairs.length; i++) { + let pair = pairs[i].split('='); + let requireAnd = (i > 0); + + if (pair[0] !== this._startName && pair[0] !== this._endName) { + if (requireAnd) { + resultParams += '&'; + } + resultParams += pairs[i]; + } + } + } + + return (resultParams.length === 0) ? baseURL : baseURL + '?' + resultParams; + } + +} + +export default ParamSeekHandler; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/io/range-seek-handler.js b/packages/xgplayer-flv.js/src/flv/io/range-seek-handler.js new file mode 100644 index 00000000..54e8224a --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/io/range-seek-handler.js @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class RangeSeekHandler { + + constructor(zeroStart) { + this._zeroStart = zeroStart || false; + } + + getConfig(url, range) { + let headers = {}; + + if (range.from !== 0 || range.to !== -1) { + let param; + if (range.to !== -1) { + param = `bytes=${range.from.toString()}-${range.to.toString()}`; + } else { + param = `bytes=${range.from.toString()}-`; + } + headers['Range'] = param; + } else if (this._zeroStart) { + headers['Range'] = 'bytes=0-'; + } + + return { + url: url, + headers: headers + }; + } + + removeURLParameters(seekedURL) { + return seekedURL; + } + +} + +export default RangeSeekHandler; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/io/speed-sampler.js b/packages/xgplayer-flv.js/src/flv/io/speed-sampler.js new file mode 100644 index 00000000..d9d682b4 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/io/speed-sampler.js @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Utility class to calculate realtime network I/O speed +class SpeedSampler { + + constructor() { + // milliseconds + this._firstCheckpoint = 0; + this._lastCheckpoint = 0; + this._intervalBytes = 0; + this._totalBytes = 0; + this._lastSecondBytes = 0; + + // compatibility detection + if (self.performance && self.performance.now) { + this._now = self.performance.now.bind(self.performance); + } else { + this._now = Date.now; + } + } + + reset() { + this._firstCheckpoint = this._lastCheckpoint = 0; + this._totalBytes = this._intervalBytes = 0; + this._lastSecondBytes = 0; + } + + addBytes(bytes) { + if (this._firstCheckpoint === 0) { + this._firstCheckpoint = this._now(); + this._lastCheckpoint = this._firstCheckpoint; + this._intervalBytes += bytes; + this._totalBytes += bytes; + } else if (this._now() - this._lastCheckpoint < 1000) { + this._intervalBytes += bytes; + this._totalBytes += bytes; + } else { // duration >= 1000 + this._lastSecondBytes = this._intervalBytes; + this._intervalBytes = bytes; + this._totalBytes += bytes; + this._lastCheckpoint = this._now(); + } + } + + get currentKBps() { + this.addBytes(0); + + let durationSeconds = (this._now() - this._lastCheckpoint) / 1000; + if (durationSeconds == 0) durationSeconds = 1; + return (this._intervalBytes / durationSeconds) / 1024; + } + + get lastSecondKBps() { + this.addBytes(0); + + if (this._lastSecondBytes !== 0) { + return this._lastSecondBytes / 1024; + } else { // lastSecondBytes === 0 + if (this._now() - this._lastCheckpoint >= 500) { + // if time interval since last checkpoint has exceeded 500ms + // the speed is nearly accurate + return this.currentKBps; + } else { + // We don't know + return 0; + } + } + } + + get averageKBps() { + let durationSeconds = (this._now() - this._firstCheckpoint) / 1000; + return (this._totalBytes / durationSeconds) / 1024; + } + +} + +export default SpeedSampler; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/io/websocket-loader.js b/packages/xgplayer-flv.js/src/flv/io/websocket-loader.js new file mode 100644 index 00000000..fba5b79f --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/io/websocket-loader.js @@ -0,0 +1,151 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Log from '../utils/logger.js'; +import {BaseLoader, LoaderStatus, LoaderErrors} from './loader.js'; +import {RuntimeException} from '../utils/exception.js'; + +// For FLV over WebSocket live stream +class WebSocketLoader extends BaseLoader { + + static isSupported() { + try { + return (typeof self.WebSocket !== 'undefined'); + } catch (e) { + return false; + } + } + + constructor() { + super('websocket-loader'); + this.TAG = 'WebSocketLoader'; + + this._needStash = true; + + this._ws = null; + this._requestAbort = false; + this._receivedLength = 0; + } + + destroy() { + if (this._ws) { + this.abort(); + } + super.destroy(); + } + + open(dataSource) { + try { + let ws = this._ws = new self.WebSocket(dataSource.url); + ws.binaryType = 'arraybuffer'; + ws.onopen = this._onWebSocketOpen.bind(this); + ws.onclose = this._onWebSocketClose.bind(this); + ws.onmessage = this._onWebSocketMessage.bind(this); + ws.onerror = this._onWebSocketError.bind(this); + + this._status = LoaderStatus.kConnecting; + } catch (e) { + this._status = LoaderStatus.kError; + + let info = {code: e.code, msg: e.message}; + + if (this._onError) { + this._onError(LoaderErrors.EXCEPTION, info); + } else { + throw new RuntimeException(info.msg); + } + } + } + + abort() { + let ws = this._ws; + if (ws && (ws.readyState === 0 || ws.readyState === 1)) { // CONNECTING || OPEN + this._requestAbort = true; + ws.close(); + } + + this._ws = null; + this._status = LoaderStatus.kComplete; + } + + _onWebSocketOpen(e) { + this._status = LoaderStatus.kBuffering; + } + + _onWebSocketClose(e) { + if (this._requestAbort === true) { + this._requestAbort = false; + return; + } + + this._status = LoaderStatus.kComplete; + + if (this._onComplete) { + this._onComplete(0, this._receivedLength - 1); + } + } + + _onWebSocketMessage(e) { + if (e.data instanceof ArrayBuffer) { + this._dispatchArrayBuffer(e.data); + } else if (e.data instanceof Blob) { + let reader = new FileReader(); + reader.onload = () => { + this._dispatchArrayBuffer(reader.result); + }; + reader.readAsArrayBuffer(e.data); + } else { + this._status = LoaderStatus.kError; + let info = {code: -1, msg: 'Unsupported WebSocket message type: ' + e.data.constructor.name}; + + if (this._onError) { + this._onError(LoaderErrors.EXCEPTION, info); + } else { + throw new RuntimeException(info.msg); + } + } + } + + _dispatchArrayBuffer(arraybuffer) { + let chunk = arraybuffer; + let byteStart = this._receivedLength; + this._receivedLength += chunk.byteLength; + + if (this._onDataArrival) { + this._onDataArrival(chunk, byteStart, this._receivedLength); + } + } + + _onWebSocketError(e) { + this._status = LoaderStatus.kError; + + let info = { + code: e.code, + msg: e.message + }; + + if (this._onError) { + this._onError(LoaderErrors.EXCEPTION, info); + } else { + throw new RuntimeException(info.msg); + } + } + +} + +export default WebSocketLoader; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/io/xhr-moz-chunked-loader.js b/packages/xgplayer-flv.js/src/flv/io/xhr-moz-chunked-loader.js new file mode 100644 index 00000000..f77b9ca6 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/io/xhr-moz-chunked-loader.js @@ -0,0 +1,200 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Log from '../utils/logger.js'; +import {BaseLoader, LoaderStatus, LoaderErrors} from './loader.js'; +import {RuntimeException} from '../utils/exception.js'; + +// For FireFox browser which supports `xhr.responseType = 'moz-chunked-arraybuffer'` +class MozChunkedLoader extends BaseLoader { + + static isSupported() { + try { + let xhr = new XMLHttpRequest(); + // Firefox 37- requires .open() to be called before setting responseType + xhr.open('GET', 'https://example.com', true); + xhr.responseType = 'moz-chunked-arraybuffer'; + return (xhr.responseType === 'moz-chunked-arraybuffer'); + } catch (e) { + Log.w('MozChunkedLoader', e.message); + return false; + } + } + + constructor(seekHandler, config) { + super('xhr-moz-chunked-loader'); + this.TAG = 'MozChunkedLoader'; + + this._seekHandler = seekHandler; + this._config = config; + this._needStash = true; + + this._xhr = null; + this._requestAbort = false; + this._contentLength = null; + this._receivedLength = 0; + } + + destroy() { + if (this.isWorking()) { + this.abort(); + } + if (this._xhr) { + this._xhr.onreadystatechange = null; + this._xhr.onprogress = null; + this._xhr.onloadend = null; + this._xhr.onerror = null; + this._xhr = null; + } + super.destroy(); + } + + open(dataSource, range) { + this._dataSource = dataSource; + this._range = range; + + let sourceURL = dataSource.url; + if (this._config.reuseRedirectedURL && dataSource.redirectedURL != undefined) { + sourceURL = dataSource.redirectedURL; + } + + let seekConfig = this._seekHandler.getConfig(sourceURL, range); + this._requestURL = seekConfig.url; + + let xhr = this._xhr = new XMLHttpRequest(); + xhr.open('GET', seekConfig.url, true); + xhr.responseType = 'moz-chunked-arraybuffer'; + xhr.onreadystatechange = this._onReadyStateChange.bind(this); + xhr.onprogress = this._onProgress.bind(this); + xhr.onloadend = this._onLoadEnd.bind(this); + xhr.onerror = this._onXhrError.bind(this); + + // cors is auto detected and enabled by xhr + + // withCredentials is disabled by default + if (dataSource.withCredentials) { + xhr.withCredentials = true; + } + + if (typeof seekConfig.headers === 'object') { + let headers = seekConfig.headers; + + for (let key in headers) { + if (headers.hasOwnProperty(key)) { + xhr.setRequestHeader(key, headers[key]); + } + } + } + + this._status = LoaderStatus.kConnecting; + xhr.send(); + } + + abort() { + this._requestAbort = true; + if (this._xhr) { + this._xhr.abort(); + } + this._status = LoaderStatus.kComplete; + } + + _onReadyStateChange(e) { + let xhr = e.target; + + if (xhr.readyState === 2) { // HEADERS_RECEIVED + if (xhr.responseURL != undefined && xhr.responseURL !== this._requestURL) { + if (this._onURLRedirect) { + let redirectedURL = this._seekHandler.removeURLParameters(xhr.responseURL); + this._onURLRedirect(redirectedURL); + } + } + + if (xhr.status !== 0 && (xhr.status < 200 || xhr.status > 299)) { + this._status = LoaderStatus.kError; + if (this._onError) { + this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID, {code: xhr.status, msg: xhr.statusText}); + } else { + throw new RuntimeException('MozChunkedLoader: Http code invalid, ' + xhr.status + ' ' + xhr.statusText); + } + } else { + this._status = LoaderStatus.kBuffering; + } + } + } + + _onProgress(e) { + if (this._status === LoaderStatus.kError) { + // Ignore error response + return; + } + + if (this._contentLength === null) { + if (e.total !== null && e.total !== 0) { + this._contentLength = e.total; + if (this._onContentLengthKnown) { + this._onContentLengthKnown(this._contentLength); + } + } + } + + let chunk = e.target.response; + let byteStart = this._range.from + this._receivedLength; + this._receivedLength += chunk.byteLength; + + if (this._onDataArrival) { + this._onDataArrival(chunk, byteStart, this._receivedLength); + } + } + + _onLoadEnd(e) { + if (this._requestAbort === true) { + this._requestAbort = false; + return; + } else if (this._status === LoaderStatus.kError) { + return; + } + + this._status = LoaderStatus.kComplete; + if (this._onComplete) { + this._onComplete(this._range.from, this._range.from + this._receivedLength - 1); + } + } + + _onXhrError(e) { + this._status = LoaderStatus.kError; + let type = 0; + let info = null; + + if (this._contentLength && e.loaded < this._contentLength) { + type = LoaderErrors.EARLY_EOF; + info = {code: -1, msg: 'Moz-Chunked stream meet Early-Eof'}; + } else { + type = LoaderErrors.EXCEPTION; + info = {code: -1, msg: e.constructor.name + ' ' + e.type}; + } + + if (this._onError) { + this._onError(type, info); + } else { + throw new RuntimeException(info.msg); + } + } + +} + +export default MozChunkedLoader; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/io/xhr-msstream-loader.js b/packages/xgplayer-flv.js/src/flv/io/xhr-msstream-loader.js new file mode 100644 index 00000000..1ddf7eac --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/io/xhr-msstream-loader.js @@ -0,0 +1,296 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Log from '../utils/logger.js'; +import {BaseLoader, LoaderStatus, LoaderErrors} from './loader.js'; +import {RuntimeException} from '../utils/exception.js'; + +/* Notice: ms-stream may cause IE/Edge browser crash if seek too frequently!!! + * The browser may crash in wininet.dll. Disable for now. + * + * For IE11/Edge browser by microsoft which supports `xhr.responseType = 'ms-stream'` + * Notice that ms-stream API sucks. The buffer is always expanding along with downloading. + * + * We need to abort the xhr if buffer size exceeded limit size (e.g. 16 MiB), then do reconnect. + * in order to release previous ArrayBuffer to avoid memory leak + * + * Otherwise, the ArrayBuffer will increase to a terrible size that equals final file size. + */ +class MSStreamLoader extends BaseLoader { + + static isSupported() { + try { + if (typeof self.MSStream === 'undefined' || typeof self.MSStreamReader === 'undefined') { + return false; + } + + let xhr = new XMLHttpRequest(); + xhr.open('GET', 'https://example.com', true); + xhr.responseType = 'ms-stream'; + return (xhr.responseType === 'ms-stream'); + } catch (e) { + Log.w('MSStreamLoader', e.message); + return false; + } + } + + constructor(seekHandler, config) { + super('xhr-msstream-loader'); + this.TAG = 'MSStreamLoader'; + + this._seekHandler = seekHandler; + this._config = config; + this._needStash = true; + + this._xhr = null; + this._reader = null; // MSStreamReader + + this._totalRange = null; + this._currentRange = null; + + this._currentRequestURL = null; + this._currentRedirectedURL = null; + + this._contentLength = null; + this._receivedLength = 0; + + this._bufferLimit = 16 * 1024 * 1024; // 16MB + this._lastTimeBufferSize = 0; + this._isReconnecting = false; + } + + destroy() { + if (this.isWorking()) { + this.abort(); + } + if (this._reader) { + this._reader.onprogress = null; + this._reader.onload = null; + this._reader.onerror = null; + this._reader = null; + } + if (this._xhr) { + this._xhr.onreadystatechange = null; + this._xhr = null; + } + super.destroy(); + } + + open(dataSource, range) { + this._internalOpen(dataSource, range, false); + } + + _internalOpen(dataSource, range, isSubrange) { + this._dataSource = dataSource; + + if (!isSubrange) { + this._totalRange = range; + } else { + this._currentRange = range; + } + + let sourceURL = dataSource.url; + if (this._config.reuseRedirectedURL) { + if (this._currentRedirectedURL != undefined) { + sourceURL = this._currentRedirectedURL; + } else if (dataSource.redirectedURL != undefined) { + sourceURL = dataSource.redirectedURL; + } + } + + let seekConfig = this._seekHandler.getConfig(sourceURL, range); + this._currentRequestURL = seekConfig.url; + + let reader = this._reader = new self.MSStreamReader(); + reader.onprogress = this._msrOnProgress.bind(this); + reader.onload = this._msrOnLoad.bind(this); + reader.onerror = this._msrOnError.bind(this); + + let xhr = this._xhr = new XMLHttpRequest(); + xhr.open('GET', seekConfig.url, true); + xhr.responseType = 'ms-stream'; + xhr.onreadystatechange = this._xhrOnReadyStateChange.bind(this); + xhr.onerror = this._xhrOnError.bind(this); + + if (dataSource.withCredentials) { + xhr.withCredentials = true; + } + + if (typeof seekConfig.headers === 'object') { + let headers = seekConfig.headers; + + for (let key in headers) { + if (headers.hasOwnProperty(key)) { + xhr.setRequestHeader(key, headers[key]); + } + } + } + + if (this._isReconnecting) { + this._isReconnecting = false; + } else { + this._status = LoaderStatus.kConnecting; + } + xhr.send(); + } + + abort() { + this._internalAbort(); + this._status = LoaderStatus.kComplete; + } + + _internalAbort() { + if (this._reader) { + if (this._reader.readyState === 1) { // LOADING + this._reader.abort(); + } + this._reader.onprogress = null; + this._reader.onload = null; + this._reader.onerror = null; + this._reader = null; + } + if (this._xhr) { + this._xhr.abort(); + this._xhr.onreadystatechange = null; + this._xhr = null; + } + } + + _xhrOnReadyStateChange(e) { + let xhr = e.target; + + if (xhr.readyState === 2) { // HEADERS_RECEIVED + if (xhr.status >= 200 && xhr.status <= 299) { + this._status = LoaderStatus.kBuffering; + + if (xhr.responseURL != undefined) { + let redirectedURL = this._seekHandler.removeURLParameters(xhr.responseURL); + if (xhr.responseURL !== this._currentRequestURL && redirectedURL !== this._currentRedirectedURL) { + this._currentRedirectedURL = redirectedURL; + if (this._onURLRedirect) { + this._onURLRedirect(redirectedURL); + } + } + } + + let lengthHeader = xhr.getResponseHeader('Content-Length'); + if (lengthHeader != null && this._contentLength == null) { + let length = parseInt(lengthHeader); + if (length > 0) { + this._contentLength = length; + if (this._onContentLengthKnown) { + this._onContentLengthKnown(this._contentLength); + } + } + } + } else { + this._status = LoaderStatus.kError; + if (this._onError) { + this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID, {code: xhr.status, msg: xhr.statusText}); + } else { + throw new RuntimeException('MSStreamLoader: Http code invalid, ' + xhr.status + ' ' + xhr.statusText); + } + } + } else if (xhr.readyState === 3) { // LOADING + if (xhr.status >= 200 && xhr.status <= 299) { + this._status = LoaderStatus.kBuffering; + + let msstream = xhr.response; + this._reader.readAsArrayBuffer(msstream); + } + } + } + + _xhrOnError(e) { + this._status = LoaderStatus.kError; + let type = LoaderErrors.EXCEPTION; + let info = {code: -1, msg: e.constructor.name + ' ' + e.type}; + + if (this._onError) { + this._onError(type, info); + } else { + throw new RuntimeException(info.msg); + } + } + + _msrOnProgress(e) { + let reader = e.target; + let bigbuffer = reader.result; + if (bigbuffer == null) { // result may be null, workaround for buggy M$ + this._doReconnectIfNeeded(); + return; + } + + let slice = bigbuffer.slice(this._lastTimeBufferSize); + this._lastTimeBufferSize = bigbuffer.byteLength; + let byteStart = this._totalRange.from + this._receivedLength; + this._receivedLength += slice.byteLength; + + if (this._onDataArrival) { + this._onDataArrival(slice, byteStart, this._receivedLength); + } + + if (bigbuffer.byteLength >= this._bufferLimit) { + Log.v(this.TAG, `MSStream buffer exceeded max size near ${byteStart + slice.byteLength}, reconnecting...`); + this._doReconnectIfNeeded(); + } + } + + _doReconnectIfNeeded() { + if (this._contentLength == null || this._receivedLength < this._contentLength) { + this._isReconnecting = true; + this._lastTimeBufferSize = 0; + this._internalAbort(); + + let range = { + from: this._totalRange.from + this._receivedLength, + to: -1 + }; + this._internalOpen(this._dataSource, range, true); + } + } + + _msrOnLoad(e) { // actually it is onComplete event + this._status = LoaderStatus.kComplete; + if (this._onComplete) { + this._onComplete(this._totalRange.from, this._totalRange.from + this._receivedLength - 1); + } + } + + _msrOnError(e) { + this._status = LoaderStatus.kError; + let type = 0; + let info = null; + + if (this._contentLength && this._receivedLength < this._contentLength) { + type = LoaderErrors.EARLY_EOF; + info = {code: -1, msg: 'MSStream meet Early-Eof'}; + } else { + type = LoaderErrors.EARLY_EOF; + info = {code: -1, msg: e.constructor.name + ' ' + e.type}; + } + + if (this._onError) { + this._onError(type, info); + } else { + throw new RuntimeException(info.msg); + } + } +} + +export default MSStreamLoader; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/io/xhr-range-loader.js b/packages/xgplayer-flv.js/src/flv/io/xhr-range-loader.js new file mode 100644 index 00000000..411db04c --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/io/xhr-range-loader.js @@ -0,0 +1,355 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Log from '../utils/logger.js'; +import SpeedSampler from './speed-sampler.js'; +import {BaseLoader, LoaderStatus, LoaderErrors} from './loader.js'; +import {RuntimeException} from '../utils/exception.js'; + +// Universal IO Loader, implemented by adding Range header in xhr's request header +class RangeLoader extends BaseLoader { + + static isSupported() { + try { + let xhr = new XMLHttpRequest(); + xhr.open('GET', 'https://example.com', true); + xhr.responseType = 'arraybuffer'; + return (xhr.responseType === 'arraybuffer'); + } catch (e) { + Log.w('RangeLoader', e.message); + return false; + } + } + + constructor(seekHandler, config) { + super('xhr-range-loader'); + this.TAG = 'RangeLoader'; + + this._seekHandler = seekHandler; + this._config = config; + this._needStash = false; + + this._chunkSizeKBList = [ + 128, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 5120, 6144, 7168, 8192 + ]; + this._currentChunkSizeKB = 384; + this._currentSpeedNormalized = 0; + this._zeroSpeedChunkCount = 0; + + this._xhr = null; + this._speedSampler = new SpeedSampler(); + + this._requestAbort = false; + this._waitForTotalLength = false; + this._totalLengthReceived = false; + + this._currentRequestURL = null; + this._currentRedirectedURL = null; + this._currentRequestRange = null; + this._totalLength = null; // size of the entire file + this._contentLength = null; // Content-Length of entire request range + this._receivedLength = 0; // total received bytes + this._lastTimeLoaded = 0; // received bytes of current request sub-range + } + + destroy() { + if (this.isWorking()) { + this.abort(); + } + if (this._xhr) { + this._xhr.onreadystatechange = null; + this._xhr.onprogress = null; + this._xhr.onload = null; + this._xhr.onerror = null; + this._xhr = null; + } + super.destroy(); + } + + get currentSpeed() { + return this._speedSampler.lastSecondKBps; + } + + open(dataSource, range) { + this._dataSource = dataSource; + this._range = range; + this._status = LoaderStatus.kConnecting; + + let useRefTotalLength = false; + if (this._dataSource.filesize != undefined && this._dataSource.filesize !== 0) { + useRefTotalLength = true; + this._totalLength = this._dataSource.filesize; + } + + if (!this._totalLengthReceived && !useRefTotalLength) { + // We need total filesize + this._waitForTotalLength = true; + this._internalOpen(this._dataSource, {from: 0, to: -1}); + } else { + // We have filesize, start loading + this._openSubRange(); + } + } + + _openSubRange() { + let chunkSize = this._currentChunkSizeKB * 1024; + + let from = this._range.from + this._receivedLength; + let to = from + chunkSize; + + if (this._contentLength != null) { + if (to - this._range.from >= this._contentLength) { + to = this._range.from + this._contentLength - 1; + } + } + + this._currentRequestRange = {from, to}; + this._internalOpen(this._dataSource, this._currentRequestRange); + } + + _internalOpen(dataSource, range) { + this._lastTimeLoaded = 0; + + let sourceURL = dataSource.url; + if (this._config.reuseRedirectedURL) { + if (this._currentRedirectedURL != undefined) { + sourceURL = this._currentRedirectedURL; + } else if (dataSource.redirectedURL != undefined) { + sourceURL = dataSource.redirectedURL; + } + } + + let seekConfig = this._seekHandler.getConfig(sourceURL, range); + this._currentRequestURL = seekConfig.url; + + let xhr = this._xhr = new XMLHttpRequest(); + xhr.open('GET', seekConfig.url, true); + xhr.responseType = 'arraybuffer'; + xhr.onreadystatechange = this._onReadyStateChange.bind(this); + xhr.onprogress = this._onProgress.bind(this); + xhr.onload = this._onLoad.bind(this); + xhr.onerror = this._onXhrError.bind(this); + + if (dataSource.withCredentials) { + xhr.withCredentials = true; + } + + if (typeof seekConfig.headers === 'object') { + let headers = seekConfig.headers; + + for (let key in headers) { + if (headers.hasOwnProperty(key)) { + xhr.setRequestHeader(key, headers[key]); + } + } + } + + xhr.send(); + } + + abort() { + this._requestAbort = true; + this._internalAbort(); + this._status = LoaderStatus.kComplete; + } + + _internalAbort() { + if (this._xhr) { + this._xhr.onreadystatechange = null; + this._xhr.onprogress = null; + this._xhr.onload = null; + this._xhr.onerror = null; + this._xhr.abort(); + this._xhr = null; + } + } + + _onReadyStateChange(e) { + let xhr = e.target; + + if (xhr.readyState === 2) { // HEADERS_RECEIVED + if (xhr.responseURL != undefined) { // if the browser support this property + let redirectedURL = this._seekHandler.removeURLParameters(xhr.responseURL); + if (xhr.responseURL !== this._currentRequestURL && redirectedURL !== this._currentRedirectedURL) { + this._currentRedirectedURL = redirectedURL; + if (this._onURLRedirect) { + this._onURLRedirect(redirectedURL); + } + } + } + + if ((xhr.status >= 200 && xhr.status <= 299)) { + if (this._waitForTotalLength) { + return; + } + this._status = LoaderStatus.kBuffering; + } else { + this._status = LoaderStatus.kError; + if (this._onError) { + this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID, {code: xhr.status, msg: xhr.statusText}); + } else { + throw new RuntimeException('RangeLoader: Http code invalid, ' + xhr.status + ' ' + xhr.statusText); + } + } + } + } + + _onProgress(e) { + if (this._status === LoaderStatus.kError) { + // Ignore error response + return; + } + + if (this._contentLength === null) { + let openNextRange = false; + + if (this._waitForTotalLength) { + this._waitForTotalLength = false; + this._totalLengthReceived = true; + openNextRange = true; + + let total = e.total; + this._internalAbort(); + if (total != null & total !== 0) { + this._totalLength = total; + } + } + + // calculate currrent request range's contentLength + if (this._range.to === -1) { + this._contentLength = this._totalLength - this._range.from; + } else { // to !== -1 + this._contentLength = this._range.to - this._range.from + 1; + } + + if (openNextRange) { + this._openSubRange(); + return; + } + if (this._onContentLengthKnown) { + this._onContentLengthKnown(this._contentLength); + } + } + + let delta = e.loaded - this._lastTimeLoaded; + this._lastTimeLoaded = e.loaded; + this._speedSampler.addBytes(delta); + } + + _normalizeSpeed(input) { + let list = this._chunkSizeKBList; + let last = list.length - 1; + let mid = 0; + let lbound = 0; + let ubound = last; + + if (input < list[0]) { + return list[0]; + } + + while (lbound <= ubound) { + mid = lbound + Math.floor((ubound - lbound) / 2); + if (mid === last || (input >= list[mid] && input < list[mid + 1])) { + return list[mid]; + } else if (list[mid] < input) { + lbound = mid + 1; + } else { + ubound = mid - 1; + } + } + } + + _onLoad(e) { + if (this._status === LoaderStatus.kError) { + // Ignore error response + return; + } + + if (this._waitForTotalLength) { + this._waitForTotalLength = false; + return; + } + + this._lastTimeLoaded = 0; + let KBps = this._speedSampler.lastSecondKBps; + if (KBps === 0) { + this._zeroSpeedChunkCount++; + if (this._zeroSpeedChunkCount >= 3) { + // Try get currentKBps after 3 chunks + KBps = this._speedSampler.currentKBps; + } + } + + if (KBps !== 0) { + let normalized = this._normalizeSpeed(KBps); + if (this._currentSpeedNormalized !== normalized) { + this._currentSpeedNormalized = normalized; + this._currentChunkSizeKB = normalized; + } + } + + let chunk = e.target.response; + let byteStart = this._range.from + this._receivedLength; + this._receivedLength += chunk.byteLength; + + let reportComplete = false; + + if (this._contentLength != null && this._receivedLength < this._contentLength) { + // continue load next chunk + this._openSubRange(); + } else { + reportComplete = true; + } + + // dispatch received chunk + if (this._onDataArrival) { + this._onDataArrival(chunk, byteStart, this._receivedLength); + } + + if (reportComplete) { + this._status = LoaderStatus.kComplete; + if (this._onComplete) { + this._onComplete(this._range.from, this._range.from + this._receivedLength - 1); + } + } + } + + _onXhrError(e) { + this._status = LoaderStatus.kError; + let type = 0; + let info = null; + + if (this._contentLength && this._receivedLength > 0 + && this._receivedLength < this._contentLength) { + type = LoaderErrors.EARLY_EOF; + info = {code: -1, msg: 'RangeLoader meet Early-Eof'}; + } else { + type = LoaderErrors.EXCEPTION; + info = {code: -1, msg: e.constructor.name + ' ' + e.type}; + } + + if (this._onError) { + this._onError(type, info); + } else { + throw new RuntimeException(info.msg); + } + } + +} + +export default RangeLoader; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/player/flv-player.js b/packages/xgplayer-flv.js/src/flv/player/flv-player.js new file mode 100644 index 00000000..9c109377 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/player/flv-player.js @@ -0,0 +1,717 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EventEmitter from 'events'; +import Log from '../utils/logger.js'; +import Browser from '../utils/browser.js'; +import PlayerEvents from './player-events.js'; +import Transmuxer from '../core/transmuxer.js'; +import TransmuxingEvents from '../core/transmuxing-events.js'; +import MSEController from '../core/mse-controller.js'; +import MSEEvents from '../core/mse-events.js'; +import {ErrorTypes, ErrorDetails} from './player-errors.js'; +import {createDefaultConfig} from '../config.js'; +import {InvalidArgumentException, IllegalStateException} from '../utils/exception.js'; + +class FlvPlayer { + + constructor(mediaDataSource, config) { + this.TAG = 'FlvPlayer'; + this._type = 'FlvPlayer'; + this._emitter = new EventEmitter(); + + this._config = createDefaultConfig(); + if (typeof config === 'object') { + Object.assign(this._config, config); + } + + if (mediaDataSource.type.toLowerCase() !== 'flv') { + throw new InvalidArgumentException('FlvPlayer requires an flv MediaDataSource input!'); + } + + if (mediaDataSource.isLive === true) { + this._config.isLive = true; + } + + this.e = { + onvLoadedMetadata: this._onvLoadedMetadata.bind(this), + onvSeeking: this._onvSeeking.bind(this), + onvCanPlay: this._onvCanPlay.bind(this), + onvStalled: this._onvStalled.bind(this), + onvProgress: this._onvProgress.bind(this) + }; + + if (self.performance && self.performance.now) { + this._now = self.performance.now.bind(self.performance); + } else { + this._now = Date.now; + } + + this._pendingSeekTime = null; // in seconds + this._requestSetTime = false; + this._seekpointRecord = null; + this._progressChecker = null; + + this._mediaDataSource = mediaDataSource; + this._mediaElement = null; + this._msectl = null; + this._transmuxer = null; + + this._mseSourceOpened = false; + this._hasPendingLoad = false; + this._receivedCanPlay = false; + + this._mediaInfo = null; + this._statisticsInfo = null; + + let chromeNeedIDRFix = (Browser.chrome && + (Browser.version.major < 50 || + (Browser.version.major === 50 && Browser.version.build < 2661))); + this._alwaysSeekKeyframe = (chromeNeedIDRFix || Browser.msedge || Browser.msie) ? true : false; + + if (this._alwaysSeekKeyframe) { + this._config.accurateSeek = false; + } + this._tempPendingSegments = { + audio: [], + video: [], + }; + this._definitionRetryTimes = 0; + } + + destroy() { + if (this._progressChecker != null) { + window.clearInterval(this._progressChecker); + this._progressChecker = null; + } + if (this._transmuxer) { + this.unload(); + } + if (this._mediaElement) { + this.detachMediaElement(); + } + this.e = null; + this._mediaDataSource = null; + + this._emitter.removeAllListeners(); + this._emitter = null; + } + + on(event, listener) { + if (event === PlayerEvents.MEDIA_INFO) { + if (this._mediaInfo != null) { + Promise.resolve().then(() => { + this._emitter.emit(PlayerEvents.MEDIA_INFO, this.mediaInfo); + }); + } + } else if (event === PlayerEvents.STATISTICS_INFO) { + if (this._statisticsInfo != null) { + Promise.resolve().then(() => { + this._emitter.emit(PlayerEvents.STATISTICS_INFO, this.statisticsInfo); + }); + } + } + this._emitter.addListener(event, listener); + } + + off(event, listener) { + this._emitter.removeListener(event, listener); + } + + attachMediaElement(mediaElement) { + this._mediaElement = mediaElement; + mediaElement.addEventListener('loadedmetadata', this.e.onvLoadedMetadata); + mediaElement.addEventListener('seeking', this.e.onvSeeking); + mediaElement.addEventListener('canplay', this.e.onvCanPlay); + mediaElement.addEventListener('stalled', this.e.onvStalled); + mediaElement.addEventListener('progress', this.e.onvProgress); + + this._msectl = new MSEController(this._config); + + this._msectl.on(MSEEvents.UPDATE_END, this._onmseUpdateEnd.bind(this)); + this._msectl.on(MSEEvents.BUFFER_FULL, this._onmseBufferFull.bind(this)); + this._msectl.on(MSEEvents.SOURCE_OPEN, () => { + this._mseSourceOpened = true; + if (this._hasPendingLoad) { + this._hasPendingLoad = false; + this.load(); + } + }); + this._msectl.on(MSEEvents.ERROR, (info) => { + this._emitter.emit(PlayerEvents.ERROR, + ErrorTypes.MEDIA_ERROR, + ErrorDetails.MEDIA_MSE_ERROR, + info + ); + }); + + this._msectl.attachMediaElement(mediaElement); + + if (this._pendingSeekTime != null) { + try { + mediaElement.currentTime = this._pendingSeekTime; + this._pendingSeekTime = null; + } catch (e) { + // IE11 may throw InvalidStateError if readyState === 0 + // We can defer set currentTime operation after loadedmetadata + } + } + } + + detachMediaElement() { + if (this._mediaElement) { + this._msectl.detachMediaElement(); + this._mediaElement.removeEventListener('loadedmetadata', this.e.onvLoadedMetadata); + this._mediaElement.removeEventListener('seeking', this.e.onvSeeking); + this._mediaElement.removeEventListener('canplay', this.e.onvCanPlay); + this._mediaElement.removeEventListener('stalled', this.e.onvStalled); + this._mediaElement.removeEventListener('progress', this.e.onvProgress); + this._mediaElement = null; + } + if (this._msectl) { + this._msectl.destroy(); + this._msectl = null; + } + } + + onDefinitionChange(url, expectTime = 3) { + setTimeout(() => { + if (!this.isDefinitionDataReady && this._definitionRetryTimes < 3) { + this._definitionRetryTimes += 1; + this.onDefinitionChange(url, expectTime); + } else if (this.isDefinitionDataReady) { + this._transmuxer.destroy(); + + Object.keys(this._tempPendingSegments).forEach(key => { + this._msectl._pendingSegments[key] = this._tempPendingSegments[key]; + }); + this._tempPendingSegments = { + audio: [], + video: [], + }; + this._transmuxer = this._tempTransmuxer; + this._definitionRetryTimes = 0; + } else if (this._definitionRetryTimes >= 3) { + this._definitionRetryTimes = 0; + if (this._tempTransmuxer) { + this._tempTransmuxer.destroy(); + this._tempTransmuxer = null; + this._emitter.emit(PlayerEvents.ERROR, ErrorTypes.NETWORK_ERROR, '', '清晰度切换失败!'); + } + this._definitionRetryTimes = 0; + } + this._tempPendingSegments = { + audio: [], + video: [], + }; + }, expectTime * 1000); + + this._mediaDataSource.segments[0].url = url; + this._tempMds = Object.assign({}, this._mediaDataSource, { url }); + + this._tempTransmuxer = new Transmuxer(this._tempMds, this._config); + + + this._tempTransmuxer.on(TransmuxingEvents.INIT_SEGMENT, (type, is) => { + if (!this._config.isLive) { + this._tempPendingSegments[type] = [is]; + } else { + this._msectl.doClearSourceBuffer(); + this._msectl.appendInitSegment(is); + if (this._transmuxer !== this._tempTransmuxer) { + this._transmuxer.destroy(); + } + this._transmuxer = this._tempTransmuxer; + } + }); + + this._tempTransmuxer.on(TransmuxingEvents.MEDIA_SEGMENT, (type, ms) => { + if (!this._config.isLive) { + if (this._transmuxer === this._tempTransmuxer) { + this._msectl.appendMediaSegment(ms); + } else { + this._tempPendingSegments[type] && this._tempPendingSegments[type].push(ms); + } + } else { + this._msectl.appendMediaSegment(ms); + } + + // lazyLoad check + if (this._config.lazyLoad && !this._config.isLive) { + let currentTime = this._mediaElement.currentTime; + if (ms.info.endDts >= (currentTime + this._config.lazyLoadMaxDuration) * 1000) { + if (this._progressChecker == null) { + Log.v(this.TAG, 'Maximum buffering duration exceeded, suspend transmuxing task'); + this._suspendTransmuxer(); + } + } + } + }); + this._tempTransmuxer.on(TransmuxingEvents.LOADING_COMPLETE, () => { + this._msectl.endOfStream(); + this._emitter.emit(PlayerEvents.LOADING_COMPLETE); + }); + this._tempTransmuxer.on(TransmuxingEvents.RECOVERED_EARLY_EOF, () => { + this._emitter.emit(PlayerEvents.RECOVERED_EARLY_EOF); + }); + this._tempTransmuxer.on(TransmuxingEvents.IO_ERROR, (detail, info) => { + this._emitter.emit(PlayerEvents.ERROR, ErrorTypes.NETWORK_ERROR, detail, info); + }); + this._tempTransmuxer.on(TransmuxingEvents.DEMUX_ERROR, (detail, info) => { + this._emitter.emit(PlayerEvents.ERROR, ErrorTypes.MEDIA_ERROR, detail, {code: -1, msg: info}); + }); + this._tempTransmuxer.on(TransmuxingEvents.MEDIA_INFO, (mediaInfo) => { + this._mediaInfo = mediaInfo; + this._tempTransmuxer.seek((this._mediaElement.currentTime + expectTime) * 1000); + this._emitter.emit(PlayerEvents.MEDIA_INFO, Object.assign({}, mediaInfo)); + }); + this._tempTransmuxer.on(TransmuxingEvents.STATISTICS_INFO, (statInfo) => { + this._statisticsInfo = this._fillStatisticsInfo(statInfo); + this._emitter.emit(PlayerEvents.STATISTICS_INFO, Object.assign({}, this._statisticsInfo)); + }); + this._tempTransmuxer.on(TransmuxingEvents.RECOMMEND_SEEKPOINT, (milliseconds) => { + if (this._transmuxer === this._tempTransmuxer && this._mediaElement && !this._config.accurateSeek) { + this._requestSetTime = true; + this._mediaElement.currentTime = milliseconds / 1000; + } + }); + + this._tempTransmuxer.open(); + } + load() { + if (!this._mediaElement) { + throw new IllegalStateException('HTMLMediaElement must be attached before load()!'); + } + if (this._transmuxer) { + throw new IllegalStateException('FlvPlayer.load() has been called, please call unload() first!'); + } + if (this._hasPendingLoad) { + return; + } + + if (this._config.deferLoadAfterSourceOpen && this._mseSourceOpened === false) { + this._hasPendingLoad = true; + return; + } + + if (this._mediaElement.readyState > 0) { + this._requestSetTime = true; + // IE11 may throw InvalidStateError if readyState === 0 + this._mediaElement.currentTime = 0; + } + + this._transmuxer = new Transmuxer(this._mediaDataSource, this._config); + + this._transmuxer.on(TransmuxingEvents.INIT_SEGMENT, (type, is) => { + this._msectl.appendInitSegment(is); + }); + this._transmuxer.on(TransmuxingEvents.MEDIA_SEGMENT, (type, ms) => { + this._msectl.appendMediaSegment(ms); + + // lazyLoad check + if (this._config.lazyLoad && !this._config.isLive) { + let currentTime = this._mediaElement.currentTime; + if (ms.info.endDts >= (currentTime + this._config.lazyLoadMaxDuration) * 1000) { + if (this._progressChecker == null) { + Log.v(this.TAG, 'Maximum buffering duration exceeded, suspend transmuxing task'); + this._suspendTransmuxer(); + } + } + } + }); + this._transmuxer.on(TransmuxingEvents.LOADING_COMPLETE, () => { + this._msectl.endOfStream(); + this._emitter.emit(PlayerEvents.LOADING_COMPLETE); + }); + this._transmuxer.on(TransmuxingEvents.RECOVERED_EARLY_EOF, () => { + this._emitter.emit(PlayerEvents.RECOVERED_EARLY_EOF); + }); + this._transmuxer.on(TransmuxingEvents.IO_ERROR, (detail, info) => { + this._emitter.emit(PlayerEvents.ERROR, ErrorTypes.NETWORK_ERROR, detail, info); + }); + this._transmuxer.on(TransmuxingEvents.DEMUX_ERROR, (detail, info) => { + this._emitter.emit(PlayerEvents.ERROR, ErrorTypes.MEDIA_ERROR, detail, {code: -1, msg: info}); + }); + this._transmuxer.on(TransmuxingEvents.MEDIA_INFO, (mediaInfo) => { + this._mediaInfo = mediaInfo; + this._emitter.emit(PlayerEvents.MEDIA_INFO, Object.assign({}, mediaInfo)); + }); + this._transmuxer.on(TransmuxingEvents.STATISTICS_INFO, (statInfo) => { + this._statisticsInfo = this._fillStatisticsInfo(statInfo); + this._emitter.emit(PlayerEvents.STATISTICS_INFO, Object.assign({}, this._statisticsInfo)); + }); + this._transmuxer.on(TransmuxingEvents.RECOMMEND_SEEKPOINT, (milliseconds) => { + if (this._mediaElement && !this._config.accurateSeek) { + this._requestSetTime = true; + this._mediaElement.currentTime = milliseconds / 1000; + } + }); + + this._transmuxer.open(); + } + + unload() { + if (this._mediaElement) { + this._mediaElement.pause(); + } + if (this._msectl) { + this._msectl.seek(0); + } + if (this._transmuxer) { + this._transmuxer.close(); + this._transmuxer.destroy(); + this._transmuxer = null; + } + } + + play() { + return this._mediaElement.play(); + } + + pause() { + this._mediaElement.pause(); + } + + get type() { + return this._type; + } + + get buffered() { + return this._mediaElement.buffered; + } + + get duration() { + return this._mediaElement.duration; + } + + get volume() { + return this._mediaElement.volume; + } + + set volume(value) { + this._mediaElement.volume = value; + } + + get muted() { + return this._mediaElement.muted; + } + + set muted(muted) { + this._mediaElement.muted = muted; + } + + get currentTime() { + if (this._mediaElement) { + return this._mediaElement.currentTime; + } + return 0; + } + + set currentTime(seconds) { + if (this._mediaElement) { + this._internalSeek(seconds); + } else { + this._pendingSeekTime = seconds; + } + } + + get mediaInfo() { + return Object.assign({}, this._mediaInfo); + } + + get statisticsInfo() { + if (this._statisticsInfo == null) { + this._statisticsInfo = {}; + } + this._statisticsInfo = this._fillStatisticsInfo(this._statisticsInfo); + return Object.assign({}, this._statisticsInfo); + } + + _fillStatisticsInfo(statInfo) { + statInfo.playerType = this._type; + + if (!(this._mediaElement instanceof HTMLVideoElement)) { + return statInfo; + } + + let hasQualityInfo = true; + let decoded = 0; + let dropped = 0; + + if (this._mediaElement.getVideoPlaybackQuality) { + let quality = this._mediaElement.getVideoPlaybackQuality(); + decoded = quality.totalVideoFrames; + dropped = quality.droppedVideoFrames; + } else if (this._mediaElement.webkitDecodedFrameCount != undefined) { + decoded = this._mediaElement.webkitDecodedFrameCount; + dropped = this._mediaElement.webkitDroppedFrameCount; + } else { + hasQualityInfo = false; + } + + if (hasQualityInfo) { + statInfo.decodedFrames = decoded; + statInfo.droppedFrames = dropped; + } + + return statInfo; + } + + _onmseUpdateEnd() { + if (!this._config.lazyLoad || this._config.isLive) { + return; + } + + let buffered = this._mediaElement.buffered; + let currentTime = this._mediaElement.currentTime; + let currentRangeStart = 0; + let currentRangeEnd = 0; + + for (let i = 0; i < buffered.length; i++) { + let start = buffered.start(i); + let end = buffered.end(i); + if (start <= currentTime && currentTime < end) { + currentRangeStart = start; + currentRangeEnd = end; + break; + } + } + + if (currentRangeEnd >= currentTime + this._config.lazyLoadMaxDuration && this._progressChecker == null) { + Log.v(this.TAG, 'Maximum buffering duration exceeded, suspend transmuxing task'); + this._suspendTransmuxer(); + } + } + + _onmseBufferFull() { + Log.v(this.TAG, 'MSE SourceBuffer is full, suspend transmuxing task'); + if (this._progressChecker == null) { + this._suspendTransmuxer(); + } + } + + _suspendTransmuxer() { + if (this._transmuxer) { + this._transmuxer.pause(); + + if (this._progressChecker == null) { + this._progressChecker = window.setInterval(this._checkProgressAndResume.bind(this), 1000); + } + } + } + + _checkProgressAndResume() { + let currentTime = this._mediaElement.currentTime; + let buffered = this._mediaElement.buffered; + + let needResume = false; + + for (let i = 0; i < buffered.length; i++) { + let from = buffered.start(i); + let to = buffered.end(i); + if (currentTime >= from && currentTime < to) { + if (currentTime >= to - this._config.lazyLoadRecoverDuration) { + needResume = true; + } + break; + } + } + + if (needResume) { + window.clearInterval(this._progressChecker); + this._progressChecker = null; + if (needResume) { + Log.v(this.TAG, 'Continue loading from paused position'); + this._transmuxer.resume(); + } + } + } + + _isTimepointBuffered(seconds) { + let buffered = this._mediaElement.buffered; + + for (let i = 0; i < buffered.length; i++) { + let from = buffered.start(i); + let to = buffered.end(i); + if (seconds >= from && seconds < to) { + return true; + } + } + return false; + } + + _internalSeek(seconds) { + let directSeek = this._isTimepointBuffered(seconds); + + let directSeekBegin = false; + let directSeekBeginTime = 0; + + if (seconds < 1.0 && this._mediaElement.buffered.length > 0) { + let videoBeginTime = this._mediaElement.buffered.start(0); + if ((videoBeginTime < 1.0 && seconds < videoBeginTime) || Browser.safari) { + directSeekBegin = true; + // also workaround for Safari: Seek to 0 may cause video stuck, use 0.1 to avoid + directSeekBeginTime = Browser.safari ? 0.1 : videoBeginTime; + } + } + + if (directSeekBegin) { // seek to video begin, set currentTime directly if beginPTS buffered + this._requestSetTime = true; + this._mediaElement.currentTime = directSeekBeginTime; + } else if (directSeek) { // buffered position + if (!this._alwaysSeekKeyframe) { + this._requestSetTime = true; + this._mediaElement.currentTime = seconds; + } else { + let idr = this._msectl.getNearestKeyframe(Math.floor(seconds * 1000)); + this._requestSetTime = true; + if (idr != null) { + this._mediaElement.currentTime = idr.dts / 1000; + } else { + this._mediaElement.currentTime = seconds; + } + } + if (this._progressChecker != null) { + this._checkProgressAndResume(); + } + } else { + if (this._progressChecker != null) { + window.clearInterval(this._progressChecker); + this._progressChecker = null; + } + this._msectl.seek(seconds); + this._transmuxer.seek(Math.floor(seconds * 1000)); // in milliseconds + // no need to set mediaElement.currentTime if non-accurateSeek, + // just wait for the recommend_seekpoint callback + if (this._config.accurateSeek) { + this._requestSetTime = true; + this._mediaElement.currentTime = seconds; + } + } + } + + _checkAndApplyUnbufferedSeekpoint() { + if (this._seekpointRecord) { + if (this._seekpointRecord.recordTime <= this._now() - 100) { + let target = this._mediaElement.currentTime; + this._seekpointRecord = null; + if (!this._isTimepointBuffered(target)) { + if (this._progressChecker != null) { + window.clearTimeout(this._progressChecker); + this._progressChecker = null; + } + // .currentTime is consists with .buffered timestamp + // Chrome/Edge use DTS, while FireFox/Safari use PTS + this._msectl.seek(target); + this._transmuxer.seek(Math.floor(target * 1000)); + // set currentTime if accurateSeek, or wait for recommend_seekpoint callback + if (this._config.accurateSeek) { + this._requestSetTime = true; + this._mediaElement.currentTime = target; + } + } + } else { + window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this), 50); + } + } + } + + _checkAndResumeStuckPlayback(stalled) { + let media = this._mediaElement; + if (stalled || !this._receivedCanPlay || media.readyState < 2) { // HAVE_CURRENT_DATA + let buffered = media.buffered; + if (buffered.length > 0 && media.currentTime < buffered.start(0)) { + Log.w(this.TAG, `Playback seems stuck at ${media.currentTime}, seek to ${buffered.start(0)}`); + this._requestSetTime = true; + this._mediaElement.currentTime = buffered.start(0); + this._mediaElement.removeEventListener('progress', this.e.onvProgress); + } + } else { + // Playback didn't stuck, remove progress event listener + this._mediaElement.removeEventListener('progress', this.e.onvProgress); + } + } + + _onvLoadedMetadata(e) { + if (this._pendingSeekTime != null) { + this._mediaElement.currentTime = this._pendingSeekTime; + this._pendingSeekTime = null; + } + } + + _onvSeeking(e) { // handle seeking request from browser's progress bar + let target = this._mediaElement.currentTime; + let buffered = this._mediaElement.buffered; + + if (this._requestSetTime) { + this._requestSetTime = false; + return; + } + + if (target < 1.0 && buffered.length > 0) { + // seek to video begin, set currentTime directly if beginPTS buffered + let videoBeginTime = buffered.start(0); + if ((videoBeginTime < 1.0 && target < videoBeginTime) || Browser.safari) { + this._requestSetTime = true; + // also workaround for Safari: Seek to 0 may cause video stuck, use 0.1 to avoid + this._mediaElement.currentTime = Browser.safari ? 0.1 : videoBeginTime; + return; + } + } + + if (this._isTimepointBuffered(target)) { + if (this._alwaysSeekKeyframe) { + let idr = this._msectl.getNearestKeyframe(Math.floor(target * 1000)); + if (idr != null) { + this._requestSetTime = true; + this._mediaElement.currentTime = idr.dts / 1000; + } + } + if (this._progressChecker != null) { + this._checkProgressAndResume(); + } + return; + } + + this._seekpointRecord = { + seekPoint: target, + recordTime: this._now() + }; + window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this), 50); + } + + _onvCanPlay(e) { + this._receivedCanPlay = true; + this._mediaElement.removeEventListener('canplay', this.e.onvCanPlay); + } + + _onvStalled(e) { + this._checkAndResumeStuckPlayback(true); + } + + _onvProgress(e) { + this._checkAndResumeStuckPlayback(); + } + + get isDefinitionDataReady() { + const minSegmentLen = this._config.isLive ? 1 : 2; + return Object.keys(this._tempPendingSegments).every((key) => this._tempPendingSegments[key].length >= minSegmentLen); + } +} + +export default FlvPlayer; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/player/native-player.js b/packages/xgplayer-flv.js/src/flv/player/native-player.js new file mode 100644 index 00000000..eb5873ae --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/player/native-player.js @@ -0,0 +1,256 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EventEmitter from 'events'; +import PlayerEvents from './player-events.js'; +import {createDefaultConfig} from '../config.js'; +import {InvalidArgumentException, IllegalStateException} from '../utils/exception.js'; + +// Player wrapper for browser's native player (HTMLVideoElement) without MediaSource src. +class NativePlayer { + + constructor(mediaDataSource, config) { + this.TAG = 'NativePlayer'; + this._type = 'NativePlayer'; + this._emitter = new EventEmitter(); + + this._config = createDefaultConfig(); + if (typeof config === 'object') { + Object.assign(this._config, config); + } + + if (mediaDataSource.type.toLowerCase() === 'flv') { + throw new InvalidArgumentException('NativePlayer does\'t support flv MediaDataSource input!'); + } + if (mediaDataSource.hasOwnProperty('segments')) { + throw new InvalidArgumentException(`NativePlayer(${mediaDataSource.type}) doesn't support multipart playback!`); + } + + this.e = { + onvLoadedMetadata: this._onvLoadedMetadata.bind(this) + }; + + this._pendingSeekTime = null; + this._statisticsReporter = null; + + this._mediaDataSource = mediaDataSource; + this._mediaElement = null; + } + + destroy() { + if (this._mediaElement) { + this.unload(); + this.detachMediaElement(); + } + this.e = null; + this._mediaDataSource = null; + this._emitter.removeAllListeners(); + this._emitter = null; + } + + on(event, listener) { + if (event === PlayerEvents.MEDIA_INFO) { + if (this._mediaElement != null && this._mediaElement.readyState !== 0) { // HAVE_NOTHING + Promise.resolve().then(() => { + this._emitter.emit(PlayerEvents.MEDIA_INFO, this.mediaInfo); + }); + } + } else if (event === PlayerEvents.STATISTICS_INFO) { + if (this._mediaElement != null && this._mediaElement.readyState !== 0) { + Promise.resolve().then(() => { + this._emitter.emit(PlayerEvents.STATISTICS_INFO, this.statisticsInfo); + }); + } + } + this._emitter.addListener(event, listener); + } + + off(event, listener) { + this._emitter.removeListener(event, listener); + } + + attachMediaElement(mediaElement) { + this._mediaElement = mediaElement; + mediaElement.addEventListener('loadedmetadata', this.e.onvLoadedMetadata); + + if (this._pendingSeekTime != null) { + try { + mediaElement.currentTime = this._pendingSeekTime; + this._pendingSeekTime = null; + } catch (e) { + // IE11 may throw InvalidStateError if readyState === 0 + // Defer set currentTime operation after loadedmetadata + } + } + } + + detachMediaElement() { + if (this._mediaElement) { + this._mediaElement.src = ''; + this._mediaElement.removeAttribute('src'); + this._mediaElement.removeEventListener('loadedmetadata', this.e.onvLoadedMetadata); + this._mediaElement = null; + } + if (this._statisticsReporter != null) { + window.clearInterval(this._statisticsReporter); + this._statisticsReporter = null; + } + } + + load() { + if (!this._mediaElement) { + throw new IllegalStateException('HTMLMediaElement must be attached before load()!'); + } + this._mediaElement.src = this._mediaDataSource.url; + + if (this._mediaElement.readyState > 0) { + this._mediaElement.currentTime = 0; + } + + this._mediaElement.preload = 'auto'; + this._mediaElement.load(); + this._statisticsReporter = window.setInterval( + this._reportStatisticsInfo.bind(this), + this._config.statisticsInfoReportInterval); + } + + unload() { + if (this._mediaElement) { + this._mediaElement.src = ''; + this._mediaElement.removeAttribute('src'); + } + if (this._statisticsReporter != null) { + window.clearInterval(this._statisticsReporter); + this._statisticsReporter = null; + } + } + + play() { + return this._mediaElement.play(); + } + + pause() { + this._mediaElement.pause(); + } + + get type() { + return this._type; + } + + get buffered() { + return this._mediaElement.buffered; + } + + get duration() { + return this._mediaElement.duration; + } + + get volume() { + return this._mediaElement.volume; + } + + set volume(value) { + this._mediaElement.volume = value; + } + + get muted() { + return this._mediaElement.muted; + } + + set muted(muted) { + this._mediaElement.muted = muted; + } + + get currentTime() { + if (this._mediaElement) { + return this._mediaElement.currentTime; + } + return 0; + } + + set currentTime(seconds) { + if (this._mediaElement) { + this._mediaElement.currentTime = seconds; + } else { + this._pendingSeekTime = seconds; + } + } + + get mediaInfo() { + let mediaPrefix = (this._mediaElement instanceof HTMLAudioElement) ? 'audio/' : 'video/'; + let info = { + mimeType: mediaPrefix + this._mediaDataSource.type + }; + if (this._mediaElement) { + info.duration = Math.floor(this._mediaElement.duration * 1000); + if (this._mediaElement instanceof HTMLVideoElement) { + info.width = this._mediaElement.videoWidth; + info.height = this._mediaElement.videoHeight; + } + } + return info; + } + + get statisticsInfo() { + let info = { + playerType: this._type, + url: this._mediaDataSource.url + }; + + if (!(this._mediaElement instanceof HTMLVideoElement)) { + return info; + } + + let hasQualityInfo = true; + let decoded = 0; + let dropped = 0; + + if (this._mediaElement.getVideoPlaybackQuality) { + let quality = this._mediaElement.getVideoPlaybackQuality(); + decoded = quality.totalVideoFrames; + dropped = quality.droppedVideoFrames; + } else if (this._mediaElement.webkitDecodedFrameCount != undefined) { + decoded = this._mediaElement.webkitDecodedFrameCount; + dropped = this._mediaElement.webkitDroppedFrameCount; + } else { + hasQualityInfo = false; + } + + if (hasQualityInfo) { + info.decodedFrames = decoded; + info.droppedFrames = dropped; + } + + return info; + } + + _onvLoadedMetadata(e) { + if (this._pendingSeekTime != null) { + this._mediaElement.currentTime = this._pendingSeekTime; + this._pendingSeekTime = null; + } + this._emitter.emit(PlayerEvents.MEDIA_INFO, this.mediaInfo); + } + + _reportStatisticsInfo() { + this._emitter.emit(PlayerEvents.STATISTICS_INFO, this.statisticsInfo); + } + +} + +export default NativePlayer; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/player/player-errors.js b/packages/xgplayer-flv.js/src/flv/player/player-errors.js new file mode 100644 index 00000000..e4a92b73 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/player/player-errors.js @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {LoaderErrors} from '../io/loader.js'; +import DemuxErrors from '../demux/demux-errors.js'; + +export const ErrorTypes = { + NETWORK_ERROR: 'NetworkError', + MEDIA_ERROR: 'MediaError', + OTHER_ERROR: 'OtherError' +}; + +export const ErrorDetails = { + NETWORK_EXCEPTION: LoaderErrors.EXCEPTION, + NETWORK_STATUS_CODE_INVALID: LoaderErrors.HTTP_STATUS_CODE_INVALID, + NETWORK_TIMEOUT: LoaderErrors.CONNECTING_TIMEOUT, + NETWORK_UNRECOVERABLE_EARLY_EOF: LoaderErrors.UNRECOVERABLE_EARLY_EOF, + + MEDIA_MSE_ERROR: 'MediaMSEError', + + MEDIA_FORMAT_ERROR: DemuxErrors.FORMAT_ERROR, + MEDIA_FORMAT_UNSUPPORTED: DemuxErrors.FORMAT_UNSUPPORTED, + MEDIA_CODEC_UNSUPPORTED: DemuxErrors.CODEC_UNSUPPORTED +}; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/player/player-events.js b/packages/xgplayer-flv.js/src/flv/player/player-events.js new file mode 100644 index 00000000..71eba128 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/player/player-events.js @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const PlayerEvents = { + ERROR: 'error', + LOADING_COMPLETE: 'loading_complete', + RECOVERED_EARLY_EOF: 'recovered_early_eof', + MEDIA_INFO: 'media_info', + STATISTICS_INFO: 'statistics_info' +}; + +export default PlayerEvents; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/remux/aac-silent.js b/packages/xgplayer-flv.js/src/flv/remux/aac-silent.js new file mode 100644 index 00000000..f436eaf6 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/remux/aac-silent.js @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * This file is modified from dailymotion's hls.js library (hls.js/src/helper/aac.js) + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class AAC { + + static getSilentFrame(codec, channelCount) { + if (codec === 'mp4a.40.2') { + // handle LC-AAC + if (channelCount === 1) { + return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x23, 0x80]); + } else if (channelCount === 2) { + return new Uint8Array([0x21, 0x00, 0x49, 0x90, 0x02, 0x19, 0x00, 0x23, 0x80]); + } else if (channelCount === 3) { + return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x8e]); + } else if (channelCount === 4) { + return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x80, 0x2c, 0x80, 0x08, 0x02, 0x38]); + } else if (channelCount === 5) { + return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x38]); + } else if (channelCount === 6) { + return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x00, 0xb2, 0x00, 0x20, 0x08, 0xe0]); + } + } else { + // handle HE-AAC (mp4a.40.5 / mp4a.40.29) + if (channelCount === 1) { + // ffmpeg -y -f lavfi -i "aevalsrc=0:d=0.05" -c:a libfdk_aac -profile:a aac_he -b:a 4k output.aac && hexdump -v -e '16/1 "0x%x," "\n"' -v output.aac + return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x4e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x1c, 0x6, 0xf1, 0xc1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]); + } else if (channelCount === 2) { + // ffmpeg -y -f lavfi -i "aevalsrc=0|0:d=0.05" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 "0x%x," "\n"' -v output.aac + return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]); + } else if (channelCount === 3) { + // ffmpeg -y -f lavfi -i "aevalsrc=0|0|0:d=0.05" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 "0x%x," "\n"' -v output.aac + return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]); + } + } + return null; + } + +} + +export default AAC; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/remux/mp4-generator.js b/packages/xgplayer-flv.js/src/flv/remux/mp4-generator.js new file mode 100644 index 00000000..c014d13d --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/remux/mp4-generator.js @@ -0,0 +1,569 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * This file is derived from dailymotion's hls.js library (hls.js/src/remux/mp4-generator.js) + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// MP4 boxes generator for ISO BMFF (ISO Base Media File Format, defined in ISO/IEC 14496-12) +class MP4 { + + static init() { + MP4.types = { + avc1: [], avcC: [], btrt: [], dinf: [], + dref: [], esds: [], ftyp: [], hdlr: [], + mdat: [], mdhd: [], mdia: [], mfhd: [], + minf: [], moof: [], moov: [], mp4a: [], + mvex: [], mvhd: [], sdtp: [], stbl: [], + stco: [], stsc: [], stsd: [], stsz: [], + stts: [], tfdt: [], tfhd: [], traf: [], + trak: [], trun: [], trex: [], tkhd: [], + vmhd: [], smhd: [], '.mp3': [] + }; + + for (let name in MP4.types) { + if (MP4.types.hasOwnProperty(name)) { + MP4.types[name] = [ + name.charCodeAt(0), + name.charCodeAt(1), + name.charCodeAt(2), + name.charCodeAt(3) + ]; + } + } + + let constants = MP4.constants = {}; + + constants.FTYP = new Uint8Array([ + 0x69, 0x73, 0x6F, 0x6D, // major_brand: isom + 0x0, 0x0, 0x0, 0x1, // minor_version: 0x01 + 0x69, 0x73, 0x6F, 0x6D, // isom + 0x61, 0x76, 0x63, 0x31 // avc1 + ]); + + constants.STSD_PREFIX = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version(0) + flags + 0x00, 0x00, 0x00, 0x01 // entry_count + ]); + + constants.STTS = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version(0) + flags + 0x00, 0x00, 0x00, 0x00 // entry_count + ]); + + constants.STSC = constants.STCO = constants.STTS; + + constants.STSZ = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version(0) + flags + 0x00, 0x00, 0x00, 0x00, // sample_size + 0x00, 0x00, 0x00, 0x00 // sample_count + ]); + + constants.HDLR_VIDEO = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version(0) + flags + 0x00, 0x00, 0x00, 0x00, // pre_defined + 0x76, 0x69, 0x64, 0x65, // handler_type: 'vide' + 0x00, 0x00, 0x00, 0x00, // reserved: 3 * 4 bytes + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x56, 0x69, 0x64, 0x65, + 0x6F, 0x48, 0x61, 0x6E, + 0x64, 0x6C, 0x65, 0x72, 0x00 // name: VideoHandler + ]); + + constants.HDLR_AUDIO = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version(0) + flags + 0x00, 0x00, 0x00, 0x00, // pre_defined + 0x73, 0x6F, 0x75, 0x6E, // handler_type: 'soun' + 0x00, 0x00, 0x00, 0x00, // reserved: 3 * 4 bytes + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x53, 0x6F, 0x75, 0x6E, + 0x64, 0x48, 0x61, 0x6E, + 0x64, 0x6C, 0x65, 0x72, 0x00 // name: SoundHandler + ]); + + constants.DREF = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version(0) + flags + 0x00, 0x00, 0x00, 0x01, // entry_count + 0x00, 0x00, 0x00, 0x0C, // entry_size + 0x75, 0x72, 0x6C, 0x20, // type 'url ' + 0x00, 0x00, 0x00, 0x01 // version(0) + flags + ]); + + // Sound media header + constants.SMHD = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version(0) + flags + 0x00, 0x00, 0x00, 0x00 // balance(2) + reserved(2) + ]); + + // video media header + constants.VMHD = new Uint8Array([ + 0x00, 0x00, 0x00, 0x01, // version(0) + flags + 0x00, 0x00, // graphicsmode: 2 bytes + 0x00, 0x00, 0x00, 0x00, // opcolor: 3 * 2 bytes + 0x00, 0x00 + ]); + } + + // Generate a box + static box(type) { + let size = 8; + let result = null; + let datas = Array.prototype.slice.call(arguments, 1); + let arrayCount = datas.length; + + for (let i = 0; i < arrayCount; i++) { + size += datas[i].byteLength; + } + + result = new Uint8Array(size); + result[0] = (size >>> 24) & 0xFF; // size + result[1] = (size >>> 16) & 0xFF; + result[2] = (size >>> 8) & 0xFF; + result[3] = (size) & 0xFF; + + result.set(type, 4); // type + + let offset = 8; + for (let i = 0; i < arrayCount; i++) { // data body + result.set(datas[i], offset); + offset += datas[i].byteLength; + } + + return result; + } + + // emit ftyp & moov + static generateInitSegment(meta) { + let ftyp = MP4.box(MP4.types.ftyp, MP4.constants.FTYP); + let moov = MP4.moov(meta); + + let result = new Uint8Array(ftyp.byteLength + moov.byteLength); + result.set(ftyp, 0); + result.set(moov, ftyp.byteLength); + return result; + } + + // Movie metadata box + static moov(meta) { + let mvhd = MP4.mvhd(meta.timescale, meta.duration); + let trak = MP4.trak(meta); + let mvex = MP4.mvex(meta); + return MP4.box(MP4.types.moov, mvhd, trak, mvex); + } + + // Movie header box + static mvhd(timescale, duration) { + return MP4.box(MP4.types.mvhd, new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version(0) + flags + 0x00, 0x00, 0x00, 0x00, // creation_time + 0x00, 0x00, 0x00, 0x00, // modification_time + (timescale >>> 24) & 0xFF, // timescale: 4 bytes + (timescale >>> 16) & 0xFF, + (timescale >>> 8) & 0xFF, + (timescale) & 0xFF, + (duration >>> 24) & 0xFF, // duration: 4 bytes + (duration >>> 16) & 0xFF, + (duration >>> 8) & 0xFF, + (duration) & 0xFF, + 0x00, 0x01, 0x00, 0x00, // Preferred rate: 1.0 + 0x01, 0x00, 0x00, 0x00, // PreferredVolume(1.0, 2bytes) + reserved(2bytes) + 0x00, 0x00, 0x00, 0x00, // reserved: 4 + 4 bytes + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, // ----begin composition matrix---- + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, // ----end composition matrix---- + 0x00, 0x00, 0x00, 0x00, // ----begin pre_defined 6 * 4 bytes---- + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // ----end pre_defined 6 * 4 bytes---- + 0xFF, 0xFF, 0xFF, 0xFF // next_track_ID + ])); + } + + // Track box + static trak(meta) { + return MP4.box(MP4.types.trak, MP4.tkhd(meta), MP4.mdia(meta)); + } + + // Track header box + static tkhd(meta) { + let trackId = meta.id, duration = meta.duration; + let width = meta.presentWidth, height = meta.presentHeight; + + return MP4.box(MP4.types.tkhd, new Uint8Array([ + 0x00, 0x00, 0x00, 0x07, // version(0) + flags + 0x00, 0x00, 0x00, 0x00, // creation_time + 0x00, 0x00, 0x00, 0x00, // modification_time + (trackId >>> 24) & 0xFF, // track_ID: 4 bytes + (trackId >>> 16) & 0xFF, + (trackId >>> 8) & 0xFF, + (trackId) & 0xFF, + 0x00, 0x00, 0x00, 0x00, // reserved: 4 bytes + (duration >>> 24) & 0xFF, // duration: 4 bytes + (duration >>> 16) & 0xFF, + (duration >>> 8) & 0xFF, + (duration) & 0xFF, + 0x00, 0x00, 0x00, 0x00, // reserved: 2 * 4 bytes + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // layer(2bytes) + alternate_group(2bytes) + 0x00, 0x00, 0x00, 0x00, // volume(2bytes) + reserved(2bytes) + 0x00, 0x01, 0x00, 0x00, // ----begin composition matrix---- + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, // ----end composition matrix---- + (width >>> 8) & 0xFF, // width and height + (width) & 0xFF, + 0x00, 0x00, + (height >>> 8) & 0xFF, + (height) & 0xFF, + 0x00, 0x00 + ])); + } + + // Media Box + static mdia(meta) { + return MP4.box(MP4.types.mdia, MP4.mdhd(meta), MP4.hdlr(meta), MP4.minf(meta)); + } + + // Media header box + static mdhd(meta) { + let timescale = meta.timescale; + let duration = meta.duration; + return MP4.box(MP4.types.mdhd, new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version(0) + flags + 0x00, 0x00, 0x00, 0x00, // creation_time + 0x00, 0x00, 0x00, 0x00, // modification_time + (timescale >>> 24) & 0xFF, // timescale: 4 bytes + (timescale >>> 16) & 0xFF, + (timescale >>> 8) & 0xFF, + (timescale) & 0xFF, + (duration >>> 24) & 0xFF, // duration: 4 bytes + (duration >>> 16) & 0xFF, + (duration >>> 8) & 0xFF, + (duration) & 0xFF, + 0x55, 0xC4, // language: und (undetermined) + 0x00, 0x00 // pre_defined = 0 + ])); + } + + // Media handler reference box + static hdlr(meta) { + let data = null; + if (meta.type === 'audio') { + data = MP4.constants.HDLR_AUDIO; + } else { + data = MP4.constants.HDLR_VIDEO; + } + return MP4.box(MP4.types.hdlr, data); + } + + // Media infomation box + static minf(meta) { + let xmhd = null; + if (meta.type === 'audio') { + xmhd = MP4.box(MP4.types.smhd, MP4.constants.SMHD); + } else { + xmhd = MP4.box(MP4.types.vmhd, MP4.constants.VMHD); + } + return MP4.box(MP4.types.minf, xmhd, MP4.dinf(), MP4.stbl(meta)); + } + + // Data infomation box + static dinf() { + let result = MP4.box(MP4.types.dinf, + MP4.box(MP4.types.dref, MP4.constants.DREF) + ); + return result; + } + + // Sample table box + static stbl(meta) { + let result = MP4.box(MP4.types.stbl, // type: stbl + MP4.stsd(meta), // Sample Description Table + MP4.box(MP4.types.stts, MP4.constants.STTS), // Time-To-Sample + MP4.box(MP4.types.stsc, MP4.constants.STSC), // Sample-To-Chunk + MP4.box(MP4.types.stsz, MP4.constants.STSZ), // Sample size + MP4.box(MP4.types.stco, MP4.constants.STCO) // Chunk offset + ); + return result; + } + + // Sample description box + static stsd(meta) { + if (meta.type === 'audio') { + if (meta.codec === 'mp3') { + return MP4.box(MP4.types.stsd, MP4.constants.STSD_PREFIX, MP4.mp3(meta)); + } + // else: aac -> mp4a + return MP4.box(MP4.types.stsd, MP4.constants.STSD_PREFIX, MP4.mp4a(meta)); + } else { + return MP4.box(MP4.types.stsd, MP4.constants.STSD_PREFIX, MP4.avc1(meta)); + } + } + + static mp3(meta) { + let channelCount = meta.channelCount; + let sampleRate = meta.audioSampleRate; + + let data = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // reserved(4) + 0x00, 0x00, 0x00, 0x01, // reserved(2) + data_reference_index(2) + 0x00, 0x00, 0x00, 0x00, // reserved: 2 * 4 bytes + 0x00, 0x00, 0x00, 0x00, + 0x00, channelCount, // channelCount(2) + 0x00, 0x10, // sampleSize(2) + 0x00, 0x00, 0x00, 0x00, // reserved(4) + (sampleRate >>> 8) & 0xFF, // Audio sample rate + (sampleRate) & 0xFF, + 0x00, 0x00 + ]); + + return MP4.box(MP4.types['.mp3'], data); + } + + static mp4a(meta) { + let channelCount = meta.channelCount; + let sampleRate = meta.audioSampleRate; + + let data = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // reserved(4) + 0x00, 0x00, 0x00, 0x01, // reserved(2) + data_reference_index(2) + 0x00, 0x00, 0x00, 0x00, // reserved: 2 * 4 bytes + 0x00, 0x00, 0x00, 0x00, + 0x00, channelCount, // channelCount(2) + 0x00, 0x10, // sampleSize(2) + 0x00, 0x00, 0x00, 0x00, // reserved(4) + (sampleRate >>> 8) & 0xFF, // Audio sample rate + (sampleRate) & 0xFF, + 0x00, 0x00 + ]); + + return MP4.box(MP4.types.mp4a, data, MP4.esds(meta)); + } + + static esds(meta) { + let config = meta.config || []; + let configSize = config.length; + let data = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version 0 + flags + + 0x03, // descriptor_type + 0x17 + configSize, // length3 + 0x00, 0x01, // es_id + 0x00, // stream_priority + + 0x04, // descriptor_type + 0x0F + configSize, // length + 0x40, // codec: mpeg4_audio + 0x15, // stream_type: Audio + 0x00, 0x00, 0x00, // buffer_size + 0x00, 0x00, 0x00, 0x00, // maxBitrate + 0x00, 0x00, 0x00, 0x00, // avgBitrate + + 0x05 // descriptor_type + ].concat([ + configSize + ]).concat( + config + ).concat([ + 0x06, 0x01, 0x02 // GASpecificConfig + ])); + return MP4.box(MP4.types.esds, data); + } + + static avc1(meta) { + let avcc = meta.avcc; + let width = meta.codecWidth, height = meta.codecHeight; + + let data = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // reserved(4) + 0x00, 0x00, 0x00, 0x01, // reserved(2) + data_reference_index(2) + 0x00, 0x00, 0x00, 0x00, // pre_defined(2) + reserved(2) + 0x00, 0x00, 0x00, 0x00, // pre_defined: 3 * 4 bytes + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + (width >>> 8) & 0xFF, // width: 2 bytes + (width) & 0xFF, + (height >>> 8) & 0xFF, // height: 2 bytes + (height) & 0xFF, + 0x00, 0x48, 0x00, 0x00, // horizresolution: 4 bytes + 0x00, 0x48, 0x00, 0x00, // vertresolution: 4 bytes + 0x00, 0x00, 0x00, 0x00, // reserved: 4 bytes + 0x00, 0x01, // frame_count + 0x0A, // strlen + 0x78, 0x71, 0x71, 0x2F, // compressorname: 32 bytes + 0x66, 0x6C, 0x76, 0x2E, + 0x6A, 0x73, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x18, // depth + 0xFF, 0xFF // pre_defined = -1 + ]); + return MP4.box(MP4.types.avc1, data, MP4.box(MP4.types.avcC, avcc)); + } + + // Movie Extends box + static mvex(meta) { + return MP4.box(MP4.types.mvex, MP4.trex(meta)); + } + + // Track Extends box + static trex(meta) { + let trackId = meta.id; + let data = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version(0) + flags + (trackId >>> 24) & 0xFF, // track_ID + (trackId >>> 16) & 0xFF, + (trackId >>> 8) & 0xFF, + (trackId) & 0xFF, + 0x00, 0x00, 0x00, 0x01, // default_sample_description_index + 0x00, 0x00, 0x00, 0x00, // default_sample_duration + 0x00, 0x00, 0x00, 0x00, // default_sample_size + 0x00, 0x01, 0x00, 0x01 // default_sample_flags + ]); + return MP4.box(MP4.types.trex, data); + } + + // Movie fragment box + static moof(track, baseMediaDecodeTime) { + return MP4.box(MP4.types.moof, MP4.mfhd(track.sequenceNumber), MP4.traf(track, baseMediaDecodeTime)); + } + + static mfhd(sequenceNumber) { + let data = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, + (sequenceNumber >>> 24) & 0xFF, // sequence_number: int32 + (sequenceNumber >>> 16) & 0xFF, + (sequenceNumber >>> 8) & 0xFF, + (sequenceNumber) & 0xFF + ]); + return MP4.box(MP4.types.mfhd, data); + } + + // Track fragment box + static traf(track, baseMediaDecodeTime) { + let trackId = track.id; + + // Track fragment header box + let tfhd = MP4.box(MP4.types.tfhd, new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version(0) & flags + (trackId >>> 24) & 0xFF, // track_ID + (trackId >>> 16) & 0xFF, + (trackId >>> 8) & 0xFF, + (trackId) & 0xFF + ])); + // Track Fragment Decode Time + let tfdt = MP4.box(MP4.types.tfdt, new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version(0) & flags + (baseMediaDecodeTime >>> 24) & 0xFF, // baseMediaDecodeTime: int32 + (baseMediaDecodeTime >>> 16) & 0xFF, + (baseMediaDecodeTime >>> 8) & 0xFF, + (baseMediaDecodeTime) & 0xFF + ])); + let sdtp = MP4.sdtp(track); + let trun = MP4.trun(track, sdtp.byteLength + 16 + 16 + 8 + 16 + 8 + 8); + + return MP4.box(MP4.types.traf, tfhd, tfdt, trun, sdtp); + } + + // Sample Dependency Type box + static sdtp(track) { + let samples = track.samples || []; + let sampleCount = samples.length; + let data = new Uint8Array(4 + sampleCount); + // 0~4 bytes: version(0) & flags + for (let i = 0; i < sampleCount; i++) { + let flags = samples[i].flags; + data[i + 4] = (flags.isLeading << 6) // is_leading: 2 (bit) + | (flags.dependsOn << 4) // sample_depends_on + | (flags.isDependedOn << 2) // sample_is_depended_on + | (flags.hasRedundancy); // sample_has_redundancy + } + return MP4.box(MP4.types.sdtp, data); + } + + // Track fragment run box + static trun(track, offset) { + let samples = track.samples || []; + let sampleCount = samples.length; + let dataSize = 12 + 16 * sampleCount; + let data = new Uint8Array(dataSize); + offset += 8 + dataSize; + + data.set([ + 0x00, 0x00, 0x0F, 0x01, // version(0) & flags + (sampleCount >>> 24) & 0xFF, // sample_count + (sampleCount >>> 16) & 0xFF, + (sampleCount >>> 8) & 0xFF, + (sampleCount) & 0xFF, + (offset >>> 24) & 0xFF, // data_offset + (offset >>> 16) & 0xFF, + (offset >>> 8) & 0xFF, + (offset) & 0xFF + ], 0); + + for (let i = 0; i < sampleCount; i++) { + let duration = samples[i].duration; + let size = samples[i].size; + let flags = samples[i].flags; + let cts = samples[i].cts; + data.set([ + (duration >>> 24) & 0xFF, // sample_duration + (duration >>> 16) & 0xFF, + (duration >>> 8) & 0xFF, + (duration) & 0xFF, + (size >>> 24) & 0xFF, // sample_size + (size >>> 16) & 0xFF, + (size >>> 8) & 0xFF, + (size) & 0xFF, + (flags.isLeading << 2) | flags.dependsOn, // sample_flags + (flags.isDependedOn << 6) | (flags.hasRedundancy << 4) | flags.isNonSync, + 0x00, 0x00, // sample_degradation_priority + (cts >>> 24) & 0xFF, // sample_composition_time_offset + (cts >>> 16) & 0xFF, + (cts >>> 8) & 0xFF, + (cts) & 0xFF + ], 12 + 16 * i); + } + return MP4.box(MP4.types.trun, data); + } + + static mdat(data) { + return MP4.box(MP4.types.mdat, data); + } + +} + +MP4.init(); + +export default MP4; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/remux/mp4-remuxer.js b/packages/xgplayer-flv.js/src/flv/remux/mp4-remuxer.js new file mode 100644 index 00000000..aaffcf58 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/remux/mp4-remuxer.js @@ -0,0 +1,743 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Log from '../utils/logger.js'; +import MP4 from './mp4-generator.js'; +import AAC from './aac-silent.js'; +import Browser from '../utils/browser.js'; +import {SampleInfo, MediaSegmentInfo, MediaSegmentInfoList} from '../core/media-segment-info.js'; +import {IllegalStateException} from '../utils/exception.js'; + + +// Fragmented mp4 remuxer +class MP4Remuxer { + + constructor(config) { + this.TAG = 'MP4Remuxer'; + + this._config = config; + this._isLive = (config.isLive === true) ? true : false; + + this._dtsBase = -1; + this._dtsBaseInited = false; + this._audioDtsBase = Infinity; + this._videoDtsBase = Infinity; + this._audioNextDts = undefined; + this._videoNextDts = undefined; + this._audioStashedLastSample = null; + this._videoStashedLastSample = null; + + this._audioMeta = null; + this._videoMeta = null; + + this._audioSegmentInfoList = new MediaSegmentInfoList('audio'); + this._videoSegmentInfoList = new MediaSegmentInfoList('video'); + + this._onInitSegment = null; + this._onMediaSegment = null; + + // Workaround for chrome < 50: Always force first sample as a Random Access Point in media segment + // see https://bugs.chromium.org/p/chromium/issues/detail?id=229412 + this._forceFirstIDR = (Browser.chrome && + (Browser.version.major < 50 || + (Browser.version.major === 50 && Browser.version.build < 2661))) ? true : false; + + // Workaround for IE11/Edge: Fill silent aac frame after keyframe-seeking + // Make audio beginDts equals with video beginDts, in order to fix seek freeze + this._fillSilentAfterSeek = (Browser.msedge || Browser.msie); + + // While only FireFox supports 'audio/mp4, codecs="mp3"', use 'audio/mpeg' for chrome, safari, ... + this._mp3UseMpegAudio = !Browser.firefox; + + this._fillAudioTimestampGap = this._config.fixAudioTimestampGap; + } + + destroy() { + this._dtsBase = -1; + this._dtsBaseInited = false; + this._audioMeta = null; + this._videoMeta = null; + this._audioSegmentInfoList.clear(); + this._audioSegmentInfoList = null; + this._videoSegmentInfoList.clear(); + this._videoSegmentInfoList = null; + this._onInitSegment = null; + this._onMediaSegment = null; + } + + bindDataSource(producer) { + producer.onDataAvailable = this.remux.bind(this); + producer.onTrackMetadata = this._onTrackMetadataReceived.bind(this); + return this; + } + + /* prototype: function onInitSegment(type: string, initSegment: ArrayBuffer): void + InitSegment: { + type: string, + data: ArrayBuffer, + codec: string, + container: string + } + */ + get onInitSegment() { + return this._onInitSegment; + } + + set onInitSegment(callback) { + this._onInitSegment = callback; + } + + /* prototype: function onMediaSegment(type: string, mediaSegment: MediaSegment): void + MediaSegment: { + type: string, + data: ArrayBuffer, + sampleCount: int32 + info: MediaSegmentInfo + } + */ + get onMediaSegment() { + return this._onMediaSegment; + } + + set onMediaSegment(callback) { + this._onMediaSegment = callback; + } + + insertDiscontinuity() { + this._audioNextDts = this._videoNextDts = undefined; + } + + seek(originalDts) { + this._audioStashedLastSample = null; + this._videoStashedLastSample = null; + this._videoSegmentInfoList.clear(); + this._audioSegmentInfoList.clear(); + } + + remux(audioTrack, videoTrack) { + if (!this._onMediaSegment) { + throw new IllegalStateException('MP4Remuxer: onMediaSegment callback must be specificed!'); + } + if (!this._dtsBaseInited) { + this._calculateDtsBase(audioTrack, videoTrack); + } + this._remuxVideo(videoTrack); + this._remuxAudio(audioTrack); + } + + _onTrackMetadataReceived(type, metadata) { + let metabox = null; + + let container = 'mp4'; + let codec = metadata.codec; + + if (type === 'audio') { + this._audioMeta = metadata; + if (metadata.codec === 'mp3' && this._mp3UseMpegAudio) { + // 'audio/mpeg' for MP3 audio track + container = 'mpeg'; + codec = ''; + metabox = new Uint8Array(); + } else { + // 'audio/mp4, codecs="codec"' + metabox = MP4.generateInitSegment(metadata); + } + } else if (type === 'video') { + this._videoMeta = metadata; + metabox = MP4.generateInitSegment(metadata); + } else { + return; + } + + // dispatch metabox (Initialization Segment) + if (!this._onInitSegment) { + throw new IllegalStateException('MP4Remuxer: onInitSegment callback must be specified!'); + } + this._onInitSegment(type, { + type: type, + data: metabox.buffer, + codec: codec, + container: `${type}/${container}`, + mediaDuration: metadata.duration // in timescale 1000 (milliseconds) + }); + } + + _calculateDtsBase(audioTrack, videoTrack) { + if (this._dtsBaseInited) { + return; + } + + if (audioTrack.samples && audioTrack.samples.length) { + this._audioDtsBase = audioTrack.samples[0].dts; + } + if (videoTrack.samples && videoTrack.samples.length) { + this._videoDtsBase = videoTrack.samples[0].dts; + } + + this._dtsBase = Math.min(this._audioDtsBase, this._videoDtsBase); + this._dtsBaseInited = true; + } + + flushStashedSamples() { + let videoSample = this._videoStashedLastSample; + let audioSample = this._audioStashedLastSample; + + let videoTrack = { + type: 'video', + id: 1, + sequenceNumber: 0, + samples: [], + length: 0 + }; + + if (videoSample != null) { + videoTrack.samples.push(videoSample); + videoTrack.length = videoSample.length; + } + + let audioTrack = { + type: 'audio', + id: 2, + sequenceNumber: 0, + samples: [], + length: 0 + }; + + if (audioSample != null) { + audioTrack.samples.push(audioSample); + audioTrack.length = audioSample.length; + } + + this._videoStashedLastSample = null; + this._audioStashedLastSample = null; + + this._remuxVideo(videoTrack, true); + this._remuxAudio(audioTrack, true); + } + + _remuxAudio(audioTrack, force) { + if (this._audioMeta == null) { + return; + } + + let track = audioTrack; + let samples = track.samples; + let dtsCorrection = undefined; + let firstDts = -1, lastDts = -1, lastPts = -1; + let refSampleDuration = this._audioMeta.refSampleDuration; + + let mpegRawTrack = this._audioMeta.codec === 'mp3' && this._mp3UseMpegAudio; + let firstSegmentAfterSeek = this._dtsBaseInited && this._audioNextDts === undefined; + + let insertPrefixSilentFrame = false; + + if (!samples || samples.length === 0) { + return; + } + if (samples.length === 1 && !force) { + // If [sample count in current batch] === 1 && (force != true) + // Ignore and keep in demuxer's queue + return; + } // else if (force === true) do remux + + let offset = 0; + let mdatbox = null; + let mdatBytes = 0; + + // calculate initial mdat size + if (mpegRawTrack) { + // for raw mpeg buffer + offset = 0; + mdatBytes = track.length; + } else { + // for fmp4 mdat box + offset = 8; // size + type + mdatBytes = 8 + track.length; + } + + + let lastSample = null; + + // Pop the lastSample and waiting for stash + if (samples.length > 1) { + lastSample = samples.pop(); + mdatBytes -= lastSample.length; + } + + // Insert [stashed lastSample in the previous batch] to the front + if (this._audioStashedLastSample != null) { + let sample = this._audioStashedLastSample; + this._audioStashedLastSample = null; + samples.unshift(sample); + mdatBytes += sample.length; + } + + // Stash the lastSample of current batch, waiting for next batch + if (lastSample != null) { + this._audioStashedLastSample = lastSample; + } + + + let firstSampleOriginalDts = samples[0].dts - this._dtsBase; + + // calculate dtsCorrection + if (this._audioNextDts) { + dtsCorrection = firstSampleOriginalDts - this._audioNextDts; + } else { // this._audioNextDts == undefined + if (this._audioSegmentInfoList.isEmpty()) { + dtsCorrection = 0; + if (this._fillSilentAfterSeek && !this._videoSegmentInfoList.isEmpty()) { + if (this._audioMeta.originalCodec !== 'mp3') { + insertPrefixSilentFrame = true; + } + } + } else { + let lastSample = this._audioSegmentInfoList.getLastSampleBefore(firstSampleOriginalDts); + if (lastSample != null) { + let distance = (firstSampleOriginalDts - (lastSample.originalDts + lastSample.duration)); + if (distance <= 3) { + distance = 0; + } + let expectedDts = lastSample.dts + lastSample.duration + distance; + dtsCorrection = firstSampleOriginalDts - expectedDts; + } else { // lastSample == null, cannot found + dtsCorrection = 0; + } + } + } + + if (insertPrefixSilentFrame) { + // align audio segment beginDts to match with current video segment's beginDts + let firstSampleDts = firstSampleOriginalDts - dtsCorrection; + let videoSegment = this._videoSegmentInfoList.getLastSegmentBefore(firstSampleOriginalDts); + if (videoSegment != null && videoSegment.beginDts < firstSampleDts) { + let silentUnit = AAC.getSilentFrame(this._audioMeta.originalCodec, this._audioMeta.channelCount); + if (silentUnit) { + let dts = videoSegment.beginDts; + let silentFrameDuration = firstSampleDts - videoSegment.beginDts; + Log.v(this.TAG, `InsertPrefixSilentAudio: dts: ${dts}, duration: ${silentFrameDuration}`); + samples.unshift({unit: silentUnit, dts: dts, pts: dts}); + mdatBytes += silentUnit.byteLength; + } // silentUnit == null: Cannot generate, skip + } else { + insertPrefixSilentFrame = false; + } + } + + let mp4Samples = []; + + // Correct dts for each sample, and calculate sample duration. Then output to mp4Samples + for (let i = 0; i < samples.length; i++) { + let sample = samples[i]; + let unit = sample.unit; + let originalDts = sample.dts - this._dtsBase; + let dts = originalDts - dtsCorrection; + + if (firstDts === -1) { + firstDts = dts; + } + + let sampleDuration = 0; + + if (i !== samples.length - 1) { + let nextDts = samples[i + 1].dts - this._dtsBase - dtsCorrection; + sampleDuration = nextDts - dts; + } else { // the last sample + if (lastSample != null) { // use stashed sample's dts to calculate sample duration + let nextDts = lastSample.dts - this._dtsBase - dtsCorrection; + sampleDuration = nextDts - dts; + } else if (mp4Samples.length >= 1) { // use second last sample duration + sampleDuration = mp4Samples[mp4Samples.length - 1].duration; + } else { // the only one sample, use reference sample duration + sampleDuration = Math.floor(refSampleDuration); + } + } + + let needFillSilentFrames = false; + let silentFrames = null; + + // Silent frame generation, if large timestamp gap detected && config.fixAudioTimestampGap + if (sampleDuration > refSampleDuration * 1.5 && this._audioMeta.codec !== 'mp3' && this._fillAudioTimestampGap && !Browser.safari) { + // We need to insert silent frames to fill timestamp gap + needFillSilentFrames = true; + let delta = Math.abs(sampleDuration - refSampleDuration); + let frameCount = Math.ceil(delta / refSampleDuration); + let currentDts = dts + refSampleDuration; // Notice: in float + + Log.w(this.TAG, 'Large audio timestamp gap detected, may cause AV sync to drift. ' + + 'Silent frames will be generated to avoid unsync.\n' + + `dts: ${dts + sampleDuration} ms, expected: ${dts + Math.round(refSampleDuration)} ms, ` + + `delta: ${Math.round(delta)} ms, generate: ${frameCount} frames`); + + let silentUnit = AAC.getSilentFrame(this._audioMeta.originalCodec, this._audioMeta.channelCount); + if (silentUnit == null) { + Log.w(this.TAG, 'Unable to generate silent frame for ' + + `${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`); + // Repeat last frame + silentUnit = unit; + } + silentFrames = []; + + for (let j = 0; j < frameCount; j++) { + let intDts = Math.round(currentDts); // round to integer + if (silentFrames.length > 0) { + // Set previous frame sample duration + let previousFrame = silentFrames[silentFrames.length - 1]; + previousFrame.duration = intDts - previousFrame.dts; + } + let frame = { + dts: intDts, + pts: intDts, + cts: 0, + unit: silentUnit, + size: silentUnit.byteLength, + duration: 0, // wait for next sample + originalDts: originalDts, + flags: { + isLeading: 0, + dependsOn: 1, + isDependedOn: 0, + hasRedundancy: 0 + } + }; + silentFrames.push(frame); + mdatBytes += unit.byteLength; + currentDts += refSampleDuration; + } + + // last frame: align end time to next frame dts + let lastFrame = silentFrames[silentFrames.length - 1]; + lastFrame.duration = dts + sampleDuration - lastFrame.dts; + + // silentFrames.forEach((frame) => { + // Log.w(this.TAG, `SilentAudio: dts: ${frame.dts}, duration: ${frame.duration}`); + // }); + + // Set correct sample duration for current frame + sampleDuration = Math.round(refSampleDuration); + } + + mp4Samples.push({ + dts: dts, + pts: dts, + cts: 0, + unit: sample.unit, + size: sample.unit.byteLength, + duration: sampleDuration, + originalDts: originalDts, + flags: { + isLeading: 0, + dependsOn: 1, + isDependedOn: 0, + hasRedundancy: 0 + } + }); + + if (needFillSilentFrames) { + // Silent frames should be inserted after wrong-duration frame + mp4Samples.push.apply(mp4Samples, silentFrames); + } + } + + // allocate mdatbox + if (mpegRawTrack) { + // allocate for raw mpeg buffer + mdatbox = new Uint8Array(mdatBytes); + } else { + // allocate for fmp4 mdat box + mdatbox = new Uint8Array(mdatBytes); + // size field + mdatbox[0] = (mdatBytes >>> 24) & 0xFF; + mdatbox[1] = (mdatBytes >>> 16) & 0xFF; + mdatbox[2] = (mdatBytes >>> 8) & 0xFF; + mdatbox[3] = (mdatBytes) & 0xFF; + // type field (fourCC) + mdatbox.set(MP4.types.mdat, 4); + } + + // Write samples into mdatbox + for (let i = 0; i < mp4Samples.length; i++) { + let unit = mp4Samples[i].unit; + mdatbox.set(unit, offset); + offset += unit.byteLength; + } + + let latest = mp4Samples[mp4Samples.length - 1]; + lastDts = latest.dts + latest.duration; + this._audioNextDts = lastDts; + + // fill media segment info & add to info list + let info = new MediaSegmentInfo(); + info.beginDts = firstDts; + info.endDts = lastDts; + info.beginPts = firstDts; + info.endPts = lastDts; + info.originalBeginDts = mp4Samples[0].originalDts; + info.originalEndDts = latest.originalDts + latest.duration; + info.firstSample = new SampleInfo(mp4Samples[0].dts, + mp4Samples[0].pts, + mp4Samples[0].duration, + mp4Samples[0].originalDts, + false); + info.lastSample = new SampleInfo(latest.dts, + latest.pts, + latest.duration, + latest.originalDts, + false); + if (!this._isLive) { + this._audioSegmentInfoList.append(info); + } + + track.samples = mp4Samples; + track.sequenceNumber++; + + let moofbox = null; + + if (mpegRawTrack) { + // Generate empty buffer, because useless for raw mpeg + moofbox = new Uint8Array(); + } else { + // Generate moof for fmp4 segment + moofbox = MP4.moof(track, firstDts); + } + + track.samples = []; + track.length = 0; + + let segment = { + type: 'audio', + data: this._mergeBoxes(moofbox, mdatbox).buffer, + sampleCount: mp4Samples.length, + info: info + }; + + if (mpegRawTrack && firstSegmentAfterSeek) { + // For MPEG audio stream in MSE, if seeking occurred, before appending new buffer + // We need explicitly set timestampOffset to the desired point in timeline for mpeg SourceBuffer. + segment.timestampOffset = firstDts; + } + + this._onMediaSegment('audio', segment); + } + + _remuxVideo(videoTrack, force) { + if (this._videoMeta == null) { + return; + } + + let track = videoTrack; + let samples = track.samples; + let dtsCorrection = undefined; + let firstDts = -1, lastDts = -1; + let firstPts = -1, lastPts = -1; + + if (!samples || samples.length === 0) { + return; + } + if (samples.length === 1 && !force) { + // If [sample count in current batch] === 1 && (force != true) + // Ignore and keep in demuxer's queue + return; + } // else if (force === true) do remux + + let offset = 8; + let mdatbox = null; + let mdatBytes = 8 + videoTrack.length; + + + let lastSample = null; + + // Pop the lastSample and waiting for stash + if (samples.length > 1) { + lastSample = samples.pop(); + mdatBytes -= lastSample.length; + } + + // Insert [stashed lastSample in the previous batch] to the front + if (this._videoStashedLastSample != null) { + let sample = this._videoStashedLastSample; + this._videoStashedLastSample = null; + samples.unshift(sample); + mdatBytes += sample.length; + } + + // Stash the lastSample of current batch, waiting for next batch + if (lastSample != null) { + this._videoStashedLastSample = lastSample; + } + + + let firstSampleOriginalDts = samples[0].dts - this._dtsBase; + + // calculate dtsCorrection + if (this._videoNextDts) { + dtsCorrection = firstSampleOriginalDts - this._videoNextDts; + } else { // this._videoNextDts == undefined + if (this._videoSegmentInfoList.isEmpty()) { + dtsCorrection = 0; + } else { + let lastSample = this._videoSegmentInfoList.getLastSampleBefore(firstSampleOriginalDts); + if (lastSample != null) { + let distance = (firstSampleOriginalDts - (lastSample.originalDts + lastSample.duration)); + if (distance <= 3) { + distance = 0; + } + let expectedDts = lastSample.dts + lastSample.duration + distance; + dtsCorrection = firstSampleOriginalDts - expectedDts; + } else { // lastSample == null, cannot found + dtsCorrection = 0; + } + } + } + + let info = new MediaSegmentInfo(); + let mp4Samples = []; + + // Correct dts for each sample, and calculate sample duration. Then output to mp4Samples + for (let i = 0; i < samples.length; i++) { + let sample = samples[i]; + let originalDts = sample.dts - this._dtsBase; + let isKeyframe = sample.isKeyframe; + let dts = originalDts - dtsCorrection; + let cts = sample.cts; + let pts = dts + cts; + + if (firstDts === -1) { + firstDts = dts; + firstPts = pts; + } + + let sampleDuration = 0; + + if (i !== samples.length - 1) { + let nextDts = samples[i + 1].dts - this._dtsBase - dtsCorrection; + sampleDuration = nextDts - dts; + } else { // the last sample + if (lastSample != null) { // use stashed sample's dts to calculate sample duration + let nextDts = lastSample.dts - this._dtsBase - dtsCorrection; + sampleDuration = nextDts - dts; + } else if (mp4Samples.length >= 1) { // use second last sample duration + sampleDuration = mp4Samples[mp4Samples.length - 1].duration; + } else { // the only one sample, use reference sample duration + sampleDuration = Math.floor(this._videoMeta.refSampleDuration); + } + } + + if (isKeyframe) { + let syncPoint = new SampleInfo(dts, pts, sampleDuration, sample.dts, true); + syncPoint.fileposition = sample.fileposition; + info.appendSyncPoint(syncPoint); + } + + mp4Samples.push({ + dts: dts, + pts: pts, + cts: cts, + units: sample.units, + size: sample.length, + isKeyframe: isKeyframe, + duration: sampleDuration, + originalDts: originalDts, + flags: { + isLeading: 0, + dependsOn: isKeyframe ? 2 : 1, + isDependedOn: isKeyframe ? 1 : 0, + hasRedundancy: 0, + isNonSync: isKeyframe ? 0 : 1 + } + }); + } + + // allocate mdatbox + mdatbox = new Uint8Array(mdatBytes); + mdatbox[0] = (mdatBytes >>> 24) & 0xFF; + mdatbox[1] = (mdatBytes >>> 16) & 0xFF; + mdatbox[2] = (mdatBytes >>> 8) & 0xFF; + mdatbox[3] = (mdatBytes) & 0xFF; + mdatbox.set(MP4.types.mdat, 4); + + // Write samples into mdatbox + for (let i = 0; i < mp4Samples.length; i++) { + let units = mp4Samples[i].units; + while (units.length) { + let unit = units.shift(); + let data = unit.data; + mdatbox.set(data, offset); + offset += data.byteLength; + } + } + + let latest = mp4Samples[mp4Samples.length - 1]; + lastDts = latest.dts + latest.duration; + lastPts = latest.pts + latest.duration; + this._videoNextDts = lastDts; + + // fill media segment info & add to info list + info.beginDts = firstDts; + info.endDts = lastDts; + info.beginPts = firstPts; + info.endPts = lastPts; + info.originalBeginDts = mp4Samples[0].originalDts; + info.originalEndDts = latest.originalDts + latest.duration; + info.firstSample = new SampleInfo(mp4Samples[0].dts, + mp4Samples[0].pts, + mp4Samples[0].duration, + mp4Samples[0].originalDts, + mp4Samples[0].isKeyframe); + info.lastSample = new SampleInfo(latest.dts, + latest.pts, + latest.duration, + latest.originalDts, + latest.isKeyframe); + if (!this._isLive) { + this._videoSegmentInfoList.append(info); + } + + track.samples = mp4Samples; + track.sequenceNumber++; + + // workaround for chrome < 50: force first sample as a random access point + // see https://bugs.chromium.org/p/chromium/issues/detail?id=229412 + if (this._forceFirstIDR) { + let flags = mp4Samples[0].flags; + flags.dependsOn = 2; + flags.isNonSync = 0; + } + + let moofbox = MP4.moof(track, firstDts); + track.samples = []; + track.length = 0; + + this._onMediaSegment('video', { + type: 'video', + data: this._mergeBoxes(moofbox, mdatbox).buffer, + sampleCount: mp4Samples.length, + info: info + }); + } + + _mergeBoxes(moof, mdat) { + let result = new Uint8Array(moof.byteLength + mdat.byteLength); + result.set(moof, 0); + result.set(mdat, moof.byteLength); + return result; + } + +} + +export default MP4Remuxer; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/utils/browser.js b/packages/xgplayer-flv.js/src/flv/utils/browser.js new file mode 100644 index 00000000..69f9b6c7 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/utils/browser.js @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +let Browser = {}; + +function detect() { + // modified from jquery-browser-plugin + + let ua = self.navigator.userAgent.toLowerCase(); + + let match = /(edge)\/([\w.]+)/.exec(ua) || + /(opr)[\/]([\w.]+)/.exec(ua) || + /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(iemobile)[\/]([\w.]+)/.exec(ua) || + /(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf('trident') >= 0 && /(rv)(?::| )([\w.]+)/.exec(ua) || + ua.indexOf('compatible') < 0 && /(firefox)[ \/]([\w.]+)/.exec(ua) || + []; + + let platform_match = /(ipad)/.exec(ua) || + /(ipod)/.exec(ua) || + /(windows phone)/.exec(ua) || + /(iphone)/.exec(ua) || + /(kindle)/.exec(ua) || + /(android)/.exec(ua) || + /(windows)/.exec(ua) || + /(mac)/.exec(ua) || + /(linux)/.exec(ua) || + /(cros)/.exec(ua) || + []; + + let matched = { + browser: match[5] || match[3] || match[1] || '', + version: match[2] || match[4] || '0', + majorVersion: match[4] || match[2] || '0', + platform: platform_match[0] || '' + }; + + let browser = {}; + if (matched.browser) { + browser[matched.browser] = true; + + let versionArray = matched.majorVersion.split('.'); + browser.version = { + major: parseInt(matched.majorVersion, 10), + string: matched.version + }; + if (versionArray.length > 1) { + browser.version.minor = parseInt(versionArray[1], 10); + } + if (versionArray.length > 2) { + browser.version.build = parseInt(versionArray[2], 10); + } + } + + if (matched.platform) { + browser[matched.platform] = true; + } + + if (browser.chrome || browser.opr || browser.safari) { + browser.webkit = true; + } + + // MSIE. IE11 has 'rv' identifer + if (browser.rv || browser.iemobile) { + if (browser.rv) { + delete browser.rv; + } + let msie = 'msie'; + matched.browser = msie; + browser[msie] = true; + } + + // Microsoft Edge + if (browser.edge) { + delete browser.edge; + let msedge = 'msedge'; + matched.browser = msedge; + browser[msedge] = true; + } + + // Opera 15+ + if (browser.opr) { + let opera = 'opera'; + matched.browser = opera; + browser[opera] = true; + } + + // Stock android browsers are marked as Safari + if (browser.safari && browser.android) { + let android = 'android'; + matched.browser = android; + browser[android] = true; + } + + browser.name = matched.browser; + browser.platform = matched.platform; + + for (let key in Browser) { + if (Browser.hasOwnProperty(key)) { + delete Browser[key]; + } + } + Object.assign(Browser, browser); +} + +detect(); + +export default Browser; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/utils/exception.js b/packages/xgplayer-flv.js/src/flv/utils/exception.js new file mode 100644 index 00000000..83581c1e --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/utils/exception.js @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class RuntimeException { + + constructor(message) { + this._message = message; + } + + get name() { + return 'RuntimeException'; + } + + get message() { + return this._message; + } + + toString() { + return this.name + ': ' + this.message; + } + +} + +export class IllegalStateException extends RuntimeException { + + constructor(message) { + super(message); + } + + get name() { + return 'IllegalStateException'; + } + +} + +export class InvalidArgumentException extends RuntimeException { + + constructor(message) { + super(message); + } + + get name() { + return 'InvalidArgumentException'; + } + +} + +export class NotImplementedException extends RuntimeException { + + constructor(message) { + super(message); + } + + get name() { + return 'NotImplementedException'; + } + +} diff --git a/packages/xgplayer-flv.js/src/flv/utils/logger.js b/packages/xgplayer-flv.js/src/flv/utils/logger.js new file mode 100644 index 00000000..e8d3b093 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/utils/logger.js @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EventEmitter from 'events'; + +class Log { + + static e(tag, msg) { + if (!tag || Log.FORCE_GLOBAL_TAG) + tag = Log.GLOBAL_TAG; + + let str = `[${tag}] > ${msg}`; + + if (Log.ENABLE_CALLBACK) { + Log.emitter.emit('log', 'error', str); + } + + if (!Log.ENABLE_ERROR) { + return; + } + + if (console.error) { + console.error(str); + } else if (console.warn) { + console.warn(str); + } else { + console.log(str); + } + } + + static i(tag, msg) { + if (!tag || Log.FORCE_GLOBAL_TAG) + tag = Log.GLOBAL_TAG; + + let str = `[${tag}] > ${msg}`; + + if (Log.ENABLE_CALLBACK) { + Log.emitter.emit('log', 'info', str); + } + + if (!Log.ENABLE_INFO) { + return; + } + + if (console.info) { + console.info(str); + } else { + console.log(str); + } + } + + static w(tag, msg) { + if (!tag || Log.FORCE_GLOBAL_TAG) + tag = Log.GLOBAL_TAG; + + let str = `[${tag}] > ${msg}`; + + if (Log.ENABLE_CALLBACK) { + Log.emitter.emit('log', 'warn', str); + } + + if (!Log.ENABLE_WARN) { + return; + } + + if (console.warn) { + console.warn(str); + } else { + console.log(str); + } + } + + static d(tag, msg) { + if (!tag || Log.FORCE_GLOBAL_TAG) + tag = Log.GLOBAL_TAG; + + let str = `[${tag}] > ${msg}`; + + if (Log.ENABLE_CALLBACK) { + Log.emitter.emit('log', 'debug', str); + } + + if (!Log.ENABLE_DEBUG) { + return; + } + + if (console.debug) { + console.debug(str); + } else { + console.log(str); + } + } + + static v(tag, msg) { + if (!tag || Log.FORCE_GLOBAL_TAG) + tag = Log.GLOBAL_TAG; + + let str = `[${tag}] > ${msg}`; + + if (Log.ENABLE_CALLBACK) { + Log.emitter.emit('log', 'verbose', str); + } + + if (!Log.ENABLE_VERBOSE) { + return; + } + + console.log(str); + } + +} + +Log.GLOBAL_TAG = 'flv.js'; +Log.FORCE_GLOBAL_TAG = false; +Log.ENABLE_ERROR = true; +Log.ENABLE_INFO = true; +Log.ENABLE_WARN = true; +Log.ENABLE_DEBUG = true; +Log.ENABLE_VERBOSE = true; + +Log.ENABLE_CALLBACK = false; + +Log.emitter = new EventEmitter(); + +export default Log; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/utils/logging-control.js b/packages/xgplayer-flv.js/src/flv/utils/logging-control.js new file mode 100644 index 00000000..d210a9f7 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/utils/logging-control.js @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import EventEmitter from 'events'; +import Log from './logger.js'; + +class LoggingControl { + + static get forceGlobalTag() { + return Log.FORCE_GLOBAL_TAG; + } + + static set forceGlobalTag(enable) { + Log.FORCE_GLOBAL_TAG = enable; + LoggingControl._notifyChange(); + } + + static get globalTag() { + return Log.GLOBAL_TAG; + } + + static set globalTag(tag) { + Log.GLOBAL_TAG = tag; + LoggingControl._notifyChange(); + } + + static get enableAll() { + return Log.ENABLE_VERBOSE + && Log.ENABLE_DEBUG + && Log.ENABLE_INFO + && Log.ENABLE_WARN + && Log.ENABLE_ERROR; + } + + static set enableAll(enable) { + Log.ENABLE_VERBOSE = enable; + Log.ENABLE_DEBUG = enable; + Log.ENABLE_INFO = enable; + Log.ENABLE_WARN = enable; + Log.ENABLE_ERROR = enable; + LoggingControl._notifyChange(); + } + + static get enableDebug() { + return Log.ENABLE_DEBUG; + } + + static set enableDebug(enable) { + Log.ENABLE_DEBUG = enable; + LoggingControl._notifyChange(); + } + + static get enableVerbose() { + return Log.ENABLE_VERBOSE; + } + + static set enableVerbose(enable) { + Log.ENABLE_VERBOSE = enable; + LoggingControl._notifyChange(); + } + + static get enableInfo() { + return Log.ENABLE_INFO; + } + + static set enableInfo(enable) { + Log.ENABLE_INFO = enable; + LoggingControl._notifyChange(); + } + + static get enableWarn() { + return Log.ENABLE_WARN; + } + + static set enableWarn(enable) { + Log.ENABLE_WARN = enable; + LoggingControl._notifyChange(); + } + + static get enableError() { + return Log.ENABLE_ERROR; + } + + static set enableError(enable) { + Log.ENABLE_ERROR = enable; + LoggingControl._notifyChange(); + } + + static getConfig() { + return { + globalTag: Log.GLOBAL_TAG, + forceGlobalTag: Log.FORCE_GLOBAL_TAG, + enableVerbose: Log.ENABLE_VERBOSE, + enableDebug: Log.ENABLE_DEBUG, + enableInfo: Log.ENABLE_INFO, + enableWarn: Log.ENABLE_WARN, + enableError: Log.ENABLE_ERROR, + enableCallback: Log.ENABLE_CALLBACK + }; + } + + static applyConfig(config) { + Log.GLOBAL_TAG = config.globalTag; + Log.FORCE_GLOBAL_TAG = config.forceGlobalTag; + Log.ENABLE_VERBOSE = config.enableVerbose; + Log.ENABLE_DEBUG = config.enableDebug; + Log.ENABLE_INFO = config.enableInfo; + Log.ENABLE_WARN = config.enableWarn; + Log.ENABLE_ERROR = config.enableError; + Log.ENABLE_CALLBACK = config.enableCallback; + } + + static _notifyChange() { + let emitter = LoggingControl.emitter; + + if (emitter.listenerCount('change') > 0) { + let config = LoggingControl.getConfig(); + emitter.emit('change', config); + } + } + + static registerListener(listener) { + LoggingControl.emitter.addListener('change', listener); + } + + static removeListener(listener) { + LoggingControl.emitter.removeListener('change', listener); + } + + static addLogListener(listener) { + Log.emitter.addListener('log', listener); + if (Log.emitter.listenerCount('log') > 0) { + Log.ENABLE_CALLBACK = true; + LoggingControl._notifyChange(); + } + } + + static removeLogListener(listener) { + Log.emitter.removeListener('log', listener); + if (Log.emitter.listenerCount('log') === 0) { + Log.ENABLE_CALLBACK = false; + LoggingControl._notifyChange(); + } + } + +} + +LoggingControl.emitter = new EventEmitter(); + +export default LoggingControl; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/utils/polyfill.js b/packages/xgplayer-flv.js/src/flv/utils/polyfill.js new file mode 100644 index 00000000..7d250df3 --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/utils/polyfill.js @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class Polyfill { + + static install() { + // ES6 Object.setPrototypeOf + Object.setPrototypeOf = Object.setPrototypeOf || function (obj, proto) { + obj.__proto__ = proto; + return obj; + }; + + // ES6 Object.assign + Object.assign = Object.assign || function (target) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + + let output = Object(target); + for (let i = 1; i < arguments.length; i++) { + let source = arguments[i]; + if (source !== undefined && source !== null) { + for (let key in source) { + if (source.hasOwnProperty(key)) { + output[key] = source[key]; + } + } + } + } + return output; + }; + + // ES6 Promise (missing support in IE11) + if (typeof self.Promise !== 'function') { + require('es6-promise').polyfill(); + } + } + +} + +Polyfill.install(); + +export default Polyfill; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/flv/utils/utf8-conv.js b/packages/xgplayer-flv.js/src/flv/utils/utf8-conv.js new file mode 100644 index 00000000..fc8eaf5f --- /dev/null +++ b/packages/xgplayer-flv.js/src/flv/utils/utf8-conv.js @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2016 Bilibili. All Rights Reserved. + * + * This file is derived from C++ project libWinTF8 (https://github.com/m13253/libWinTF8) + * @author zheng qian + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function checkContinuation(uint8array, start, checkLength) { + let array = uint8array; + if (start + checkLength < array.length) { + while (checkLength--) { + if ((array[++start] & 0xC0) !== 0x80) + return false; + } + return true; + } else { + return false; + } +} + +function decodeUTF8(uint8array) { + let out = []; + let input = uint8array; + let i = 0; + let length = uint8array.length; + + while (i < length) { + if (input[i] < 0x80) { + out.push(String.fromCharCode(input[i])); + ++i; + continue; + } else if (input[i] < 0xC0) { + // fallthrough + } else if (input[i] < 0xE0) { + if (checkContinuation(input, i, 1)) { + let ucs4 = (input[i] & 0x1F) << 6 | (input[i + 1] & 0x3F); + if (ucs4 >= 0x80) { + out.push(String.fromCharCode(ucs4 & 0xFFFF)); + i += 2; + continue; + } + } + } else if (input[i] < 0xF0) { + if (checkContinuation(input, i, 2)) { + let ucs4 = (input[i] & 0xF) << 12 | (input[i + 1] & 0x3F) << 6 | input[i + 2] & 0x3F; + if (ucs4 >= 0x800 && (ucs4 & 0xF800) !== 0xD800) { + out.push(String.fromCharCode(ucs4 & 0xFFFF)); + i += 3; + continue; + } + } + } else if (input[i] < 0xF8) { + if (checkContinuation(input, i, 3)) { + let ucs4 = (input[i] & 0x7) << 18 | (input[i + 1] & 0x3F) << 12 + | (input[i + 2] & 0x3F) << 6 | (input[i + 3] & 0x3F); + if (ucs4 > 0x10000 && ucs4 < 0x110000) { + ucs4 -= 0x10000; + out.push(String.fromCharCode((ucs4 >>> 10) | 0xD800)); + out.push(String.fromCharCode((ucs4 & 0x3FF) | 0xDC00)); + i += 4; + continue; + } + } + } + out.push(String.fromCharCode(0xFFFD)); + ++i; + } + + return out.join(''); +} + +export default decodeUTF8; \ No newline at end of file diff --git a/packages/xgplayer-flv.js/src/index.js b/packages/xgplayer-flv.js/src/index.js new file mode 100644 index 00000000..8d63c9b0 --- /dev/null +++ b/packages/xgplayer-flv.js/src/index.js @@ -0,0 +1,45 @@ +import Player from 'xgplayer' +import Flv from './flv/flv' + +class FlvJsPlayer extends Player { + constructor (options) { + super(options) + this.flvOpts = { type: 'flv' } + Player.util.deepCopy(this.flvOpts, options) + const player = this + player.once('complete', () => { + player.__flv__ = Flv.createPlayer(this.flvOpts) + player.createInstance(player.__flv__) + }) + } + createInstance (flv) { + const player = this + const util = Player.util + flv.attachMediaElement(player.video) + flv.load() + flv.play() + if (this.flvOpts.isLive) { + util.addClass(player.root, 'xgplayer-is-live') + const live = util.createDom('xg-live', '正在直播', {}, 'xgplayer-live') + player.controls.appendChild(live) + } + flv.on(Flv.Events.ERROR, (e) => { + player.emit('error', new Player.Errors('other', player.config.url)) + }) + } + switchURL (url) { + const player = this + const flvPlayer = player.__flv__ + player.config.url = url + if (!player.config.isLive) { + flvPlayer.onDefinitionChange(url, player.config.retryTimes) + } else { + const tempFlvPlayer = Flv.createPlayer(player.flvOpts) + flvPlayer.destroy() + player.createInstance(tempFlvPlayer) + player.__flv__ = tempFlvPlayer + } + } +} +FlvJsPlayer.isSupported = Flv.isSupported +export default FlvJsPlayer diff --git a/packages/xgplayer-flv.js/webpack.config.js b/packages/xgplayer-flv.js/webpack.config.js new file mode 100644 index 00000000..70be1475 --- /dev/null +++ b/packages/xgplayer-flv.js/webpack.config.js @@ -0,0 +1,77 @@ +const polyfill = [] + +const umd = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/dist`, + filename: 'index.js', + library: 'xgplayer-flv.js', + libraryTarget: 'umd' + }, + mode: 'production', + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader' + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true + } + }, + 'postcss-loader', + 'sass-loader' + ] + }] + }, + externals: { + 'xgplayer': 'xgplayer' + }, + optimization: { + minimize: true + } +} + +const client = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/browser`, + filename: 'xgplayer-flvjs.js', + library: 'FlvJsPlayer', + libraryTarget: 'window' + }, + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader' + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true + } + }, + 'postcss-loader', + 'sass-loader' + ] + }] + }, + externals: { + 'xgplayer': 'Player' + }, + mode: 'production', + optimization: { + minimize: true + } +} + +module.exports = [umd, client] diff --git a/packages/xgplayer-flv/.babelrc b/packages/xgplayer-flv/.babelrc new file mode 100644 index 00000000..1e789995 --- /dev/null +++ b/packages/xgplayer-flv/.babelrc @@ -0,0 +1,13 @@ +{ + "presets": [ + "env", + "react", + "stage-0" + ], + "plugins": [ + "transform-class-properties", + "transform-decorators", + "transform-react-constant-elements", + "transform-react-inline-elements" + ] +} diff --git a/packages/xgplayer-flv/.gitignore b/packages/xgplayer-flv/.gitignore new file mode 100644 index 00000000..a5d48386 --- /dev/null +++ b/packages/xgplayer-flv/.gitignore @@ -0,0 +1,4 @@ +/node_modules +.idea/ +npm-debug.log +.vscode/ \ No newline at end of file diff --git a/packages/xgplayer-flv/browser/xgplayer-flv.js b/packages/xgplayer-flv/browser/xgplayer-flv.js new file mode 100644 index 00000000..715bbe92 --- /dev/null +++ b/packages/xgplayer-flv/browser/xgplayer-flv.js @@ -0,0 +1 @@ +!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=54)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1?n-1:0),r=1;r>24,e>>16&255,e>>8&255,255&e])}},{key:"readAsInt",value:function(e){var t="";return e.forEach(function(e){t+=function(e){return e.toString(16).padStart(2,"0")}(e)}),parseInt(t,16)}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.MetaTypes={NUMBER:0,BOOLEAN:1,STRING:2,OBJECT:3,MIX_ARRAY:8,OBJECT_END:9,STRICT_ARRAY:10,DATE:11,LONE_STRING:12},t.EventTypes={DATA_READY:"data_ready",META_DATA_READY:"meta_data_ready",TRACK_META_READY:"track_meta_ready",MEDIA_INFO_READY:"media_info_ready",META_END_POSITION:"meta_end_position",ERROR:"error"},t.soundRateTypes=[5500,11e3,22e3,4400],t.AudioObjectTypes={0:"Null",1:"AAC Main",2:"AAC LC",3:"AAC SSR(Scalable Sample Rate)",4:"AAC LTP(Long Term Prediction)",5:"HE-AAC / SBR(Spectral Band Replication)",6:"AAC Scalable"},t.samplingFrequencyTypes=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3],t.browserTypes={IE:"ie",FIRE_FOX:"firefox",CHROME:"chrome",OPERA:"opera",SAFARI:"safari"},t.mp3Versions={V25:0,RESERVED:1,V20:2,V10:3},t.audioSampleRate={V10:[44100,48e3,32e3,0],V20:[22050,24e3,16e3,0],V25:[11025,12e3,8e3,0]},t.mp3BitRate={Layer1:[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],Layer2:[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],Layer3:[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2])||arguments[2];if(t>32)throw"not supported read size";var s=32;if(this["getUint"+t])return i["getUint"+s](a,!r.isLe);for(var u=0,f=n.length;u2&&void 0!==arguments[2]?arguments[2]:8,i=0,r=--n;r>0;)r>t||r-1}},function(e,t,n){"use strict";var i="razdwatrzy";e.exports=function(){return"function"==typeof i.contains&&(!0===i.contains("dwa")&&!1===i.contains("foo"))}},function(e,t,n){"use strict";e.exports=n(12)()?String.prototype.contains:n(11)},function(e,t,n){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";var i=n(5),r=Array.prototype.forEach,a=Object.create;e.exports=function(e){var t=a(null);return r.call(arguments,function(e){i(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)}),t}},function(e,t,n){"use strict";var i=n(5);e.exports=function(e){if(!i(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var i=n(5),r=Object.keys;e.exports=function(e){return r(i(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";e.exports=n(19)()?Object.keys:n(18)},function(e,t,n){"use strict";var i=n(20),r=n(16),a=Math.max;e.exports=function(e,t){var n,o,s,u=a(arguments.length,2);for(e=Object(r(e)),s=function(i){try{e[i]=t[i]}catch(e){n||(n=e)}},o=1;o0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.64001E, mp4a.40.5"';!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=this;(0,r.default)(this),this.codecs=t,this.mediaSource=new window.MediaSource,this.url=window.URL.createObjectURL(this.mediaSource),this.mediaSource.addEventListener("sourceopen",function(){n.sourceBuffer=n.mediaSource.addSourceBuffer(n.codecs),n.sourceBuffer.addEventListener("error",function(e){n.emit("error",{type:"sourceBuffer",error:e})}),n.sourceBuffer.addEventListener("updateend",function(e){n.emit("updateend")}),n.emit("sourceopen"),n.sourceBuffer.addEventListener("error",function(e){n.emit("error",{type:"mediaSource",error:e})})}),this.mediaSource.addEventListener("sourceclose",function(){n.emit("sourceclose")})}return i(e,[{key:"appendBuffer",value:function(e){var t=this.sourceBuffer;if(!1===t.updating&&"open"===this.state)return t.appendBuffer(e),!0;if("closed"===this.state)this.emit("error",{type:"sourceBuffer",error:new Error("mediaSource is not attached to video or mediaSource is closed")});else{if("ended"!==this.state)return!0===t.updating&&this.emit("warn",{type:"sourceBuffer",error:new Error("mediaSource is busy")}),!1;this.emit("error",{type:"sourceBuffer",error:new Error("mediaSource is closed")})}}},{key:"removeBuffer",value:function(e,t){this.sourceBuffer.remove(e,t)}},{key:"endOfStream",value:function(){"open"===this.mediaSource.readyState&&this.mediaSource.endOfStream()}},{key:"state",get:function(){return this.mediaSource.readyState}},{key:"duration",get:function(){return this.mediaSource.duration},set:function(e){this.mediaSource.duration=e}}],[{key:"isSupported",value:function(e){return window.MediaSource&&window.MediaSource.isTypeSupported(e)}}]),e}();t.default=a},function(e,t){e.exports=Player},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t,this.on=!1;var o={headers:{Range:"bytes="+n[0]+"-"+n[1]},method:"GET",cache:"default",mode:"cors"};this.request=function(){return i.on=!0,fetch(t,Object.assign({},o,a)).then(function(e){return r.default.remove(i),e.arrayBuffer()}).catch(function(e){return r.default.remove(i),e})}}return i(e,[{key:"run",value:function(){this._promise=this.request()}},{key:"cancel",value:function(){}},{key:"readyState",get:function(){return 1}},{key:"promise",get:function(){return this.on?this._promise:this.request()}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0){var i=n/1e3,r=e.referFrameRate,a=e.mediaInfo;r.fixed=!0,r.fps=i,r.fpsNum=n,r.fpsDen=1e3,a.fps=i}}},{name:"keyframes",type:Object,parser:function(e,t){var n=t.keyframes;e.mediaInfo.hasKeyframes=!!n,n&&(e.mediaInfo.keyframes=this._parseKeyframes(n)),t.keyframes=null},onTypeErr:function(e){e.mediaInfo.hasKeyframes=!1}}];t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n>>4,u=(12&r)>>>2,f=r%1;if(i.audioSampleRate=o.soundRateTypes[u],i.channelCount=0===f?1:2,10===s||2===s){if(10===s){var l=this._parseAACAudio();if(!l)return;var c=l.data,d=l.data.sampleFreq;if(0===l.packetType){i.sampleRate=d,i.channelCount=c.channelCount,i.codec=c.codec,i.manifestCodec=c.manifestCodec,i.config=c.config,i.refSampleDuration=1024/d*i.timeScale,t.hasInitialMetaDispatched?(t.videoTrack.length||t.audioTrack.length)&&this.dispatch(o.EventTypes.DATA_READY,t.videoTrack,t.audioTrack):t.state._audioInitialMetadataDispatched=!0,this.dispatch(o.EventTypes.META_DATA_READY,"audio",i);var h=t.mediaInfo;h.audioCodec=i.codec,h.audioSampleRate=i.sampleRate,h.audioChannelCount=i.channelCount,h.audioConfig=i.config,h.hasVideo?h.videoCodec&&(h.mimeType='video/x-flv; codecs="'+h.videoCodec+","+h.audioCodec+'"',h.codec=h.mimeType.replace("x-flv","mp4")):(h.mimeType='video/x-flv; codecs="'+h.audioCodec+'"',h.codec=h.mimeType.replace("x-flv","mp4")),h.isComplete&&this.dispatch(o.EventTypes.MEDIA_INFO_READY,h)}else if(1===l.packetType){var v=t.state.timeStampBase+this.currentTag.getTime(),p={unit:l.data,length:l.data.byteLength,dts:v,pts:v};n.samples.push(p),n.length+=l.data.length}}this.resetStatus()}else this.error("only support AAC Audio format so far")}},{key:"_parseAACAudio",value:function(){if(!(this.unreadLength<=1)){var e={},t=new Uint8Array(this.data.buffer,this.readOffset,this.unreadLength),n=t[0];if(this.readOffset+=1,e.packetType=n,n)e.data=t.slice(1);else{var i=this.currentTag,r=i.position,a=i.tagSize;this._store.metaEndPosition=r+u.default.readAsInt(a)+4,e.data=this._parseAACAudioSpecificConfig()}return e}}},{key:"_parseAACAudioSpecificConfig",value:function(){var e,t=new a.default(this.data.buffer,this),n=a.default.getAndNum,i={samplingFrequency:null,extAudioObjectType:null,extAudioSamplingIdx:null},r={},u=t.getUint8(),f=t.getUint8(),l=e=u>>>3,c=(u&n(5,7))<<1|f>>>7;if(c<0||c>o.samplingFrequencyTypes.length)this.dispatch(o.EventTypes.ERROR,"error samplingFrequencyIndex: "+c);else{i.samplingFrequency=o.samplingFrequencyTypes[c];var d=i.channelCount=(f&n(1,4))>>>3;if(!(d<0||d>7)){if(5===l){var h=t.getUint8();i.extAudioSamplingIdx=(f&n(5,7))<<1|h>>>7,i.extAudioObjectType=(h&n(1,5))>>>2}return s.default.browser===o.browserTypes.FIRE_FOX?c>=6?(l=5,r=new Array(4),i.extAudioSamplingIdx=c-3):(l=2,r=new Array(2),i.extAudioSamplingIdx=c):s.default.os.isAndroid?(l=2,r=new Array(2),i.extAudioSamplingIdx=c):(l=5,i.extensionSamplingIndex=c,r=new Array(4),c>=6?i.extensionSamplingIdx=c-3:1===d&&(l=2,r=new Array(2),i.extensionSamplingIndex=c)),r[0]=l<<3,r[0]|=(14&c)>>1,r[1]|=(1&c)<<7,r[1]|=d<<3,5===l&&(r[1]|=(14&i.extAudioSamplingIdx)>>1,r[2]=(1&i.extensionSamplingIdx)<<7,r[2]|=8,r[3]=0),{config:r,sampleFreq:i.samplingFrequency,channelCount:d,codec:"mp4a.40."+l,manifestCodec:"mp4a.40."+e}}this.dispatch(o.EventTypes.ERROR,"error Audio Channel Count: "+d)}}},{key:"initAudioMeta",value:function(e){var t=this._store,n=t.state,i=t.audioTrack;return e.duration=n.duration,e.timeScale=n.timeScale,e.type="audio",e.id=i.id,e}},{key:"resetStatus",value:function(){this.currentTag=null,this.data=new Uint8Array(0),this.readOffset=0}},{key:"dataSize",get:function(){return this.data.length}},{key:"unreadLength",get:function(){return this.dataSize-this.readOffset}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;ne?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e),t}},{key:"readBits",value:function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&r.default.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"readUShort",value:function(){return this.readBits(16)}},{key:"readUInt",value:function(){return this.readBits(32)}},{key:"skipScalingList",value:function(e){var t,n=8,i=8;for(t=0;t2&&3===e[r]&&0===e[r-1]&&0===e[r-2]||(n[i++]=e[r]);return new Uint8Array(n.buffer,0,i)}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n>>4,i=15&t;7===i?(this._parseAVCPacket(n),this.resetStatus()):this.error("unsupported codecId: "+i)}},{key:"_parseAVCPacket",value:function(e){this.unreadLength<4&&this.error("Invalid Avc Tag");var t=this._store.isLe,n=this.data.buffer,i=new DataView(n,this.readOffset,this.unreadLength),r=i.getUint8(0),a=16777215&i.getUint32(0,!t);switch(a=a<<8>>8,this.readOffset+=4,r){case 0:var o=this.currentTag,s=o.position,f=o.tagSize;this._store.metaEndPosition=s+u.default.readAsInt(f)+4,this._parseAVCDecoderConfigurationRecord();break;case 1:this._parseAVCVideoData(e,a)}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(){if(this.unreadLength<7)this.error("Invalid AVCDecoderConfigurationRecord, lack of data!");else{var e=this._store.mediaInfo,t=(this.readOffset,this.unreadLength,this._store),n=this._store.videoMetaData,i=this._store.videoTrack,r=new o.default(this.data.buffer,this);n?void 0!==n.avcc&&this.error("found another AVCDecoderConfigurationRecord!"):(t.state._hasVideo||t.state.hasVideoFlagOverrided||(t.state._hasVideo=!0,t._mediaInfo.hasVideo=!0),(n=t.videoMetaData={}).type="video",n.id=i.id,n.timeScale=t.videoTimeScale,n.duration=t.state.duration,e.timescale=t.videoTimeScale);var u=r.getUint8(),f=r.getUint8();if(r.getUint8(),r.getUint8(),1===u&&0!==f){var l=t.state.naluLengthSize=r.getUint(2,this.readOffset,!1)+1;if(3===l||4===l){var c=r.getUint(5,null,!1);if(0!==c){c>1&&this.warn("AVCDecoderConfigurationRecord: spsLength > 1");for(var d=void 0,h=0;h1&&this.warn("AVCDecoderConfigurationRecord has ppsCount: "+R);for(var j=0;j0;){if(this.unreadLength<4){this.warn("not enough data for parsing AVC");break}var f=this.readOffset,l=4===a?n.getUint32():n.getUint24();if(l>this.unreadLength)return;var c=n.getUint(5,this.readOffset,!1);5===c&&(u=!0);var d=new Uint8Array(this.data.buffer,f,a+l);this.readOffset=f+a+l;var h={type:c,data:d};i.push(h),r+=d.byteLength}if(n=null,i.length){var v=this._store.videoTrack,p={units:i,length:r,dts:s,cps:t,pts:s+t,isKeyframe:u,position:u?this.currentTag.position:void 0};v.samples.push(p),v.length+=r}}},{key:"readData",value:function(e){var t=this.data,n=this.readOffset;return this.dataSize>n+e?(this.readOffset+=e,t.slice(n,e)):[]}},{key:"dataSize",get:function(){return this.data.length}},{key:"unreadLength",get:function(){return this.dataSize-this.readOffset}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=128){n.push(String.fromCharCode(65535&o)),r+=2;continue}}}else if(i[r]<240){if(e._checkContinuation(i,r,2)){var s=(15&i[r])<<12|(63&i[r+1])<<6|63&i[r+2];if(s>=2048&&55296!=(63488&s)){n.push(String.fromCharCode(65535&s)),r+=3;continue}}}else if(i[r]<248&&e._checkContinuation(i,r,3)){var u=(7&i[r])<<18|(63&i[r+1])<<12|(63&i[r+2])<<6|63&i[r+3];if(u>65536&&u<1114112){u-=65536,n.push(String.fromCharCode(u>>>10|55296)),n.push(String.fromCharCode(1023&u|56320)),r+=4;continue}}n.push(String.fromCharCode(65533)),++r}return n.join("")}},{key:"_checkContinuation",value:function(e,t,n){var i=e;if(t+n0?a.default.decode(new Uint8Array(e,this.readOffset+2,t)):"";var i=t+2;return this.readOffset+=i,{data:n,bodySize:t+2}}},{key:"parseDate",value:function(e,t){var n=this.isLe,i=new DataView(e,this.readOffset,t),r=i.getFloat64(0,!n);return r+=60*i.getInt16(8,!n)*1e3,this.readOffset+=10,{data:new Date(r),bodySize:10}}},{key:"parseObject",value:function(e,t){var n=this.parseString(e,t),i=this.parseValue(e,t-n.bodySize);return{data:{name:n.data,value:i.data},bodySize:n.bodySize+i.bodySize,isObjEnd:i.isObjEnd}}},{key:"parseLongString",value:function(e){var t=new DataView(e,this.readOffset).getUint32(0,!this.isLe),n="";return n=t>0?a.default.decode(new Uint8Array(e,this.readOffset+2,t)):"",this.readOffset+=t+4,{data:n,bodySize:t+4}}},{key:"parseValue",value:function(e,t){var n=new ArrayBuffer;n=e instanceof ArrayBuffer?e:e.buffer;var i=this.isLe,a=r.MetaTypes.NUMBER,o=r.MetaTypes.BOOLEAN,s=r.MetaTypes.STRING,u=r.MetaTypes.OBJECT,f=r.MetaTypes.MIX_ARRAY,l=r.MetaTypes.OBJECT_END,c=r.MetaTypes.STRICT_ARRAY,d=r.MetaTypes.DATE,h=r.MetaTypes.LONE_STRING,v=new DataView(n,this.readOffset,t),p=!1,y=v.getUint8(0),m=1;this.readOffset+=1;var g=null;switch(y){case a:g=v.getFloat64(1,!i),this.readOffset+=8,m+=8;break;case o:g=!!v.getUint8(1),this.readOffset+=1,m+=1;break;case s:var _=this.parseString(n);g=_.data,m+=_.bodySize;break;case u:g={};var b=0;for(16777215&v.getUint32(t-4,!i)&&(b=3);m13&&t.isFlvHead(n)?(this.parseHead(),this.readData(9),this.readData(4),this.parseData(),this.firstFlag=!1,this.filePosition+=this.offset,this.offset):this.offset:this.parseData()}},{key:"parseData",value:function(){for(var e=this.temp_u8a.length;this.index=11)if(t.position=this.filePosition+this.offset,t.tagType=this.readData(1)[0],t.bodySize=this.readData(3),t.Timestamp=this.readData(4),t.StramId=this.readData(3),this.unreadLength>=this.getBodySize(t.bodySize)+4){t.body=this.readData(this.getBodySize(t.bodySize)),t.tagSize=this.readData(4);var n=this._store.state,i=n.tags,r=n._hasVideo,a=n._hasAudio;switch(t.tagType){case 9:r&&i.push(t);break;case 8:a&&i.push(t);break;case 18:i.push(t)}this.offset=this.index}else this.stop=!0;else this.stop=!0}return this.filePosition+=this.offset,this.temp_u8a=null,this.offset}},{key:"getBodySize",value:function(e){return a.default.readAsInt(e)}},{key:"parseHead",value:function(){var e=this.temp_u8a,t=this._store,n={match:!1};if(1!==e[3])return n;var i=e[4],r=(4&i)>>>2!=0,a=0!=(1&i);if(!r&&!a)return n;t.hasAudio=r,t.hasVideo=a}},{key:"readData",value:function(e){var t=this.index;return this.index+=e,this.temp_u8a.slice(t,t+e)}},{key:"unreadLength",get:function(){return this.dataLen-this.index}}],[{key:"isFlvHead",value:function(e){var t=[e[0],e[1],e[2]];return"FLV"===String.fromCharCode.apply(String,t)}}]),t}();t.default=u},function(e,t,n){"use strict";function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,n,i,s,u,f;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(o(n=this._events[e]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),i=(f=n.slice()).length,u=0;u0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},i.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=function(e,t,n){var i,r,a=function(a){if(i&&clearTimeout(i),n){var o=!i;i=setTimeout(e,t),o&&(r=e())}else i=setTimeout(e,t);return r};return a.cancel=function(){clearTimeout(i),i=null},a};t.cacheWrapper=function(e){var t={};return function(){for(var n=arguments.length,i=Array(n),r=0;r2?a-2:0),s=2;s>16&255,t>>8&255,255&t])}},{key:"ftyp",value:function(){return e.initBox(24,"ftyp",new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]))}},{key:"moov",value:function(t){var n=8,i=e.mvhd(t.duration,t.timescale),r=e.videoTrak(t),a=e.audioTrak(t),o=e.mvex(t.duration,t.timescale);return[i,r,a,o].forEach(function(e){n+=e.byteLength}),e.initBox(n,"moov",i,r,a,o)}},{key:"mvhd",value:function(t,n){var i=n||1e3,r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.initBox(8+r.length,"mvhd",new Uint8Array(r))}},{key:"videoTrak",value:function(t){var n=8,i=e.tkhd({id:1,duration:t.duration,timescale:t.timescale,width:t.width,height:t.height,type:"video"}),r=e.mdia({type:"video",timescale:t.timescale,duration:t.duration,sps:t.sps,pps:t.pps,pixelRatio:t.pixelRatio,width:t.width,height:t.height});return[i,r].forEach(function(e){n+=e.byteLength}),e.initBox(n,"trak",i,r)}},{key:"audioTrak",value:function(t){var n=8,i=e.tkhd({id:2,duration:t.duration,timescale:t.timescale,width:0,height:0,type:"audio"}),r=e.mdia({type:"audio",timescale:t.timescale,duration:t.duration,channelCount:t.audioChannelCount,samplerate:t.audioSampleRate,config:t.audioConfig});return[i,r].forEach(function(e){n+=e.byteLength}),e.initBox(n,"trak",i,r)}},{key:"tkhd",value:function(t){var n=t.id,i=t.duration,r=t.width,a=t.height,o=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>>8&255,255&r,0,0,a>>>8&255,255&a,0,0]);return e.initBox(8+o.byteLength,"tkhd",o)}},{key:"edts",value:function(t){var n=new r.default,i=t.duration,a=t.mediaTime;return n.write(e.size(36),e.type("edts")),n.write(e.size(28),e.type("elst")),n.write(new Uint8Array([0,0,0,1,i>>24&255,i>>16&255,i>>8&255,255&i,a>>24&255,a>>16&255,a>>8&255,255&a,0,0,0,1])),n.buffer}},{key:"mdia",value:function(t){var n=8,i=e.mdhd(t.timescale,t.duration),r=e.hdlr(t.type),a=e.minf(t);return[i,r,a].forEach(function(e){n+=e.byteLength}),e.initBox(n,"mdia",i,r,a)}},{key:"mdhd",value:function(t,n){var i=new Uint8Array([0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,85,196,0,0]);return e.initBox(12+i.byteLength,"mdhd",e.extension(0,0),i)}},{key:"hdlr",value:function(t){new r.default;var n=[0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0];return"audio"===t&&(n.splice.apply(n,[8,4].concat([115,111,117,110])),n.splice.apply(n,[24,13].concat([83,111,117,110,100,72,97,110,100,108,101,114,0]))),e.initBox(8+n.length,"hdlr",new Uint8Array(n))}},{key:"minf",value:function(t){new r.default;var n=8,i="video"===t.type?e.vmhd():e.smhd(),a=e.dinf(),o=e.stbl(t);return[i,a,o].forEach(function(e){n+=e.byteLength}),e.initBox(n,"minf",i,a,o)}},{key:"vmhd",value:function(){return e.initBox(20,"vmhd",new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]))}},{key:"smhd",value:function(){return e.initBox(16,"smhd",new Uint8Array([0,0,0,0,0,0,0,0]))}},{key:"dinf",value:function(){var t=new r.default;return t.write(e.size(36),e.type("dinf"),e.size(28),e.type("dref"),new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])),t.buffer}},{key:"stbl",value:function(t){var n=8,i=e.stsd(t),r=e.stts(),a=e.stsc(),o=e.stsz(),s=e.stco();return[i,r,a,o,s].forEach(function(e){n+=e.byteLength}),e.initBox(n,"stbl",i,r,a,o,s)}},{key:"stsd",value:function(t){var n=void 0;return n="audio"===t.type?e.mp4a(t):e.avc1(t),e.initBox(16+n.byteLength,"stsd",e.extension(0,0),new Uint8Array([0,0,0,1]),n)}},{key:"mp4a",value:function(t){new r.default;var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.samplerate>>8&255,255&t.samplerate,0,0]),i=e.esds(t.config);return e.initBox(8+n.byteLength+i.byteLength,"mp4a",n,i)}},{key:"esds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[43,146,8,0],n=t.length,i=new r.default,a=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(t).concat([6,1,2]));return i.write(e.size(8+a.byteLength),e.type("esds"),a),i.buffer}},{key:"avc1",value:function(t){var n=new r.default,i=t.sps,a=t.pps,o=t.width,s=t.height,u=t.pixelRatio[0],f=t.pixelRatio[1],l=new r.default;l.write(new Uint8Array([1,i[1],i[2],i[3],255,225].concat([i.length>>>8&255,255&i.length]))),l.write(i,new Uint8Array([1,a.length>>>8&255,255&a.length]),a);var c=l.buffer,d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,255&o,s>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),h=new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]),v=new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,f>>24,f>>16&255,f>>8&255,255&f]);return n.write(e.size(40+d.byteLength+c.byteLength+h.byteLength),e.type("avc1"),d,e.size(8+c.byteLength),e.type("avcC"),c,e.size(20),e.type("btrt"),h,e.size(16),e.type("pasp"),v),n.buffer}},{key:"stts",value:function(){var t=new Uint8Array([0,0,0,0,0,0,0,0]);return e.initBox(16,"stts",t)}},{key:"stsc",value:function(){var t=new Uint8Array([0,0,0,0,0,0,0,0]);return e.initBox(16,"stsc",t)}},{key:"stco",value:function(){var t=new Uint8Array([0,0,0,0,0,0,0,0]);return e.initBox(16,"stco",t)}},{key:"stsz",value:function(){var t=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);return e.initBox(20,"stsz",t)}},{key:"mvex",value:function(t){var n=new r.default,i=r.default.writeUint32(t);return n.write(e.size(88),e.type("mvex"),e.size(16),e.type("mehd"),e.extension(0,0),i,e.trex(1),e.trex(2)),n.buffer}},{key:"trex",value:function(t){var n=new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.initBox(8+n.byteLength,"trex",n)}},{key:"moof",value:function(t){var n=8,i=e.mfhd(),r=e.traf(t);return[i,r].forEach(function(e){n+=e.byteLength}),e.initBox(n,"moof",i,r)}},{key:"mfhd",value:function(){var t=r.default.writeUint32(e.sequence);return e.sequence+=1,e.initBox(16,"mfhd",e.extension(0,0),t)}},{key:"traf",value:function(t){var n=8,i=e.tfhd(t.id),r=e.tfdt(t.time),a=e.sdtp(t),o=e.trun(t,a.byteLength);return[i,r,a,o].forEach(function(e){n+=e.byteLength}),e.initBox(n,"traf",i,r,a,o)}},{key:"tfhd",value:function(t){var n=r.default.writeUint32(t);return e.initBox(16,"tfhd",e.extension(0,0),n)}},{key:"tfdt",value:function(t){return e.initBox(16,"tfdt",e.extension(0,0),r.default.writeUint32(t))}},{key:"trun",value:function(t,n){var i=new r.default,a=r.default.writeUint32(t.samples.length),o=r.default.writeUint32(92+16*t.samples.length+n);i.write(e.size(20+16*t.samples.length),e.type("trun"),new Uint8Array([0,0,15,1]),a,o);var s=i.buffer.byteLength,u=0;t.samples.forEach(function(){s+=16});var f=new Uint8Array(s);return f.set(i.buffer,0),u+=i.buffer.byteLength,t.samples.forEach(function(e){f.set(r.default.writeUint32(e.duration),u),u+=4,f.set(r.default.writeUint32(e.size),u),u+=4,1===t.id?(f.set(r.default.writeUint32(e.isKeyframe?33554432:16842752),u),u+=4,f.set(r.default.writeUint32(e.cps),u),u+=4):(f.set(r.default.writeUint32(16777216),u),u+=4,f.set(r.default.writeUint32(0),u),u+=4)}),f}},{key:"sdtp",value:function(t){var n=new r.default;return n.write(e.size(12+t.samples.length),e.type("sdtp"),e.extension(0,0)),t.samples.forEach(function(e){n.write(new Uint8Array(1===t.id?[e.key?32:16]:[16]))}),n.buffer}},{key:"mdat",value:function(t){var n=new r.default,i=8;t.samples.forEach(function(e){i+=e.size}),n.write(e.size(i),e.type("mdat"));var a=new Uint8Array(i),o=0;return a.set(n.buffer,o),o+=8,t.samples.forEach(function(e){e.buffer.forEach(function(e){a.set(e.data,o),o+=e.data.byteLength})}),a}}]),e}();o.type=(0,a.cacheWrapper)(function(e){return new Uint8Array([e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)])}),o.sequence=1,t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=0,n=arguments.length,i=Array(n>1?n-1:0),r=1;rt[i].lastSample.originDts&&e=t[n].lastSample.originDts&&(n===t.length-1||n0&&(i=this._searchNearestSegmentBefore(e.originStartDts)+1),this._lastAppendLocation=i,this._list.splice(i,0,e)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!==t?t.lastSample:null}},{key:"getLastRAPBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].randomAccessPoints;0===n.length&&t>0;)t--,n=this._list[t].randomAccessPoints;return n.length>0?n[n.length-1]:null}},{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n3?g-(b+w):0))}else s=0}var k=g,S=(g-=s)+m;-1===l&&(l=g,c=S);for(var A=[];p.units.length;){var O={buffer:[],size:0},T=p.units.shift();A.push(T),O.buffer.push(T),O.size+=T.data.byteLength,h.samples.push(O)}var E=0;if(r.length>=1)E=r[0].dts-this._dtsBase-s-g;else E=d.length>=1?d[d.length-1].duration:this._videoMeta.refSampleDuration;if(y){var D=new o.default({dts:g,pts:S,duration:E,originDts:p.dts,position:p.position,isRAP:!0});v.addRAP(D)}d.push({dts:g,cps:m,pts:S,units:A,size:p.length,isKeyframe:y,duration:E,originDts:k})}var x=d[0],M=d[d.length-1];n=M.dts+M.duration,i=M.pts+M.duration,this._videoNextDts=n,v.startDts=l,v.endDts=n,v.startPts=c,v.endPts=i,v.originStartDts=x.originDts,v.originEndDts=M.originDts+M.duration,v.gap=s;var L=new o.default({dts:x.dts,pts:x.pts,duration:x.duration,isKeyframe:x.isKeyframe,originDts:x.originDts}),C=new o.default({dts:M.dts,pts:M.pts,duration:M.duration,isKeyframe:M.isKeyframe,originDts:M.originDts});v.firstSample=L,v.lastSample=C;var P=new u.default;t.samples=d,t.time=l;var R=f.default.moof(t),j=f.default.mdat(h);P.write(R,j),this.isLive||this._videoSegmentList.append(v),t.samples=[],t.length=0,this._emitter.emit("mediaFragment",{type:"video",data:P.buffer.buffer,sampleCount:d.length,fragment:v})}}}},{key:"_remuxAudio",value:function(e){if(this._audioMeta){var t,n=e.samples,i=void 0,r=-1,s=void 0,l=[],c={samples:[]};if(n&&n.length){for(var d=!1;n.length;){var h=n.shift(),v=h.unit,p=h.dts-this._dtsBase,y=!1;if(void 0===i)if(this._audioNextDts)i=p-this._audioNextDts;else{var m=this._audioSegmentList.getLastSegmentBefore(p);if(m){var g=m.lastDts,_=m.gap;i=p-(g+(p-(g+_)>3?p-(g+_):0))}else y=this._fillSilenceFrame&&!this._videoSegmentList.isEmpty(),i=0}var b=p;if(p-=i,y){var w=this._videoSegmentList.getLastSampleBefore(b);w&&w.startDts=1)A=n[0].dts-this._dtsBase-i-p;else A=l.length>=1?l[l.length-1].duration:this._audioMeta.refSampleDuration;var O={dts:p,pts:p,cts:0,size:v.byteLength,duration:A,originDts:b},T={buffer:[],size:0};T.buffer.push({data:v}),T.size+=v.byteLength,c.samples.push(T),l.push(O)}}var E=l[l.length-1];t=E.dts+E.duration,this._audioNextDts=t;var D=new a.default;D.startDts=r,D.endDts=t,D.startPts=r,D.endPts=t,D.originStartDts=l[0].originDts,D.originEndDts=E.originDts+E.duration,D.gap=i,D.firstSample=new o.default({dts:l[0].dts,pts:l[0].pts,duration:l[0].duration,originDts:l[0].originDts}),D.lastSample=new o.default({dts:E.dts,pts:E.pts,duration:E.duration,originDts:E.originDts}),e.samples=l;var x=new u.default;e.time=r;var M=f.default.moof(e,r),L=f.default.mdat(c);x.write(M,L),this.isLive||this._audioSegmentList.append(D),e.samples=[],e.length=0,this._emitter.emit("mediaFragment",{type:"audio",data:x.buffer.buffer,sampleCount:l.length,fragment:D})}}}},{key:"initSilentAudio",value:function(t,n){var i=e.getSilentFrame(this._audioMeta.channelCount);return{dts:t,pts:t,cps:0,duration:n,unit:i,size:i.byteLength,originDts:t}}}],[{key:"getSilentFrame",value:function(e){return 1===e?new Uint8Array([0,200,0,128,35,128]):2===e?new Uint8Array([33,0,73,144,2,25,0,35,128]):3===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]):4===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]):5===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]):6===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]):null}}]),e}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0,i=arguments[2];this._isNewSegmentsArrival=!1;if(e){var r=this.range;if(this.getNextRangeEnd(n,i)<=r.end)return Promise.resolve();if(this.range={start:this.range.end+1,end:void 0===n?this.range.end+this.CHUNK_SIZE:this.getNextRangeEnd(n,i)},this.range.start>=this.range.end||!this.range.end)return this.range=r,Promise.resolve()}return this._loadSegmentsData(this.range.start,this.range.end).then(function(e){t.buffer.write(new Uint8Array(e));var n=t.setFlv(t.buffer.buffer);t.buffer.buffer=t.buffer.buffer.slice(n),t._isNewSegmentsArrival||t.loadSegments(!0)})}},{key:"getNextRangeEnd",value:function(e,t){var n=this._store,i=n.keyframes,r=i.times,a=i.filePositions,o=n.videoTimeScale;if(!r||!a)return this.range.end+this.CHUNK_SIZE;var s=(e*=o)+t*o;if(s>r[r.length-1])return r[r.length-1];for(var u=0,f=r.length,l=void 0;u<=f;){var c=Math.floor((f+u)/2);if(r[c]<=s&&s<=r[c+1]){l=c;break}s0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e+this.CHUNK_SIZE;return new f.default(this._config.url,[e,t]).promise}},{key:"loadMetaData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e+this.META_CHUNK_SIZE;return new f.default(this._config.url,[e,t]).promise}},{key:"setFlvFirst",value:function(e,t){var n=this.flvParser.setFlv(new Uint8Array(e)),i=this._store.state.tags;if(i.length){if(18!==i[0].tagType)throw new Error("flv file without metadata tag");0!==this._tempBaseTime&&this._tempBaseTime===i[0].getTime()&&(this._store.state._timestampBase=0),this.tagDemuxer.resolveTags(i)}return this.firstFlag=!1,n}},{key:"setFlvUsually",value:function(e,t){var n=this.flvParser.setFlv(new Uint8Array(e)),i=this._store.state.tags;return i.length&&this.tagDemuxer.resolveTags(i),n}},{key:"handleDataReady",value:function(e,t){this._mp4remuxer.remux(e,t)}},{key:"handleMetaDataReady",value:function(e,t){this._mp4remuxer.onMetaDataReady(e,t)}},{key:"handleError",value:function(e){this.error(e)}},{key:"handleMediaInfoReady",value:function(e){if(!this._isMediaInfoInited){var t=this._mp4remuxer.onMediaInfoReady(e);this.ftyp_moof||(this.ftyp_moof=t,this.emit("ready",t)),this._isMediaInfoInited=!0}}},{key:"initEventBind",value:function(){var e=this,t=this.handleError,n=this.handleDataReady,i=this.handleMetaDataReady,r=this.handleMediaInfoReady;this.on("mediaFragment",function(t){e._isNewSegmentsArrival=!0,e._pendingFragments.push(t);var n=t.fragment.randomAccessPoints;if(n&&n.length&&n.forEach(function(t){e.bufferKeyframes.add(t.dts)}),e.isSourceOpen&&e._pendingFragments.length){var i=e._pendingFragments.shift();e.mse.appendBuffer(i.data)?e._player.emit("cacheupdate",e._player):e._pendingFragments.unshift(i)}}),this.on(c.EventTypes.ERROR,t.bind(this)),this.on("demuxer_data_ready",n.bind(this)),this.on("demuxer_meta_data_ready",i.bind(this)),this.on("demuxer_media_info_ready",r.bind(this))}},{key:"replay",value:function(){this.range={start:this._store.metaEndPosition,end:this.getNextRangeEnd(0,this._config.preloadTime)},this._mp4remuxer.seek(),this.flvParser.seek(),this.clearBuffer(),this.loadSegments(!1)}},{key:"clearBuffer",value:function(){this._pendingFragments=[],this._pendingRemoveRange=[]}},{key:"seek",value:function(e){var t=this._store,n=t.keyframes,i=void 0===n?{}:n,r=t.videoTimeScale,a=e*r,o=void 0,s=void 0,u=Math.min(i.filePositions.length,i.times.length),f=this._config.preloadTime;function l(e,t){return t===i.times.length?(s=t,!1):!(e<=f&&f<=i.times[t+1])||(s=t,!1)}for(var c=0,h=u-2;c0&&void 0!==arguments[0]?arguments[0]:c.url)&&((t=new i.default(c,e)).on("ready",function(i){n=e.mse=t.mse=new a.default,p.call(e,n.url),n.on("sourceopen",function(){t.isSourceOpen=!0,n.appendBuffer(i.buffer),n.on("updateend",function(){var i=t,r=i.pendingFragments,a=i.hasPendingFragments;if(u=!0,a){var o=r.shift();n.appendBuffer(o.data)?e.emit("cacheupdate",e):r.unshift(o)}})}),n.on("error",function(t){e.emit("error",t)})}),t.handleError=function(t){e.emit("error",t)})},e.on("pause",function(){!v&&o.default.clear()}),v||(e.on("seeking",function(){o.default.clear();var n=e.buffered,i=e.currentTime,r=!1;if(n.length)for(var a=0,s=n.length;an.start(a)&&i1?n-1:0),r=1;r>24,e>>16&255,e>>8&255,255&e])}},{key:"readAsInt",value:function(e){var t="";return e.forEach(function(e){t+=function(e){return e.toString(16).padStart(2,"0")}(e)}),parseInt(t,16)}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.MetaTypes={NUMBER:0,BOOLEAN:1,STRING:2,OBJECT:3,MIX_ARRAY:8,OBJECT_END:9,STRICT_ARRAY:10,DATE:11,LONE_STRING:12},t.EventTypes={DATA_READY:"data_ready",META_DATA_READY:"meta_data_ready",TRACK_META_READY:"track_meta_ready",MEDIA_INFO_READY:"media_info_ready",META_END_POSITION:"meta_end_position",ERROR:"error"},t.soundRateTypes=[5500,11e3,22e3,4400],t.AudioObjectTypes={0:"Null",1:"AAC Main",2:"AAC LC",3:"AAC SSR(Scalable Sample Rate)",4:"AAC LTP(Long Term Prediction)",5:"HE-AAC / SBR(Spectral Band Replication)",6:"AAC Scalable"},t.samplingFrequencyTypes=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3],t.browserTypes={IE:"ie",FIRE_FOX:"firefox",CHROME:"chrome",OPERA:"opera",SAFARI:"safari"},t.mp3Versions={V25:0,RESERVED:1,V20:2,V10:3},t.audioSampleRate={V10:[44100,48e3,32e3,0],V20:[22050,24e3,16e3,0],V25:[11025,12e3,8e3,0]},t.mp3BitRate={Layer1:[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],Layer2:[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],Layer3:[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2])||arguments[2];if(t>32)throw"not supported read size";var s=32;if(this["getUint"+t])return i["getUint"+s](a,!r.isLe);for(var u=0,f=n.length;u2&&void 0!==arguments[2]?arguments[2]:8,i=0,r=--n;r>0;)r>t||r-1}},function(e,t,n){"use strict";var i="razdwatrzy";e.exports=function(){return"function"==typeof i.contains&&(!0===i.contains("dwa")&&!1===i.contains("foo"))}},function(e,t,n){"use strict";e.exports=n(12)()?String.prototype.contains:n(11)},function(e,t,n){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";var i=n(5),r=Array.prototype.forEach,a=Object.create;e.exports=function(e){var t=a(null);return r.call(arguments,function(e){i(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)}),t}},function(e,t,n){"use strict";var i=n(5);e.exports=function(e){if(!i(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var i=n(5),r=Object.keys;e.exports=function(e){return r(i(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";e.exports=n(19)()?Object.keys:n(18)},function(e,t,n){"use strict";var i=n(20),r=n(16),a=Math.max;e.exports=function(e,t){var n,o,s,u=a(arguments.length,2);for(e=Object(r(e)),s=function(i){try{e[i]=t[i]}catch(e){n||(n=e)}},o=1;o0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.64001E, mp4a.40.5"';!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=this;(0,r.default)(this),this.codecs=t,this.mediaSource=new window.MediaSource,this.url=window.URL.createObjectURL(this.mediaSource),this.mediaSource.addEventListener("sourceopen",function(){n.sourceBuffer=n.mediaSource.addSourceBuffer(n.codecs),n.sourceBuffer.addEventListener("error",function(e){n.emit("error",{type:"sourceBuffer",error:e})}),n.sourceBuffer.addEventListener("updateend",function(e){n.emit("updateend")}),n.emit("sourceopen"),n.sourceBuffer.addEventListener("error",function(e){n.emit("error",{type:"mediaSource",error:e})})}),this.mediaSource.addEventListener("sourceclose",function(){n.emit("sourceclose")})}return i(e,[{key:"appendBuffer",value:function(e){var t=this.sourceBuffer;if(!1===t.updating&&"open"===this.state)return t.appendBuffer(e),!0;if("closed"===this.state)this.emit("error",{type:"sourceBuffer",error:new Error("mediaSource is not attached to video or mediaSource is closed")});else{if("ended"!==this.state)return!0===t.updating&&this.emit("warn",{type:"sourceBuffer",error:new Error("mediaSource is busy")}),!1;this.emit("error",{type:"sourceBuffer",error:new Error("mediaSource is closed")})}}},{key:"removeBuffer",value:function(e,t){this.sourceBuffer.remove(e,t)}},{key:"endOfStream",value:function(){"open"===this.mediaSource.readyState&&this.mediaSource.endOfStream()}},{key:"state",get:function(){return this.mediaSource.readyState}},{key:"duration",get:function(){return this.mediaSource.duration},set:function(e){this.mediaSource.duration=e}}],[{key:"isSupported",value:function(e){return window.MediaSource&&window.MediaSource.isTypeSupported(e)}}]),e}();t.default=a},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t,this.on=!1;var o={headers:{Range:"bytes="+n[0]+"-"+n[1]},method:"GET",cache:"default",mode:"cors"};this.request=function(){return i.on=!0,fetch(t,Object.assign({},o,a)).then(function(e){return r.default.remove(i),e.arrayBuffer()}).catch(function(e){return r.default.remove(i),e})}}return i(e,[{key:"run",value:function(){this._promise=this.request()}},{key:"cancel",value:function(){}},{key:"readyState",get:function(){return 1}},{key:"promise",get:function(){return this.on?this._promise:this.request()}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0){var i=n/1e3,r=e.referFrameRate,a=e.mediaInfo;r.fixed=!0,r.fps=i,r.fpsNum=n,r.fpsDen=1e3,a.fps=i}}},{name:"keyframes",type:Object,parser:function(e,t){var n=t.keyframes;e.mediaInfo.hasKeyframes=!!n,n&&(e.mediaInfo.keyframes=this._parseKeyframes(n)),t.keyframes=null},onTypeErr:function(e){e.mediaInfo.hasKeyframes=!1}}];t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n>>4,u=(12&r)>>>2,f=r%1;if(i.audioSampleRate=o.soundRateTypes[u],i.channelCount=0===f?1:2,10===s||2===s){if(10===s){var l=this._parseAACAudio();if(!l)return;var c=l.data,d=l.data.sampleFreq;if(0===l.packetType){i.sampleRate=d,i.channelCount=c.channelCount,i.codec=c.codec,i.manifestCodec=c.manifestCodec,i.config=c.config,i.refSampleDuration=1024/d*i.timeScale,t.hasInitialMetaDispatched?(t.videoTrack.length||t.audioTrack.length)&&this.dispatch(o.EventTypes.DATA_READY,t.videoTrack,t.audioTrack):t.state._audioInitialMetadataDispatched=!0,this.dispatch(o.EventTypes.META_DATA_READY,"audio",i);var h=t.mediaInfo;h.audioCodec=i.codec,h.audioSampleRate=i.sampleRate,h.audioChannelCount=i.channelCount,h.audioConfig=i.config,h.hasVideo?h.videoCodec&&(h.mimeType='video/x-flv; codecs="'+h.videoCodec+","+h.audioCodec+'"',h.codec=h.mimeType.replace("x-flv","mp4")):(h.mimeType='video/x-flv; codecs="'+h.audioCodec+'"',h.codec=h.mimeType.replace("x-flv","mp4")),h.isComplete&&this.dispatch(o.EventTypes.MEDIA_INFO_READY,h)}else if(1===l.packetType){var v=t.state.timeStampBase+this.currentTag.getTime(),p={unit:l.data,length:l.data.byteLength,dts:v,pts:v};n.samples.push(p),n.length+=l.data.length}}this.resetStatus()}else this.error("only support AAC Audio format so far")}},{key:"_parseAACAudio",value:function(){if(!(this.unreadLength<=1)){var e={},t=new Uint8Array(this.data.buffer,this.readOffset,this.unreadLength),n=t[0];if(this.readOffset+=1,e.packetType=n,n)e.data=t.slice(1);else{var i=this.currentTag,r=i.position,a=i.tagSize;this._store.metaEndPosition=r+u.default.readAsInt(a)+4,e.data=this._parseAACAudioSpecificConfig()}return e}}},{key:"_parseAACAudioSpecificConfig",value:function(){var e,t=new a.default(this.data.buffer,this),n=a.default.getAndNum,i={samplingFrequency:null,extAudioObjectType:null,extAudioSamplingIdx:null},r={},u=t.getUint8(),f=t.getUint8(),l=e=u>>>3,c=(u&n(5,7))<<1|f>>>7;if(c<0||c>o.samplingFrequencyTypes.length)this.dispatch(o.EventTypes.ERROR,"error samplingFrequencyIndex: "+c);else{i.samplingFrequency=o.samplingFrequencyTypes[c];var d=i.channelCount=(f&n(1,4))>>>3;if(!(d<0||d>7)){if(5===l){var h=t.getUint8();i.extAudioSamplingIdx=(f&n(5,7))<<1|h>>>7,i.extAudioObjectType=(h&n(1,5))>>>2}return s.default.browser===o.browserTypes.FIRE_FOX?c>=6?(l=5,r=new Array(4),i.extAudioSamplingIdx=c-3):(l=2,r=new Array(2),i.extAudioSamplingIdx=c):s.default.os.isAndroid?(l=2,r=new Array(2),i.extAudioSamplingIdx=c):(l=5,i.extensionSamplingIndex=c,r=new Array(4),c>=6?i.extensionSamplingIdx=c-3:1===d&&(l=2,r=new Array(2),i.extensionSamplingIndex=c)),r[0]=l<<3,r[0]|=(14&c)>>1,r[1]|=(1&c)<<7,r[1]|=d<<3,5===l&&(r[1]|=(14&i.extAudioSamplingIdx)>>1,r[2]=(1&i.extensionSamplingIdx)<<7,r[2]|=8,r[3]=0),{config:r,sampleFreq:i.samplingFrequency,channelCount:d,codec:"mp4a.40."+l,manifestCodec:"mp4a.40."+e}}this.dispatch(o.EventTypes.ERROR,"error Audio Channel Count: "+d)}}},{key:"initAudioMeta",value:function(e){var t=this._store,n=t.state,i=t.audioTrack;return e.duration=n.duration,e.timeScale=n.timeScale,e.type="audio",e.id=i.id,e}},{key:"resetStatus",value:function(){this.currentTag=null,this.data=new Uint8Array(0),this.readOffset=0}},{key:"dataSize",get:function(){return this.data.length}},{key:"unreadLength",get:function(){return this.dataSize-this.readOffset}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;ne?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e),t}},{key:"readBits",value:function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&r.default.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"readUShort",value:function(){return this.readBits(16)}},{key:"readUInt",value:function(){return this.readBits(32)}},{key:"skipScalingList",value:function(e){var t,n=8,i=8;for(t=0;t2&&3===e[r]&&0===e[r-1]&&0===e[r-2]||(n[i++]=e[r]);return new Uint8Array(n.buffer,0,i)}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n>>4,i=15&t;7===i?(this._parseAVCPacket(n),this.resetStatus()):this.error("unsupported codecId: "+i)}},{key:"_parseAVCPacket",value:function(e){this.unreadLength<4&&this.error("Invalid Avc Tag");var t=this._store.isLe,n=this.data.buffer,i=new DataView(n,this.readOffset,this.unreadLength),r=i.getUint8(0),a=16777215&i.getUint32(0,!t);switch(a=a<<8>>8,this.readOffset+=4,r){case 0:var o=this.currentTag,s=o.position,f=o.tagSize;this._store.metaEndPosition=s+u.default.readAsInt(f)+4,this._parseAVCDecoderConfigurationRecord();break;case 1:this._parseAVCVideoData(e,a)}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(){if(this.unreadLength<7)this.error("Invalid AVCDecoderConfigurationRecord, lack of data!");else{var e=this._store.mediaInfo,t=(this.readOffset,this.unreadLength,this._store),n=this._store.videoMetaData,i=this._store.videoTrack,r=new o.default(this.data.buffer,this);n?void 0!==n.avcc&&this.error("found another AVCDecoderConfigurationRecord!"):(t.state._hasVideo||t.state.hasVideoFlagOverrided||(t.state._hasVideo=!0,t._mediaInfo.hasVideo=!0),(n=t.videoMetaData={}).type="video",n.id=i.id,n.timeScale=t.videoTimeScale,n.duration=t.state.duration,e.timescale=t.videoTimeScale);var u=r.getUint8(),f=r.getUint8();if(r.getUint8(),r.getUint8(),1===u&&0!==f){var l=t.state.naluLengthSize=r.getUint(2,this.readOffset,!1)+1;if(3===l||4===l){var c=r.getUint(5,null,!1);if(0!==c){c>1&&this.warn("AVCDecoderConfigurationRecord: spsLength > 1");for(var d=void 0,h=0;h1&&this.warn("AVCDecoderConfigurationRecord has ppsCount: "+j);for(var R=0;R0;){if(this.unreadLength<4){this.warn("not enough data for parsing AVC");break}var f=this.readOffset,l=4===a?n.getUint32():n.getUint24();if(l>this.unreadLength)return;var c=n.getUint(5,this.readOffset,!1);5===c&&(u=!0);var d=new Uint8Array(this.data.buffer,f,a+l);this.readOffset=f+a+l;var h={type:c,data:d};i.push(h),r+=d.byteLength}if(n=null,i.length){var v=this._store.videoTrack,p={units:i,length:r,dts:s,cps:t,pts:s+t,isKeyframe:u,position:u?this.currentTag.position:void 0};v.samples.push(p),v.length+=r}}},{key:"readData",value:function(e){var t=this.data,n=this.readOffset;return this.dataSize>n+e?(this.readOffset+=e,t.slice(n,e)):[]}},{key:"dataSize",get:function(){return this.data.length}},{key:"unreadLength",get:function(){return this.dataSize-this.readOffset}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=128){n.push(String.fromCharCode(65535&o)),r+=2;continue}}}else if(i[r]<240){if(e._checkContinuation(i,r,2)){var s=(15&i[r])<<12|(63&i[r+1])<<6|63&i[r+2];if(s>=2048&&55296!=(63488&s)){n.push(String.fromCharCode(65535&s)),r+=3;continue}}}else if(i[r]<248&&e._checkContinuation(i,r,3)){var u=(7&i[r])<<18|(63&i[r+1])<<12|(63&i[r+2])<<6|63&i[r+3];if(u>65536&&u<1114112){u-=65536,n.push(String.fromCharCode(u>>>10|55296)),n.push(String.fromCharCode(1023&u|56320)),r+=4;continue}}n.push(String.fromCharCode(65533)),++r}return n.join("")}},{key:"_checkContinuation",value:function(e,t,n){var i=e;if(t+n0?a.default.decode(new Uint8Array(e,this.readOffset+2,t)):"";var i=t+2;return this.readOffset+=i,{data:n,bodySize:t+2}}},{key:"parseDate",value:function(e,t){var n=this.isLe,i=new DataView(e,this.readOffset,t),r=i.getFloat64(0,!n);return r+=60*i.getInt16(8,!n)*1e3,this.readOffset+=10,{data:new Date(r),bodySize:10}}},{key:"parseObject",value:function(e,t){var n=this.parseString(e,t),i=this.parseValue(e,t-n.bodySize);return{data:{name:n.data,value:i.data},bodySize:n.bodySize+i.bodySize,isObjEnd:i.isObjEnd}}},{key:"parseLongString",value:function(e){var t=new DataView(e,this.readOffset).getUint32(0,!this.isLe),n="";return n=t>0?a.default.decode(new Uint8Array(e,this.readOffset+2,t)):"",this.readOffset+=t+4,{data:n,bodySize:t+4}}},{key:"parseValue",value:function(e,t){var n=new ArrayBuffer;n=e instanceof ArrayBuffer?e:e.buffer;var i=this.isLe,a=r.MetaTypes.NUMBER,o=r.MetaTypes.BOOLEAN,s=r.MetaTypes.STRING,u=r.MetaTypes.OBJECT,f=r.MetaTypes.MIX_ARRAY,l=r.MetaTypes.OBJECT_END,c=r.MetaTypes.STRICT_ARRAY,d=r.MetaTypes.DATE,h=r.MetaTypes.LONE_STRING,v=new DataView(n,this.readOffset,t),p=!1,y=v.getUint8(0),m=1;this.readOffset+=1;var g=null;switch(y){case a:g=v.getFloat64(1,!i),this.readOffset+=8,m+=8;break;case o:g=!!v.getUint8(1),this.readOffset+=1,m+=1;break;case s:var _=this.parseString(n);g=_.data,m+=_.bodySize;break;case u:g={};var b=0;for(16777215&v.getUint32(t-4,!i)&&(b=3);m13&&t.isFlvHead(n)?(this.parseHead(),this.readData(9),this.readData(4),this.parseData(),this.firstFlag=!1,this.filePosition+=this.offset,this.offset):this.offset:this.parseData()}},{key:"parseData",value:function(){for(var e=this.temp_u8a.length;this.index=11)if(t.position=this.filePosition+this.offset,t.tagType=this.readData(1)[0],t.bodySize=this.readData(3),t.Timestamp=this.readData(4),t.StramId=this.readData(3),this.unreadLength>=this.getBodySize(t.bodySize)+4){t.body=this.readData(this.getBodySize(t.bodySize)),t.tagSize=this.readData(4);var n=this._store.state,i=n.tags,r=n._hasVideo,a=n._hasAudio;switch(t.tagType){case 9:r&&i.push(t);break;case 8:a&&i.push(t);break;case 18:i.push(t)}this.offset=this.index}else this.stop=!0;else this.stop=!0}return this.filePosition+=this.offset,this.temp_u8a=null,this.offset}},{key:"getBodySize",value:function(e){return a.default.readAsInt(e)}},{key:"parseHead",value:function(){var e=this.temp_u8a,t=this._store,n={match:!1};if(1!==e[3])return n;var i=e[4],r=(4&i)>>>2!=0,a=0!=(1&i);if(!r&&!a)return n;t.hasAudio=r,t.hasVideo=a}},{key:"readData",value:function(e){var t=this.index;return this.index+=e,this.temp_u8a.slice(t,t+e)}},{key:"unreadLength",get:function(){return this.dataLen-this.index}}],[{key:"isFlvHead",value:function(e){var t=[e[0],e[1],e[2]];return"FLV"===String.fromCharCode.apply(String,t)}}]),t}();t.default=u},function(e,t,n){"use strict";function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,n,i,s,u,f;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(o(n=this._events[e]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),i=(f=n.slice()).length,u=0;u0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},i.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=function(e,t,n){var i,r,a=function(a){if(i&&clearTimeout(i),n){var o=!i;i=setTimeout(e,t),o&&(r=e())}else i=setTimeout(e,t);return r};return a.cancel=function(){clearTimeout(i),i=null},a};t.cacheWrapper=function(e){var t={};return function(){for(var n=arguments.length,i=Array(n),r=0;r2?a-2:0),s=2;s>16&255,t>>8&255,255&t])}},{key:"ftyp",value:function(){return e.initBox(24,"ftyp",new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]))}},{key:"moov",value:function(t){var n=8,i=e.mvhd(t.duration,t.timescale),r=e.videoTrak(t),a=e.audioTrak(t),o=e.mvex(t.duration,t.timescale);return[i,r,a,o].forEach(function(e){n+=e.byteLength}),e.initBox(n,"moov",i,r,a,o)}},{key:"mvhd",value:function(t,n){var i=n||1e3,r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.initBox(8+r.length,"mvhd",new Uint8Array(r))}},{key:"videoTrak",value:function(t){var n=8,i=e.tkhd({id:1,duration:t.duration,timescale:t.timescale,width:t.width,height:t.height,type:"video"}),r=e.mdia({type:"video",timescale:t.timescale,duration:t.duration,sps:t.sps,pps:t.pps,pixelRatio:t.pixelRatio,width:t.width,height:t.height});return[i,r].forEach(function(e){n+=e.byteLength}),e.initBox(n,"trak",i,r)}},{key:"audioTrak",value:function(t){var n=8,i=e.tkhd({id:2,duration:t.duration,timescale:t.timescale,width:0,height:0,type:"audio"}),r=e.mdia({type:"audio",timescale:t.timescale,duration:t.duration,channelCount:t.audioChannelCount,samplerate:t.audioSampleRate,config:t.audioConfig});return[i,r].forEach(function(e){n+=e.byteLength}),e.initBox(n,"trak",i,r)}},{key:"tkhd",value:function(t){var n=t.id,i=t.duration,r=t.width,a=t.height,o=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>>8&255,255&r,0,0,a>>>8&255,255&a,0,0]);return e.initBox(8+o.byteLength,"tkhd",o)}},{key:"edts",value:function(t){var n=new r.default,i=t.duration,a=t.mediaTime;return n.write(e.size(36),e.type("edts")),n.write(e.size(28),e.type("elst")),n.write(new Uint8Array([0,0,0,1,i>>24&255,i>>16&255,i>>8&255,255&i,a>>24&255,a>>16&255,a>>8&255,255&a,0,0,0,1])),n.buffer}},{key:"mdia",value:function(t){var n=8,i=e.mdhd(t.timescale,t.duration),r=e.hdlr(t.type),a=e.minf(t);return[i,r,a].forEach(function(e){n+=e.byteLength}),e.initBox(n,"mdia",i,r,a)}},{key:"mdhd",value:function(t,n){var i=new Uint8Array([0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,85,196,0,0]);return e.initBox(12+i.byteLength,"mdhd",e.extension(0,0),i)}},{key:"hdlr",value:function(t){new r.default;var n=[0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0];return"audio"===t&&(n.splice.apply(n,[8,4].concat([115,111,117,110])),n.splice.apply(n,[24,13].concat([83,111,117,110,100,72,97,110,100,108,101,114,0]))),e.initBox(8+n.length,"hdlr",new Uint8Array(n))}},{key:"minf",value:function(t){new r.default;var n=8,i="video"===t.type?e.vmhd():e.smhd(),a=e.dinf(),o=e.stbl(t);return[i,a,o].forEach(function(e){n+=e.byteLength}),e.initBox(n,"minf",i,a,o)}},{key:"vmhd",value:function(){return e.initBox(20,"vmhd",new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]))}},{key:"smhd",value:function(){return e.initBox(16,"smhd",new Uint8Array([0,0,0,0,0,0,0,0]))}},{key:"dinf",value:function(){var t=new r.default;return t.write(e.size(36),e.type("dinf"),e.size(28),e.type("dref"),new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])),t.buffer}},{key:"stbl",value:function(t){var n=8,i=e.stsd(t),r=e.stts(),a=e.stsc(),o=e.stsz(),s=e.stco();return[i,r,a,o,s].forEach(function(e){n+=e.byteLength}),e.initBox(n,"stbl",i,r,a,o,s)}},{key:"stsd",value:function(t){var n=void 0;return n="audio"===t.type?e.mp4a(t):e.avc1(t),e.initBox(16+n.byteLength,"stsd",e.extension(0,0),new Uint8Array([0,0,0,1]),n)}},{key:"mp4a",value:function(t){new r.default;var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.samplerate>>8&255,255&t.samplerate,0,0]),i=e.esds(t.config);return e.initBox(8+n.byteLength+i.byteLength,"mp4a",n,i)}},{key:"esds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[43,146,8,0],n=t.length,i=new r.default,a=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(t).concat([6,1,2]));return i.write(e.size(8+a.byteLength),e.type("esds"),a),i.buffer}},{key:"avc1",value:function(t){var n=new r.default,i=t.sps,a=t.pps,o=t.width,s=t.height,u=t.pixelRatio[0],f=t.pixelRatio[1],l=new r.default;l.write(new Uint8Array([1,i[1],i[2],i[3],255,225].concat([i.length>>>8&255,255&i.length]))),l.write(i,new Uint8Array([1,a.length>>>8&255,255&a.length]),a);var c=l.buffer,d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,255&o,s>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),h=new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]),v=new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,f>>24,f>>16&255,f>>8&255,255&f]);return n.write(e.size(40+d.byteLength+c.byteLength+h.byteLength),e.type("avc1"),d,e.size(8+c.byteLength),e.type("avcC"),c,e.size(20),e.type("btrt"),h,e.size(16),e.type("pasp"),v),n.buffer}},{key:"stts",value:function(){var t=new Uint8Array([0,0,0,0,0,0,0,0]);return e.initBox(16,"stts",t)}},{key:"stsc",value:function(){var t=new Uint8Array([0,0,0,0,0,0,0,0]);return e.initBox(16,"stsc",t)}},{key:"stco",value:function(){var t=new Uint8Array([0,0,0,0,0,0,0,0]);return e.initBox(16,"stco",t)}},{key:"stsz",value:function(){var t=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);return e.initBox(20,"stsz",t)}},{key:"mvex",value:function(t){var n=new r.default,i=r.default.writeUint32(t);return n.write(e.size(88),e.type("mvex"),e.size(16),e.type("mehd"),e.extension(0,0),i,e.trex(1),e.trex(2)),n.buffer}},{key:"trex",value:function(t){var n=new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.initBox(8+n.byteLength,"trex",n)}},{key:"moof",value:function(t){var n=8,i=e.mfhd(),r=e.traf(t);return[i,r].forEach(function(e){n+=e.byteLength}),e.initBox(n,"moof",i,r)}},{key:"mfhd",value:function(){var t=r.default.writeUint32(e.sequence);return e.sequence+=1,e.initBox(16,"mfhd",e.extension(0,0),t)}},{key:"traf",value:function(t){var n=8,i=e.tfhd(t.id),r=e.tfdt(t.time),a=e.sdtp(t),o=e.trun(t,a.byteLength);return[i,r,a,o].forEach(function(e){n+=e.byteLength}),e.initBox(n,"traf",i,r,a,o)}},{key:"tfhd",value:function(t){var n=r.default.writeUint32(t);return e.initBox(16,"tfhd",e.extension(0,0),n)}},{key:"tfdt",value:function(t){return e.initBox(16,"tfdt",e.extension(0,0),r.default.writeUint32(t))}},{key:"trun",value:function(t,n){var i=new r.default,a=r.default.writeUint32(t.samples.length),o=r.default.writeUint32(92+16*t.samples.length+n);i.write(e.size(20+16*t.samples.length),e.type("trun"),new Uint8Array([0,0,15,1]),a,o);var s=i.buffer.byteLength,u=0;t.samples.forEach(function(){s+=16});var f=new Uint8Array(s);return f.set(i.buffer,0),u+=i.buffer.byteLength,t.samples.forEach(function(e){f.set(r.default.writeUint32(e.duration),u),u+=4,f.set(r.default.writeUint32(e.size),u),u+=4,1===t.id?(f.set(r.default.writeUint32(e.isKeyframe?33554432:16842752),u),u+=4,f.set(r.default.writeUint32(e.cps),u),u+=4):(f.set(r.default.writeUint32(16777216),u),u+=4,f.set(r.default.writeUint32(0),u),u+=4)}),f}},{key:"sdtp",value:function(t){var n=new r.default;return n.write(e.size(12+t.samples.length),e.type("sdtp"),e.extension(0,0)),t.samples.forEach(function(e){n.write(new Uint8Array(1===t.id?[e.key?32:16]:[16]))}),n.buffer}},{key:"mdat",value:function(t){var n=new r.default,i=8;t.samples.forEach(function(e){i+=e.size}),n.write(e.size(i),e.type("mdat"));var a=new Uint8Array(i),o=0;return a.set(n.buffer,o),o+=8,t.samples.forEach(function(e){e.buffer.forEach(function(e){a.set(e.data,o),o+=e.data.byteLength})}),a}}]),e}();o.type=(0,a.cacheWrapper)(function(e){return new Uint8Array([e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)])}),o.sequence=1,t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=0,n=arguments.length,i=Array(n>1?n-1:0),r=1;rt[i].lastSample.originDts&&e=t[n].lastSample.originDts&&(n===t.length-1||n0&&(i=this._searchNearestSegmentBefore(e.originStartDts)+1),this._lastAppendLocation=i,this._list.splice(i,0,e)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!==t?t.lastSample:null}},{key:"getLastRAPBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].randomAccessPoints;0===n.length&&t>0;)t--,n=this._list[t].randomAccessPoints;return n.length>0?n[n.length-1]:null}},{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}}]),e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n3?g-(b+w):0))}else s=0}var k=g,S=(g-=s)+m;-1===l&&(l=g,c=S);for(var A=[];p.units.length;){var O={buffer:[],size:0},T=p.units.shift();A.push(T),O.buffer.push(T),O.size+=T.data.byteLength,h.samples.push(O)}var E=0;if(r.length>=1)E=r[0].dts-this._dtsBase-s-g;else E=d.length>=1?d[d.length-1].duration:this._videoMeta.refSampleDuration;if(y){var x=new o.default({dts:g,pts:S,duration:E,originDts:p.dts,position:p.position,isRAP:!0});v.addRAP(x)}d.push({dts:g,cps:m,pts:S,units:A,size:p.length,isKeyframe:y,duration:E,originDts:k})}var D=d[0],M=d[d.length-1];n=M.dts+M.duration,i=M.pts+M.duration,this._videoNextDts=n,v.startDts=l,v.endDts=n,v.startPts=c,v.endPts=i,v.originStartDts=D.originDts,v.originEndDts=M.originDts+M.duration,v.gap=s;var L=new o.default({dts:D.dts,pts:D.pts,duration:D.duration,isKeyframe:D.isKeyframe,originDts:D.originDts}),C=new o.default({dts:M.dts,pts:M.pts,duration:M.duration,isKeyframe:M.isKeyframe,originDts:M.originDts});v.firstSample=L,v.lastSample=C;var P=new u.default;t.samples=d,t.time=l;var j=f.default.moof(t),R=f.default.mdat(h);P.write(j,R),this.isLive||this._videoSegmentList.append(v),t.samples=[],t.length=0,this._emitter.emit("mediaFragment",{type:"video",data:P.buffer.buffer,sampleCount:d.length,fragment:v})}}}},{key:"_remuxAudio",value:function(e){if(this._audioMeta){var t,n=e.samples,i=void 0,r=-1,s=void 0,l=[],c={samples:[]};if(n&&n.length){for(var d=!1;n.length;){var h=n.shift(),v=h.unit,p=h.dts-this._dtsBase,y=!1;if(void 0===i)if(this._audioNextDts)i=p-this._audioNextDts;else{var m=this._audioSegmentList.getLastSegmentBefore(p);if(m){var g=m.lastDts,_=m.gap;i=p-(g+(p-(g+_)>3?p-(g+_):0))}else y=this._fillSilenceFrame&&!this._videoSegmentList.isEmpty(),i=0}var b=p;if(p-=i,y){var w=this._videoSegmentList.getLastSampleBefore(b);w&&w.startDts=1)A=n[0].dts-this._dtsBase-i-p;else A=l.length>=1?l[l.length-1].duration:this._audioMeta.refSampleDuration;var O={dts:p,pts:p,cts:0,size:v.byteLength,duration:A,originDts:b},T={buffer:[],size:0};T.buffer.push({data:v}),T.size+=v.byteLength,c.samples.push(T),l.push(O)}}var E=l[l.length-1];t=E.dts+E.duration,this._audioNextDts=t;var x=new a.default;x.startDts=r,x.endDts=t,x.startPts=r,x.endPts=t,x.originStartDts=l[0].originDts,x.originEndDts=E.originDts+E.duration,x.gap=i,x.firstSample=new o.default({dts:l[0].dts,pts:l[0].pts,duration:l[0].duration,originDts:l[0].originDts}),x.lastSample=new o.default({dts:E.dts,pts:E.pts,duration:E.duration,originDts:E.originDts}),e.samples=l;var D=new u.default;e.time=r;var M=f.default.moof(e,r),L=f.default.mdat(c);D.write(M,L),this.isLive||this._audioSegmentList.append(x),e.samples=[],e.length=0,this._emitter.emit("mediaFragment",{type:"audio",data:D.buffer.buffer,sampleCount:l.length,fragment:x})}}}},{key:"initSilentAudio",value:function(t,n){var i=e.getSilentFrame(this._audioMeta.channelCount);return{dts:t,pts:t,cps:0,duration:n,unit:i,size:i.byteLength,originDts:t}}}],[{key:"getSilentFrame",value:function(e){return 1===e?new Uint8Array([0,200,0,128,35,128]):2===e?new Uint8Array([33,0,73,144,2,25,0,35,128]):3===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]):4===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]):5===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]):6===e?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]):null}}]),e}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0,i=arguments[2];this._isNewSegmentsArrival=!1;if(e){var r=this.range;if(this.getNextRangeEnd(n,i)<=r.end)return Promise.resolve();if(this.range={start:this.range.end+1,end:void 0===n?this.range.end+this.CHUNK_SIZE:this.getNextRangeEnd(n,i)},this.range.start>=this.range.end||!this.range.end)return this.range=r,Promise.resolve()}return this._loadSegmentsData(this.range.start,this.range.end).then(function(e){t.buffer.write(new Uint8Array(e));var n=t.setFlv(t.buffer.buffer);t.buffer.buffer=t.buffer.buffer.slice(n),t._isNewSegmentsArrival||t.loadSegments(!0)})}},{key:"getNextRangeEnd",value:function(e,t){var n=this._store,i=n.keyframes,r=i.times,a=i.filePositions,o=n.videoTimeScale;if(!r||!a)return this.range.end+this.CHUNK_SIZE;var s=(e*=o)+t*o;if(s>r[r.length-1])return r[r.length-1];for(var u=0,f=r.length,l=void 0;u<=f;){var c=Math.floor((f+u)/2);if(r[c]<=s&&s<=r[c+1]){l=c;break}s0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e+this.CHUNK_SIZE;return new f.default(this._config.url,[e,t]).promise}},{key:"loadMetaData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e+this.META_CHUNK_SIZE;return new f.default(this._config.url,[e,t]).promise}},{key:"setFlvFirst",value:function(e,t){var n=this.flvParser.setFlv(new Uint8Array(e)),i=this._store.state.tags;if(i.length){if(18!==i[0].tagType)throw new Error("flv file without metadata tag");0!==this._tempBaseTime&&this._tempBaseTime===i[0].getTime()&&(this._store.state._timestampBase=0),this.tagDemuxer.resolveTags(i)}return this.firstFlag=!1,n}},{key:"setFlvUsually",value:function(e,t){var n=this.flvParser.setFlv(new Uint8Array(e)),i=this._store.state.tags;return i.length&&this.tagDemuxer.resolveTags(i),n}},{key:"handleDataReady",value:function(e,t){this._mp4remuxer.remux(e,t)}},{key:"handleMetaDataReady",value:function(e,t){this._mp4remuxer.onMetaDataReady(e,t)}},{key:"handleError",value:function(e){this.error(e)}},{key:"handleMediaInfoReady",value:function(e){if(!this._isMediaInfoInited){var t=this._mp4remuxer.onMediaInfoReady(e);this.ftyp_moof||(this.ftyp_moof=t,this.emit("ready",t)),this._isMediaInfoInited=!0}}},{key:"initEventBind",value:function(){var e=this,t=this.handleError,n=this.handleDataReady,i=this.handleMetaDataReady,r=this.handleMediaInfoReady;this.on("mediaFragment",function(t){e._isNewSegmentsArrival=!0,e._pendingFragments.push(t);var n=t.fragment.randomAccessPoints;if(n&&n.length&&n.forEach(function(t){e.bufferKeyframes.add(t.dts)}),e.isSourceOpen&&e._pendingFragments.length){var i=e._pendingFragments.shift();e.mse.appendBuffer(i.data)?e._player.emit("cacheupdate",e._player):e._pendingFragments.unshift(i)}}),this.on(c.EventTypes.ERROR,t.bind(this)),this.on("demuxer_data_ready",n.bind(this)),this.on("demuxer_meta_data_ready",i.bind(this)),this.on("demuxer_media_info_ready",r.bind(this))}},{key:"replay",value:function(){this.range={start:this._store.metaEndPosition,end:this.getNextRangeEnd(0,this._config.preloadTime)},this._mp4remuxer.seek(),this.flvParser.seek(),this.clearBuffer(),this.loadSegments(!1)}},{key:"clearBuffer",value:function(){this._pendingFragments=[],this._pendingRemoveRange=[]}},{key:"seek",value:function(e){var t=this._store,n=t.keyframes,i=void 0===n?{}:n,r=t.videoTimeScale,a=e*r,o=void 0,s=void 0,u=Math.min(i.filePositions.length,i.times.length),f=this._config.preloadTime;function l(e,t){return t===i.times.length?(s=t,!1):!(e<=f&&f<=i.times[t+1])||(s=t,!1)}for(var c=0,h=u-2;c0&&void 0!==arguments[0]?arguments[0]:c.url)&&((t=new i.default(c,e)).on("ready",function(i){n=e.mse=t.mse=new a.default,p.call(e,n.url),n.on("sourceopen",function(){t.isSourceOpen=!0,n.appendBuffer(i.buffer),n.on("updateend",function(){var i=t,r=i.pendingFragments,a=i.hasPendingFragments;if(u=!0,a){var o=r.shift();n.appendBuffer(o.data)?e.emit("cacheupdate",e):r.unshift(o)}})}),n.on("error",function(t){e.emit("error",t)})}),t.handleError=function(t){e.emit("error",t)})},e.on("pause",function(){!v&&o.default.clear()}),v||(e.on("seeking",function(){o.default.clear();var n=e.buffered,i=e.currentTime,r=!1;if(n.length)for(var a=0,s=n.length;an.start(a)&&i + + + + + + flv转码到fmp4 + + + +
+ +
+
+ + \ No newline at end of file diff --git a/packages/xgplayer-flv/package-lock.json b/packages/xgplayer-flv/package-lock.json new file mode 100644 index 00000000..4a057fdd --- /dev/null +++ b/packages/xgplayer-flv/package-lock.json @@ -0,0 +1,9900 @@ +{ + "name": "xgplayer-flv", + "version": "0.1.2-0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0-beta.41", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.41.tgz", + "integrity": "sha512-omQT0n9EW38xfMCY7cCW/PAT55igUX9c9cMq6QN4EjxCcelcrocwMJ6H4JP4BGrQ+OHdJAQPM9/Eaa2Yce4Aug==", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0-beta.41" + } + }, + "@babel/generator": { + "version": "7.0.0-beta.41", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.41.tgz", + "integrity": "sha512-j1hBM7K53RqAwPzPkS3GK9ggxJUBaUHevkpnt9iKBPHVlTrO3owMMlT8wH/GmOjr0HyBGFlL8cSlygx8RLdD7A==", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.41", + "jsesc": "^2.5.1", + "lodash": "^4.2.0", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", + "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", + "dev": true + } + } + }, + "@babel/helper-function-name": { + "version": "7.0.0-beta.41", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.41.tgz", + "integrity": "sha512-oN/ljgS1InIpOp2bDkj8X5gIoiWnYBdhaAb2y/nPSMX4t0C6nIdbd0qYhG8uAKFm6mQBmm1cvNxPzcSB3F19aQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "7.0.0-beta.41", + "@babel/template": "7.0.0-beta.41", + "@babel/types": "7.0.0-beta.41" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0-beta.41", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.41.tgz", + "integrity": "sha512-B4Vwv02jCSjCws0jmBwR+c5y3MXs5dDyjEVZ8wlIeOaMvwXNxVrBGl+OaLuuPlxVNDrESNvpGFXxh+rlqf+w5Q==", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.41" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0-beta.41", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.41.tgz", + "integrity": "sha512-eAyEJr4u3FWR5r0+gJWgE2Npu4d7BCXnXP+zw89n02x2DyewW0IHrED2HVlbhBAMWVt083VyGKjoVUMyH945wg==", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.41" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.41", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.41.tgz", + "integrity": "sha512-5RURdqgHmXdg775Dr6GIFaVatHaPtaVgMF29jvWgkm8LP/B3MjZR/TOhkpbIBChqFzTn7uQKiBR3002pGjKY7Q==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", + "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/template": { + "version": "7.0.0-beta.41", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.41.tgz", + "integrity": "sha512-EiFgrLPJQ64+Im0+fg9fHcos0eooRG/iuTM6vlF4X9b+j/9Z/VCZejbvgqLYtuseT67GKQHEeEoXM07HK6in2Q==", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.41", + "@babel/types": "7.0.0-beta.41", + "babylon": "7.0.0-beta.41", + "lodash": "^4.2.0" + }, + "dependencies": { + "babylon": { + "version": "7.0.0-beta.41", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.41.tgz", + "integrity": "sha512-AfQfqR9hbNSpY/9yyGaUAiT1tmyHzaJbHJpqkfn8DGAUkPTG5VwPoulajQu3FUQXTr8NGm4MFaupVzmWkvln4Q==", + "dev": true + } + } + }, + "@babel/traverse": { + "version": "7.0.0-beta.41", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.41.tgz", + "integrity": "sha512-EkWyDxYvaGaFjV+7xsGBeTsryqj5+oMo6noN/fhT5j5C4bpPuNwWnl47Ivvg10bk6v1NpfCoI6NHOWj3x+v9Ag==", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.41", + "@babel/generator": "7.0.0-beta.41", + "@babel/helper-function-name": "7.0.0-beta.41", + "@babel/helper-split-export-declaration": "7.0.0-beta.41", + "@babel/types": "7.0.0-beta.41", + "babylon": "7.0.0-beta.41", + "debug": "^3.1.0", + "globals": "^11.1.0", + "invariant": "^2.2.0", + "lodash": "^4.2.0" + }, + "dependencies": { + "babylon": { + "version": "7.0.0-beta.41", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.41.tgz", + "integrity": "sha512-AfQfqR9hbNSpY/9yyGaUAiT1tmyHzaJbHJpqkfn8DGAUkPTG5VwPoulajQu3FUQXTr8NGm4MFaupVzmWkvln4Q==", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "globals": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.3.0.tgz", + "integrity": "sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.0.0-beta.41", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.41.tgz", + "integrity": "sha512-q+Jf57E089a98CjAN5x0C5PAn7fqhVrEHTVAeVWHviyauASWgqff3F+t8migYEagnn5PcJ9lmtr5Mgmi3sV8PA==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.2.0", + "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + } + } + }, + "@webassemblyjs/ast": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.5.12.tgz", + "integrity": "sha512-bmTBEKuuhSU6dC95QIW250xO769cdYGx9rWn3uBLTw2pUpud0Z5kVuMw9m9fqbNzGeuOU2HpyuZa+yUt2CTEDA==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.5.12", + "@webassemblyjs/helper-wasm-bytecode": "1.5.12", + "@webassemblyjs/wast-parser": "1.5.12", + "debug": "^3.1.0", + "mamacro": "^0.0.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.5.12.tgz", + "integrity": "sha512-epTvkdwOIPpTE9edHS+V+shetYzpTbd91XOzUli1zAS0+NSgSe6ZsNggIqUNzhma1s4bN2f/m8c6B1NMdCERAg==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.5.12.tgz", + "integrity": "sha512-Goxag86JvLq8ucHLXFNSLYzf9wrR+CJr37DsESTAzSnGoqDTgw5eqiXSQVd/D9Biih7+DIn8UIQCxMs8emRRwg==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.5.12.tgz", + "integrity": "sha512-tJNUjttL5CxiiS/KLxT4/Zk0Nbl/poFhztFxktb46zoQEUWaGHR9ZJ0SnvE7DbFX5PY5JNJDMZ0Li4lm246fWw==", + "dev": true, + "requires": { + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.5.12.tgz", + "integrity": "sha512-0FrJgiST+MQDMvPigzs+UIk1vslLIqGadkEWdn53Lr0NsUC2JbheG9QaO3Zf6ycK2JwsHiUpGaMFcHYXStTPMA==", + "dev": true, + "requires": { + "@webassemblyjs/wast-printer": "1.5.12" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.5.12.tgz", + "integrity": "sha512-QBHZ45VPUJ7UyYKvUFoaxrSS9H5hbkC9U7tdWgFHmnTMutkXSEgDg2gZg3I/QTsiKOCIwx4qJUJwPd7J4D5CNQ==", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.5.12.tgz", + "integrity": "sha512-SCXR8hPI4JOG3cdy9HAO8W5/VQ68YXG/Hfs7qDf1cd64zWuMNshyEour5NYnLMVkrrtc0XzfVS/MdeV94woFHA==", + "dev": true, + "requires": { + "debug": "^3.1.0", + "mamacro": "^0.0.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.5.12.tgz", + "integrity": "sha512-0Gz5lQcyvElNVbOTKwjEmIxGwdWf+zpAW/WGzGo95B7IgMEzyyfZU+PrGHDwiSH9c0knol9G7smQnY0ljrSA6g==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.5.12.tgz", + "integrity": "sha512-ge/CKVKBGpiJhFN9PIOQ7sPtGYJhxm/mW1Y3SpG1L6XBunfRz0YnLjW3TmhcOEFozIVyODPS1HZ9f7VR3GBGow==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/helper-buffer": "1.5.12", + "@webassemblyjs/helper-wasm-bytecode": "1.5.12", + "@webassemblyjs/wasm-gen": "1.5.12", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/ieee754": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.5.12.tgz", + "integrity": "sha512-F+PEv9QBzPi1ThLBouUJbuxhEr+Sy/oua1ftXFKHiaYYS5Z9tKPvK/hgCxlSdq+RY4MSG15jU2JYb/K5pkoybg==", + "dev": true, + "requires": { + "ieee754": "^1.1.11" + } + }, + "@webassemblyjs/leb128": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.5.12.tgz", + "integrity": "sha512-cCOx/LVGiWyCwVrVlvGmTdnwHzIP4+zflLjGkZxWpYCpdNax9krVIJh1Pm7O86Ox/c5PrJpbvZU1cZLxndlPEw==", + "dev": true, + "requires": { + "leb": "^0.3.0" + } + }, + "@webassemblyjs/utf8": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.5.12.tgz", + "integrity": "sha512-FX8NYQMiTRU0TfK/tJVntsi9IEKsedSsna8qtsndWVE0x3zLndugiApxdNMIOoElBV9o4j0BUqR+iwU58QfPxQ==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.5.12.tgz", + "integrity": "sha512-r/oZAyC4EZl0ToOYJgvj+b0X6gVEKQMLT34pNNbtvWBehQOnaSXvVUA5FIYlH8ubWjFNAFqYaVGgQTjR1yuJdQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/helper-buffer": "1.5.12", + "@webassemblyjs/helper-wasm-bytecode": "1.5.12", + "@webassemblyjs/helper-wasm-section": "1.5.12", + "@webassemblyjs/wasm-gen": "1.5.12", + "@webassemblyjs/wasm-opt": "1.5.12", + "@webassemblyjs/wasm-parser": "1.5.12", + "@webassemblyjs/wast-printer": "1.5.12", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.5.12.tgz", + "integrity": "sha512-LTu+cr1YRxGGiVIXWhei/35lXXEwTnQU18x4V/gE+qCSJN21QcVTMjJuasTUh8WtmBZtOlqJbOQIeN7fGnHWhg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/helper-wasm-bytecode": "1.5.12", + "@webassemblyjs/ieee754": "1.5.12", + "@webassemblyjs/leb128": "1.5.12", + "@webassemblyjs/utf8": "1.5.12" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.5.12.tgz", + "integrity": "sha512-LBwG5KPA9u/uigZVyTsDpS3CVxx3AePCnTItVL+OPkRCp5LqmLsOp4a3/c5CQE0Lecm0Ss9hjUTDcbYFZkXlfQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/helper-buffer": "1.5.12", + "@webassemblyjs/wasm-gen": "1.5.12", + "@webassemblyjs/wasm-parser": "1.5.12", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.5.12.tgz", + "integrity": "sha512-xset3+1AtoFYEfMg30nzCGBnhKmTBzbIKvMyLhqJT06TvYV+kA884AOUpUvhSmP6XPF3G+HVZPm/PbCGxH4/VQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/helper-api-error": "1.5.12", + "@webassemblyjs/helper-wasm-bytecode": "1.5.12", + "@webassemblyjs/ieee754": "1.5.12", + "@webassemblyjs/leb128": "1.5.12", + "@webassemblyjs/utf8": "1.5.12" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.5.12.tgz", + "integrity": "sha512-QWUtzhvfY7Ue9GlJ3HeOB6w5g9vNYUUnG+Y96TWPkFHJTxZlcvGfNrUoACCw6eDb9gKaHrjt77aPq41a7y8svg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/floating-point-hex-parser": "1.5.12", + "@webassemblyjs/helper-api-error": "1.5.12", + "@webassemblyjs/helper-code-frame": "1.5.12", + "@webassemblyjs/helper-fsm": "1.5.12", + "long": "^3.2.0", + "mamacro": "^0.0.3" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.5.12.tgz", + "integrity": "sha512-XF9RTeckFgDyl196uRKZWHFFfbkzsMK96QTXp+TC0R9gsV9DMiDGMSIllgy/WdrZ3y3dsQp4fTA5r4GoaOBchA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/wast-parser": "1.5.12", + "long": "^3.2.0" + } + }, + "accepts": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", + "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", + "dev": true, + "requires": { + "mime-types": "~2.1.16", + "negotiator": "0.6.1" + } + }, + "acorn": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", + "dev": true + }, + "acorn-dynamic-import": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", + "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", + "dev": true, + "requires": { + "acorn": "^5.0.0" + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ajv-keywords": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "dev": true + }, + "alphanum-sort": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", + "dev": true + }, + "ansi-html": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "optional": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-flatten": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", + "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=", + "dev": true + }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + } + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "ast-types": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz", + "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=", + "dev": true + }, + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "dev": true, + "requires": { + "lodash": "^4.14.0" + } + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "atob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", + "dev": true + }, + "autoprefixer": { + "version": "6.7.7", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz", + "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", + "dev": true, + "requires": { + "browserslist": "^1.7.6", + "caniuse-db": "^1.0.30000634", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^5.2.16", + "postcss-value-parser": "^3.2.3" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "^1.0.30000639", + "electron-to-chromium": "^1.2.7" + } + } + } + }, + "babel": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel/-/babel-6.23.0.tgz", + "integrity": "sha1-0NHn2APpdHZb7qMjLU4VPA77kPQ=", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + } + }, + "babel-env": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/babel-env/-/babel-env-2.4.1.tgz", + "integrity": "sha1-Mjbgg770KbsCKBQkReE3lz5oAq0=", + "dev": true, + "requires": { + "babel-cli": "^6.24.0", + "babel-core": "^6.24.0", + "babel-plugin-transform-class-properties": "^6.23.0", + "babel-plugin-transform-decorators": "^6.22.0", + "babel-plugin-transform-react-constant-elements": "^6.23.0", + "babel-plugin-transform-react-inline-elements": "^6.22.0", + "babel-polyfill": "^6.23.0", + "babel-preset-env": "^1.3.2", + "babel-preset-react": "^6.23.0", + "babel-preset-stage-0": "^6.22.0" + }, + "dependencies": { + "babel-cli": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", + "integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-polyfill": "^6.26.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "chokidar": "^1.6.1", + "commander": "^2.11.0", + "convert-source-map": "^1.5.0", + "fs-readdir-recursive": "^1.0.0", + "glob": "^7.1.2", + "lodash": "^4.17.4", + "output-file-sync": "^1.1.2", + "path-is-absolute": "^1.0.1", + "slash": "^1.0.0", + "source-map": "^0.5.6", + "v8flags": "^2.1.1" + }, + "dependencies": { + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + } + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + }, + "dependencies": { + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + } + } + } + } + }, + "babel-eslint": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-8.2.2.tgz", + "integrity": "sha512-Qt2lz2egBxNYWqN9JIO2z4NOOf8i4b5JS6CFoYrOZZTDssueiV1jH/jsefyg+86SeNY3rB361/mi3kE1WK2WYQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0-beta.40", + "@babel/traverse": "^7.0.0-beta.40", + "@babel/types": "^7.0.0-beta.40", + "babylon": "^7.0.0-beta.40", + "eslint-scope": "~3.7.1", + "eslint-visitor-keys": "^1.0.0" + }, + "dependencies": { + "babylon": { + "version": "7.0.0-beta.41", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.41.tgz", + "integrity": "sha512-AfQfqR9hbNSpY/9yyGaUAiT1tmyHzaJbHJpqkfn8DGAUkPTG5VwPoulajQu3FUQXTr8NGm4MFaupVzmWkvln4Q==", + "dev": true + } + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + } + }, + "babel-helper-bindify-decorators": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", + "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", + "dev": true, + "requires": { + "babel-helper-explode-assignable-expression": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-builder-react-jsx": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz", + "integrity": "sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "esutils": "^2.0.2" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-explode-class": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz", + "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", + "dev": true, + "requires": { + "babel-helper-bindify-decorators": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true, + "requires": { + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-loader": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.2.tgz", + "integrity": "sha512-jRwlFbINAeyDStqK6Dd5YuY0k5YuzQUvlz2ZamuXrXmxav3pNqe9vfJ402+2G+OmlJSXxCOpB6Uz0INM7RQe2A==", + "dev": true, + "requires": { + "find-cache-dir": "^1.0.0", + "loader-utils": "^1.0.2", + "mkdirp": "^0.5.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", + "dev": true + }, + "babel-plugin-syntax-async-generators": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", + "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=", + "dev": true + }, + "babel-plugin-syntax-class-constructor-call": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz", + "integrity": "sha1-nLnTn+Q8hgC+yBRkVt3L1OGnZBY=", + "dev": true + }, + "babel-plugin-syntax-class-properties": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", + "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=", + "dev": true + }, + "babel-plugin-syntax-decorators": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", + "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=", + "dev": true + }, + "babel-plugin-syntax-do-expressions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz", + "integrity": "sha1-V0d1YTmqJtOQ0JQQsDdEugfkeW0=", + "dev": true + }, + "babel-plugin-syntax-dynamic-import": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", + "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=", + "dev": true + }, + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", + "dev": true + }, + "babel-plugin-syntax-export-extensions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz", + "integrity": "sha1-cKFITw+QiaToStRLrDU8lbmxJyE=", + "dev": true + }, + "babel-plugin-syntax-flow": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", + "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=", + "dev": true + }, + "babel-plugin-syntax-function-bind": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz", + "integrity": "sha1-SMSV8Xe98xqYHnMvVa3AvdJgH0Y=", + "dev": true + }, + "babel-plugin-syntax-jsx": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", + "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=", + "dev": true + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "dev": true + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", + "dev": true + }, + "babel-plugin-transform-async-generator-functions": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", + "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-generators": "^6.5.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-functions": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-class-constructor-call": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz", + "integrity": "sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk=", + "dev": true, + "requires": { + "babel-plugin-syntax-class-constructor-call": "^6.18.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-class-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", + "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-plugin-syntax-class-properties": "^6.8.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-decorators": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz", + "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=", + "dev": true, + "requires": { + "babel-helper-explode-class": "^6.24.1", + "babel-plugin-syntax-decorators": "^6.13.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-do-expressions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz", + "integrity": "sha1-KMyvkoEtlJws0SgfaQyP3EaK6bs=", + "dev": true, + "requires": { + "babel-plugin-syntax-do-expressions": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "dev": true, + "requires": { + "babel-helper-define-map": "^6.24.1", + "babel-helper-function-name": "^6.24.1", + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-helper-replace-supers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "dev": true, + "requires": { + "babel-helper-replace-supers": "^6.24.1", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true, + "requires": { + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" + } + }, + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "dev": true, + "requires": { + "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", + "babel-plugin-syntax-exponentiation-operator": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-export-extensions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz", + "integrity": "sha1-U3OLR+deghhYnuqUbLvTkQm75lM=", + "dev": true, + "requires": { + "babel-plugin-syntax-export-extensions": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-flow-strip-types": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", + "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", + "dev": true, + "requires": { + "babel-plugin-syntax-flow": "^6.18.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-function-bind": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz", + "integrity": "sha1-xvuOlqwpajELjPjqQBRiQH3fapc=", + "dev": true, + "requires": { + "babel-plugin-syntax-function-bind": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-object-rest-spread": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", + "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", + "dev": true, + "requires": { + "babel-plugin-syntax-object-rest-spread": "^6.8.0", + "babel-runtime": "^6.26.0" + } + }, + "babel-plugin-transform-react-constant-elements": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-react-constant-elements/-/babel-plugin-transform-react-constant-elements-6.23.0.tgz", + "integrity": "sha1-LxGb9NLN1F65uqrldAU8YE9hR90=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-react-display-name": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz", + "integrity": "sha1-Z+K/Hx6ck6sI25Z5LgU5K/LMKNE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-react-inline-elements": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-inline-elements/-/babel-plugin-transform-react-inline-elements-6.22.0.tgz", + "integrity": "sha1-ZochGjK0mlLyLFc6K1UEol7xfFM=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-react-jsx": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz", + "integrity": "sha1-hAoCjn30YN/DotKfDA2R9jduZqM=", + "dev": true, + "requires": { + "babel-helper-builder-react-jsx": "^6.24.1", + "babel-plugin-syntax-jsx": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-react-jsx-self": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz", + "integrity": "sha1-322AqdomEqEh5t3XVYvL7PBuY24=", + "dev": true, + "requires": { + "babel-plugin-syntax-jsx": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-react-jsx-source": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz", + "integrity": "sha1-ZqwSFT9c0tF7PBkmj0vwGX9E7NY=", + "dev": true, + "requires": { + "babel-plugin-syntax-jsx": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "dev": true, + "requires": { + "regenerator-transform": "^0.10.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-polyfill": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "regenerator-runtime": "^0.10.5" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true + } + } + }, + "babel-preset-env": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz", + "integrity": "sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-syntax-trailing-function-commas": "^6.22.0", + "babel-plugin-transform-async-to-generator": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.23.0", + "babel-plugin-transform-es2015-classes": "^6.23.0", + "babel-plugin-transform-es2015-computed-properties": "^6.22.0", + "babel-plugin-transform-es2015-destructuring": "^6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0", + "babel-plugin-transform-es2015-for-of": "^6.23.0", + "babel-plugin-transform-es2015-function-name": "^6.22.0", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.22.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0", + "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0", + "babel-plugin-transform-es2015-modules-umd": "^6.23.0", + "babel-plugin-transform-es2015-object-super": "^6.22.0", + "babel-plugin-transform-es2015-parameters": "^6.23.0", + "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.22.0", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.22.0", + "babel-plugin-transform-exponentiation-operator": "^6.22.0", + "babel-plugin-transform-regenerator": "^6.22.0", + "browserslist": "^3.2.6", + "invariant": "^2.2.2", + "semver": "^5.3.0" + } + }, + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.24.1", + "babel-plugin-transform-es2015-classes": "^6.24.1", + "babel-plugin-transform-es2015-computed-properties": "^6.24.1", + "babel-plugin-transform-es2015-destructuring": "^6.22.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", + "babel-plugin-transform-es2015-for-of": "^6.22.0", + "babel-plugin-transform-es2015-function-name": "^6.24.1", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-umd": "^6.24.1", + "babel-plugin-transform-es2015-object-super": "^6.24.1", + "babel-plugin-transform-es2015-parameters": "^6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", + "babel-plugin-transform-regenerator": "^6.24.1" + } + }, + "babel-preset-flow": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz", + "integrity": "sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0=", + "dev": true, + "requires": { + "babel-plugin-transform-flow-strip-types": "^6.22.0" + } + }, + "babel-preset-react": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.24.1.tgz", + "integrity": "sha1-umnfrqRfw+xjm2pOzqbhdwLJE4A=", + "dev": true, + "requires": { + "babel-plugin-syntax-jsx": "^6.3.13", + "babel-plugin-transform-react-display-name": "^6.23.0", + "babel-plugin-transform-react-jsx": "^6.24.1", + "babel-plugin-transform-react-jsx-self": "^6.22.0", + "babel-plugin-transform-react-jsx-source": "^6.22.0", + "babel-preset-flow": "^6.23.0" + } + }, + "babel-preset-stage-0": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz", + "integrity": "sha1-VkLRUEL5E4TX5a+LyIsduVsDnmo=", + "dev": true, + "requires": { + "babel-plugin-transform-do-expressions": "^6.22.0", + "babel-plugin-transform-function-bind": "^6.22.0", + "babel-preset-stage-1": "^6.24.1" + } + }, + "babel-preset-stage-1": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz", + "integrity": "sha1-dpLNfc1oSZB+auSgqFWJz7niv7A=", + "dev": true, + "requires": { + "babel-plugin-transform-class-constructor-call": "^6.24.1", + "babel-plugin-transform-export-extensions": "^6.22.0", + "babel-preset-stage-2": "^6.24.1" + } + }, + "babel-preset-stage-2": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", + "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=", + "dev": true, + "requires": { + "babel-plugin-syntax-dynamic-import": "^6.18.0", + "babel-plugin-transform-class-properties": "^6.24.1", + "babel-plugin-transform-decorators": "^6.24.1", + "babel-preset-stage-3": "^6.24.1" + } + }, + "babel-preset-stage-3": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", + "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", + "dev": true, + "requires": { + "babel-plugin-syntax-trailing-function-commas": "^6.22.0", + "babel-plugin-transform-async-generator-functions": "^6.24.1", + "babel-plugin-transform-async-to-generator": "^6.24.1", + "babel-plugin-transform-exponentiation-operator": "^6.24.1", + "babel-plugin-transform-object-rest-spread": "^6.22.0" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "body-parser": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.1", + "http-errors": "~1.6.2", + "iconv-lite": "0.4.19", + "on-finished": "~2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "~1.6.15" + } + }, + "bonjour": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", + "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "dev": true, + "requires": { + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", + "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "browserslist": { + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", + "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000844", + "electron-to-chromium": "^1.3.47" + }, + "dependencies": { + "electron-to-chromium": { + "version": "1.3.50", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.50.tgz", + "integrity": "sha1-dDi3b5K0G5GfP73TUPvQdX2s3fc=", + "dev": true + } + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-from": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", + "dev": true + }, + "buffer-indexof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, + "cacache": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", + "dev": true, + "requires": { + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.1", + "mississippi": "^2.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^5.2.4", + "unique-filename": "^1.1.0", + "y18n": "^4.0.0" + }, + "dependencies": { + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + } + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + } + } + }, + "caniuse-api": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz", + "integrity": "sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=", + "dev": true, + "requires": { + "browserslist": "^1.3.6", + "caniuse-db": "^1.0.30000529", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "^1.0.30000639", + "electron-to-chromium": "^1.2.7" + } + } + } + }, + "caniuse-db": { + "version": "1.0.30000810", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000810.tgz", + "integrity": "sha1-vSWDDEHvq2Qzmi44H0lnc0PIRQk=", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30000858", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000858.tgz", + "integrity": "sha512-oJRGfVfwHr0VKcoy2UqIoRmQcDOugnNAQsWYI3/JTzExrlzxSKtmLW1N4h+gmjgpYCEJthHmaIjok894H5il/g==", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "optional": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", + "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "clap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", + "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==", + "dev": true, + "requires": { + "chalk": "^1.1.3" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "clean-css": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.9.tgz", + "integrity": "sha1-Nc7ornaHpJuYA09w3gDE7dOCYwE=", + "dev": true, + "requires": { + "source-map": "0.5.x" + } + }, + "clean-webpack-plugin": { + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-0.1.17.tgz", + "integrity": "sha512-Bts/V725v8Ijosp4K1cqppQXgXcrohxoMsg0CV2xL4y/vua1G5pAfHEW/eJIiKF+GNNG72mdjbipxMRFEms7yg==", + "dev": true, + "requires": { + "rimraf": "^2.6.1" + } + }, + "clone": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", + "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=", + "dev": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "coa": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/coa/-/coa-1.0.4.tgz", + "integrity": "sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=", + "dev": true, + "requires": { + "q": "^1.1.2" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", + "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", + "dev": true, + "requires": { + "clone": "^1.0.2", + "color-convert": "^1.3.0", + "color-string": "^0.3.0" + } + }, + "color-convert": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "dev": true, + "requires": { + "color-name": "^1.1.1" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "color-string": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", + "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", + "dev": true, + "requires": { + "color-name": "^1.0.0" + } + }, + "colormin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz", + "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", + "dev": true, + "requires": { + "color": "^0.11.0", + "css-color-names": "0.0.4", + "has": "^1.0.1" + } + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "compressible": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.12.tgz", + "integrity": "sha1-xZpcmdt2dn6YdlAOJx72OzSTvWY=", + "dev": true, + "requires": { + "mime-db": ">= 1.30.0 < 2" + } + }, + "compression": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.1.tgz", + "integrity": "sha1-7/JgPvwuIs+G810uuTWJ+YdTc9s=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "bytes": "3.0.0", + "compressible": "~2.0.11", + "debug": "2.6.9", + "on-headers": "~1.0.1", + "safe-buffer": "5.1.1", + "vary": "~1.1.2" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "concat-typed-array": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/concat-typed-array/-/concat-typed-array-1.0.2.tgz", + "integrity": "sha1-Z4gMPOGez/EQwxWYtBx/RznUfKA=" + }, + "connect-history-api-fallback": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", + "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=", + "dev": true + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", + "dev": true + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", + "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "css-color-names": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", + "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", + "dev": true + }, + "css-loader": { + "version": "0.28.10", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.28.10.tgz", + "integrity": "sha512-X1IJteKnW9Llmrd+lJ0f7QZHh9Arf+11S7iRcoT2+riig3BK0QaCaOtubAulMK6Itbo08W6d3l8sW21r+Jhp5Q==", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "css-selector-tokenizer": "^0.7.0", + "cssnano": "^3.10.0", + "icss-utils": "^2.1.0", + "loader-utils": "^1.0.2", + "lodash.camelcase": "^4.3.0", + "object-assign": "^4.1.1", + "postcss": "^5.0.6", + "postcss-modules-extract-imports": "^1.2.0", + "postcss-modules-local-by-default": "^1.2.0", + "postcss-modules-scope": "^1.1.0", + "postcss-modules-values": "^1.3.0", + "postcss-value-parser": "^3.3.0", + "source-list-map": "^2.0.0" + } + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "css-selector-tokenizer": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", + "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", + "dev": true, + "requires": { + "cssesc": "^0.1.0", + "fastparse": "^1.1.1", + "regexpu-core": "^1.0.0" + }, + "dependencies": { + "regexpu-core": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", + "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + } + } + }, + "css-what": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=", + "dev": true + }, + "cssesc": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", + "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", + "dev": true + }, + "cssnano": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz", + "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", + "dev": true, + "requires": { + "autoprefixer": "^6.3.1", + "decamelize": "^1.1.2", + "defined": "^1.0.0", + "has": "^1.0.1", + "object-assign": "^4.0.1", + "postcss": "^5.0.14", + "postcss-calc": "^5.2.0", + "postcss-colormin": "^2.1.8", + "postcss-convert-values": "^2.3.4", + "postcss-discard-comments": "^2.0.4", + "postcss-discard-duplicates": "^2.0.1", + "postcss-discard-empty": "^2.0.1", + "postcss-discard-overridden": "^0.1.1", + "postcss-discard-unused": "^2.2.1", + "postcss-filter-plugins": "^2.0.0", + "postcss-merge-idents": "^2.1.5", + "postcss-merge-longhand": "^2.0.1", + "postcss-merge-rules": "^2.0.3", + "postcss-minify-font-values": "^1.0.2", + "postcss-minify-gradients": "^1.0.1", + "postcss-minify-params": "^1.0.4", + "postcss-minify-selectors": "^2.0.4", + "postcss-normalize-charset": "^1.1.0", + "postcss-normalize-url": "^3.0.7", + "postcss-ordered-values": "^2.1.0", + "postcss-reduce-idents": "^2.2.2", + "postcss-reduce-initial": "^1.0.0", + "postcss-reduce-transforms": "^1.0.3", + "postcss-svgo": "^2.1.1", + "postcss-unique-selectors": "^2.0.2", + "postcss-value-parser": "^3.2.3", + "postcss-zindex": "^2.0.1" + } + }, + "csso": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/csso/-/csso-2.3.2.tgz", + "integrity": "sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=", + "dev": true, + "requires": { + "clap": "^1.0.9", + "source-map": "^0.5.3" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "cyclist": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "dev": true + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "requires": { + "es5-ext": "^0.10.9" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", + "dev": true + }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "dev": true, + "requires": { + "foreach": "^2.0.5", + "object-keys": "^1.0.8" + } + }, + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "del": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "dev": true, + "requires": { + "globby": "^6.1.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "p-map": "^1.1.1", + "pify": "^3.0.0", + "rimraf": "^2.2.8" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "detect-node": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz", + "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", + "dev": true + }, + "dns-packet": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", + "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", + "dev": true, + "requires": { + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, + "dns-txt": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", + "dev": true, + "requires": { + "buffer-indexof": "^1.0.0" + } + }, + "dom-converter": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", + "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", + "dev": true, + "requires": { + "utila": "~0.3" + }, + "dependencies": { + "utila": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", + "dev": true + } + } + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "dev": true, + "requires": { + "domelementtype": "~1.1.1", + "entities": "~1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", + "dev": true + } + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", + "dev": true + }, + "domhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", + "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "duplexify": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", + "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.31", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.31.tgz", + "integrity": "sha512-XE4CLbswkZgZFn34cKFy1xaX+F5LHxeDLjY1+rsK9asDzknhbrd9g/n/01/acbU25KTsUSiLKwvlLyA+6XLUOA==", + "dev": true + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", + "integrity": "sha512-jox/62b2GofV1qTUQTMPEJSDIGycS43evqYzD/KVtEb9OCoki9cnacUPxCrZa7JfPzZSYOCZhu9O9luaMxAX8g==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" + } + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", + "dev": true + }, + "errno": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.6.tgz", + "integrity": "sha512-IsORQDpaaSwcDP4ZZnHxgE85werpo34VYn1Ud3mq+eUsF593faR8oCZNXrROVkpFu2TsbrNhHin0aUrTsQ9vNw==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.10.0.tgz", + "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", + "dev": true, + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "dev": true, + "requires": { + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" + } + }, + "es5-ext": { + "version": "0.10.45", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", + "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "es6-templates": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/es6-templates/-/es6-templates-0.2.3.tgz", + "integrity": "sha1-XLmsn7He1usSOTQrgdeSu7QHjuQ=", + "dev": true, + "requires": { + "recast": "~0.11.12", + "through": "~2.3.6" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + }, + "esrecurse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", + "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "dev": true, + "requires": { + "estraverse": "^4.1.0", + "object-assign": "^4.0.1" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "eventemitter3": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz", + "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=", + "dev": true + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "eventsource": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", + "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", + "dev": true, + "requires": { + "original": ">=0.0.5" + } + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "^2.1.0" + } + }, + "express": { + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.2.tgz", + "integrity": "sha1-41xt/i1kt9ygpc1PIXgb4ymeB2w=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "array-flatten": "1.1.1", + "body-parser": "1.18.2", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.1", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.0", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.2", + "qs": "6.5.1", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.1", + "send": "0.16.1", + "serve-static": "1.13.1", + "setprototypeof": "1.1.0", + "statuses": "~1.3.1", + "type-is": "~1.6.15", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + } + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "extract-text-webpack-plugin": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz", + "integrity": "sha512-bt/LZ4m5Rqt/Crl2HiKuAl/oqg0psx1tsTLkvWbJen1CtD+fftkZhMaQ9HOtY2gWsl2Wq+sABmMVi9z3DhKWQQ==", + "dev": true, + "requires": { + "async": "^2.4.1", + "loader-utils": "^1.1.0", + "schema-utils": "^0.3.0", + "webpack-sources": "^1.0.1" + } + }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fastparse": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", + "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=", + "dev": true + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "finalhandler": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.3.1", + "unpipe": "~1.0.0" + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "flatten": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", + "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", + "dev": true + }, + "flush-write-stream": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", + "dev": true + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "handle-thing": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", + "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", + "dev": true + }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "dev": true, + "requires": { + "function-bind": "^1.0.2" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.4.tgz", + "integrity": "sha512-A6RlQvvZEtFS5fLU43IDu0QUmBy+fDO9VMdTXvufKwIkt/rFfvICAViCax5fbDO4zdNzaC3/27ZhKUok5bAJyw==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "dev": true + }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "html-comment-regex": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz", + "integrity": "sha1-ZouTd26q5V696POtRkswekljYl4=", + "dev": true + }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", + "dev": true + }, + "html-loader": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/html-loader/-/html-loader-0.5.5.tgz", + "integrity": "sha512-7hIW7YinOYUpo//kSYcPB6dCKoceKLmOwjEMmhIobHuWGDVl0Nwe4l68mdG/Ru0wcUxQjVMEoZpkalZ/SE7zog==", + "dev": true, + "requires": { + "es6-templates": "^0.2.3", + "fastparse": "^1.1.1", + "html-minifier": "^3.5.8", + "loader-utils": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "html-minifier": { + "version": "3.5.8", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.8.tgz", + "integrity": "sha512-WX7D6PB9PFq05fZ1/CyxPUuyqXed6vh2fGOM80+zJT5wAO93D/cUjLs0CcbBFjQmlwmCgRvl97RurtArIpOnkw==", + "dev": true, + "requires": { + "camel-case": "3.0.x", + "clean-css": "4.1.x", + "commander": "2.12.x", + "he": "1.1.x", + "ncname": "1.0.x", + "param-case": "2.1.x", + "relateurl": "0.2.x", + "uglify-js": "3.3.x" + }, + "dependencies": { + "commander": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", + "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "uglify-js": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.8.tgz", + "integrity": "sha512-X0jAGtpSZRtd4RhbVNuGHyjZNa/h2MrVkKrR3Ew5iL2MJw6d7FmBke+fhVCALWySv1ygHnjjROG1KI1FAPvddw==", + "dev": true, + "requires": { + "commander": "~2.13.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true + } + } + } + } + }, + "html-webpack-plugin": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-2.30.1.tgz", + "integrity": "sha1-f5xCG36pHsRg9WUn1430hO51N9U=", + "dev": true, + "requires": { + "bluebird": "^3.4.7", + "html-minifier": "^3.2.3", + "loader-utils": "^0.2.16", + "lodash": "^4.17.3", + "pretty-error": "^2.0.2", + "toposort": "^1.0.0" + }, + "dependencies": { + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" + } + } + } + }, + "htmlparser2": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", + "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", + "dev": true, + "requires": { + "domelementtype": "1", + "domhandler": "2.1", + "domutils": "1.1", + "readable-stream": "1.0" + }, + "dependencies": { + "domutils": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", + "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", + "dev": true + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "dev": true, + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": ">= 1.3.1 < 2" + }, + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", + "dev": true + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", + "dev": true + } + } + }, + "http-parser-js": { + "version": "0.4.9", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.9.tgz", + "integrity": "sha1-6hoE+2St/wJC6ZdPKX3Uw8rSceE=", + "dev": true + }, + "http-proxy": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.16.2.tgz", + "integrity": "sha1-Bt/ykpUr9k2+hHH6nfcwZtTzd0I=", + "dev": true, + "requires": { + "eventemitter3": "1.x.x", + "requires-port": "1.x.x" + } + }, + "http-proxy-middleware": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz", + "integrity": "sha1-ZC6ISIUdZvCdTxJJEoRtuutBuDM=", + "dev": true, + "requires": { + "http-proxy": "^1.16.2", + "is-glob": "^3.1.0", + "lodash": "^4.17.2", + "micromatch": "^2.3.11" + }, + "dependencies": { + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, + "icss-replace-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", + "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", + "dev": true + }, + "icss-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-2.1.0.tgz", + "integrity": "sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", + "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.2.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.19", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.19.tgz", + "integrity": "sha512-f13HRz0HtVwVaEuW6J6cOUCBLFtymhgyLPV7t4QEk2UD3twRI9IluDcQNdzQdBpiixkXj2OmzejhhTbSbDxNTg==", + "dev": true, + "requires": { + "chalk": "^2.3.1", + "source-map": "^0.6.1", + "supports-color": "^5.2.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", + "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "import-local": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", + "dev": true, + "requires": { + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "internal-ip": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", + "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", + "dev": true, + "requires": { + "meow": "^3.3.0" + } + }, + "invariant": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "ipaddr.js": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.5.2.tgz", + "integrity": "sha1-1LUFvemUaYfM8PxY2QEP+WB+P6A=", + "dev": true + }, + "is-absolute-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", + "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-callable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", + "dev": true + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-odd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", + "dev": true, + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "dev": true, + "requires": { + "is-path-inside": "^1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "^1.0.1" + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-svg": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz", + "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=", + "dev": true, + "requires": { + "html-comment-regex": "^1.1.0" + } + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "js-base64": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.3.tgz", + "integrity": "sha512-H7ErYLM34CvDMto3GbD6xD0JLUGYXR3QTcH6B/tr4Hi/QpSThnCsIp+Sy5FRTw3B0d6py4HcNkW7nO/wdtGWEw==", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz", + "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^2.6.0" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + } + } + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "killable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.0.tgz", + "integrity": "sha1-2ouEvUfeU5WHj5XWTQLyRJ/gXms=", + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "leb": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/leb/-/leb-0.3.0.tgz", + "integrity": "sha1-Mr7p+tFoMo1q6oUi2DP0GA7tHaM=", + "dev": true + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "dev": true + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "loglevel": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", + "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", + "dev": true + }, + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "^3.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz", + "integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "mamacro": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", + "dev": true + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "math-expression-evaluator": { + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", + "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=", + "dev": true + }, + "math-random": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "dev": true + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "dev": true + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=", + "dev": true + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "dev": true, + "requires": { + "mime-db": "~1.30.0" + } + }, + "minimalistic-assert": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", + "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mississippi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^2.0.1", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multicast-dns": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.2.tgz", + "integrity": "sha512-xTO41ApiRHMVDBYhNL9bEhx7kRf1hq3OqPOnOy8bpTi0JZSxVPDre7ZRpTHLDlxmhf6d/FL+10E8VX1QRd+0DA==", + "dev": true, + "requires": { + "dns-packet": "^1.0.1", + "thunky": "^0.1.0" + } + }, + "multicast-dns-service-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", + "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", + "dev": true + }, + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "ncname": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ncname/-/ncname-1.0.0.tgz", + "integrity": "sha1-W1etGLHKCShk72Kwse2BlPODtxw=", + "dev": true, + "requires": { + "xml-char-classes": "^1.0.0" + } + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", + "dev": true + }, + "neo-async": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "dev": true, + "requires": { + "lower-case": "^1.1.1" + } + }, + "node-forge": { + "version": "0.6.33", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.6.33.tgz", + "integrity": "sha1-RjgRh59XPUUVWtap9D3ClujoXrw=", + "dev": true + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^1.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.0", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true + }, + "normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" + } + }, + "nth-check": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "dev": true, + "requires": { + "boolbase": "~1.0.0" + } + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + } + } + }, + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "obuf": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.1.tgz", + "integrity": "sha1-EEEktsYCxnlogaBCVB0220OlJk4=", + "dev": true + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "opn": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.2.0.tgz", + "integrity": "sha512-Jd/GpzPyHF4P2/aNOVmS3lfMSWV9J7cOhCG1s08XCEAsPkB7lp6ddiU0J7XzyQRDUh8BqJ7PchfINjR8jyofRQ==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "original": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/original/-/original-1.0.0.tgz", + "integrity": "sha1-kUf5P6FpbQS+YeAb1QuurKZWvTs=", + "dev": true, + "requires": { + "url-parse": "1.0.x" + }, + "dependencies": { + "url-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.0.5.tgz", + "integrity": "sha1-CFSGBCKv3P7+tsllxmLUgAFpkns=", + "dev": true, + "requires": { + "querystringify": "0.0.x", + "requires-port": "1.0.x" + } + } + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "output-file-sync": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz", + "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.4", + "mkdirp": "^0.5.1", + "object-assign": "^4.1.0" + } + }, + "p-limit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "dev": true + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "dev": true + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "dev": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "pbkdf2": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "portfinder": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", + "integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=", + "dev": true, + "requires": { + "async": "^1.5.2", + "debug": "^2.2.0", + "mkdirp": "0.5.x" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "js-base64": "^2.1.9", + "source-map": "^0.5.6", + "supports-color": "^3.2.3" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "postcss-calc": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", + "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", + "dev": true, + "requires": { + "postcss": "^5.0.2", + "postcss-message-helpers": "^2.0.0", + "reduce-css-calc": "^1.2.6" + } + }, + "postcss-colormin": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz", + "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", + "dev": true, + "requires": { + "colormin": "^1.0.5", + "postcss": "^5.0.13", + "postcss-value-parser": "^3.2.3" + } + }, + "postcss-convert-values": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", + "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", + "dev": true, + "requires": { + "postcss": "^5.0.11", + "postcss-value-parser": "^3.1.2" + } + }, + "postcss-discard-comments": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", + "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", + "dev": true, + "requires": { + "postcss": "^5.0.14" + } + }, + "postcss-discard-duplicates": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", + "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-discard-empty": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", + "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", + "dev": true, + "requires": { + "postcss": "^5.0.14" + } + }, + "postcss-discard-overridden": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", + "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", + "dev": true, + "requires": { + "postcss": "^5.0.16" + } + }, + "postcss-discard-unused": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", + "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", + "dev": true, + "requires": { + "postcss": "^5.0.14", + "uniqs": "^2.0.0" + } + }, + "postcss-filter-plugins": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz", + "integrity": "sha512-T53GVFsdinJhgwm7rg1BzbeBRomOg9y5MBVhGcsV0CxurUdVj1UlPdKtn7aqYA/c/QVkzKMjq2bSV5dKG5+AwQ==", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-merge-idents": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", + "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.10", + "postcss-value-parser": "^3.1.1" + } + }, + "postcss-merge-longhand": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", + "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-merge-rules": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", + "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", + "dev": true, + "requires": { + "browserslist": "^1.5.2", + "caniuse-api": "^1.5.2", + "postcss": "^5.0.4", + "postcss-selector-parser": "^2.2.2", + "vendors": "^1.0.0" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "dev": true, + "requires": { + "caniuse-db": "^1.0.30000639", + "electron-to-chromium": "^1.2.7" + } + } + } + }, + "postcss-message-helpers": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", + "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=", + "dev": true + }, + "postcss-minify-font-values": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", + "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.2" + } + }, + "postcss-minify-gradients": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", + "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", + "dev": true, + "requires": { + "postcss": "^5.0.12", + "postcss-value-parser": "^3.3.0" + } + }, + "postcss-minify-params": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", + "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.1", + "postcss": "^5.0.2", + "postcss-value-parser": "^3.0.2", + "uniqs": "^2.0.0" + } + }, + "postcss-minify-selectors": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", + "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.2", + "has": "^1.0.1", + "postcss": "^5.0.14", + "postcss-selector-parser": "^2.0.0" + } + }, + "postcss-modules-extract-imports": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz", + "integrity": "sha1-ZhQOzs447wa/DT41XWm/WdFB6oU=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", + "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.2.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.19", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.19.tgz", + "integrity": "sha512-f13HRz0HtVwVaEuW6J6cOUCBLFtymhgyLPV7t4QEk2UD3twRI9IluDcQNdzQdBpiixkXj2OmzejhhTbSbDxNTg==", + "dev": true, + "requires": { + "chalk": "^2.3.1", + "source-map": "^0.6.1", + "supports-color": "^5.2.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", + "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-local-by-default": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz", + "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=", + "dev": true, + "requires": { + "css-selector-tokenizer": "^0.7.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", + "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.2.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.19", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.19.tgz", + "integrity": "sha512-f13HRz0HtVwVaEuW6J6cOUCBLFtymhgyLPV7t4QEk2UD3twRI9IluDcQNdzQdBpiixkXj2OmzejhhTbSbDxNTg==", + "dev": true, + "requires": { + "chalk": "^2.3.1", + "source-map": "^0.6.1", + "supports-color": "^5.2.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", + "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-scope": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz", + "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=", + "dev": true, + "requires": { + "css-selector-tokenizer": "^0.7.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", + "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.2.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.19", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.19.tgz", + "integrity": "sha512-f13HRz0HtVwVaEuW6J6cOUCBLFtymhgyLPV7t4QEk2UD3twRI9IluDcQNdzQdBpiixkXj2OmzejhhTbSbDxNTg==", + "dev": true, + "requires": { + "chalk": "^2.3.1", + "source-map": "^0.6.1", + "supports-color": "^5.2.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", + "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-values": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz", + "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=", + "dev": true, + "requires": { + "icss-replace-symbols": "^1.1.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", + "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.2.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.19", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.19.tgz", + "integrity": "sha512-f13HRz0HtVwVaEuW6J6cOUCBLFtymhgyLPV7t4QEk2UD3twRI9IluDcQNdzQdBpiixkXj2OmzejhhTbSbDxNTg==", + "dev": true, + "requires": { + "chalk": "^2.3.1", + "source-map": "^0.6.1", + "supports-color": "^5.2.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", + "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-normalize-charset": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", + "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", + "dev": true, + "requires": { + "postcss": "^5.0.5" + } + }, + "postcss-normalize-url": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", + "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", + "dev": true, + "requires": { + "is-absolute-url": "^2.0.0", + "normalize-url": "^1.4.0", + "postcss": "^5.0.14", + "postcss-value-parser": "^3.2.3" + } + }, + "postcss-ordered-values": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", + "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", + "dev": true, + "requires": { + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.1" + } + }, + "postcss-reduce-idents": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", + "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", + "dev": true, + "requires": { + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.2" + } + }, + "postcss-reduce-initial": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", + "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-reduce-transforms": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", + "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.8", + "postcss-value-parser": "^3.0.1" + } + }, + "postcss-selector-parser": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", + "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", + "dev": true, + "requires": { + "flatten": "^1.0.2", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-svgo": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", + "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", + "dev": true, + "requires": { + "is-svg": "^2.0.0", + "postcss": "^5.0.14", + "postcss-value-parser": "^3.2.3", + "svgo": "^0.7.0" + } + }, + "postcss-unique-selectors": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", + "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.1", + "postcss": "^5.0.4", + "uniqs": "^2.0.0" + } + }, + "postcss-value-parser": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", + "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", + "dev": true + }, + "postcss-zindex": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", + "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.4", + "uniqs": "^2.0.0" + } + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", + "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", + "dev": true, + "requires": { + "renderkid": "^2.0.1", + "utila": "~0.4" + } + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "proxy-addr": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.2.tgz", + "integrity": "sha1-ZXFQT0e7mI7IGAJT+F3X4UlSvew=", + "dev": true, + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.5.2" + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "dev": true + }, + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dev": true, + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "querystringify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-0.0.4.tgz", + "integrity": "sha1-DPf4T5Rj/wrlHExLFC2VvjdyTZw=", + "dev": true + }, + "randomatic": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", + "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "dev": true + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.0.3", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + } + }, + "recast": { + "version": "0.11.23", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz", + "integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=", + "dev": true, + "requires": { + "ast-types": "0.9.6", + "esprima": "~3.1.0", + "private": "~0.1.5", + "source-map": "~0.5.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "reduce-css-calc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2", + "math-expression-evaluator": "^1.2.14", + "reduce-function-call": "^1.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "reduce-function-call": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz", + "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "regenerate": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", + "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", + "dev": true, + "requires": { + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.0.tgz", + "integrity": "sha1-Qvg+OXcWIt+CawKvF2Ul1qXxV/k=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1" + } + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "renderkid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", + "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", + "dev": true, + "requires": { + "css-select": "^1.1.0", + "dom-converter": "~0.1", + "htmlparser2": "~3.3.0", + "strip-ansi": "^3.0.0", + "utila": "~0.3" + }, + "dependencies": { + "utila": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", + "dev": true + } + } + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "schema-utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", + "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", + "dev": true, + "requires": { + "ajv": "^5.0.0" + } + }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", + "dev": true + }, + "selfsigned": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.1.tgz", + "integrity": "sha1-v4y3uDJWxFUeMTR8YxF3jbme7FI=", + "dev": true, + "requires": { + "node-forge": "0.6.33" + } + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "send": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.1.tgz", + "integrity": "sha512-ElCLJdJIKPk6ux/Hocwhk7NFHpI3pVm/IZOYWqUmoxcgeyM+MpxHHKhb8QmlJDX1pU6WrgaHBkVNm73Sv7uc2A==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.1", + "destroy": "~1.0.4", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.3.1" + } + }, + "serialize-javascript": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", + "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", + "dev": true + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + } + }, + "serve-static": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.1.tgz", + "integrity": "sha512-hSMUZrsPa/I09VYFJwa627JJkNs0NrfL1Uzuup+GqHfToR2KcsXFymXSV90hoyw3M+msjFuQly+YzIH/q0MGlQ==", + "dev": true, + "requires": { + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.1" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + } + }, + "sockjs": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", + "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "dev": true, + "requires": { + "faye-websocket": "^0.10.0", + "uuid": "^3.0.1" + } + }, + "sockjs-client": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.4.tgz", + "integrity": "sha1-W6vjhrd15M8U51IJEUUmVAFsixI=", + "dev": true, + "requires": { + "debug": "^2.6.6", + "eventsource": "0.1.6", + "faye-websocket": "~0.11.0", + "inherits": "^2.0.1", + "json3": "^3.3.2", + "url-parse": "^1.1.8" + }, + "dependencies": { + "faye-websocket": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", + "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + } + } + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "dev": true, + "requires": { + "spdx-license-ids": "^1.0.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "dev": true + }, + "spdy": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", + "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", + "dev": true, + "requires": { + "debug": "^2.6.8", + "handle-thing": "^1.2.5", + "http-deceiver": "^1.2.7", + "safe-buffer": "^5.0.1", + "select-hose": "^2.0.0", + "spdy-transport": "^2.0.18" + } + }, + "spdy-transport": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.0.20.tgz", + "integrity": "sha1-c15yBUxIayNU/onnAiVgBKOazk0=", + "dev": true, + "requires": { + "debug": "^2.6.8", + "detect-node": "^2.0.3", + "hpack.js": "^2.1.6", + "obuf": "^1.1.1", + "readable-stream": "^2.2.9", + "safe-buffer": "^5.0.1", + "wbuf": "^1.7.2" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "ssri": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", + "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "style-loader": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.20.2.tgz", + "integrity": "sha512-FrLMGaOLVhS5pvoez3eJyc0ktchT1inEZziBSjBq1hHQBK3GFkF57Qd825DcrUhjaAWQk70MKrIl5bfjadR/Dg==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "schema-utils": "^0.4.3" + }, + "dependencies": { + "ajv": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.1.1.tgz", + "integrity": "sha1-l41Zf7wrfQ5aXD3esUmmgvKr+g4=", + "dev": true, + "requires": { + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ajv-keywords": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.1.0.tgz", + "integrity": "sha1-rCsnk5xUPpXSwG5/f1wnvkqlQ74=", + "dev": true + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "svgo": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz", + "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", + "dev": true, + "requires": { + "coa": "~1.0.1", + "colors": "~1.1.2", + "csso": "~2.3.1", + "js-yaml": "~3.7.0", + "mkdirp": "~0.5.1", + "sax": "~1.2.1", + "whet.extend": "~0.9.9" + } + }, + "tapable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", + "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "thunky": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-0.1.0.tgz", + "integrity": "sha1-vzAUaCTituZ7Dy16Ssi+smkIaE4=", + "dev": true + }, + "time-stamp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-2.0.0.tgz", + "integrity": "sha1-lcakRTDhW6jW9KPsuMOj+sRto1c=", + "dev": true + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.1.tgz", + "integrity": "sha1-FTWL7kosg712N3uh3ASdDxiDeq4=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "regex-not": "^1.0.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + } + } + }, + "toposort": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.6.tgz", + "integrity": "sha1-wxdI5V0hDv/AD9zcfW5o19e7nOw=", + "dev": true + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "type-is": { + "version": "1.6.15", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", + "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.15" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "dev": true, + "requires": { + "commander": "~2.13.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "uglifyjs-webpack-plugin": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.6.tgz", + "integrity": "sha512-NDP94ahjW7ZH+qzdjxjIV04n5YGnrYD2jeHgKgnpUKmdAfcXEO5DbVo21fXAm/KPMyX9k21zWFBMYm9m9R2ptg==", + "dev": true, + "requires": { + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "schema-utils": "^0.4.5", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "uglify-es": "^3.3.4", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "dependencies": { + "ajv": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", + "integrity": "sha512-pgZos1vgOHDiC7gKNbZW8eKvCnNXARv2oqrGQT7Hzbq5Azp7aZG6DJzADnkuSq7RH6qkXp4J/m68yPX/2uBHyQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "uniqs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", + "dev": true + }, + "unique-filename": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "upath": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "dev": true + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-parse": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.2.0.tgz", + "integrity": "sha512-DT1XbYAfmQP65M/mE6OALxmXzZ/z1+e5zk2TcSKe/KiYbNGZxgtttzC0mR/sjopbpOXcbniq7eIKmocJnUWlEw==", + "dev": true, + "requires": { + "querystringify": "~1.0.0", + "requires-port": "~1.0.0" + }, + "dependencies": { + "querystringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-1.0.0.tgz", + "integrity": "sha1-YoYkIRLFtxL6ZU5SZlK/ahP/Bcs=", + "dev": true + } + } + }, + "use": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", + "dev": true + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true, + "requires": { + "user-home": "^1.1.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "dev": true, + "requires": { + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.0.0" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "vendors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.1.tgz", + "integrity": "sha1-N61zyO5Bf7PVgOeFMSMH0nSEfyI=", + "dev": true + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "chokidar": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", + "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.2.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "lodash.debounce": "^4.0.8", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.5" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + } + } + } + } + }, + "wbuf": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.2.tgz", + "integrity": "sha1-1pe5nx9ZUS3ydRvkJ2nBWAtYAf4=", + "dev": true, + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, + "webpack": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.12.0.tgz", + "integrity": "sha512-EJj2FfhgtjrTbJbJaNulcVpDxi9vsQVvTahHN7xJvIv6W+k4r/E6Hxy4eyOrj+IAFWqYgaUtnpxmSGYP8MSZJw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/helper-module-context": "1.5.12", + "@webassemblyjs/wasm-edit": "1.5.12", + "@webassemblyjs/wasm-opt": "1.5.12", + "@webassemblyjs/wasm-parser": "1.5.12", + "acorn": "^5.6.2", + "acorn-dynamic-import": "^3.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^1.0.0", + "enhanced-resolve": "^4.0.0", + "eslint-scope": "^3.7.1", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^0.4.4", + "tapable": "^1.0.0", + "uglifyjs-webpack-plugin": "^1.2.4", + "watchpack": "^1.5.0", + "webpack-sources": "^1.0.1" + }, + "dependencies": { + "ajv": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.1.tgz", + "integrity": "sha512-pgZos1vgOHDiC7gKNbZW8eKvCnNXARv2oqrGQT7Hzbq5Azp7aZG6DJzADnkuSq7RH6qkXp4J/m68yPX/2uBHyQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + } + } + } + } + }, + "webpack-dev-middleware": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz", + "integrity": "sha512-FCrqPy1yy/sN6U/SaEZcHKRXGlqU0DUaEBL45jkUYoB8foVb6wCnbIJ1HKIx+qUFTW+3JpVcCJCxZ8VATL4e+A==", + "dev": true, + "requires": { + "memory-fs": "~0.4.1", + "mime": "^1.5.0", + "path-is-absolute": "^1.0.0", + "range-parser": "^1.0.3", + "time-stamp": "^2.0.0" + }, + "dependencies": { + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + } + } + }, + "webpack-dev-server": { + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.11.1.tgz", + "integrity": "sha512-ombhu5KsO/85sVshIDTyQ5HF3xjZR3N0sf5Ao6h3vFwpNyzInEzA1GV3QPVjTMLTNckp8PjfG1PFGznzBwS5lg==", + "dev": true, + "requires": { + "ansi-html": "0.0.7", + "array-includes": "^3.0.3", + "bonjour": "^3.5.0", + "chokidar": "^2.0.0", + "compression": "^1.5.2", + "connect-history-api-fallback": "^1.3.0", + "debug": "^3.1.0", + "del": "^3.0.0", + "express": "^4.16.2", + "html-entities": "^1.2.0", + "http-proxy-middleware": "~0.17.4", + "import-local": "^1.0.0", + "internal-ip": "1.2.0", + "ip": "^1.1.5", + "killable": "^1.0.0", + "loglevel": "^1.4.1", + "opn": "^5.1.0", + "portfinder": "^1.0.9", + "selfsigned": "^1.9.1", + "serve-index": "^1.7.2", + "sockjs": "0.3.19", + "sockjs-client": "1.1.4", + "spdy": "^3.4.1", + "strip-ansi": "^3.0.0", + "supports-color": "^5.1.0", + "webpack-dev-middleware": "1.12.2", + "yargs": "6.6.0" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.0.tgz", + "integrity": "sha512-P4O8UQRdGiMLWSizsApmXVQDBS6KCt7dSexgLKBmH5Hr1CZq7vsnscFh8oR1sP1ab1Zj0uCHCEzZeV6SfUf3rA==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + } + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "chokidar": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.0.tgz", + "integrity": "sha512-OgXCNv2U6TnG04D3tth0gsvdbV4zdbxFG3sYUqcoQMoEFVd1j1pZR6TZ8iknC45o9IJ6PeQI/J6wT/+cHcniAw==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.0.0", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "micromatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.5.tgz", + "integrity": "sha512-ykttrLPQrz1PUJcXjwsTUjGoPJ64StIGNE2lGVD1c9CuguJ+L7/navsE8IcDNndOoCMvYV0qc/exfVbMHkUhvA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.0", + "define-property": "^1.0.0", + "extend-shallow": "^2.0.1", + "extglob": "^2.0.2", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.0", + "nanomatch": "^1.2.5", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "supports-color": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", + "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "dev": true, + "requires": { + "has-flag": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "yargs": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", + "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^4.2.0" + } + }, + "yargs-parser": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", + "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + } + } + } + }, + "webpack-sources": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "websocket-driver": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", + "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", + "dev": true, + "requires": { + "http-parser-js": ">=0.4.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", + "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "dev": true + }, + "whet.extend": { + "version": "0.9.9", + "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz", + "integrity": "sha1-+HfVv2SMl+WqVC+twW1qJZucEaE=", + "dev": true + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "dev": true, + "requires": { + "errno": "~0.1.7" + }, + "dependencies": { + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + } + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xml-char-classes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz", + "integrity": "sha1-ZGV4SKIP/F31g6Qq2KJ3tFErvE0=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + } + } +} diff --git a/packages/xgplayer-flv/package.json b/packages/xgplayer-flv/package.json new file mode 100644 index 00000000..607a43fd --- /dev/null +++ b/packages/xgplayer-flv/package.json @@ -0,0 +1,42 @@ +{ + "name": "xgplayer-flv", + "version": "1.0.2", + "description": "flv demuxer for xgplayer", + "main": "./dist/index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "prepare": "npm run build", + "build": "webpack --progress --display-chunks -p", + "watch": "webpack --progress --display-chunks -p --watch" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/bytedance/xgplayer.git" + }, + "keywords": [], + "author": "leo", + "license": "MIT", + "devDependencies": { + "babel": "^6.23.0", + "babel-env": "^2.4.1", + "babel-eslint": "^8.2.2", + "babel-loader": "^7.1.2", + "babel-plugin-transform-react-constant-elements": "^6.23.0", + "babel-preset-es2015": "^6.24.1", + "clean-webpack-plugin": "^0.1.17", + "css-loader": "^0.28.10", + "extract-text-webpack-plugin": "^3.0.2", + "html-loader": "^0.5.5", + "html-webpack-plugin": "^2.30.1", + "style-loader": "^0.20.2", + "webpack": "^4.12.0", + "webpack-dev-server": "^2.11.1" + }, + "peerDependency": { + "xgplayer": "^0.1.0" + }, + "dependencies": { + "concat-typed-array": "^1.0.2", + "event-emitter": "^0.3.5" + } +} diff --git a/packages/xgplayer-flv/postcss.config.js b/packages/xgplayer-flv/postcss.config.js new file mode 100644 index 00000000..0665a0f3 --- /dev/null +++ b/packages/xgplayer-flv/postcss.config.js @@ -0,0 +1,7 @@ +module.exports = { + plugins: { + 'postcss-cssnext': { + browserslist: ['cover 99.5%'], + }, + }, +}; \ No newline at end of file diff --git a/packages/xgplayer-flv/src/constants/config.js b/packages/xgplayer-flv/src/constants/config.js new file mode 100644 index 00000000..aea68d76 --- /dev/null +++ b/packages/xgplayer-flv/src/constants/config.js @@ -0,0 +1,9 @@ +const defaultConf = { + preloadTime: 60, + minCachedTime: 5, + autoCleanSourceBuffer: true, + autoCleanMaxBackTime: 60, + isLive: false +} + +export default Object.assign({}, defaultConf) diff --git a/packages/xgplayer-flv/src/constants/metaFields.js b/packages/xgplayer-flv/src/constants/metaFields.js new file mode 100644 index 00000000..ee733ba4 --- /dev/null +++ b/packages/xgplayer-flv/src/constants/metaFields.js @@ -0,0 +1,85 @@ +const fields = [{ + name: 'duration', + type: Boolean, + parser (target, origin) { + target.mediaInfo.duration = origin.duration + } +}, { + name: 'hasAudio', + type: Boolean, + parser (target, origin) { + target.mediaInfo.hasAudio = origin.hasAudio + } +}, { + name: 'hasVideo', + type: Boolean, + parser (target, origin) { + target.mediaInfo.hasVideo = origin.hasVideo + } +}, { + name: 'audiodatarate', + type: Number, + parser (target, origin) { + target.mediaInfo.audioDataRate = origin.audiodatarate + } +}, { + name: 'videodatarate', + type: Number, + parser (target, origin) { + target.mediaInfo.videoDataRate = origin.videodatarate + } +}, { + name: 'width', + type: Number, + parser (target, origin) { + target.mediaInfo.width = origin.width + } +}, { + name: 'height', + type: Number, + parser (target, origin) { + target.mediaInfo.height = origin.height + } +}, { + name: 'duration', + type: Number, + parser (target, origin) { + if (!target.state.duration) { + const duration = Math.floor(origin.duration * target.state.timeScale) + target.state.duration = target.mediaInfo.duration = duration + } + }, + onTypeErr (target) { + target.mediaInfo.duration = 0 + } +}, { + name: 'framerate', + type: Number, + parser (target, origin) { + const fpsNum = Math.floor(origin.framerate * 1000) + if (fpsNum > 0) { + const fps = fpsNum / 1000 + const { referFrameRate, mediaInfo } = target + referFrameRate.fixed = true + referFrameRate.fps = fps + referFrameRate.fpsNum = fpsNum + referFrameRate.fpsDen = 1000 + mediaInfo.fps = fps + } + } +}, { + name: 'keyframes', + type: Object, + parser (target, origin) { + const { keyframes } = origin + target.mediaInfo.hasKeyframes = !!keyframes + if (keyframes) { + target.mediaInfo.keyframes = this._parseKeyframes(keyframes) + } + origin.keyframes = null + }, + onTypeErr (target) { + target.mediaInfo.hasKeyframes = false + } +}] +export default fields diff --git a/packages/xgplayer-flv/src/constants/test.js b/packages/xgplayer-flv/src/constants/test.js new file mode 100644 index 00000000..bc4bc788 --- /dev/null +++ b/packages/xgplayer-flv/src/constants/test.js @@ -0,0 +1,2 @@ +// export const videoUrl = 'http://yunxianchang.live.ujne7.com/vod-system-bj/TLaf2cc9d469939803949187b46da16c45.flv'; +export const videoUrl = 'http://127.0.0.1:8000/TLaf2cc9d469939803949187b46da16c45.flv' diff --git a/packages/xgplayer-flv/src/constants/types.js b/packages/xgplayer-flv/src/constants/types.js new file mode 100644 index 00000000..283639d3 --- /dev/null +++ b/packages/xgplayer-flv/src/constants/types.js @@ -0,0 +1,73 @@ +export const MetaTypes = { + NUMBER: 0, + BOOLEAN: 1, + STRING: 2, + OBJECT: 3, + MIX_ARRAY: 8, + OBJECT_END: 9, + STRICT_ARRAY: 10, + DATE: 11, + LONE_STRING: 12 +} + +export const EventTypes = { + DATA_READY: 'data_ready', + META_DATA_READY: 'meta_data_ready', + TRACK_META_READY: 'track_meta_ready', + MEDIA_INFO_READY: 'media_info_ready', + META_END_POSITION: 'meta_end_position', + ERROR: 'error' +} + +export const soundRateTypes = [ + 5500, + 11000, + 22000, + 4400 +] + +export const AudioObjectTypes = { + 0: 'Null', + 1: 'AAC Main', + 2: 'AAC LC', + 3: 'AAC SSR(Scalable Sample Rate)', + 4: 'AAC LTP(Long Term Prediction)', + 5: 'HE-AAC / SBR(Spectral Band Replication)', + 6: 'AAC Scalable' +} + +export const samplingFrequencyTypes = [ + 96000, 88200, + 64000, 48000, + 44100, 32000, + 24000, 22050, + 16000, 12000, + 11025, 8000 +] + +export const browserTypes = { + IE: 'ie', + FIRE_FOX: 'firefox', + CHROME: 'chrome', + OPERA: 'opera', + SAFARI: 'safari' +} + +export const mp3Versions = { + V25: 0, + RESERVED: 1, + V20: 2, + V10: 3 +} + +export const audioSampleRate = { + V10: [44100, 48000, 32000, 0], + V20: [22050, 24000, 16000, 0], + V25: [11025, 12000, 8000, 0] +} + +export const mp3BitRate = { + Layer1: [0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1], + Layer2: [0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, -1], + Layer3: [0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1] +} diff --git a/packages/xgplayer-flv/src/index.js b/packages/xgplayer-flv/src/index.js new file mode 100644 index 00000000..59d64f25 --- /dev/null +++ b/packages/xgplayer-flv/src/index.js @@ -0,0 +1,149 @@ +import MainParser from './parse/MainParser'; +import Player from 'xgplayer'; +import MSE from './parse/MSE'; +import VodTask from './utils/VodTask'; +import defaultConfig from './constants/config'; + +const isEnded = function (player, flv) { + if (flv.videoDuration - player.currentTime * flv.videoTimeScale < 2 * flv.videoTimeScale) { + const range = player.getBufferedRange(); + if (player.currentTime - range[1] < 0.1) { + player.mse.endOfStream(); + } + } +}; +let tempCurrentTime = 0; +const flvPlayer = function () { + let player = this, + flv, + mse, + seekDataReceived, + requestSending = false, + _config = Object.assign(defaultConfig, player.config), + sniffer = Player.sniffer; + const { preloadTime, minCachedTime, isLive } = _config; + + function progressChecker() { + const range = player.getBufferedRange(); + if (flv.videoDuration - range[1] * flv.videoTimeScale < 0.1 * flv.videoTimeScale) { return; } + if (range[1] - player.currentTime < minCachedTime && !requestSending) { + requestSending = true; + flv.loadSegments(true, player.currentTime, preloadTime).then(() => { + requestSending = false; + }); + } + } + + const _start = player.start; + player.start = function (url = _config.url) { + if (!url) { return; } + flv = new MainParser(_config, player); + + flv.on('ready', (ftyp_moov) => { + mse = player.mse = flv.mse = new MSE(); + _start.call(player, mse.url); + + mse.on('sourceopen', () => { + flv.isSourceOpen = true; + mse.appendBuffer(ftyp_moov.buffer); + mse.on('updateend', () => { + const { pendingFragments, hasPendingFragments } = flv; + + seekDataReceived = true; + if (hasPendingFragments) { + const fragment = pendingFragments.shift(); + if (!mse.appendBuffer(fragment.data)) { + pendingFragments.unshift(fragment); + } else { + player.emit('cacheupdate', player); + } + } + }); + }); + + mse.on('error', (e) => { + player.emit('error', e); + }); + }); + + flv.handleError = function (e) { + player.emit('error', e); + }; + }; + + player.on('pause', () => { + !isLive && VodTask.clear(); + }); + // + // player.on('resume', function () { + // + // }); + // + // player.on('waiting', function () { + // console.log('waiting'); + // }); + + + if (!isLive) { + player.on('seeking', () => { + VodTask.clear(); + const { buffered, currentTime } = player; + let isBuffered = false; + if (buffered.length) { + for (let i = 0, len = buffered.length; i < len; i++) { + if (currentTime > buffered.start(i) && currentTime < buffered.end(i)) { + isBuffered = true; + break; + } + } + } + if (isBuffered) { + return; + } + if (!flv.isSeekable) { + player.currentTime = tempCurrentTime; + return; + } + flv.seek(player.currentTime, preloadTime, player); + seekDataReceived = false; + }); + player.on('timeupdate', () => { + tempCurrentTime = player.currentTime; + if (seekDataReceived !== false) { + progressChecker(); + } + isEnded(player, flv); + }); + player.beforeReplay = function () { + VodTask.clear(); + const mse = flv.mse = new MSE(); + flv.replay(); + mse.on('sourceopen', () => { + flv.isSourceOpen = true; + mse.appendBuffer(flv.ftyp_moof.buffer); + mse.on('updateend', () => { + const { pendingFragments, hasPendingFragments } = flv; + seekDataReceived = true; + if (hasPendingFragments) { + const fragment = pendingFragments.shift(); + if (!mse.appendBuffer(fragment.data)) { + pendingFragments.unshift(fragment); + } else { + player.emit('cacheupdate', player); + } + } + }); + }); + + mse.on('error', (e) => { + player.emit('error', e); + }); + player.emit('cacheupdate', player); + player.src = mse.url; + player.mse = mse; + return true; + }; + } +}; + +Player.install('flvplayer', flvPlayer); diff --git a/packages/xgplayer-flv/src/models/MediaInfo.js b/packages/xgplayer-flv/src/models/MediaInfo.js new file mode 100644 index 00000000..3bf2c3d8 --- /dev/null +++ b/packages/xgplayer-flv/src/models/MediaInfo.js @@ -0,0 +1,75 @@ +export default class MediaInfo { + constructor (data) { + const _default = { + mimeType: null, + codec: '', + duration: null, + hasAudio: false, + hasVideo: false, + audioCodec: null, + videoCodec: null, + + videoDataRate: null, + audioDataRate: null, + audioSampleRate: null, + audioChannelCount: null, + audioConfig: null, + + width: null, + height: null, + fps: null, + profile: null, + level: null, + chromaFormat: null, + + pixelRatio: [], + + _metaData: null, + segments: [], + hasKeyframes: null, + keyframes: [], + }; + + const initData = Object.assign({}, _default, data); + Object.entries(initData).forEach(([k, v])=> { + this[k] = v; + }); + + } + get isComplete () { + const { mimeType, duration, hasKeyframes } = this; + return mimeType !== null + && duration !== null + && hasKeyframes !== null + && this.isVideoInfoFilled + && this.isAudioInfoFilled; + } + get isAudioInfoFilled () { + const { hasAudio, + audioCodec, + audioSampleRate, + audioChannelCount, + } = this; + + return !!(!hasAudio || (hasAudio && audioCodec && audioSampleRate && audioChannelCount)); + + } + + get isVideoInfoFilled () { + const notNullFields = [ + 'videoCodec', + 'width', + 'height', + 'fps', + 'profile', + 'level', + 'chromaFormat', + ]; + for (let i = 0, len = notNullFields.length; i < len; i++) { + if (this[notNullFields[i]] === null) { return false; } + } + + return this.hasVideo; + } + +} \ No newline at end of file diff --git a/packages/xgplayer-flv/src/models/MediaSample.js b/packages/xgplayer-flv/src/models/MediaSample.js new file mode 100644 index 00000000..c5194571 --- /dev/null +++ b/packages/xgplayer-flv/src/models/MediaSample.js @@ -0,0 +1,28 @@ +export default class MediaSample { + constructor (info) { + let _default = MediaSample.getDefaultInf(); + + if (!info || Object.prototype.toString.call(info) !== '[object Object]') { + return _default; + } + let sample = Object.assign({}, _default, info); + + Object.entries(sample).forEach(([k, v]) => { + this[k] = v; + }); + + } + + static getDefaultInf () { + return { + dts: null, + pts: null, + duration: null, + position: null, + isRAP: false, // is Random access point + originDts: null, + }; + } + +} + diff --git a/packages/xgplayer-flv/src/models/MediaSegment.js b/packages/xgplayer-flv/src/models/MediaSegment.js new file mode 100644 index 00000000..183687cf --- /dev/null +++ b/packages/xgplayer-flv/src/models/MediaSegment.js @@ -0,0 +1,18 @@ +export default class MediaSegment { + constructor () { + this.startDts = -1; + this.endDts = -1; + this.startPts = -1; + this.endPts = -1; + this.originStartDts = -1; + this.originEndDts = -1; + this.randomAccessPoints = []; + this.firstSample = null; + this.lastSample = null; + } + + addRAP (sample) { + sample.isRAP = true; + this.randomAccessPoints.push(sample); + } +} \ No newline at end of file diff --git a/packages/xgplayer-flv/src/models/MediaSegmentList.js b/packages/xgplayer-flv/src/models/MediaSegmentList.js new file mode 100644 index 00000000..5a33495b --- /dev/null +++ b/packages/xgplayer-flv/src/models/MediaSegmentList.js @@ -0,0 +1,115 @@ +export default class MediaSegmentList { + + constructor (type) { + this._type = type; + this._list = []; + this._lastAppendLocation = -1; // cached last insert location + } + + get type () { + return this._type; + } + + get length () { + return this._list.length; + } + + isEmpty () { + return this._list.length === 0; + } + + clear () { + this._list = []; + this._lastAppendLocation = -1; + } + + _searchNearestSegmentBefore (beginDts) { + let list = this._list; + if (list.length === 0) { + return -2; + } + let last = list.length - 1; + let mid = 0; + let lbound = 0; + let ubound = last; + + let idx = 0; + + if (beginDts < list[0].originDts) { + idx = -1; + return idx; + } + + while (lbound <= ubound) { + mid = lbound + Math.floor((ubound - lbound) / 2); + if (mid === last || (beginDts > list[mid].lastSample.originDts + && (beginDts < list[mid + 1].originDts))) { + idx = mid; + break; + } else if (list[mid].originDts < beginDts) { + lbound = mid + 1; + } else { + ubound = mid - 1; + } + } + return idx; + } + + _searchNearestSegmentAfter (beginDts) { + return this._searchNearestSegmentBefore(beginDts) + 1; + } + + append (segment) { + let list = this._list; + let lastAppendIdx = this._lastAppendLocation; + let insertIdx = 0; + + if (lastAppendIdx !== -1 && lastAppendIdx < list.length + && segment.originStartDts >= list[lastAppendIdx].lastSample.originDts + && ((lastAppendIdx === list.length - 1) + || (lastAppendIdx < list.length - 1 + && segment.originStartDts < list[lastAppendIdx + 1].originStartDts))) { + insertIdx = lastAppendIdx + 1; // use cached location idx + } else { + if (list.length > 0) { + insertIdx = this._searchNearestSegmentBefore(segment.originStartDts) + 1; + } + } + + this._lastAppendLocation = insertIdx; + this._list.splice(insertIdx, 0, segment); + } + + getLastSegmentBefore (beginDts) { + let idx = this._searchNearestSegmentBefore(beginDts); + if (idx >= 0) { + return this._list[idx]; + } else { // -1 + return null; + } + } + + getLastSampleBefore (beginDts) { + let segment = this.getLastSegmentBefore(beginDts); + if (segment !== null) { + return segment.lastSample; + } else { + return null; + } + } + + getLastRAPBefore (beginDts) { + let segmentIdx = this._searchNearestSegmentBefore(beginDts); + let randomAccessPoints = this._list[segmentIdx].randomAccessPoints; + while (randomAccessPoints.length === 0 && segmentIdx > 0) { + segmentIdx--; + randomAccessPoints = this._list[segmentIdx].randomAccessPoints; + } + if (randomAccessPoints.length > 0) { + return randomAccessPoints[randomAccessPoints.length - 1]; + } else { + return null; + } + } + +} \ No newline at end of file diff --git a/packages/xgplayer-flv/src/models/Tag.js b/packages/xgplayer-flv/src/models/Tag.js new file mode 100644 index 00000000..61074c63 --- /dev/null +++ b/packages/xgplayer-flv/src/models/Tag.js @@ -0,0 +1,25 @@ +export default class FlvTag { + constructor () { + this.tagType = -1; + this.bodySize = -1; + this.tagSize = -1; + this.position = -1; + this.Timestamp = -1; + this.StreamID = -1; + this.body = -1; + this.time = -1; + this.arr = []; + } + + getTime () { + this.arr = []; + for (let i = 0; i < this.Timestamp.length; i++) { + this.arr.push((this.Timestamp[i].toString(16).length === 1 ? '0' + this.Timestamp[i].toString(16) : this.Timestamp[i].toString(16))); + } + this.arr.pop(); + const time = this.arr.join(''); + this.time = parseInt(time, 16); + return parseInt(time, 16); + } + +} \ No newline at end of file diff --git a/packages/xgplayer-flv/src/parse/FlvParser.js b/packages/xgplayer-flv/src/parse/FlvParser.js new file mode 100644 index 00000000..f429233d --- /dev/null +++ b/packages/xgplayer-flv/src/parse/FlvParser.js @@ -0,0 +1,128 @@ +import Demuxer from './demux/Demuxer'; +import Buffer from '../write/Buffer'; +import Tag from '../models/Tag'; +export default class FlvParser extends Demuxer { + constructor (store) { + super(store); + this.CLASS_NAME = this.constructor.name; + this.temp_u8a = null; + this.dataLen = 0; + this.stop = false; + this.index = 0; // record the position in single round + this.offset = 0; + this.filePosition = 0; // record current file position + this.firstFlag = true; + } + seek () { + this.offset = 0; + } + + setFlv (flv_u8a) { + this.stop = false; + this.index = 0; + this.offset = 0; + const temp_u8a = this.temp_u8a = flv_u8a; + this.dataLen = this.temp_u8a.length; + + if (!this.firstFlag) { + return this.parseData(); + } else if (temp_u8a.length > 13 && FlvParser.isFlvHead(temp_u8a)) { + this.parseHead(); + this.readData(9); // 跳过头部 + this.readData(4); // 跳过下一个记录头部size的 int32 + this.parseData(); + this.firstFlag = false; + this.filePosition += this.offset; + return this.offset; + } else { + return this.offset; + } + + } + + parseData () { + const { length: u8a_length } = this.temp_u8a; + while (this.index < u8a_length && !this.stop) { + this.offset = this.index; + const tag = new Tag(); + if (this.unreadLength >= 11) { + // 可以读出头部信息 + tag.position = this.filePosition + this.offset; + tag.tagType = this.readData(1)[0]; + tag.bodySize = this.readData(3); + tag.Timestamp = this.readData(4); + tag.StramId = this.readData(3); + } else { + this.stop = true; + continue; + } + if (this.unreadLength >= this.getBodySize(tag.bodySize) + 4) { + tag.body = this.readData(this.getBodySize(tag.bodySize)); + tag.tagSize = this.readData(4); + const { tags, _hasVideo, _hasAudio } = this._store.state; + switch (tag.tagType) { + case 9: + _hasVideo && tags.push(tag); + break; + case 8: + _hasAudio && tags.push(tag); + break; + case 18: + tags.push(tag); + break; + } + } else { + this.stop = true; + continue; + } + + this.offset = this.index; + } + this.filePosition += this.offset; + this.temp_u8a = null; + return this.offset; + } + + /** + * @param sizeArr + * @return + */ + getBodySize (sizeArr) { + return Buffer.readAsInt(sizeArr); + } + + parseHead () { + const { temp_u8a, _store } = this; + const result = { + match: false, + }; + if (temp_u8a[3] !== 1) { + return result; + } + const flag = temp_u8a[4]; + const hasAudio = ((flag & 4) >>> 2) !== 0; + const hasVideo = (flag & 1) !== 0; + + if (!hasAudio && !hasVideo) { + return result; + } + + _store.hasAudio = hasAudio; + _store.hasVideo = hasVideo; + } + + readData (length) { + const _index = this.index; + this.index += length; + return this.temp_u8a.slice(_index, _index + length); + } + + get unreadLength () { + return this.dataLen - this.index; + } + + static isFlvHead(temp_u8a) { + let firstThreeChars = [temp_u8a[0], temp_u8a[1], temp_u8a[2]]; + return String.fromCharCode.apply(String, firstThreeChars) === 'FLV'; + } +} diff --git a/packages/xgplayer-flv/src/parse/LevelController.js b/packages/xgplayer-flv/src/parse/LevelController.js new file mode 100644 index 00000000..140bcaab --- /dev/null +++ b/packages/xgplayer-flv/src/parse/LevelController.js @@ -0,0 +1,7 @@ +import EventEmitter from '../utils/EventEmitter'; + +export default class LevelController { + constructor (url) { + // TODO + } +} \ No newline at end of file diff --git a/packages/xgplayer-flv/src/parse/MSE.js b/packages/xgplayer-flv/src/parse/MSE.js new file mode 100644 index 00000000..5dfc6114 --- /dev/null +++ b/packages/xgplayer-flv/src/parse/MSE.js @@ -0,0 +1,94 @@ +import EventEmitter from 'event-emitter'; + +class MSE { + constructor (codecs = 'video/mp4; codecs="avc1.64001E, mp4a.40.5"') { + let self = this; + EventEmitter(this); + this.codecs = codecs; + this.mediaSource = new window.MediaSource(); + this.url = window.URL.createObjectURL(this.mediaSource); + + this.mediaSource.addEventListener('sourceopen', function () { + self.sourceBuffer = self.mediaSource.addSourceBuffer(self.codecs); + self.sourceBuffer.addEventListener('error', function (e) { + self.emit('error', { + type: 'sourceBuffer', + error: e, + }); + }); + self.sourceBuffer.addEventListener('updateend', function (e) { + self.emit('updateend'); + }); + self.emit('sourceopen'); + + self.sourceBuffer.addEventListener('error', function (e) { + self.emit('error', { + type: 'mediaSource', + error: e, + }); + }); + }); + + this.mediaSource.addEventListener('sourceclose', function () { + self.emit('sourceclose'); + }); + } + + get state () { + return this.mediaSource.readyState; + } + + get duration () { + return this.mediaSource.duration; + } + + set duration (value) { + this.mediaSource.duration = value; + } + + appendBuffer (buffer) { + let sourceBuffer = this.sourceBuffer; + if (sourceBuffer.updating === false && this.state === 'open') { + + sourceBuffer.appendBuffer(buffer); + return true; + } else { + if (this.state === 'closed') { + this.emit('error', { + type: 'sourceBuffer', + error: new Error('mediaSource is not attached to video or mediaSource is closed'), + }); + } else if (this.state === 'ended') { + this.emit('error', { + type: 'sourceBuffer', + error: new Error('mediaSource is closed'), + }); + } else { + if (sourceBuffer.updating === true) { + this.emit('warn', { + type: 'sourceBuffer', + error: new Error('mediaSource is busy'), + }); + } + return false; + } + } + } + + removeBuffer (start, end) { + this.sourceBuffer.remove(start, end); + } + + endOfStream () { + if (this.mediaSource.readyState === 'open') { + this.mediaSource.endOfStream(); + } + } + + static isSupported (codecs) { + return window.MediaSource && window.MediaSource.isTypeSupported(codecs); + } +} + + +export default MSE; diff --git a/packages/xgplayer-flv/src/parse/MainParser.js b/packages/xgplayer-flv/src/parse/MainParser.js new file mode 100644 index 00000000..3a2c7f44 --- /dev/null +++ b/packages/xgplayer-flv/src/parse/MainParser.js @@ -0,0 +1,326 @@ +import Mp4Remuxer from './remux/Mp4remux'; +import Demuxer from './demux/Demuxer'; +import flvParser from './FlvParser'; +import tagDemuxer from './demux/TagDemuxer'; +import Store from '../utils/Store'; +import VodTask from '../utils/VodTask'; +import LiveTask from '../utils/LiveTask'; +import { EventTypes } from '../constants/types'; +import Buffer from '../write/Buffer'; + +export default class MainParser extends Demuxer { + constructor (config, player) { + super(); + this.CLASS_NAME = this.constructor.name; + this._config = config; + this._player = player; + this._tempBaseTime = 0; + this.firstFlag = true; + this._store = new Store(); + this._store.isLive = config.isLive || false; + this.flvParser = new flvParser(this._store); + this.tagDemuxer = new tagDemuxer(this._store); + this._mp4remuxer = new Mp4Remuxer(); + this._mp4remuxer.isLive = config.isLive || false; + this.buffer = new Buffer(); + this.bufferKeyframes = new Set(); + this.META_CHUNK_SIZE = Math.pow(10, 5); + this.CHUNK_SIZE = Math.pow(10, 6); + this.ftyp_moof = null; + this.isSourceOpen = false; + this._isNewSegmentsArrival = false; + this.range = { + start: -1, + end: -1, + }; + this._isMediaInfoInited = false; + this._pendingFragments = []; + this._pendingRemoveRange = []; + + if (!config.isLive) { + this.initMeta(); + } else { + this.initLiveStream(); + } + this.initEventBind(); + } + + + initLiveStream () { + new LiveTask(this._config.url, {}).run(this.loadLiveData.bind(this)); + } + + loadLiveData (buffer) { + if (buffer === undefined) { + this.emit('live-end'); + } + this.buffer.write(new Uint8Array(buffer)); + let offset = this.setFlv(this.buffer.buffer); + this.buffer.buffer = this.buffer.buffer.slice(offset); + } + + initMeta () { + const self = this; + const Resolver = { + resolveChunk (buffer) { + self.buffer.write(new Uint8Array(buffer)); + let offset = self.setFlv(self.buffer.buffer); + self.buffer.buffer = self.buffer.buffer.slice(offset); + if (!self.isMediaInfoReady) { + self.initMeta(); + } + }, + }; + this.range = { + start: this.range.end + 1, + end: this.range.end + this.META_CHUNK_SIZE, + }; + this.loadMetaData(this.range.start, this.range.end).then(Resolver.resolveChunk); + + } + + loadSegments (changeRange, currentTime = 0, preloadTime) { + this._isNewSegmentsArrival = false; + const resolveChunk = (buffer) => { + this.buffer.write(new Uint8Array(buffer)); + let offset = this.setFlv(this.buffer.buffer); + + this.buffer.buffer = this.buffer.buffer.slice(offset); + if (!this._isNewSegmentsArrival) { + this.loadSegments(true); + } + }; + if (changeRange) { + let _range = this.range; + + if (this.getNextRangeEnd(currentTime, preloadTime) <= _range.end) { + return Promise.resolve(); + } + + this.range = { + start: this.range.end + 1, + end: currentTime === undefined ? this.range.end + this.CHUNK_SIZE : this.getNextRangeEnd(currentTime, preloadTime), + }; + + if (this.range.start >= this.range.end || !this.range.end) { + this.range = _range; + return Promise.resolve(); + } + } + return this._loadSegmentsData(this.range.start, this.range.end).then(resolveChunk); + + } + + getNextRangeEnd (start, preloadTime) { + + const { keyframes: { times, filePositions }, videoTimeScale } = this._store; + if (!times || !filePositions) { return this.range.end + this.CHUNK_SIZE; } + start *= videoTimeScale; + let expectEnd = start + (preloadTime * videoTimeScale); + if (expectEnd > times[times.length - 1]) { return times[times.length - 1]; } + let left = 0, right = times.length, index; + while (left <= right) { + let mid = Math.floor((right + left) / 2); + if (times[mid] <= expectEnd && expectEnd <= times[mid + 1]) { + index = mid; + break; + } else if (expectEnd < times[mid]) { + right = mid - 1; + } else { + left = mid + 1; + } + } + + return index ? filePositions[index] : ''; + } + + _loadSegmentsData (start = 0, end = start + this.CHUNK_SIZE) { + return new VodTask(this._config.url, [start, end]).promise; + } + + loadMetaData (start = 0, end = start + this.META_CHUNK_SIZE) { + return new VodTask(this._config.url, [start, end]).promise; + } + setFlvFirst (arrayBuff, baseTime) { + + const offset = this.flvParser.setFlv(new Uint8Array(arrayBuff)); + const { tags } = this._store.state; + + if (tags.length) { + if (tags[0].tagType !== 18) { + throw new Error('flv file without metadata tag'); + } + + if (this._tempBaseTime !== 0 && this._tempBaseTime === tags[0].getTime()) { + this._store.state._timestampBase = 0; + } + + this.tagDemuxer.resolveTags(tags); + + } + + + this.firstFlag = false; + return offset; + } + + setFlvUsually (arrayBuff, baseTime) { + const offset = this.flvParser.setFlv(new Uint8Array(arrayBuff)); + const { tags } = this._store.state; + if (tags.length) { + this.tagDemuxer.resolveTags(tags); + } + return offset; + } + + handleDataReady (audioTrack, videoTrack) { + this._mp4remuxer.remux(audioTrack, videoTrack); + } + + handleMetaDataReady (type, meta) { + this._mp4remuxer.onMetaDataReady(type, meta); + } + + handleError (e) { + this.error(e); + } + + handleMediaInfoReady (mediaInfo) { + if (this._isMediaInfoInited) { return; } + + const ftyp_moof = this._mp4remuxer.onMediaInfoReady(mediaInfo); + if (!this.ftyp_moof) { + this.ftyp_moof = ftyp_moof; + this.emit('ready', ftyp_moof); + } + this._isMediaInfoInited = true; + } + initEventBind () { + const prefix = 'demuxer_'; + const { + handleError, + handleDataReady, + handleMetaDataReady, + handleMediaInfoReady, + } = this; + + this.on('mediaFragment', (newFrag) => { + this._isNewSegmentsArrival = true; + this._pendingFragments.push(newFrag); + const { randomAccessPoints } = newFrag.fragment; + if (randomAccessPoints && randomAccessPoints.length) { + randomAccessPoints.forEach(rap => { + this.bufferKeyframes.add(rap.dts); + }); + } + if (!this.isSourceOpen) { return; } + if (this._pendingFragments.length) { + + const fragment = this._pendingFragments.shift(); + if (!this.mse.appendBuffer(fragment.data)) { + this._pendingFragments.unshift(fragment); + + } else { + this._player.emit('cacheupdate', this._player); + } + } + }); + this.on(EventTypes.ERROR, handleError.bind(this)); + this.on(`${prefix}data_ready`, handleDataReady.bind(this)); + this.on(`${prefix}meta_data_ready`, handleMetaDataReady.bind(this)); + this.on(`${prefix}media_info_ready`, handleMediaInfoReady.bind(this)); + + } + replay () { + this.range = { + start: this._store.metaEndPosition, + end: this.getNextRangeEnd(0, this._config.preloadTime), + }; + // this.firstFlag = true; + this._mp4remuxer.seek(); + this.flvParser.seek(); + this.clearBuffer(); + this.loadSegments(false); + } + clearBuffer () { + this._pendingFragments = []; + this._pendingRemoveRange = []; + } + + seek (target) { + const { keyframes = {}, videoTimeScale } = this._store; + let seekStart = target * videoTimeScale, startFilePos, endFilePos; + const length = Math.min(keyframes.filePositions.length, keyframes.times.length); + let { preloadTime } = this._config; + + function getEndFilePos (time, idx) { + if (idx === keyframes.times.length) { + endFilePos = idx; + return false; + } + if (time <= preloadTime && preloadTime <= keyframes.times[idx + 1]) { + endFilePos = idx; + return false; + // 需要处理EOF的情况 + } + return true; + } + let lo = 0, hi = length - 2; + while (lo < hi) { + let mid = Math.floor((lo + hi) / 2); + let currentTime = keyframes.times[mid], nextTime = keyframes.times[mid + 1] ? keyframes.times[mid + 1] : Number.MAX_SAFE_INTEGER; + if (currentTime <= seekStart && seekStart <= nextTime) { + startFilePos = mid; + preloadTime = preloadTime * videoTimeScale + seekStart; + keyframes.times.every(getEndFilePos); + break; + } else if (seekStart < currentTime) { + hi = mid - 1; + } else { + lo = mid + 1; + } + } + this.buffer = new Buffer(); + this._pendingFragments = []; + this._mp4remuxer.seek(); + this.flvParser.seek(); + this.range = { + start: keyframes.filePositions[startFilePos], + end: keyframes.filePositions[endFilePos] || '', + }; + this.loadSegments(false); + } + get setFlv () { + return this.firstFlag ? this.setFlvFirst : this.setFlvUsually; + } + + get isMediaInfoReady () { + return this._store.mediaInfo.isComplete; + } + + get videoDuration () { + return this._store.mediaInfo.duration; + } + get hasPendingFragments () { + return !!this._pendingFragments.length; + } + + get pendingFragments () { + return this._pendingFragments; + } + + get videoTimeScale () { + return this._store.videoTimeScale; + } + get hasPendingRemoveRanges () { + return this._pendingRemoveRange.length; + } + + get pendingRemoveRanges () { + return this._pendingRemoveRange; + } + + get isSeekable () { + return this._store.isSeekable; + } +} diff --git a/packages/xgplayer-flv/src/parse/SPSParser.js b/packages/xgplayer-flv/src/parse/SPSParser.js new file mode 100644 index 00000000..dc6f155e --- /dev/null +++ b/packages/xgplayer-flv/src/parse/SPSParser.js @@ -0,0 +1,75 @@ +import ExpGolomb from '../utils/ExpGolomb'; +export default class SPSParser { + static getProfileStr (profileIdc) { + switch (profileIdc) { + case 66: + return 'Baseline'; + case 77: + return 'Main'; + case 88: + return 'Extended'; + case 100: + return 'High'; + case 110: + return 'High10'; + case 122: + return 'High422'; + case 244: + return 'High444'; + default: + return 'Unknown'; + } + } + + static getLevelStr (levelIdc) { + return (levelIdc / 10).toFixed(1); + } + + static getChromaFormatStr (chroma) { + switch (chroma) { + case 420: + return '4:2:0'; + case 422: + return '4:2:2'; + case 444: + return '4:4:4'; + default: + return 'Unknown'; + } + } + + /** + * read SPS + * @param originArr + */ + static parseSPS (originArr) { + + let rbsp = SPSParser._ebsp2rbsp(originArr); + + const stream = new ExpGolomb(rbsp); + const spsConfig = stream.readSPS(); + const { chromaFormat, levelIdc, profileIdc } = spsConfig; + spsConfig.profileString = SPSParser.getProfileStr(profileIdc); + spsConfig.levelString = SPSParser.getLevelStr(levelIdc); + spsConfig.chromaFormatString = SPSParser.getChromaFormatStr(chromaFormat); + + return spsConfig; + + } + + // + static _ebsp2rbsp (originArr) { + const originLen = originArr.byteLength; + const dist = new Uint8Array(originArr.byteLength); + let distSize = 0; + + for (let i = 0, len = originLen; i < len; i++) { + if (i > 2 && originArr[i] === 3 && originArr[i - 1] === 0 && originArr[i - 2] === 0) { + continue; + } + dist[distSize++] = originArr[i]; + } + + return new Uint8Array(dist.buffer, 0, distSize); + } +} \ No newline at end of file diff --git a/packages/xgplayer-flv/src/parse/demux/AudioDemuxer.js b/packages/xgplayer-flv/src/parse/demux/AudioDemuxer.js new file mode 100644 index 00000000..f1f38f20 --- /dev/null +++ b/packages/xgplayer-flv/src/parse/demux/AudioDemuxer.js @@ -0,0 +1,237 @@ +// refrence: https://github.com/video-dev/hls.js/blob/master/src/demux/adts.js +import Demuxer from './Demuxer'; +import DataView4Read from '../../utils/DataView4Read'; +// import { mp3Versions, mp3BitRate, audioSampleRate } from '../../constants/types'; +import { + soundRateTypes, + samplingFrequencyTypes, + EventTypes, + browserTypes, +} from '../../constants/types'; +import sniffer from '../../utils/sniffer'; +import Buffer from '../../write/Buffer'; +export default class AudioDemuxer extends Demuxer { + constructor (store) { + super(store); + this.CLASS_NAME = this.constructor.name; + this.currentTag = null; + this.data = new Uint8Array(0); + this.readOffset = 0; + this._store.audioMetaData = null; + } + resolve (tag) { + const { _store: store } = this; + const { audioTrack: track } = store; + this.currentTag = tag; + this.data = tag.body; + let { + audioMetaData: meta, + } = store; + + if (!meta) { + meta = store.audioMetaData = {}; + store.audioMetaData = this.initAudioMeta(meta); + } + + const dv = new DataView4Read(tag.body.buffer, this); + + const sound = dv.getUint8(); + + const soundFormatIdx = sound >>> 4, // UInt4 + soundRate = (sound & 12) >>> 2, // UInt2 + soundSize = (sound & 2) >>> 1, // UInt1 + soundType = (sound % 1); // UInt1 + + meta.audioSampleRate = soundRateTypes[soundRate]; + meta.channelCount = soundType === 0 ? 1 : 2; + + if (soundFormatIdx !== 10 && soundFormatIdx !== 2) { + this.error('only support AAC Audio format so far'); + return; + } else if (soundFormatIdx === 10) { // AAC + const aacInfo = this._parseAACAudio(); + if (!aacInfo) { + return; + } + + const { data: aacData, data: { sampleFreq } } = aacInfo; + if (aacInfo.packetType === 0) { // AAC sequence header + meta.sampleRate = sampleFreq; + meta.channelCount = aacData.channelCount; + meta.codec = aacData.codec; + meta.manifestCodec = aacData.manifestCodec; + meta.config = aacData.config; + meta.refSampleDuration = 1024 / sampleFreq * meta.timeScale; + if (store.hasInitialMetaDispatched) { + if (store.videoTrack.length || store.audioTrack.length) { + this.dispatch(EventTypes.DATA_READY, store.videoTrack, store.audioTrack); + } + } else { + store.state._audioInitialMetadataDispatched = true; + } + + this.dispatch(EventTypes.META_DATA_READY, 'audio', meta); + + const { mediaInfo: mi } = store; + mi.audioCodec = meta.codec; + mi.audioSampleRate = meta.sampleRate; + mi.audioChannelCount = meta.channelCount; + mi.audioConfig = meta.config; + if (mi.hasVideo) { + if (mi.videoCodec) { + mi.mimeType = `video/x-flv; codecs="${mi.videoCodec},${mi.audioCodec}"`; + mi.codec = mi.mimeType.replace('x-flv', 'mp4'); + } + } else { + mi.mimeType = `video/x-flv; codecs="${mi.audioCodec}"`; + mi.codec = mi.mimeType.replace('x-flv', 'mp4'); + } + + if (mi.isComplete) { + this.dispatch(EventTypes.MEDIA_INFO_READY, mi); + } + } else if (aacInfo.packetType === 1) { // AAC raw frame data + let dts = store.state.timeStampBase + this.currentTag.getTime(); + let aacSample = { unit: aacInfo.data, length: aacInfo.data.byteLength, dts: dts, pts: dts }; + track.samples.push(aacSample); + track.length += aacInfo.data.length; + } + } + + this.resetStatus(); + } + + _parseAACAudio () { + if (this.unreadLength <= 1) { + return; + } + const aacData = {}; + let aacArray = new Uint8Array(this.data.buffer, this.readOffset, this.unreadLength); + const packetType = aacArray[0]; + this.readOffset += 1; + aacData.packetType = packetType; + if (!packetType) { + const { position, tagSize } = this.currentTag; + this._store.metaEndPosition = position + Buffer.readAsInt(tagSize) + 4; + aacData.data = this._parseAACAudioSpecificConfig(); // AAC Sequence header + } else { + aacData.data = aacArray.slice(1); + } + + return aacData; + } + _parseAACAudioSpecificConfig () { + const dv = new DataView4Read(this.data.buffer, this); + const { getAndNum } = DataView4Read; + + let resultObj = { + samplingFrequency: null, + extAudioObjectType: null, + extAudioSamplingIdx: null, + }, + config = {}; + const UInt0 = dv.getUint8(), + UInt1 = dv.getUint8(); + + let tempAudioObjectType; + let audioObjectType = tempAudioObjectType = UInt0 >>> 3; // UInt5 + let samplingIdx = ((UInt0 & getAndNum(5, 7)) << 1) | (UInt1 >>> 7); // UInt4 + if (samplingIdx < 0 || samplingIdx > samplingFrequencyTypes.length) { + this.dispatch(EventTypes.ERROR, `error samplingFrequencyIndex: ${samplingIdx}`); + return; + } + + resultObj.samplingFrequency = samplingFrequencyTypes[samplingIdx]; + + let channelCount = resultObj.channelCount = (UInt1 & getAndNum(1, 4)) >>> 3; + if (channelCount < 0 || channelCount > 7) { + this.dispatch(EventTypes.ERROR, `error Audio Channel Count: ${channelCount}`); + return; + } + + if (audioObjectType === 5) { // HE-AAC + const UInt2 = dv.getUint8(); + resultObj.extAudioSamplingIdx = ((UInt1 & getAndNum(5, 7)) << 1) | UInt2 >>> 7; + resultObj.extAudioObjectType = (UInt2 & getAndNum(1, 5)) >>> 2; + } + + if (sniffer.browser === browserTypes.FIRE_FOX) { + if (samplingIdx >= 6) { + // HE-AAC uses SBR, high frequencies are constructed from low frequencies + audioObjectType = 5; + config = new Array(4); + resultObj.extAudioSamplingIdx = samplingIdx - 3; + } else { + audioObjectType = 2; + config = new Array(2); + resultObj.extAudioSamplingIdx = samplingIdx; + } + } else if (sniffer.os.isAndroid) { + // Android : always use AAC + audioObjectType = 2; + config = new Array(2); + resultObj.extAudioSamplingIdx = samplingIdx; + } else { + + /* for other browsers (Chrome/Vivaldi/Opera ...) + always force audio type to be HE-AAC SBR, as some browsers do not support audio codec switch properly (like Chrome ...) + */ + audioObjectType = 5; + resultObj.extensionSamplingIndex = samplingIdx; + config = new Array(4); + + if (samplingIdx >= 6) { + resultObj.extensionSamplingIdx = samplingIdx - 3; + } else if (channelCount === 1) { + audioObjectType = 2; + config = new Array(2); + resultObj.extensionSamplingIndex = samplingIdx; + } + } + + config[0] = audioObjectType << 3; + config[0] |= (samplingIdx & 0x0E) >> 1; + config[1] |= (samplingIdx & 0x01) << 7; + config[1] |= channelCount << 3; + if (audioObjectType === 5) { + config[1] |= (resultObj.extAudioSamplingIdx & 0x0E) >> 1; + config[2] = (resultObj.extensionSamplingIdx & 0x01) << 7; + // adtsObjectType (force to 2, chrome is checking that object type is less than 5 ??? + // https://chromium.googlesource.com/chromium/src.git/+/master/media/formats/mp4/aac.cc + config[2] |= 2 << 2; + config[3] = 0; + } + + return { + config, + sampleFreq: resultObj.samplingFrequency, + channelCount, + codec: `mp4a.40.${audioObjectType}`, + manifestCodec: `mp4a.40.${tempAudioObjectType}`, + }; + } + + initAudioMeta (meta) { + const { state, audioTrack: track } = this._store; + + meta.duration = state.duration; + meta.timeScale = state.timeScale; + meta.type = 'audio'; + meta.id = track.id; + + return meta; + } + + resetStatus () { + this.currentTag = null; + this.data = new Uint8Array(0); + this.readOffset = 0; + } + get dataSize () { + return this.data.length; + } + + get unreadLength () { + return this.dataSize - this.readOffset; + } +} diff --git a/packages/xgplayer-flv/src/parse/demux/Demuxer.js b/packages/xgplayer-flv/src/parse/demux/Demuxer.js new file mode 100644 index 00000000..def09758 --- /dev/null +++ b/packages/xgplayer-flv/src/parse/demux/Demuxer.js @@ -0,0 +1,37 @@ +import Log from '../../utils/Log'; +import emitter from '../../utils/EventEmitter'; +export default class Demuxer { + constructor (store) { + if (store) { + this._store = store; + } + + this._emitter = emitter; + this.on = emitter.on.bind(emitter); + this.emit = emitter.emit.bind(emitter); + } + + dispatch (type, ...payload) { + const prefix = 'demuxer_'; + this._emitter.emit(`${prefix}${type}`, ...payload); + } + error (message) { + const { CLASS_NAME = 'Demuxer' } = this; + Log.error(`[${CLASS_NAME} error] `, message); + } + + info (message) { + const { CLASS_NAME = 'Demuxer' } = this; + Log.info(`[${CLASS_NAME} info] `, message); + } + + log (message) { + const { CLASS_NAME = 'Demuxer' } = this; + Log.log(`[${CLASS_NAME} log] `, message); + } + + warn (message) { + const { CLASS_NAME = 'Demuxer' } = this; + Log.warn(`[${CLASS_NAME} warn] `, message); + } +} \ No newline at end of file diff --git a/packages/xgplayer-flv/src/parse/demux/MetaDemuxer.js b/packages/xgplayer-flv/src/parse/demux/MetaDemuxer.js new file mode 100644 index 00000000..18bcb623 --- /dev/null +++ b/packages/xgplayer-flv/src/parse/demux/MetaDemuxer.js @@ -0,0 +1,241 @@ +import { MetaTypes } from '../../constants/types'; +import UTF8 from '../../utils/UTF8'; +import Demuxer from './Demuxer'; + +/** + * meta信息解析 + */ +export default class MetaDemuxer extends Demuxer { + constructor (store) { + super(store); + this.offset = 0; + this.readOffset = this.offset; + } + get isLe () { + return this._store.isLe; + } + resolve (meta, size) { + if (size < 3) { + throw 'not enough data for metainfo'; + } + const metaData = {}; + const name = this.parseValue(meta); + const value = this.parseValue(meta, size - name.bodySize); + metaData[name.data] = value.data; + + this.resetStatus(); + return metaData; + } + + resetStatus () { + this.offset = 0; + this.readOffset = this.offset; + } + + parseString (buffer) { + const dv = new DataView(buffer, this.readOffset); + const strLen = dv.getUint16(0, !this.isLe); + let str = ''; + if (strLen > 0) { + str = UTF8.decode(new Uint8Array(buffer, this.readOffset + 2, strLen)); + } else { + str = ''; + } + let size = strLen + 2; + this.readOffset += size; + return { + data: str, + bodySize: strLen + 2, + }; + } + + parseDate (buffer, size) { + const { isLe } = this; + const dv = new DataView(buffer, this.readOffset, size); + let ts = dv.getFloat64(0, !isLe); + const timeOffset = dv.getInt16(8, !isLe); + ts += timeOffset * 60 * 1000; + + this.readOffset += 10; + return { + data: new Date(ts), + bodySize: 10, + }; + } + + parseObject (buffer, size) { + const name = this.parseString(buffer, size); + const value = this.parseValue(buffer, size - name.bodySize); + return { + data: { + name: name.data, + value: value.data, + }, + bodySize: name.bodySize + value.bodySize, + isObjEnd: value.isObjEnd, + }; + } + + parseLongString (buffer) { + const dv = new DataView(buffer, this.readOffset); + const strLen = dv.getUint32(0, !this.isLe); + let str = ''; + if (strLen > 0) { + str = UTF8.decode(new Uint8Array(buffer, this.readOffset + 2, strLen)); + } else { + str = ''; + } + // const size = strLen + 4; + this.readOffset += strLen + 4; + return { + data: str, + bodySize: strLen + 4, + }; + } + + /** + * 解析meta中的变量 + */ + parseValue (data, size) { + let buffer = new ArrayBuffer(); + if (data instanceof ArrayBuffer) { + buffer = data; + } else { + buffer = data.buffer; + } + const { isLe } = this; + const { + NUMBER, + BOOLEAN, + STRING, + OBJECT, + MIX_ARRAY, + OBJECT_END, + STRICT_ARRAY, + DATE, + LONE_STRING, + } = MetaTypes; + const dataView = new DataView(buffer, this.readOffset, size); + let isObjEnd = false; + const type = dataView.getUint8(0); + let offset = 1; + this.readOffset += 1; + let value = null; + + switch (type) { + case NUMBER: { + value = dataView.getFloat64(1, !isLe); + this.readOffset += 8; + offset += 8; + break; + } + case BOOLEAN: { + const boolNum = dataView.getUint8(1); + value = !!boolNum; + this.readOffset += 1; + offset += 1; + break; + } + case STRING: { + const str = this.parseString(buffer); + value = str.data; + offset += str.bodySize; + break; + } + case OBJECT: { + value = {}; + let objEndSize = 0; + if (dataView.getUint32(size - 4, !isLe) & 0x00FFFFFF) { + objEndSize = 3; + } + // this.readOffset += offset - 1; + while (offset < size - 4) { + + const amfObj = this.parseObject(buffer, size - offset - objEndSize); + if (amfObj.isObjectEnd) { break; } + value[amfObj.data.name] = amfObj.data.value; + offset += amfObj.bodySize; + } + if (offset <= size - 3) { + const mark = dataView.getUint32(offset - 1, !isLe) & 0x00FFFFFF; + if (mark === 9) { + this.readOffset += 3; + offset += 3; + } + } + break; + } + case MIX_ARRAY: { + value = {}; + offset += 4; + this.readOffset += 4; + let objEndSize = 0; + if ((dataView.getUint32(size - 4, !isLe) & 0x00FFFFFF) === 9) { + objEndSize = 3; + } + + while (offset < size - 8) { + const amfVar = this.parseObject(buffer, size - offset - objEndSize); + if (amfVar.isObjectEnd) { break; } + value[amfVar.data.name] = amfVar.data.value; + offset += amfVar.bodySize; + + } + if (offset <= size - 3) { + const marker = dataView.getUint32(offset - 1, !isLe) & 0x00FFFFFF; + if (marker === 9) { + offset += 3; + this.readOffset += 3; + } + } + break; + } + + case OBJECT_END: { + value = null; + isObjEnd = true; + break; + } + + case STRICT_ARRAY: { + value = []; + const arrLength = dataView.getUint32(1, !isLe); + offset += 4; + this.readOffset += 4; + for (let i = 0; i < arrLength; i++) { + + const script = this.parseValue(buffer, size - offset); + value.push(script.data); + offset += script.bodySize; + } + break; + } + + case DATE: { + const date = this.parseDate(buffer, size - 1); + value = date.data; + offset += date.bodySize; + break; + } + + case LONE_STRING: { + const longStr = this.parseLongString(buffer, size - 1); + value = longStr.data; + offset += longStr.bodySize; + break; + } + + default: { + offset = size; + } + } + + return { + data: value, + bodySize: offset, + isObjEnd: isObjEnd, + }; + } + +} + diff --git a/packages/xgplayer-flv/src/parse/demux/TagDemuxer.js b/packages/xgplayer-flv/src/parse/demux/TagDemuxer.js new file mode 100644 index 00000000..46d0748b --- /dev/null +++ b/packages/xgplayer-flv/src/parse/demux/TagDemuxer.js @@ -0,0 +1,126 @@ +import Demuxer from './Demuxer'; +import MetaDemuxer from './MetaDemuxer'; +import VideoDemuxer from './VideoDemuxer'; +import AudioDemuxer from './AudioDemuxer'; +import Logger from '../../utils/Log'; +import metaFields from '../../constants/metaFields'; +import { EventTypes } from '../../constants/types'; + +const nativeHasProp = Object.prototype.hasOwnProperty; + +export default class Tagdemux extends Demuxer { + + constructor (store) { + super(store); + this.CLASS_NAME = this.constructor.name; + this._metaDemuxer = new MetaDemuxer(store); + this._videoDemuxer = new VideoDemuxer(store); + this._audioDemuxer = new AudioDemuxer(store); + this._firstParse = true; + this._dataOffset = 0; + + } + + resolveTags () { + const { tags } = this._store.state; + + const { _store: store } = this; + const { videoTrack, audioTrack } = store; + + tags.forEach((tag) => { + this.resolveTag(tag); + }); + + if (this._store.hasInitialMetaDispatched) { + if (videoTrack.length || audioTrack.length) { + this.dispatch(EventTypes.DATA_READY, audioTrack, videoTrack); + } + } + + this._store.state.tags = []; + } + + resolveTag (tag) { + + switch (String(tag.tagType)) { + case '8': // audio + this._resolveAudioTag(tag); + break; + case '9': // video + this._resolveVideoTag(tag); + break; + case '18': // metadata + this._resolveMetaTag(tag); + break; + } + + + } + + _resolveAudioTag (tag) { + if (tag.bodySize <= 1) { + this.warn('Not enough data for audio tag body'); + } + this._audioDemuxer.resolve(tag); + } + _resolveVideoTag (tag) { + if (tag.bodySize <= 1) { + this.error('Not enough data for video tag body'); + return; + } + const { _hasVideo, hasVideoFlagOverrided } = this; + if (hasVideoFlagOverrided && !_hasVideo) { + return; + } + + this._videoDemuxer.resolve(tag); + } + _initMetaData (metaData) { + const { _store: s } = this; + if (nativeHasProp.call(metaData, 'onMetaData')) { + if (s.hasMetaData) { + Logger.log(`[${this.CLASS_NAME}]`, 'found another meta tag'); + } + s.metaData = metaData; + const onMetaData = metaData.onMetaData; + + metaFields.forEach(field => { + const { name, type, parser, onTypeErr } = field; + if (Object(onMetaData[name]) instanceof type) { + parser.call(this, s, onMetaData); + } else { + if (onTypeErr && onTypeErr instanceof Function) { + onTypeErr(s, onMetaData); + } + } + }); + + this._store.mediaInfo._metaData = metaData; + // 同步到共享store + if (this._store.mediaInfo.isComplete) { + this.dispatch(EventTypes.MEDIA_INFO_READY, this._store.mediaInfo); + } + } + } + + _resolveMetaTag (tag) { + const { body } = tag; + const metaObj = this._metaDemuxer.resolve(body, body.length); + this._initMetaData(metaObj); + } + + _parseKeyframes (keyframes) { + let times = [], filePositions = []; + const { videoTimeScale, state } = this._store; + for (let i = 1; i < keyframes.times.length; i++) { + times[times.length] = state.timeStampBase + Math.floor(keyframes.times[i] * videoTimeScale); + filePositions[filePositions.length] = keyframes.filepositions[i]; + } + + return { + times, + filePositions, + }; + } + +} \ No newline at end of file diff --git a/packages/xgplayer-flv/src/parse/demux/VideoDemuxer.js b/packages/xgplayer-flv/src/parse/demux/VideoDemuxer.js new file mode 100644 index 00000000..73e10107 --- /dev/null +++ b/packages/xgplayer-flv/src/parse/demux/VideoDemuxer.js @@ -0,0 +1,320 @@ +import Demuxer from './Demuxer'; +import SPSParser from '../SPSParser'; +import DataView4Read from '../../utils/DataView4Read'; +import { EventTypes } from '../../constants/types'; +import Buffer from '../../write/Buffer'; +export default class VideoDemuxer extends Demuxer { + constructor (store) { + super(store); + this.CLASS_NAME = this.constructor.name; + this.readOffset = 0; + this.data = new Uint8Array(0); + this.currentTag = null; + this._store.videoMetaData = null; + } + + resetStatus () { + this.readOffset = 0; + this.data = new Uint8Array(0); + this.currentTag = null; + } + + resolve (tag) { + this.data = tag.body; + this.currentTag = tag; + const firstUI8 = this.readData(1)[0]; + const frameType = (firstUI8 & 0xF0) >>> 4; + const codecId = firstUI8 & 0x0F; + if (codecId !== 7) { + + /** 1: JPEG + * 2: H263 + * 3: Screen video + * 4: On2 VP6 + * 5: On2 VP6 + * 6: Screen videoversion 2 + * 7: AVC + */ + this.error(`unsupported codecId: ${codecId}`); + return; + } + this._parseAVCPacket(frameType); + + this.resetStatus(); + } + + _parseAVCPacket (frameType) { + if (this.unreadLength < 4) { + this.error('Invalid Avc Tag'); + } + const isLe = this._store.isLe; + const { buffer } = this.data; + const dv = new DataView(buffer, this.readOffset, this.unreadLength); + const packageType = dv.getUint8(0); + + let cpsTime = dv.getUint32(0, !isLe) & 0x00FFFFFF; + cpsTime = (cpsTime << 8) >> 8; + this.readOffset += 4; + + switch (packageType) { + case 0: { + const { position, tagSize } = this.currentTag; + + this._store.metaEndPosition = position + Buffer.readAsInt(tagSize) + 4; // 缓存scriptTag结束的位置,replay使用 + this._parseAVCDecoderConfigurationRecord(); + break; + } + case 1: { + this._parseAVCVideoData(frameType, cpsTime); + break; + } + case 2: { + break; + } + default: { + // 报错 + } + } + } + + _parseAVCDecoderConfigurationRecord () { + if (this.unreadLength < 7) { + this.error('Invalid AVCDecoderConfigurationRecord, lack of data!'); + return; + } + + const { mediaInfo: mi } = this._store; + // stash offset&unreadSize before parsing sps&pps + const tempOffset = this.readOffset; + const tempUnreadLength = this.unreadLength; + + + const { _store: store } = this; + let meta = this._store.videoMetaData; + let track = this._store.videoTrack; + const dv = new DataView4Read(this.data.buffer, this); + if (meta) { + if (meta.avcc !== undefined) { + this.error('found another AVCDecoderConfigurationRecord!'); + } + } else { + if (!store.state._hasVideo && !store.state.hasVideoFlagOverrided) { + store.state._hasVideo = true; + store._mediaInfo.hasVideo = true; + } + meta = store.videoMetaData = {}; + meta.type = 'video'; + meta.id = track.id; + meta.timeScale = store.videoTimeScale; + meta.duration = store.state.duration; + mi.timescale = store.videoTimeScale; + } + + const version = dv.getUint8(); + const avcProfile = dv.getUint8(); + dv.getUint8(); + dv.getUint8(); + if (version !== 1 || avcProfile === 0) { + // 处理错误 + return; + } + + const naluLengthSize = store.state.naluLengthSize = dv.getUint(2, this.readOffset, false) + 1; + if (naluLengthSize !== 3 && naluLengthSize !== 4) { + // 处理错误 + return; + } + + const spsLength = dv.getUint(5, null, false); + if (spsLength === 0) { + // 处理错误 + return; + } else if (spsLength > 1) { + this.warn('AVCDecoderConfigurationRecord: spsLength > 1'); + } + let sps; + for (let i = 0; i < spsLength; i++) { + const len = dv.getUint16(); + + if (len === 0) { + continue; + } + sps = new Uint8Array(this.data.buffer, this.readOffset, len); + this.readOffset += len; + const spsConfig = SPSParser.parseSPS(sps); + + if (i !== 0) { + continue; + } + + const { + codecSize, + presentSize, + profileString, + levelString, + chromaFormat, + pixelRatio, + frameRate, + refFrames, + bitDepth, + } = spsConfig; + + meta.width = codecSize.width; + meta.height = codecSize.height; + meta.presentWidth = presentSize.width; + meta.presentHeight = presentSize.height; + + meta.profile = profileString; + meta.level = levelString; + // meta.profileCompatibility = profileCompatibility; + // meta.naluLengthSize = naluLengthSize; + + meta.bitDepth = bitDepth; + meta.chromaFormat = chromaFormat; + meta.pixelRatio = pixelRatio; + meta.frameRate = frameRate; + + if (!frameRate.fixed + || frameRate.fpsNum === 0 + || frameRate.fpsDen === 0) { + meta.frameRate = store.referFrameRate; + } + + let { fpsDen, fpsNum } = meta.frameRate; + meta.refSampleDuration = meta.timeScale * (fpsDen / fpsNum); + + let codecArr = sps.subarray(1, 4); + let codecStr = 'avc1.'; + for (let j = 0; j < 3; j++) { + let hex = codecArr[j].toString(16); + hex = hex.padStart(2, '0'); + codecStr += hex; + } + + meta.codec = codecStr; + + const { mediaInfo: mi } = this._store; + mi.width = meta.width; + mi.height = meta.height; + mi.fps = meta.frameRate.fps; + mi.profile = meta.profile; + mi.level = meta.level; + mi.refFrames = refFrames; + mi.pixelRatio = pixelRatio; + mi.videoCodec = codecStr; + mi.chromaFormat = chromaFormat; + if (mi.hasAudio) { + if (mi.audioCodec) { + mi.mimeType = `video/x-flv; codecs="${mi.videoCodec},${mi.audioCodec}"`; + mi.codec = mi.mimeType.replace('x-flv', 'mp4'); + } + } else { + mi.mimeType = `video/x-flv; codecs="${mi.videoCodec}"`; + mi.codec = mi.mimeType.replace('x-flv', 'mp4'); + } + + if (mi.isComplete) { + this.dispatch(EventTypes.MEDIA_INFO_READY, mi); + } + } + let pps; + const ppsCount = dv.getUint8(); + if (!ppsCount) { + this.dispatch(EventTypes.ERROR, 'no pps in AVCDecoderConfigurationRecord'); + return; + } else if (ppsCount > 1) { + this.warn(`AVCDecoderConfigurationRecord has ppsCount: ${ppsCount}`); + } + + for (let i = 0; i < ppsCount; i++) { + let ppsSize = dv.getUint16(); + + if (!ppsSize) { + continue; + } + + pps = new Uint8Array(this.data.buffer, this.readOffset, ppsSize); + this.readOffset += ppsSize; + } + + mi.sps = meta.sps = sps; + mi.pps = meta.pps = pps; + if (store.hasInitialMetaDispatched) { + if (store.videoTrack.length || store.audioTrack.length) { + this.dispatch(EventTypes.DATA_READY, store.videoTrack, store.audioTrack); + } + } else { + store.state._videoInitialMetadataDispatched = true; + } + + this.dispatch(EventTypes.META_DATA_READY, 'video', meta); + } + + _parseAVCVideoData (frameType, cpsTime) { + let dv = new DataView4Read(this.data.buffer, this); + + let naluList = [], dataLen = 0; + const { naluLengthSize: naluLenSize } = this._store.state; + let ts = this._store.state.timeStampBase + this.currentTag.getTime(); + let isKeyframe = (frameType === 1); + while (this.unreadLength > 0) { + if (this.unreadLength < 4) { + this.warn('not enough data for parsing AVC'); + break; + } + const tempReadOffset = this.readOffset; + let naluSize = naluLenSize === 4 ? dv.getUint32() : dv.getUint24(); + if (naluSize > this.unreadLength) { + return; + } + + let unitType = dv.getUint(5, this.readOffset, false); + + if (unitType === 5) { + isKeyframe = true; + } + + let data = new Uint8Array(this.data.buffer, tempReadOffset, naluLenSize + naluSize); + this.readOffset = tempReadOffset + naluLenSize + naluSize; + const naluUnit = { + type: unitType, + data, + }; + naluList.push(naluUnit); + dataLen += data.byteLength; + } + dv = null; + if (naluList.length) { + const { videoTrack } = this._store; + const videoSample = { + units: naluList, + length: dataLen, + dts: ts, + cps: cpsTime, + pts: (ts + cpsTime), + isKeyframe, + position: isKeyframe ? this.currentTag.position : undefined, + }; + videoTrack.samples.push(videoSample); + videoTrack.length += dataLen; + } + + } + + readData (num) { + const { data, readOffset } = this; + if (this.dataSize > readOffset + num) { + this.readOffset += num; + return data.slice(readOffset, num); + } + return []; + } + + get dataSize () { + return this.data.length; + } + get unreadLength () { + return this.dataSize - this.readOffset; + } +} + diff --git a/packages/xgplayer-flv/src/parse/remux/Fmp4.js b/packages/xgplayer-flv/src/parse/remux/Fmp4.js new file mode 100644 index 00000000..01f8f590 --- /dev/null +++ b/packages/xgplayer-flv/src/parse/remux/Fmp4.js @@ -0,0 +1,596 @@ +import Buffer from '../../write/Buffer'; +// const UINT32_MAX = Math.pow(2, 32) - 1; +import { cacheWrapper } from '../../utils/funcUtils'; +class FMP4 { + static size (value) { + return Buffer.writeUint32(value); + } + static initBox (size, name, ...content) { + const buffer = new Buffer(); + buffer.write(FMP4.size(size), FMP4.type(name), ...content); + return buffer.buffer; + } + static extension (version, flag) { + return new Uint8Array([ + version, + (flag >> 16) & 0xff, + (flag >> 8) & 0xff, + flag & 0xff, + ]); + } + static ftyp () { + return FMP4.initBox(24, 'ftyp', new Uint8Array([ + 0x69, 0x73, 0x6F, 0x6D, // isom, + 0x0, 0x0, 0x00, 0x01, // minor_version: 0x01 + 0x69, 0x73, 0x6F, 0x6D, // isom + 0x61, 0x76, 0x63, 0x31, // avc1 + ])); + } + static moov (data) { + let size = 8; + let mvhd = FMP4.mvhd(data.duration, data.timescale); + let trak1 = FMP4.videoTrak(data); + let trak2 = FMP4.audioTrak(data); + let mvex = FMP4.mvex(data.duration, data.timescale); + [mvhd, trak1, trak2, mvex].forEach(item=>{ + size += item.byteLength; + }); + return FMP4.initBox(size, 'moov', mvhd, trak1, trak2, mvex); + } + static mvhd (duration, timeScale) { + let timescale = timeScale || 1000; + // duration *= timescale; + let bytes = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // version(0) + flags 1位的box版本+3位flags box版本,0或1,一般为0。(以下字节数均按version=0) + 0x00, 0x00, 0x00, 0x00, // creation_time 创建时间 (相对于UTC时间1904-01-01零点的秒数) + 0x00, 0x00, 0x00, 0x00, // modification_time 修改时间 + + /** + * timescale: 4 bytes文件媒体在1秒时间内的刻度值,可以理解为1秒长度 + */ + (timescale >>> 24) & 0xFF, + (timescale >>> 16) & 0xFF, + (timescale >>> 8) & 0xFF, + (timescale) & 0xFF, + + /** + * duration: 4 bytes该track的时间长度,用duration和time scale值可以计算track时长,比如audio track的time scale = 8000, + * duration = 560128,时长为70.016,video track的time scale = 600, duration = 42000,时长为70 + */ + (duration >>> 24) & 0xFF, + (duration >>> 16) & 0xFF, + (duration >>> 8) & 0xFF, + (duration) & 0xFF, + 0x00, 0x01, 0x00, 0x00, // Preferred rate: 1.0 推荐播放速率,高16位和低16位分别为小数点整数部分和小数部分,即[16.16] 格式,该值为1.0(0x00010000)表示正常前向播放 + /** + * PreferredVolume(1.0, 2bytes) + reserved(2bytes) + * 与rate类似,[8.8] 格式,1.0(0x0100)表示最大音量 + */ + 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // reserved: 4 + 4 bytes保留位 + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, // ----begin composition matrix---- + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // 视频变换矩阵 线性代数 + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, // ----end composition matrix---- + 0x00, 0x00, 0x00, 0x00, // ----begin pre_defined 6 * 4 bytes---- + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // pre-defined 保留位 + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // ----end pre_defined 6 * 4 bytes---- + 0xFF, 0xFF, 0xFF, 0xFF, // next_track_ID 下一个track使用的id号 + ]); + return FMP4.initBox(8 + bytes.length, 'mvhd', new Uint8Array(bytes)); + } + static videoTrak (data) { + let size = 8; + let tkhd = FMP4.tkhd({ + id: 1, + duration: data.duration, + timescale: data.timescale, + width: data.width, + height: data.height, + type: 'video', + }); + let mdia = FMP4.mdia({ + type: 'video', + timescale: data.timescale, + duration: data.duration, + sps: data.sps, + pps: data.pps, + pixelRatio: data.pixelRatio, + width: data.width, + height: data.height, + }); + [tkhd, mdia].forEach(item=>{ + size += item.byteLength; + }); + return FMP4.initBox(size, 'trak', tkhd, mdia); + } + static audioTrak (data) { + let size = 8; + let tkhd = FMP4.tkhd({ + id: 2, + duration: data.duration, + timescale: data.timescale, + width: 0, + height: 0, + type: 'audio', + }); + let mdia = FMP4.mdia({ + type: 'audio', + timescale: data.timescale, + duration: data.duration, + channelCount: data.audioChannelCount, + samplerate: data.audioSampleRate, + config: data.audioConfig, + }); + [tkhd, mdia].forEach(item=>{ + size += item.byteLength; + }); + return FMP4.initBox(size, 'trak', tkhd, mdia); + } + static tkhd (data) { + let id = data.id, + duration = data.duration, + width = data.width, + height = data.height; + let content = new Uint8Array([ + 0x00, 0x00, 0x00, 0x07, // version(0) + flags 1位版本 box版本,0或1,一般为0。(以下字节数均按version=0)按位或操作结果值,预定义如下: + // 0x000001 track_enabled,否则该track不被播放; + // 0x000002 track_in_movie,表示该track在播放中被引用; + // 0x000004 track_in_preview,表示该track在预览时被引用。 + // 一般该值为7,1+2+4 如果一个媒体所有track均未设置track_in_movie和track_in_preview,将被理解为所有track均设置了这两项;对于hint track,该值为0 + // hint track 这个特殊的track并不包含媒体数据,而是包含了一些将其他数据track打包成流媒体的指示信息。 + 0x00, 0x00, 0x00, 0x00, // creation_time创建时间(相对于UTC时间1904-01-01零点的秒数) + 0x00, 0x00, 0x00, 0x00, // modification time 修改时间 + (id >>> 24) & 0xFF, // track_ID: 4 bytes id号,不能重复且不能为0 + (id >>> 16) & 0xFF, + (id >>> 8) & 0xFF, + (id) & 0xFF, + 0x00, 0x00, 0x00, 0x00, // reserved: 4 bytes 保留位 + (duration >>> 24) & 0xFF, // duration: 4 bytes track的时间长度 + (duration >>> 16) & 0xFF, + (duration >>> 8) & 0xFF, + (duration) & 0xFF, + 0x00, 0x00, 0x00, 0x00, // reserved: 2 * 4 bytes 保留位 + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // layer(2bytes) + alternate_group(2bytes) 视频层,默认为0,值小的在上层.track分组信息,默认为0表示该track未与其他track有群组关系 + 0x00, 0x00, 0x00, 0x00, // volume(2bytes) + reserved(2bytes) [8.8] 格式,如果为音频track,1.0(0x0100)表示最大音量;否则为0 +保留位 + 0x00, 0x01, 0x00, 0x00, // ----begin composition matrix---- + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, // 视频变换矩阵 + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, // ----end composition matrix---- + (width >>> 8) & 0xFF, // //宽度 + (width) & 0xFF, + 0x00, 0x00, + (height >>> 8) & 0xFF, // 高度 + (height) & 0xFF, + 0x00, 0x00, + ]); + return FMP4.initBox(8 + content.byteLength, 'tkhd', content); + } + static edts (data) { + let buffer = new Buffer(), duration = data.duration, mediaTime = data.mediaTime; + buffer.write(FMP4.size(36), FMP4.type('edts')); + // elst + buffer.write(FMP4.size(28), FMP4.type('elst')); + buffer.write(new Uint8Array([ + 0x00, 0x00, 0x00, 0x01, // entry count + (duration >> 24) & 0xff, (duration >> 16) & 0xff, (duration >> 8) & 0xff, duration & 0xff, + (mediaTime >> 24) & 0xff, (mediaTime >> 16) & 0xff, (mediaTime >> 8) & 0xff, mediaTime & 0xff, + 0x00, 0x00, 0x00, 0x01, // media rate + ])); + return buffer.buffer; + } + static mdia (data) { + let size = 8; + let mdhd = FMP4.mdhd(data.timescale, data.duration); + let hdlr = FMP4.hdlr(data.type); + let minf = FMP4.minf(data); + [mdhd, hdlr, minf].forEach(item=>{ + size += item.byteLength; + }); + return FMP4.initBox(size, 'mdia', mdhd, hdlr, minf); + } + static mdhd (timescale, duration) { + let content = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, // creation_time 创建时间 + 0x00, 0x00, 0x00, 0x00, // modification_time修改时间 + (timescale >>> 24) & 0xFF, // timescale: 4 bytes 文件媒体在1秒时间内的刻度值,可以理解为1秒长度 + (timescale >>> 16) & 0xFF, + (timescale >>> 8) & 0xFF, + (timescale) & 0xFF, + (duration >>> 24) & 0xFF, // duration: 4 bytes track的时间长度 + (duration >>> 16) & 0xFF, + (duration >>> 8) & 0xFF, + (duration) & 0xFF, + 0x55, 0xC4, // language: und (undetermined) 媒体语言码。最高位为0,后面15位为3个字符(见ISO 639-2/T标准中定义) + 0x00, 0x00, // pre_defined = 0 + ]); + return FMP4.initBox(12 + content.byteLength, 'mdhd', FMP4.extension(0, 0), content); + } + static hdlr (type) { + let buffer = new Buffer(); + let value = [0x00, // version 0 + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00, // pre_defined + 0x76, 0x69, 0x64, 0x65, // handler_type: 'vide' + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, 0x00, // reserved + 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x48, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x72, 0x00, // name: 'VideoHandler' + ]; + if (type === 'audio') { + value.splice(8, 4, ...[0x73, 0x6f, 0x75, 0x6e]); + value.splice(24, 13, ...[0x53, 0x6f, 0x75, 0x6e, + 0x64, 0x48, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x72, 0x00]); + } + return FMP4.initBox(8 + value.length, 'hdlr', new Uint8Array(value)); + } + static minf (data) { + let buffer = new Buffer(), size = 8; + let vmhd = data.type === 'video' ? FMP4.vmhd() : FMP4.smhd(); + let dinf = FMP4.dinf(); + let stbl = FMP4.stbl(data); + [vmhd, dinf, stbl].forEach(item=>{ + size += item.byteLength; + }); + return FMP4.initBox(size, 'minf', vmhd, dinf, stbl); + } + static vmhd () { + return FMP4.initBox(20, 'vmhd', new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x01, // flags + 0x00, 0x00, // graphicsmode + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, // opcolor + ])); + } + static smhd () { + return FMP4.initBox(16, 'smhd', new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, // balance + 0x00, 0x00, // reserved + ])); + } + static dinf () { + let buffer = new Buffer(); + let dref = [0x00, // version 0 + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x01, // entry_count + 0x00, 0x00, 0x00, 0x0c, // entry_size + 0x75, 0x72, 0x6c, 0x20, // 'url' type + 0x00, // version 0 + 0x00, 0x00, 0x01, // entry_flags + ]; + buffer.write(FMP4.size(36), FMP4.type('dinf'), FMP4.size(28), FMP4.type('dref'), new Uint8Array(dref)); + return buffer.buffer; + } + static stbl (data) { + let size = 8; + let stsd = FMP4.stsd(data); + let stts = FMP4.stts(); + let stsc = FMP4.stsc(); + let stsz = FMP4.stsz(); + let stco = FMP4.stco(); + [stsd, stts, stsc, stsz, stco].forEach(item=>{ + size += item.byteLength; + }); + return FMP4.initBox(size, 'stbl', stsd, stts, stsc, stsz, stco); + } + static stsd (data) { + let content; + if (data.type === 'audio') { + // if (!data.isAAC && data.codec === 'mp4') { + // content = FMP4.mp3(data); + // } else { + // + // } + // 支持mp4a + content = FMP4.mp4a(data); + } else { + content = FMP4.avc1(data); + } + return FMP4.initBox(16 + content.byteLength, 'stsd', FMP4.extension(0, 0), new Uint8Array([0x00, 0x00, 0x00, 0x01]), content); + } + static mp4a (data) { + let buffer = new Buffer(); + let content = new Uint8Array([ + 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, // reserved + 0x00, 0x01, // data_reference_index + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, data.channelCount, // channelcount + 0x00, 0x10, // sampleSize:16bits + 0x00, 0x00, 0x00, 0x00, // reserved2 + (data.samplerate >> 8) & 0xff, + data.samplerate & 0xff, // + 0x00, 0x00, + ]); + let esds = FMP4.esds(data.config); + return FMP4.initBox(8 + content.byteLength + esds.byteLength, 'mp4a', content, esds); + } + static esds (config = [43, 146, 8, 0]) { + const configlen = config.length; + let buffer = new Buffer(); + let content = new Uint8Array([ + 0x00, // version 0 + 0x00, 0x00, 0x00, // flags + + 0x03, // descriptor_type + 0x17 + configlen, // length + 0x00, 0x01, // es_id + 0x00, // stream_priority + + 0x04, // descriptor_type + 0x0f + configlen, // length + 0x40, // codec : mpeg4_audio + 0x15, // stream_type + 0x00, 0x00, 0x00, // buffer_size + 0x00, 0x00, 0x00, 0x00, // maxBitrate + 0x00, 0x00, 0x00, 0x00, // avgBitrate + + 0x05, // descriptor_type + ].concat([configlen]).concat(config).concat([0x06, 0x01, 0x02])); + buffer.write(FMP4.size(8 + content.byteLength), FMP4.type('esds'), content); + return buffer.buffer; + } + static avc1 (data) { + let buffer = new Buffer(), size = 40;// 8(avc1)+8(avcc)+8(btrt)+16(pasp) + let sps = data.sps, pps = data.pps, width = data.width, height = data.height, hSpacing = data.pixelRatio[0], vSpacing = data.pixelRatio[1]; + let avccBuffer = new Buffer(); + avccBuffer.write(new Uint8Array([ + 0x01, // version + sps[1], // profile + sps[2], // profile compatible + sps[3], // level + 0xfc | 3, + 0xE0 | 1, // 目前只处理一个sps + ].concat([sps.length >>> 8 & 0xff, sps.length & 0xff]))); + avccBuffer.write(sps, new Uint8Array([1, pps.length >>> 8 & 0xff, pps.length & 0xff]), pps); + + let avcc = avccBuffer.buffer; + let avc1 = new Uint8Array([ + 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, // reserved + 0x00, 0x01, // data_reference_index + 0x00, 0x00, // pre_defined + 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // pre_defined + (width >> 8) & 0xff, + width & 0xff, // width + (height >> 8) & 0xff, + height & 0xff, // height + 0x00, 0x48, 0x00, 0x00, // horizresolution + 0x00, 0x48, 0x00, 0x00, // vertresolution + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x01, // frame_count + 0x12, + 0x64, 0x61, 0x69, 0x6C, // dailymotion/hls.js + 0x79, 0x6D, 0x6F, 0x74, + 0x69, 0x6F, 0x6E, 0x2F, + 0x68, 0x6C, 0x73, 0x2E, + 0x6A, 0x73, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, // compressorname + 0x00, 0x18, // depth = 24 + 0x11, 0x11]); // pre_defined = -1 + let btrt = new Uint8Array([ + 0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB + 0x00, 0x2d, 0xc6, 0xc0, // maxBitrate + 0x00, 0x2d, 0xc6, 0xc0, // avgBitrate + ]); + let pasp = new Uint8Array([ + (hSpacing >> 24), // hSpacing + (hSpacing >> 16) & 0xff, + (hSpacing >> 8) & 0xff, + hSpacing & 0xff, + (vSpacing >> 24), // vSpacing + (vSpacing >> 16) & 0xff, + (vSpacing >> 8) & 0xff, + vSpacing & 0xff, + ]); + + buffer.write( + FMP4.size(size + avc1.byteLength + avcc.byteLength + btrt.byteLength), FMP4.type('avc1'), avc1, + FMP4.size(8 + avcc.byteLength), FMP4.type('avcC'), avcc, + FMP4.size(20), FMP4.type('btrt'), btrt, + FMP4.size(16), FMP4.type('pasp'), pasp + ); + return buffer.buffer; + } + static stts () { + let content = new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00, // entry_count + ]); + return FMP4.initBox(16, 'stts', content); + } + static stsc () { + let content = new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00, // entry_count + ]); + return FMP4.initBox(16, 'stsc', content); + } + static stco () { + let content = new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00, // entry_count + ]); + return FMP4.initBox(16, 'stco', content); + } + static stsz () { + let content = new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00, // sample_size + 0x00, 0x00, 0x00, 0x00, // sample_count + ]); + return FMP4.initBox(20, 'stsz', content); + } + static mvex (duration) { + let buffer = new Buffer(); + let mehd = Buffer.writeUint32(duration); + buffer.write(FMP4.size(88), FMP4.type('mvex'), FMP4.size(16), FMP4.type('mehd'), FMP4.extension(0, 0), mehd, FMP4.trex(1), FMP4.trex(2)); + return buffer.buffer; + } + static trex (id) { + let content = new Uint8Array([ + 0x00, // version 0 + 0x00, 0x00, 0x00, // flags + (id >> 24), + (id >> 16) & 0xff, + (id >> 8) & 0xff, + (id & 0xff), // track_ID + 0x00, 0x00, 0x00, 0x01, // default_sample_description_index + 0x00, 0x00, 0x00, 0x00, // default_sample_duration + 0x00, 0x00, 0x00, 0x00, // default_sample_size + 0x00, 0x01, 0x00, 0x01, // default_sample_flags + ]); + return FMP4.initBox(8 + content.byteLength, 'trex', content); + } + static moof (data) { + let size = 8; + let mfhd = FMP4.mfhd(); + let traf = FMP4.traf(data); + [mfhd, traf].forEach(item=>{ + size += item.byteLength; + }); + return FMP4.initBox(size, 'moof', mfhd, traf); + } + static mfhd () { + let content = Buffer.writeUint32(FMP4.sequence); + FMP4.sequence += 1; + return FMP4.initBox(16, 'mfhd', FMP4.extension(0, 0), content); + } + static traf (data) { + let size = 8; + let tfhd = FMP4.tfhd(data.id); + let tfdt = FMP4.tfdt(data.time); + let sdtp = FMP4.sdtp(data); + let trun = FMP4.trun(data, sdtp.byteLength); + [tfhd, tfdt, sdtp, trun].forEach(item=>{ + size += item.byteLength; + }); + return FMP4.initBox(size, 'traf', tfhd, tfdt, sdtp, trun); + } + static tfhd (id) { + let content = Buffer.writeUint32(id); + return FMP4.initBox(16, 'tfhd', FMP4.extension(0, 0), content); + } + static tfdt (time) { + // let upper = Math.floor(time / (UINT32_MAX + 1)), + // lower = Math.floor(time % (UINT32_MAX + 1)); + return FMP4.initBox(16, 'tfdt', FMP4.extension(0, 0), Buffer.writeUint32(time)); + } + static trun (data, sdtpLength) { + // let id = data.id; + // let ceil = id === 1 ? 16 : 12; + let buffer = new Buffer(); + let sampleCount = Buffer.writeUint32(data.samples.length); + // mdat-header 8 + // moof-header 8 + // mfhd 16 + // traf-header 8 + // thhd 16 + // tfdt 20 + // trun-header 12 + // sampleCount 4 + // data-offset 4 + // samples.length + let offset = Buffer.writeUint32(8 + 8 + 16 + 8 + 16 + 16 + 12 + 4 + 4 + 16 * data.samples.length + sdtpLength); + buffer.write(FMP4.size(20 + 16 * data.samples.length), FMP4.type('trun'), new Uint8Array([0x00, 0x00, 0x0F, 0x01]), sampleCount, offset); + + let size = buffer.buffer.byteLength, writeOffset = 0; + data.samples.forEach(() => { + size += 16; + }); + + let trunBox = new Uint8Array(size); + + trunBox.set(buffer.buffer, 0); + writeOffset += buffer.buffer.byteLength; + data.samples.forEach((item)=>{ + + + trunBox.set(Buffer.writeUint32(item.duration), writeOffset); + writeOffset += 4; + trunBox.set(Buffer.writeUint32(item.size), writeOffset); + writeOffset += 4; + + if (data.id === 1) { + trunBox.set(Buffer.writeUint32(item.isKeyframe ? 0x02000000 : 0x01010000), writeOffset); + writeOffset += 4; + trunBox.set(Buffer.writeUint32(item.cps), writeOffset); + writeOffset += 4; + } else { + trunBox.set(Buffer.writeUint32(0x01000000), writeOffset); + writeOffset += 4; + trunBox.set(Buffer.writeUint32(0), writeOffset); + writeOffset += 4; + + } + + // buffer.write(Buffer.writeUint32(0)); + }); + return trunBox; + } + static sdtp (data) { + let buffer = new Buffer(); + buffer.write(FMP4.size(12 + data.samples.length), FMP4.type('sdtp'), FMP4.extension(0, 0)); + data.samples.forEach(item=>{ + buffer.write(new Uint8Array(data.id === 1 ? [item.key ? 32 : 16] : [16])); + }); + return buffer.buffer; + } + static mdat (data) { + let buffer = new Buffer(), size = 8; + data.samples.forEach(item=>{ + size += item.size; + }); + buffer.write(FMP4.size(size), FMP4.type('mdat')); + let mdatBox = new Uint8Array(size); + let offset = 0; + mdatBox.set(buffer.buffer, offset); + offset += 8; + data.samples.forEach(item=>{ + item.buffer.forEach((unit) => { + mdatBox.set(unit.data, offset); + offset += unit.data.byteLength; + // buffer.write(unit.data); + }); + }); + return mdatBox; + } +} +FMP4.type = cacheWrapper((name) => { + return new Uint8Array([name.charCodeAt(0), name.charCodeAt(1), name.charCodeAt(2), name.charCodeAt(3)]); +}); +FMP4.sequence = 1; + +export default FMP4; diff --git a/packages/xgplayer-flv/src/parse/remux/Mp4remux.js b/packages/xgplayer-flv/src/parse/remux/Mp4remux.js new file mode 100644 index 00000000..af6fdffe --- /dev/null +++ b/packages/xgplayer-flv/src/parse/remux/Mp4remux.js @@ -0,0 +1,422 @@ +import MediaSegmentList from '../../models/MediaSegmentList'; +import MediaSegment from '../../models/MediaSegment'; +import MediaSample from '../../models/MediaSample'; +import sniffer from '../../utils/sniffer'; +import Buffer from '../../write/Buffer'; +import FMP4 from './Fmp4'; +import emitter from '../../utils/EventEmitter'; +export default class Mp4Remuxer { + constructor () { + this._dtsBase = 0; + this.isLive = false; + this._isDtsBaseInited = false; + this._videoMeta = null; + this._audioMeta = null; + this._audioNextDts = null; + this._videoNextDts = null; + this._videoSegmentList = new MediaSegmentList('video'); + this._audioSegmentList = new MediaSegmentList('audio'); + const { browser } = sniffer; + this._emitter = emitter; + this._fillSilenceFrame = browser === 'ie'; + } + + destroy () { + this._dtsBase = -1; + this._dtsBaseInited = false; + this._audioMeta = null; + this._videoMeta = null; + this._videoSegmentList.clear(); + this._audioSegmentList.clear(); + this._videoSegmentList = null; + this._audioSegmentList = null; + } + + remux (audioTrack, videoTrack) { + !this._isDtsBaseInited && this.calcDtsBase(audioTrack, videoTrack); + + this._remuxVideo(videoTrack); + this._remuxAudio(audioTrack); + } + + seek () { + this._videoNextDts = null; + this._audioNextDts = null; + this._videoSegmentList.clear(); + this._audioSegmentList.clear(); + } + + onMetaDataReady (type, meta) { + this[`_${type}Meta`] = meta; + } + + onMediaInfoReady (mediaInfo) { + let ftyp_moov = new Buffer(); + let ftyp = FMP4.ftyp(); + let moov = FMP4.moov(mediaInfo); + ftyp_moov.write(ftyp, moov); + return ftyp_moov.buffer; + } + calcDtsBase (audioTrack, videoTrack) { + + let audioBase = Infinity, videoBase = Infinity; + if (audioTrack.samples && audioTrack.samples.length) { + audioBase = audioTrack.samples[0].dts; + } + if (videoTrack.samples && videoTrack.samples.length) { + videoBase = videoTrack.samples[0].dts; + } + + this._dtsBase = Math.min(audioBase, videoBase); + this._isDtsBaseInited = true; + } + + _remuxVideo (videoTrack) { + if (!this._videoMeta) { + return; + } + const track = videoTrack; + if (!videoTrack.samples || !videoTrack.samples.length) { + return; + } + let { samples } = track, dtsCorrection, + firstDts = -1, + lastDts = -1, + firstPts = -1, + lastPts = -1; + + const mp4Samples = []; + const mdatBox = { + samples: [], + }; + const videoSegment = new MediaSegment(); + while (samples.length) { + const avcSample = samples.shift(); + const { isKeyframe, cps } = avcSample; + let dts = avcSample.dts - this._dtsBase; + + if (dtsCorrection === undefined) { + if (!this._videoNextDts) { + const lastSegment = this._videoSegmentList.getLastSegmentBefore(dts); + if (lastSegment) { + let gap; + const { lastDts, gap: lastGap } = lastSegment; + gap = dts - (lastDts + lastGap) > 3 ? dts - (lastDts + lastGap) : 0; + dtsCorrection = dts - (lastDts + gap); + } else { + dtsCorrection = 0; + } + } else { + dtsCorrection = dts - this._videoNextDts; + } + } + const originDts = dts; + dts -= dtsCorrection; + const pts = dts + cps; + + if (firstDts === -1) { + firstDts = dts; + firstPts = pts; + } + let _units = []; + while (avcSample.units.length) { + let mdatSample = { + buffer: [], + size: 0, + }; + const unit = avcSample.units.shift(); + _units.push(unit); + mdatSample.buffer.push(unit); + mdatSample.size += unit.data.byteLength; + + mdatBox.samples.push(mdatSample); + } + + let sampleDuration = 0; + + if (samples.length >= 1) { + const nextDts = samples[0].dts - this._dtsBase - dtsCorrection; + sampleDuration = nextDts - dts; + } else { + if (mp4Samples.length >= 1) { // lastest sample, use second last duration + sampleDuration = mp4Samples[mp4Samples.length - 1].duration; + } else { // the only one sample, use reference duration + sampleDuration = this._videoMeta.refSampleDuration; + } + } + + if (isKeyframe) { + const rap = new MediaSample({ + dts, + pts, + duration: sampleDuration, + originDts: avcSample.dts, + position: avcSample.position, + isRAP: true, + }); + videoSegment.addRAP(rap); + } + + mp4Samples.push({ + dts, + cps, + pts, + units: _units, + size: avcSample.length, + isKeyframe, + duration: sampleDuration, + originDts, + }); + + } + const first = mp4Samples[0], + last = mp4Samples[mp4Samples.length - 1]; + lastDts = last.dts + last.duration; + lastPts = last.pts + last.duration; + + this._videoNextDts = lastDts; + + + videoSegment.startDts = firstDts; + videoSegment.endDts = lastDts; + videoSegment.startPts = firstPts; + videoSegment.endPts = lastPts; + videoSegment.originStartDts = first.originDts; + videoSegment.originEndDts = last.originDts + last.duration; + videoSegment.gap = dtsCorrection; + const firstSample = new MediaSample({ + dts: first.dts, + pts: first.pts, + duration: first.duration, + isKeyframe: first.isKeyframe, + originDts: first.originDts, + }); + const lastSample = new MediaSample({ + dts: last.dts, + pts: last.pts, + duration: last.duration, + isKeyframe: last.isKeyframe, + originDts: last.originDts, + }); + videoSegment.firstSample = firstSample; + videoSegment.lastSample = lastSample; + let moof_mdat = new Buffer(); + + track.samples = mp4Samples; + track.time = firstDts; + const moof = FMP4.moof(track); + const mdat = FMP4.mdat(mdatBox); + moof_mdat.write(moof, mdat); + + if (!this.isLive) { + this._videoSegmentList.append(videoSegment); + } + + track.samples = []; + track.length = 0; + + this._emitter.emit('mediaFragment', { + type: 'video', + data: moof_mdat.buffer.buffer, + sampleCount: mp4Samples.length, + fragment: videoSegment, + }); + + } + + _remuxAudio (track) { + + if (!this._audioMeta) { + return; + } + const { samples } = track; + let dtsCorrection, + firstDts = -1, + lastDts = -1, + firstPts = -1, + lastPts = -1, + silentDuration, + mp4Samples = []; + + const mdatBox = { + samples: [], + }; + if (!samples || !samples.length) { + return; + } + let isFirstDtsInited = false; + while (samples.length) { + let sample = samples.shift(); + const { unit } = sample; + let dts = sample.dts - this._dtsBase; + + let needSilentFrame = false; + if (dtsCorrection === undefined) { + if (!this._audioNextDts) { + + const lastSegment = this._audioSegmentList.getLastSegmentBefore(dts); + if (lastSegment) { + let gap; + const { lastDts, gap: lastGap } = lastSegment; + gap = dts - (lastDts + lastGap) > 3 ? dts - (lastDts + lastGap) : 0; + dtsCorrection = dts - (lastDts + gap); + } else { + needSilentFrame = this._fillSilenceFrame && !this._videoSegmentList.isEmpty(); + dtsCorrection = 0; + } + } else { + dtsCorrection = dts - this._audioNextDts; + } + } + const originDts = dts; + dts -= dtsCorrection; + + if (needSilentFrame) { + const videoSegment = this._videoSegmentList.getLastSampleBefore(originDts); + + if (videoSegment && videoSegment.startDts < dts) { + silentDuration = dts - videoSegment.startDts; + dts = videoSegment.startDts; + } else { + needSilentFrame = false; + } + } + + if (!isFirstDtsInited) { + firstDts = dts; + isFirstDtsInited = true; + } + + if (needSilentFrame) { + samples.unshift(sample); + const silentFrame = this.initSilentAudio(dts, silentDuration); + mp4Samples.push(silentFrame); + + let mdatSample = { + buffer: [], + size: 0, + }; + mdatSample.buffer.push({ + data: silentFrame.unit, + }); + mdatSample.size += silentFrame.unit.byteLength; + + mdatBox.samples.push(mdatSample); + continue; + } + + let sampleDuration = 0; + + if (samples.length >= 1) { + const nextDts = samples[0].dts - this._dtsBase - dtsCorrection; + sampleDuration = nextDts - dts; + } else { + if (mp4Samples.length >= 1) { // use second last sample duration + sampleDuration = mp4Samples[mp4Samples.length - 1].duration; + } else { // the only one sample, use reference sample duration + sampleDuration = this._audioMeta.refSampleDuration; + } + } + + const mp4Sample = { + dts, + pts: dts, + cts: 0, + size: unit.byteLength, + duration: sampleDuration, + originDts, + }; + + let mdatSample = { + buffer: [], + size: 0, + }; + mdatSample.buffer.push({ + data: unit, + }); + mdatSample.size += unit.byteLength; + + mdatBox.samples.push(mdatSample); + + mp4Samples.push(mp4Sample); + } + + const last = mp4Samples[mp4Samples.length - 1]; + lastDts = last.dts + last.duration; + + this._audioNextDts = lastDts; + + + const audioSegment = new MediaSegment(); + audioSegment.startDts = firstDts; + audioSegment.endDts = lastDts; + audioSegment.startPts = firstDts; + audioSegment.endPts = lastDts; + audioSegment.originStartDts = mp4Samples[0].originDts; + audioSegment.originEndDts = last.originDts + last.duration; + audioSegment.gap = dtsCorrection; + audioSegment.firstSample = new MediaSample({ + dts: mp4Samples[0].dts, + pts: mp4Samples[0].pts, + duration: mp4Samples[0].duration, + originDts: mp4Samples[0].originDts, + }); + audioSegment.lastSample = new MediaSample({ + dts: last.dts, + pts: last.pts, + duration: last.duration, + originDts: last.originDts, + }); + + + track.samples = mp4Samples; + const ftyp_moof = new Buffer(); + track.time = firstDts; + const moof = FMP4.moof(track, firstDts); + const mdat = FMP4.mdat(mdatBox); + ftyp_moof.write(moof, mdat); + + if (!this.isLive) { + this._audioSegmentList.append(audioSegment); + } + track.samples = []; + track.length = 0; + this._emitter.emit('mediaFragment', { + type: 'audio', + data: ftyp_moof.buffer.buffer, + sampleCount: mp4Samples.length, + fragment: audioSegment, + }); + } + + initSilentAudio (dts, duration) { + const unit = Mp4Remuxer.getSilentFrame(this._audioMeta.channelCount); + return { + dts, + pts: dts, + cps: 0, + duration, + unit, + size: unit.byteLength, + originDts: dts, + }; + + } + + static getSilentFrame (channelCount) { + if (channelCount === 1) { + return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x23, 0x80]); + } else if (channelCount === 2) { + return new Uint8Array([0x21, 0x00, 0x49, 0x90, 0x02, 0x19, 0x00, 0x23, 0x80]); + } else if (channelCount === 3) { + return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x8e]); + } else if (channelCount === 4) { + return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x80, 0x2c, 0x80, 0x08, 0x02, 0x38]); + } else if (channelCount === 5) { + return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x38]); + } else if (channelCount === 6) { + return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x00, 0xb2, 0x00, 0x20, 0x08, 0xe0]); + } + return null; + } +} \ No newline at end of file diff --git a/packages/xgplayer-flv/src/utils/DataView4Read.js b/packages/xgplayer-flv/src/utils/DataView4Read.js new file mode 100644 index 00000000..d5746756 --- /dev/null +++ b/packages/xgplayer-flv/src/utils/DataView4Read.js @@ -0,0 +1,72 @@ +export default class DataView4Read { + constructor (buffer, context) { + this._dv = new DataView(buffer); + this._context = context; + this.initProxy(); + } + + initProxy () { + const sizeArr = [8, 16, 32]; + const self = this; + const { _store } = this._context; + sizeArr.forEach(size => { + this[`getUint${size}`] = function (offset) { + if (!offset) { offset = self._context.readOffset; } + if (offset === self._context.readOffset) { + self._context.readOffset += size / 8; + } + return self._dv[`getUint${size}`](offset, !_store.isLe); + }; + + }); + + /** + * 显式声明一个比其它位数更常用读取24位整数方法 + * @param offset + * @param isHigh + */ + this.getUint24 = function (offset) { + const result = this.getUint(24, offset, false); // 会读取Uint32,做 and 操作之后回退一位。 + self._context.readOffset -= 1; + return result; + }; + + this.getUint = function (size, offset, isHigh = true) { + if (size > 32) { + throw 'not supported read size'; + } + let readSize = 32; + if (!this[`getUint${size}`]) { + for (let i = 0, len = sizeArr.length; i < len; i++) { + if (size < sizeArr[i]) { + readSize = sizeArr[i]; + break; + } + + } + + const numToAnd = isHigh ? DataView4Read.getAndNum(0, size - 1, readSize) : DataView4Read.getAndNum(readSize - size, readSize - 1, readSize); + return self[`getUint${readSize}`](offset, !_store.isLe) & numToAnd; + + } else { + return self[`getUint${readSize}`](offset, !_store.isLe); + } + }; + } + + static getAndNum (begin, end, size = 8) { + let result = 0; + let index = --size; + while (index > 0) { + if (index > end || index < begin) { + index--; + continue; + } else { + result += Math.pow(2, size - index); + index--; + } + } + + return result; + } +} \ No newline at end of file diff --git a/packages/xgplayer-flv/src/utils/EventEmitter.js b/packages/xgplayer-flv/src/utils/EventEmitter.js new file mode 100644 index 00000000..a31de7da --- /dev/null +++ b/packages/xgplayer-flv/src/utils/EventEmitter.js @@ -0,0 +1,3 @@ +const events = require('events'); + +export default new events.EventEmitter(); \ No newline at end of file diff --git a/packages/xgplayer-flv/src/utils/ExpGolomb.js b/packages/xgplayer-flv/src/utils/ExpGolomb.js new file mode 100644 index 00000000..13d19962 --- /dev/null +++ b/packages/xgplayer-flv/src/utils/ExpGolomb.js @@ -0,0 +1,398 @@ +import Logger from './Log'; +export default class ExpGolomb { + constructor (data) { + this.data = data; + // the number of bytes left to examine in this.data + this.bytesAvailable = data.byteLength; + // the current word being examined + this.word = 0; // :uint + // the number of bits left to examine in the current word + this.bitsAvailable = 0; // :uint + } + // ():void + loadWord () { + let data = this.data, + bytesAvailable = this.bytesAvailable, + position = data.byteLength - bytesAvailable, + workingBytes = new Uint8Array(4), + availableBytes = Math.min(4, bytesAvailable); + if (availableBytes === 0) { + throw new Error('no bytes available'); + } + workingBytes.set(data.subarray(position, position + availableBytes)); + this.word = new DataView(workingBytes.buffer).getUint32(0); + // track the amount of this.data that has been processed + this.bitsAvailable = availableBytes * 8; + this.bytesAvailable -= availableBytes; + } + + // (count:int):void + skipBits (count) { + var skipBytes; // :int + if (this.bitsAvailable > count) { + this.word <<= count; + this.bitsAvailable -= count; + } else { + count -= this.bitsAvailable; + skipBytes = count >> 3; + count -= (skipBytes >> 3); + this.bytesAvailable -= skipBytes; + this.loadWord(); + this.word <<= count; + this.bitsAvailable -= count; + } + return skipBytes; + } + + // (size:int):uint + readBits (size) { + let bits = Math.min(this.bitsAvailable, size), // :uint + valu = this.word >>> (32 - bits); // :uint + if (size > 32) { + Logger.error('Cannot read more than 32 bits at a time'); + } + this.bitsAvailable -= bits; + if (this.bitsAvailable > 0) { + this.word <<= bits; + } else if (this.bytesAvailable > 0) { + this.loadWord(); + } + bits = size - bits; + if (bits > 0 && this.bitsAvailable) { + return valu << bits | this.readBits(bits); + } else { + return valu; + } + } + + // ():uint + skipLZ () { + var leadingZeroCount; // :uint + for (leadingZeroCount = 0; leadingZeroCount < this.bitsAvailable; ++leadingZeroCount) { + if (0 !== (this.word & (0x80000000 >>> leadingZeroCount))) { + // the first bit of working word is 1 + this.word <<= leadingZeroCount; + this.bitsAvailable -= leadingZeroCount; + return leadingZeroCount; + } + } + // we exhausted word and still have not found a 1 + this.loadWord(); + return leadingZeroCount + this.skipLZ(); + } + + // ():void + skipUEG () { + this.skipBits(1 + this.skipLZ()); + } + + // ():void + skipEG () { + this.skipBits(1 + this.skipLZ()); + } + + // ():uint + readUEG () { + var clz = this.skipLZ(); // :uint + return this.readBits(clz + 1) - 1; + } + + // ():int + readEG () { + var valu = this.readUEG(); // :int + if (0x01 & valu) { + // the number is odd if the low order bit is set + return (1 + valu) >>> 1; // add 1 to make it even, and divide by 2 + } else { + return -1 * (valu >>> 1); // divide by two then make it negative + } + } + + // Some convenience functions + // :Boolean + readBoolean () { + return 1 === this.readBits(1); + } + + // ():int + readUByte () { + return this.readBits(8); + } + + // ():int + readUShort () { + return this.readBits(16); + } + // ():int + readUInt () { + return this.readBits(32); + } + + /** + * Advance the ExpGolomb decoder past a scaling list. The scaling + * list is optionally transmitted as part of a sequence parameter + * set and is not relevant to transmuxing. + * @param count {number} the number of entries in this scaling list + * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1 + */ + skipScalingList (count) { + var lastScale = 8, + nextScale = 8, + j, + deltaScale; + for (j = 0; j < count; j++) { + if (nextScale !== 0) { + deltaScale = this.readEG(); + nextScale = (lastScale + deltaScale + 256) % 256; + } + lastScale = (nextScale === 0) + ? lastScale + : nextScale; + } + } + + /** + * Read a sequence parameter set and return some interesting video + * properties. A sequence parameter set is the H264 metadata that + * describes the properties of upcoming video frames. + * @param data {Uint8Array} the bytes of a sequence parameter set + * @return {object} an object with configuration parsed from the + * sequence parameter set, including the dimensions of the + * associated video frames. + */ + readSPS () { + var frameCropLeftOffset = 0, + frameCropRightOffset = 0, + frameCropTopOffset = 0, + frameCropBottomOffset = 0, + profileIdc, + // profileCompat, + levelIdc, + codecWidth, + codecHeight, + presentWidth, + numRefFramesInPicOrderCntCycle, + picWidthInMbsMinus1, + picHeightInMapUnitsMinus1, + frameMbsOnlyFlag, + scalingListCount, + i, + readUByte = this.readUByte.bind(this), + readBits = this.readBits.bind(this), + readUEG = this.readUEG.bind(this), + readBoolean = this.readBoolean.bind(this), + skipBits = this.skipBits.bind(this), + skipEG = this.skipEG.bind(this), + skipUEG = this.skipUEG.bind(this), + skipScalingList = this.skipScalingList.bind(this); + + readUByte(); + profileIdc = readUByte(); // profile_idc + readBits(5); // profileCompat constraint_set[0-4]_flag, u(5) + skipBits(3); // reserved_zero_3bits u(3), + levelIdc = readUByte(); // level_idc u(8) + skipUEG(); // seq_parameter_set_id + let chromaFormatIdc = 1; + let chromaFormat = 420; + let chromaFormats = [0, 420, 422, 444]; + let bitDepthLuma = 8; + const profileIdcs = [100, 110, 122, 244, 44, 83, 86, 118, 128]; + // some profiles have more optional data we don't need + if (profileIdcs.includes(profileIdc)) { + chromaFormatIdc = readUEG(); + if (chromaFormatIdc === 3) { + skipBits(1); // separate_colour_plane_flag + } + if (chromaFormatIdc <= 3) { + chromaFormat = chromaFormats[chromaFormatIdc]; + } + bitDepthLuma = readUEG() + 8; // bit_depth_luma_minus8 + skipUEG(); // bit_depth_chroma_minus8 + skipBits(1); // qpprime_y_zero_transform_bypass_flag + if (readBoolean()) { // seq_scaling_matrix_present_flag + scalingListCount = (chromaFormatIdc !== 3) + ? 8 + : 12; + for (i = 0; i < scalingListCount; i++) { + if (readBoolean()) { // seq_scaling_list_present_flag[ i ] + i < 6 ? skipScalingList(16) : skipScalingList(64); + } + } + } + } + skipUEG(); // log2_max_frame_num_minus4 + var picOrderCntType = readUEG(); + if (picOrderCntType === 0) { + readUEG(); // log2_max_pic_order_cnt_lsb_minus4 + } else if (picOrderCntType === 1) { + skipBits(1); // delta_pic_order_always_zero_flag + skipEG(); // offset_for_non_ref_pic + skipEG(); // offset_for_top_to_bottom_field + numRefFramesInPicOrderCntCycle = readUEG(); + for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) { + skipEG(); // offset_for_ref_frame[ i ] + } + } + let refFrames = readUEG(); // max_num_ref_frames + skipBits(1); // gaps_in_frame_num_value_allowed_flag + picWidthInMbsMinus1 = readUEG(); + picHeightInMapUnitsMinus1 = readUEG(); + frameMbsOnlyFlag = readBits(1); + if (frameMbsOnlyFlag === 0) { + skipBits(1); // mb_adaptive_frame_field_flag + } + skipBits(1); // direct_8x8_inference_flag + if (readBoolean()) { // frame_cropping_flag + frameCropLeftOffset = readUEG(); + frameCropRightOffset = readUEG(); + frameCropTopOffset = readUEG(); + frameCropBottomOffset = readUEG(); + } + let frameRate = { + fps: 0, + fpsFixed: true, + fpsNum: 0, + fpsDen: 0, + }; + let pixelRatio = [1, 1]; + if (readBoolean()) { + // vui_parameters_present_flag + if (readBoolean()) { + // aspect_ratio_info_present_flag + const aspectRatioIdc = readUByte(); + switch (aspectRatioIdc) { + case 1: + pixelRatio = [1, 1]; + break; + case 2: + pixelRatio = [12, 11]; + break; + case 3: + pixelRatio = [10, 11]; + break; + case 4: + pixelRatio = [16, 11]; + break; + case 5: + pixelRatio = [40, 33]; + break; + case 6: + pixelRatio = [24, 11]; + break; + case 7: + pixelRatio = [20, 11]; + break; + case 8: + pixelRatio = [32, 11]; + break; + case 9: + pixelRatio = [80, 33]; + break; + case 10: + pixelRatio = [18, 11]; + break; + case 11: + pixelRatio = [15, 11]; + break; + case 12: + pixelRatio = [64, 33]; + break; + case 13: + pixelRatio = [160, 99]; + break; + case 14: + pixelRatio = [4, 3]; + break; + case 15: + pixelRatio = [3, 2]; + break; + case 16: + pixelRatio = [2, 1]; + break; + case 255: + { + pixelRatio = [ + readUByte() << 8 | readUByte(), + readUByte() << 8 | readUByte(), + ]; + break; + } + } + } + if (readBoolean()) { // overscan_info_present_flag + readBoolean(); // overscan_appropriate_flag + } + if (readBoolean()) { // video_signal_type_present_flag + readBits(4); // video_format & video_full_range_flag + if (readBoolean()) { // colour_description_present_flag + readBits(24); // colour_primaries & transfer_characteristics & matrix_coefficients + } + } + if (readBoolean()) { // chroma_loc_info_present_flag + readUEG(); // chroma_sample_loc_type_top_field + readUEG(); // chroma_sample_loc_type_bottom_field + } + + if (readBoolean()) { // timing_info_present_flag + const numUnitInTick = (readBits(32)); + frameRate.fpsNum = (readBits(32)); + frameRate.fixed = this.readBoolean(); + frameRate.fpsDen = numUnitInTick * 2; + frameRate.fps = frameRate.fpsNum / frameRate.fpsDen; + } + let cropUnitX = 0, cropUnitY = 0; + if (chromaFormatIdc === 0) { + cropUnitX = 1; + cropUnitX = 2 - frameMbsOnlyFlag; + } else { + let subWc = chromaFormatIdc === 3 ? 1 : 2; + let subHc = chromaFormatIdc === 1 ? 2 : 1; + cropUnitX = subWc; + cropUnitY = subHc * (2 - frameMbsOnlyFlag); + } + + codecWidth = (picWidthInMbsMinus1 + 1) * 16; + codecHeight = (2 - frameMbsOnlyFlag) * ((picHeightInMapUnitsMinus1 + 1) * 16); + + codecWidth -= (frameCropLeftOffset + frameCropRightOffset) * cropUnitX; + codecHeight -= (frameCropTopOffset + frameCropBottomOffset) * cropUnitY; + + const pixelScale = pixelRatio[0] === 1 || pixelRatio[1] === 1 + ? 1 + : pixelRatio[0] / pixelRatio[1]; + + presentWidth = pixelScale * codecWidth; + } + return { + profileIdc, + levelIdc, + refFrames, + chromaFormat, + bitDepth: bitDepthLuma, + frameRate, + codecSize: { + width: codecWidth, + height: codecHeight, + }, + presentSize: { + width: presentWidth, + height: codecHeight, + }, + width: Math.ceil((((picWidthInMbsMinus1 + 1) * 16) - frameCropLeftOffset * 2 - frameCropRightOffset * 2)), + height: ((2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16) - (( + frameMbsOnlyFlag + ? 2 + : 4) * (frameCropTopOffset + frameCropBottomOffset)), + pixelRatio: pixelRatio, + }; + } + + readSliceType () { + // skip NALu type + this.readUByte(); + // discard first_mb_in_slice + this.readUEG(); + // return slice_type + return this.readUEG(); + } +} diff --git a/packages/xgplayer-flv/src/utils/LiveTask.js b/packages/xgplayer-flv/src/utils/LiveTask.js new file mode 100644 index 00000000..ec4a3dd2 --- /dev/null +++ b/packages/xgplayer-flv/src/utils/LiveTask.js @@ -0,0 +1,29 @@ +class LiveTask { + constructor(url, config) { + const _headers = new window.Headers(); + const _config = { + headers: Object.assign({}, _headers), + method: 'GET', + cache: 'default', + mode: 'cors', + }; + this.request = new Request(url, Object.assign({}, _config, config)); + } + + run (callback) { + + function resolve (reader) { + reader.read().then(result => { + callback(result.done ? undefined : result.value); + resolve(reader); + }); + } + fetch(this.request).then(res => { + const reader = res.body.getReader(); + resolve(reader); + }); + + } +} + +export default LiveTask; \ No newline at end of file diff --git a/packages/xgplayer-flv/src/utils/Log.js b/packages/xgplayer-flv/src/utils/Log.js new file mode 100644 index 00000000..9d2f8211 --- /dev/null +++ b/packages/xgplayer-flv/src/utils/Log.js @@ -0,0 +1,17 @@ +export default class Logger { + static log (...args) { + window.console.log.apply(window, args); + } + + static info (...args) { + window.console.info.apply(window, args); + } + + static error (...args) { + window.console.error.apply(window, args); + } + + static warn (...args) { + window.console.warn.apply(window, args); + } +} diff --git a/packages/xgplayer-flv/src/utils/Store.js b/packages/xgplayer-flv/src/utils/Store.js new file mode 100644 index 00000000..7d35de0a --- /dev/null +++ b/packages/xgplayer-flv/src/utils/Store.js @@ -0,0 +1,190 @@ +import MediaInfo from '../models/MediaInfo'; +class Store { + constructor () { + const isLe = (function () { + const buf = new ArrayBuffer(2); + (new DataView(buf)).setInt16(0, 256, true); // little-endian write + return (new Int16Array(buf))[0] === 256; // platform-spec read, if equal then LE + })(); + + this.state = { + isLe: isLe, + _hasAudio: false, + _hasVideo: false, + _mediaInfo: new MediaInfo(), + _metaData: null, + _videoTrack: {type: 'video', id: 1, samples: [], length: 0}, + _audioTrack: {type: 'audio', id: 2, samples: [], length: 0}, + _videoMetaData: null, + _audioMetaData: null, + _audioInitialMetadataDispatched: false, + _videoInitialMetadataDispatched: false, + tags: [], + timeStampBase: 0, + hasVideoFlagOverrided: false, + hasAudioFlagOverrided: false, + timeScale: 1000, + duration: 0, + isLive: false, + durationOverrided: false, + naluLengthSize: 4, + _referFrameRate: { + fixed: true, + fps: 23.976, + fpsNum: 23976, + fpsDen: 1000, + }, + metaEndPosition: -1, + }; + + this.methods = { + _isInitialMetadataDispatched: function () { + const { + _hasAudio, + _hasVideo, + _audioInitialMetadataDispatched, + _videoInitialMetadataDispatched, + } = this.state; + if (_hasAudio && _hasVideo) { // both audio & video + return _audioInitialMetadataDispatched && _videoInitialMetadataDispatched; + } + if (_hasAudio && !_hasVideo) { // audio only + return this._audioInitialMetadataDispatched; + } + if (!_hasAudio && _hasVideo) { // video only + return _videoInitialMetadataDispatched; + } + return false; + }.bind(this), + }; + } + + get referFrameRate () { + return this.state._referFrameRate; + } + + set referFrameRate (val) { + this.state._referFrameRate = val; + } + + set mediaInfo (mediaInfo) { + this.state._mediaInfo = mediaInfo; + } + + get mediaInfo () { + return this.state._mediaInfo; + } + + get metaData () { + return this.state._metaData; + } + + get hasMetaData () { + return this.state._metaData !== null; + } + + set metaData (v) { + this.state._metaData = v; + } + + set audioTrack (val) { + this.state._audioTrack = val; + } + + get audioTrack () { + return this.state._audioTrack; + } + + set videoTrack (val) { + this.state._videoTrack = val; + } + + get videoTrack () { + return this.state._videoTrack; + } + + set hasAudio (val) { + this.state._hasAudio = val; + this.state._mediaInfo.hasAudio = val; + } + + get hasAudio () { + return this.state._hasAudio; + } + + set hasVideo (val) { + this.state._hasVideo = val; + this.state._mediaInfo.hasVideo = val; + } + + get hasVideo () { + return this.state._hasVideo; + } + + set videoMetaData (val) { + this.state._videoMetaData = val; + } + + get videoMetaData () { + return this.state._videoMetaData; + } + + set audioMetaData (val) { + this.state._audioMetaData = val; + } + + get audioMetaData () { + return this.state._audioMetaData; + } + + get keyframes () { + return this.state._mediaInfo.keyframes; + } + get isSeekable () { + return this.state._mediaInfo.hasKeyframes; + } + + get isLe () { + return this.state.isLe; + } + get hasInitialMetaDispatched () { + const { + _hasAudio, + _hasVideo, + _audioInitialMetadataDispatched, + _videoInitialMetadataDispatched, + } = this.state; + if (_hasAudio && _hasVideo) { + return _audioInitialMetadataDispatched && _videoInitialMetadataDispatched; + } + if (_hasAudio && !_hasVideo) { + return this._audioInitialMetadataDispatched; + } + if (!_hasAudio && _hasVideo) { + return _videoInitialMetadataDispatched; + } + return false; + } + + get videoTimeScale () { + return this.state.timeScale; + } + + get metaEndPosition () { + return this.state.metaEndPosition; + } + + set metaEndPosition (pos) { + this.state.metaEndPosition = pos; + } + + get isLive () { + return this.state.isLive; + } + + set isLive (val) { + this.state.isLive = val; + } +} + +export default Store; \ No newline at end of file diff --git a/packages/xgplayer-flv/src/utils/UTF8.js b/packages/xgplayer-flv/src/utils/UTF8.js new file mode 100644 index 00000000..5791de28 --- /dev/null +++ b/packages/xgplayer-flv/src/utils/UTF8.js @@ -0,0 +1,68 @@ +/* eslint-disable */ +class UTF8 { + static decode(uint8array) { + const out = []; + const input = uint8array; + let i = 0; + const length = uint8array.length; + + while (i < length) { + if (input[i] < 0x80) { + out.push(String.fromCharCode(input[i])); + ++i; + continue; + } else if (input[i] < 0xC0) { + // fallthrough + } else if (input[i] < 0xE0) { + if (UTF8._checkContinuation(input, i, 1)) { + const ucs4 = (input[i] & 0x1F) << 6 | (input[i + 1] & 0x3F); + if (ucs4 >= 0x80) { + out.push(String.fromCharCode(ucs4 & 0xFFFF)); + i += 2; + continue; + } + } + } else if (input[i] < 0xF0) { + if (UTF8._checkContinuation(input, i, 2)) { + const ucs4 = (input[i] & 0xF) << 12 | (input[i + 1] & 0x3F) << 6 | input[i + 2] & 0x3F; + if (ucs4 >= 0x800 && (ucs4 & 0xF800) !== 0xD800) { + out.push(String.fromCharCode(ucs4 & 0xFFFF)); + i += 3; + continue; + } + } + } else if (input[i] < 0xF8) { + if (UTF8._checkContinuation(input, i, 3)) { + let ucs4 = (input[i] & 0x7) << 18 | (input[i + 1] & 0x3F) << 12 | + (input[i + 2] & 0x3F) << 6 | (input[i + 3] & 0x3F); + if (ucs4 > 0x10000 && ucs4 < 0x110000) { + ucs4 -= 0x10000; + out.push(String.fromCharCode((ucs4 >>> 10) | 0xD800)); + out.push(String.fromCharCode((ucs4 & 0x3FF) | 0xDC00)); + i += 4; + continue; + } + } + } + out.push(String.fromCharCode(0xFFFD)); + ++i; + } + + return out.join(''); + } + + static _checkContinuation(uint8array, start, checkLength) { + let array = uint8array; + if (start + checkLength < array.length) { + while (checkLength--) { + if ((array[++start] & 0xC0) !== 0x80) + return false; + } + return true; + } else { + return false; + } + } +} + +export default UTF8; \ No newline at end of file diff --git a/packages/xgplayer-flv/src/utils/VodTask.js b/packages/xgplayer-flv/src/utils/VodTask.js new file mode 100644 index 00000000..011a732a --- /dev/null +++ b/packages/xgplayer-flv/src/utils/VodTask.js @@ -0,0 +1,74 @@ +import XHRLoader from './loaders/XHRLoader'; +import FetchLoader from './loaders/FetchLoader'; +const loadCls = (function(window) { + if (window.fetch) { + return FetchLoader; + } + return XHRLoader; +})(window); +class VodTask { + constructor (url, range, headers) { + this.url = url; + this.range = range; + this.id = range.join('-'); + this.on = false; + this.loader = new loadCls(url, range, headers); + VodTask.queue.push(this); + VodTask.update(); + } + cancel () { + this.loader.cancel(); + } + + static remove (loader) { + VodTask.queue.filter((item, idx) => { + if (item.url === loader.url && item.id === loader.id) { + VodTask.queue.splice(idx, 1); + return true; + } else { + return false; + } + }); + VodTask.update(); + } + + static update () { + let Queue = VodTask.queue; + let sended = Queue.filter((item) => item.on); + let wait = Queue.filter(item=>!item.on); + let max = VodTask.limit - sended.length; + wait.forEach((item, idx)=>{ + if (idx < max) { + item.run(); + } + }); + } + + run () { + if (this.loader.readyState === 1) { + this.on = true; + this.loader.run(); + } else { + VodTask.remove(); + } + } + + static clear () { + VodTask.queue.forEach(item=>{ + if (item.on) { + item.cancel(); + } + }); + VodTask.queue.length = 0; + } + + get promise () { + return this.loader.promise; + } +} + +VodTask.queue = []; +VodTask.limit = 2; +window.VodTask = VodTask; + +export default VodTask; diff --git a/packages/xgplayer-flv/src/utils/funcUtils.js b/packages/xgplayer-flv/src/utils/funcUtils.js new file mode 100644 index 00000000..d739d214 --- /dev/null +++ b/packages/xgplayer-flv/src/utils/funcUtils.js @@ -0,0 +1,42 @@ +export function debounce (func, wait, immediate) { + var timeout, result; + + + var debounced = function (args) { + if (timeout) { clearTimeout(timeout); } + if (immediate) { + var callNow = !timeout; + timeout = setTimeout(func, wait); + if (callNow) { result = func(); } + } else { + timeout = setTimeout(func, wait); + } + + return result; + }; + + debounced.cancel = function () { + clearTimeout(timeout); + timeout = null; + }; + + return debounced; + +} + +export const cacheWrapper = (fn) => { + + const cache = {}; + return (...args) => { + const key = args.reduce((pre, cur) => { + return `${pre}_${cur}`; + }, ''); + const result = fn(...args); + if (cache[key] !== undefined) { + return cache[key]; + } else { + cache[key] = result; + return result; + } + }; +}; \ No newline at end of file diff --git a/packages/xgplayer-flv/src/utils/loaders/FetchLoader.js b/packages/xgplayer-flv/src/utils/loaders/FetchLoader.js new file mode 100644 index 00000000..945d1ef0 --- /dev/null +++ b/packages/xgplayer-flv/src/utils/loaders/FetchLoader.js @@ -0,0 +1,41 @@ +import VodTask from '../VodTask'; +export default class FetchLoader { + constructor(url, range, config = {}) { + this.url = url; + this.on = false; + const _config = { + headers: { + Range: `bytes=${range[0]}-${range[1]}`, + }, + method: 'GET', + cache: 'default', + mode: 'cors', + }; + this.request = () => { + this.on = true; + return fetch(url, Object.assign({}, _config, config)).then(res => { + VodTask.remove(this); + return res.arrayBuffer(); + }).catch(e => { + VodTask.remove(this); + return e; + }); + }; + } + + run () { + this._promise = this.request(); + } + + get readyState () { + return 1; + } + + cancel () { + // TODO + } + + get promise () { + return this.on ? this._promise : this.request(); + } +} \ No newline at end of file diff --git a/packages/xgplayer-flv/src/utils/loaders/WebSocketLoader.js b/packages/xgplayer-flv/src/utils/loaders/WebSocketLoader.js new file mode 100644 index 00000000..1d77a859 --- /dev/null +++ b/packages/xgplayer-flv/src/utils/loaders/WebSocketLoader.js @@ -0,0 +1,60 @@ +/** + * @author leo + * @date 2018/3/29 + * @description: +*/ +export default class WebSocketLoader { + constructor (url, callback) { + this.url = url; + this._sendData = callback || function () {}; + this.on = false; + this._ws = null; + } + + initWsObj () { + const ws = new WebSocket(this.url); + ws.binaryType = 'arraybuffer'; + ws.onopen = this._onOpen.bind(this); + ws.onclose = this._onClose.bind(this); + ws.onmessage = this._onMessage.bind(this); + // ws.onerror = this._onError.bind(this); + } + + _onOpen () { + this.on = true; + } + + _onClose() { + this._sendData(); + } + + _onMessage (result = {}) { + const { data } = result; + if (data instanceof ArrayBuffer) { + this._sendData(data); + } else if (data instanceof Blob) { + const reader = new FileReader(); + reader.onload = () => { + this._sendData(reader.result); + }; + reader.readAsArrayBuffer(data); + } + } + + run () { + this._ws = this.initWsObj(); + } + + cancel () { + if (this.isCancelAble) { + this._ws.close(); + this._ws = null; + } + } + + get isCancelAble () { + const { _ws: ws } = this; + return ws && ws.readyState === 0 && ws.readyState === 1; + } + +} diff --git a/packages/xgplayer-flv/src/utils/loaders/XHRLoader.js b/packages/xgplayer-flv/src/utils/loaders/XHRLoader.js new file mode 100644 index 00000000..b758131c --- /dev/null +++ b/packages/xgplayer-flv/src/utils/loaders/XHRLoader.js @@ -0,0 +1,44 @@ +import VodTask from '../VodTask'; +export default class XHRLoader { + constructor (url, range) { + this.url = url; + const xhr = new XMLHttpRequest(); + xhr.open('get', url); + xhr.responseType = 'arraybuffer'; + xhr.setRequestHeader('Range', `bytes=${range[0]}-${range[1]}`); + xhr.onabort = () => { + VodTask.remove(this); + }; + this._promise = new Promise((resolve, reject) => { + xhr.onload = function () { + if (xhr.status === 200 || xhr.status === 206) { + resolve(xhr.response); + } + VodTask.remove(this); + }; + xhr.onerror = (e) => { + reject(e); + VodTask.remove(this); + }; + }); + + this._xhr = xhr; + } + + get promise () { + return this._promise; + } + + get readyState () { + return this._xhr.readyState; + } + + run () { + this._xhr.send(); + } + + cancel () { + this._xhr.abort(); + } + +} \ No newline at end of file diff --git a/packages/xgplayer-flv/src/utils/sniffer.js b/packages/xgplayer-flv/src/utils/sniffer.js new file mode 100644 index 00000000..b95abdbc --- /dev/null +++ b/packages/xgplayer-flv/src/utils/sniffer.js @@ -0,0 +1,38 @@ +const sniffer = { + get device () { + let r = sniffer.os; + return r.isPc ? 'pc' : r.isTablet ? 'tablet' : 'mobile'; + }, + get browser () { + let ua = navigator.userAgent.toLowerCase(); + let reg = { + ie: /rv:([\d.]+)\) like gecko/, + firfox: /firefox\/([\d.]+)/, + chrome: /chrome\/([\d.]+)/, + opera: /opera.([\d.]+)/, + safari: /version\/([\d.]+).*safari/, + }; + return [].concat(Object.keys(reg).filter(key => reg[key].test(ua)))[0]; + }, + get os () { + let ua = navigator.userAgent, + isWindowsPhone = /(?:Windows Phone)/.test(ua), + isSymbian = /(?:SymbianOS)/.test(ua) || isWindowsPhone, + isAndroid = /(?:Android)/.test(ua), + isFireFox = /(?:Firefox)/.test(ua), + isTablet = /(?:iPad|PlayBook)/.test(ua) || (isAndroid && !/(?:Mobile)/.test(ua)) || (isFireFox && /(?:Tablet)/.test(ua)), + isPhone = /(?:iPhone)/.test(ua) && !isTablet, + isPc = !isPhone && !isAndroid && !isSymbian; + return { + isTablet, + isPhone, + isAndroid, + isPc, + isSymbian, + isWindowsPhone, + isFireFox, + }; + }, +}; + +export default sniffer; diff --git a/packages/xgplayer-flv/src/write/Buffer.js b/packages/xgplayer-flv/src/write/Buffer.js new file mode 100644 index 00000000..028f0595 --- /dev/null +++ b/packages/xgplayer-flv/src/write/Buffer.js @@ -0,0 +1,37 @@ +import Concat from 'concat-typed-array'; +import Logger from '../utils/Log'; +class Buffer { + constructor (buffer) { + this.buffer = buffer || new Uint8Array(0); + } + write (...buffer) { + buffer.forEach(item => { + if (item) { + this.buffer = Concat(Uint8Array, this.buffer, item); + } else { + Logger.error(item); + } + }); + } + static writeUint32 (value) { + return new Uint8Array([ + value >> 24, + (value >> 16) & 0xff, + (value >> 8) & 0xff, + value & 0xff, + ]); + } + static readAsInt (arr) { + let temp = ''; + function padStart4Hex (hexNum) { + let hexStr = hexNum.toString(16); + return hexStr.padStart(2, '0'); + } + arr.forEach(num => { + temp += padStart4Hex(num); + }); + return parseInt(temp, 16); + } +} + +export default Buffer; diff --git a/packages/xgplayer-flv/src/write/Stream.js b/packages/xgplayer-flv/src/write/Stream.js new file mode 100644 index 00000000..1d73e15e --- /dev/null +++ b/packages/xgplayer-flv/src/write/Stream.js @@ -0,0 +1,99 @@ +class Stream { + constructor (buffer) { + this.buffer = buffer; + this.dataview = new DataView(buffer); + this.dataview.position = 0; + } + + fill (count) { + for (let i = 0; i < count; i++) { + this.writeUint8(0); + } + } + + set position (value) { + this.dataview.position = value; + } + + get position () { + return this.dataview.position || 0; + } + + static writeByte (buffer, value, size, sign) { + switch (size) { + case 1: + if (sign) { + buffer.setInt8(buffer.position, value); + } else { + buffer.setUint8(buffer.position, value); + } + break; + case 2: + if (sign) { + buffer.setInt16(buffer.position, value); + } else { + buffer.setUint16(buffer.position, value); + } + break; + case 3: + if (sign) { + for (let i = 0; i < 3; i++) { + buffer.setInt8(buffer.position + i, value >> (16 - i * 8) & 0xff); + } + } else { + for (let i = 0; i < 3; i++) { + buffer.setUint8(buffer.position + i, value >> (16 - i * 8) & 0xff); + } + } + break; + case 4: + if (sign) { + buffer.setInt32(buffer.position, value); + } else { + buffer.setUint32(buffer.position, value); + } + break; + default: + throw `not support ${size} write`; + } + buffer.position += size; + } + + writeUint8 (value) { + Stream.writeByte(this.dataview, value, 1); + } + writeInt8 (value) { + Stream.writeByte(this.dataview, value, 1, true); + } + writeUint16 (value) { + Stream.writeByte(this.dataview, value, 2); + } + writeInt16 (value) { + Stream.writeByte(this.dataview, value, 2, true); + } + writeUint24 (value) { + Stream.writeByte(this.dataview, value, 3); + } + writeInt24 (value) { + Stream.writeByte(this.dataview, value, 3, true); + } + writeUint32 (value) { + Stream.writeByte(this.dataview, value, 4); + } + writeInt32 (value) { + Stream.writeByte(this.dataview, value, 4, true); + } + writeUint64 (value) { + Stream.writeByte(this.dataview, (value & 0xFFFFFFFF00000000) >> 32, 4); + Stream.writeByte(this.dataview, (value & 0x00000000FFFFFFFF), 4); + } + writeStr (value) { + value = value.toString(); + let length = value.length; + for (let i = 0; i < length; i++) { + this.writeUint8(value.charCodeAt(i)); + } + } +} + +export default Stream; diff --git a/packages/xgplayer-flv/webpack.config.js b/packages/xgplayer-flv/webpack.config.js new file mode 100644 index 00000000..33504b31 --- /dev/null +++ b/packages/xgplayer-flv/webpack.config.js @@ -0,0 +1,75 @@ +const polyfill = [] + +const umd = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/dist`, + filename: 'index.js', + library: 'xgplayer-flv', + libraryTarget: 'umd' + }, + mode: 'production', + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader' + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true + } + }, + 'postcss-loader', + 'sass-loader' + ] + }] + }, + externals: { + xgplayer: 'xgplayer' + }, + optimization: { + minimize: true + } +} + +const client = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/browser`, + filename: 'xgplayer-flv.js' + }, + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader' + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true + } + }, + 'postcss-loader', + 'sass-loader' + ] + }] + }, + externals: { + xgplayer: 'Player' + }, + mode: 'production', + optimization: { + minimize: true + } +} + +module.exports = [umd, client] diff --git a/packages/xgplayer-hls.js/.gitignore b/packages/xgplayer-hls.js/.gitignore new file mode 100644 index 00000000..93cab344 --- /dev/null +++ b/packages/xgplayer-hls.js/.gitignore @@ -0,0 +1,2 @@ +node_modules +yarn-error.log diff --git a/packages/xgplayer-hls.js/browser/xgplayer-hlsjs.js b/packages/xgplayer-hls.js/browser/xgplayer-hlsjs.js new file mode 100644 index 00000000..c38eb437 --- /dev/null +++ b/packages/xgplayer-hls.js/browser/xgplayer-hlsjs.js @@ -0,0 +1 @@ +window.HlsJsPlayer=function(t){var e={};function r(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(i,a,function(e){return t[e]}.bind(null,a));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([function(t,e,r){var i;i=function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/dist/",r(r.s=8)}([function(t,e,r){"use strict";r.d(e,"a",function(){return l}),r.d(e,"b",function(){return u});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function a(){}var n={trace:a,debug:a,log:a,warn:a,info:a,error:a},o=n;function s(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i "+e}(t,i[0])),e.apply(self.console,i)}:a}(e)})}var l=function(t){if(!0===t||"object"===(void 0===t?"undefined":i(t))){s(t,"debug","log","info","warn","error");try{o.log()}catch(t){o=n}}else o=n},u=n},function(t,e,r){"use strict";e.a={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCH:"hlsLevelSwitch",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCH:"hlsAudioTrackSwitch",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},function(t,e,r){"use strict";r.d(e,"b",function(){return i}),r.d(e,"a",function(){return a});var i={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},a={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException"}},function(t,e,r){"use strict";r.d(e,"b",function(){return a});var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.isHeader=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.isFooter=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.getID3Data=function(e,r){for(var i=r,a=0;t.isHeader(e,r);){a+=10,a+=t._readSize(e,r+6),t.isFooter(e,r+10)&&(a+=10),r+=a}if(a>0)return e.subarray(i,i+a)},t._readSize=function(t,e){var r=0;return r=(127&t[e])<<21,r|=(127&t[e+1])<<14,r|=(127&t[e+2])<<7,r|=127&t[e+3]},t.getTimeStamp=function(e){for(var r=t.getID3Frames(e),i=0;i1&&void 0!==arguments[1]&&arguments[1],r=t.length,i=void 0,a=void 0,n=void 0,o="",s=0;s>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(i);break;case 12:case 13:a=t[s++],o+=String.fromCharCode((31&i)<<6|63&a);break;case 14:a=t[s++],n=t[s++],o+=String.fromCharCode((15&i)<<12|(63&a)<<6|(63&n)<<0)}}return o},t}(),a=i._utf8ArrayToStr;e.a=i},function(t,e,r){"use strict";var i=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.subtle=e,this.aesIV=r}return t.prototype.decrypt=function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)},t}();var a=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.subtle=e,this.key=r}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}();var n=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return t.prototype.uint8ArrayToUint32Array_=function(t){for(var e=new DataView(t),r=new Uint32Array(4),i=0;i<4;i++)r[i]=e.getUint32(4*i);return r},t.prototype.initTable=function(){var t=this.sBox,e=this.invSBox,r=this.subMix,i=r[0],a=r[1],n=r[2],o=r[3],s=this.invSubMix,l=s[0],u=s[1],d=s[2],h=s[3],c=new Uint32Array(256),f=0,p=0,g=0;for(g=0;g<256;g++)c[g]=g<128?g<<1:g<<1^283;for(g=0;g<256;g++){var v=p^p<<1^p<<2^p<<3^p<<4;v=v>>>8^255&v^99,t[f]=v,e[v]=f;var y=c[f],m=c[y],b=c[m],E=257*c[v]^16843008*v;i[f]=E<<24|E>>>8,a[f]=E<<16|E>>>16,n[f]=E<<8|E>>>24,o[f]=E,E=16843009*b^65537*m^257*y^16843008*f,l[v]=E<<24|E>>>8,u[v]=E<<16|E>>>16,d[v]=E<<8|E>>>24,h[v]=E,f?(f=y^c[c[c[b^y]]],p^=c[c[p]]):f=p=1}},t.prototype.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),r=!0,i=0;i0&&this._events[t].length>o&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){if(!i(e))throw TypeError("listener must be a function");var r=!1;function a(){this.removeListener(t,a),r||(r=!0,e.apply(this,arguments))}return a.listener=e,this.on(t,a),this},r.prototype.removeListener=function(t,e){var r,n,o,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(o=(r=this._events[t]).length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(r)){for(s=o;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(i(r=this._events[t]))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){var i,a,n,o,s;i=/^((?:[^\/;?#]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,a=/^([^\/;?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(t,e,r){if(r=r||{},t=t.trim(),!(e=e.trim())){if(!r.alwaysNormalize)return t;var i=this.parseURL(t);if(!o)throw new Error("Error trying to parse base URL.");return i.path=s.normalizePath(i.path),s.buildURLFromParts(i)}var n=this.parseURL(e);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return r.alwaysNormalize?(n.path=s.normalizePath(n.path),s.buildURLFromParts(n)):e;var o=this.parseURL(t);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=a.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(u.netLoc=o.netLoc,"/"!==n.path[0]))if(n.path){var d=o.path,h=d.substring(0,d.lastIndexOf("/")+1)+n.path;u.path=s.normalizePath(h)}else u.path=o.path,n.params||(u.params=o.params,n.query||(u.query=o.query));return null===u.path&&(u.path=r.alwaysNormalize?s.normalizePath(n.path):n.path),s.buildURLFromParts(u)},parseURL:function(t){var e=i.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(n,"");t.length!==(t=t.replace(o,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=s},function(t,e,r){"use strict";var i=r(1),a=r(2),n=r(4),o=r(0);function s(t,e){return 255===t[e]&&240==(246&t[e+1])}function l(t,e){return 1&t[e+1]?7:9}function u(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function d(t,e){return!!(e+1>>6),!((s=(60&e[r+2])>>>2)>f.length-1))return u=(1&e[r+2])<<2,u|=(192&e[r+3])>>>6,o.b.log("manifest codec:"+i+",ADTS data:type:"+n+",sampleingIndex:"+s+"["+f[s]+"Hz],channelConfig:"+u),/firefox/i.test(h)?s>=6?(n=5,d=new Array(4),l=s-3):(n=2,d=new Array(2),l=s):-1!==h.indexOf("android")?(n=2,d=new Array(2),l=s):(n=5,d=new Array(4),i&&(-1!==i.indexOf("mp4a.40.29")||-1!==i.indexOf("mp4a.40.5"))||!i&&s>=6?l=s-3:((i&&-1!==i.indexOf("mp4a.40.2")&&(s>=6&&1===u||/vivaldi/i.test(h))||!i&&1===u)&&(n=2,d=new Array(2)),l=s)),d[0]=n<<3,d[0]|=(14&s)>>1,d[1]|=(1&s)<<7,d[1]|=u<<3,5===n&&(d[1]|=(14&l)>>1,d[2]=(1&l)<<7,d[2]|=8,d[3]=0),{config:d,samplerate:f[s],channelCount:u,codec:"mp4a.40."+n,manifestCodec:c};t.trigger(Event.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+s})}(e,r,i,n);t.config=s.config,t.samplerate=s.samplerate,t.channelCount=s.channelCount,t.codec=s.codec,t.manifestCodec=s.manifestCodec,o.b.log("parsed codec:"+t.codec+",rate:"+s.samplerate+",nb channel:"+s.channelCount)}}function f(t){return 9216e4/t}function p(t,e,r,i,a){var n=function(t,e,r,i,a){var n,o,s=t.length;if(n=l(t,e),o=u(t,e),(o-=n)>0&&e+n+o<=s)return{headerLength:n,frameLength:o,stamp:r+i*a}}(e,r,i,a,f(t.samplerate));if(n){var o=n.stamp,s=n.headerLength,d=n.frameLength,h={unit:e.subarray(r+s,r+s+d),pts:o,dts:o};return t.samples.push(h),t.len+=d,{sample:h,length:d+s}}}var g=r(3);var v=function(){function t(e,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.config=i,this.remuxer=r}return t.prototype.resetInitSegment=function(t,e,r,i){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:e,duration:i,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){if(!t)return!1;for(var e=(g.a.getID3Data(t,0)||[]).length,r=t.length;e0},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint32=function(t,e){t.data&&(e+=t.start,t=t.data);var r=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return r<0?4294967296+r:r},t.writeUint32=function(t,e,r){t.data&&(e+=t.start,t=t.data),t[e]=r>>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r},t.findBox=function(e,r){var i,a,n,o,s,l,u=[];if(e.data?(s=e.start,n=e.end,e=e.data):(s=0,n=e.byteLength),!r.length)return null;for(i=s;i1?i+a:n,t.bin2str(e.subarray(i+4,i+8))===r[0]&&(1===r.length?u.push({data:e,start:i+8,end:l}):(o=t.findBox({data:e,start:i+8,end:l},r.slice(1))).length&&(u=u.concat(o))),i=l;return u},t.parseInitSegment=function(e){var r=[];return t.findBox(e,["moov","trak"]).forEach(function(e){var i=t.findBox(e,["tkhd"])[0];if(i){var a=i.data[i.start],n=0===a?12:20,s=t.readUint32(i,n),l=t.findBox(e,["mdia","mdhd"])[0];if(l){n=0===(a=l.data[l.start])?12:20;var u=t.readUint32(l,n),d=t.findBox(e,["mdia","hdlr"])[0];if(d){var h={soun:"audio",vide:"video"}[t.bin2str(d.data.subarray(d.start+8,d.start+12))];if(h){var c=t.findBox(e,["mdia","minf","stbl","stsd"]);if(c.length){c=c[0];var f=t.bin2str(c.data.subarray(c.start+12,c.start+16));o.b.log("MP4Demuxer:"+h+":"+f+" found")}r[s]={timescale:u,type:h},r[h]={timescale:u,id:s}}}}}}),r},t.getStartDTS=function(e,r){var i,a,n;return i=t.findBox(r,["moof","traf"]),a=[].concat.apply([],i.map(function(r){return t.findBox(r,["tfhd"]).map(function(i){var a,n;return a=t.readUint32(i,4),n=e[a].timescale||9e4,t.findBox(r,["tfdt"]).map(function(e){var r,i;return r=e.data[e.start],i=t.readUint32(e,4),1===r&&(i*=Math.pow(2,32),i+=t.readUint32(e,8)),i})[0]/n})})),n=Math.min.apply(null,a),isFinite(n)?n:0},t.offsetStartDTS=function(e,r,i){t.findBox(r,["moof","traf"]).map(function(r){return t.findBox(r,["tfhd"]).map(function(a){var n=t.readUint32(a,4),o=e[n].timescale||9e4;t.findBox(r,["tfdt"]).map(function(e){var r=e.data[e.start],a=t.readUint32(e,4);if(0===r)t.writeUint32(e,4,a-i*o);else{a*=Math.pow(2,32),a+=t.readUint32(e,8),a-=i*o,a=Math.max(a,0);var n=Math.floor(a/(y+1)),s=Math.floor(a%(y+1));t.writeUint32(e,4,n),t.writeUint32(e,8,s)}})})})},t.prototype.append=function(e,r,a,n){var o=this.initData;o||(this.resetInitSegment(e,this.audioCodec,this.videoCodec),o=this.initData);var s,l=this.initPTS;if(void 0===l){var u=t.getStartDTS(o,e);this.initPTS=l=u-r,this.observer.trigger(i.a.INIT_PTS_FOUND,{initPTS:l})}t.offsetStartDTS(o,e,l),s=t.getStartDTS(o,e),this.remuxer.remux(o.audio,o.video,null,null,s,a,n,e)},t.prototype.destroy=function(){},t}(),b={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(t,e,r,i,a){if(!(r+24>e.length)){var n=this.parseHeader(e,r);if(n&&r+n.frameLength<=e.length){var o=i+a*(9e4*n.samplesPerFrame/n.sampleRate),s={unit:e.subarray(r,r+n.frameLength),pts:o,dts:o};return t.config=[],t.channelCount=n.channelCount,t.samplerate=n.sampleRate,t.samples.push(s),t.len+=n.frameLength,{sample:s,length:n.frameLength}}}},parseHeader:function(t,e){var r=t[e+1]>>3&3,i=t[e+1]>>1&3,a=t[e+2]>>4&15,n=t[e+2]>>2&3,o=t[e+2]>>1&1;if(1!==r&&0!==a&&15!==a&&3!==n){var s=3===r?3-i:3===i?3:4,l=1e3*b.BitratesMap[14*s+a-1],u=3===r?0:2===r?1:2,d=b.SamplingRateMap[3*u+n],h=t[e+3]>>6==3?1:2,c=b.SamplesCoefficients[r][i],f=b.BytesInSlot[i],p=8*c*f;return{sampleRate:d,channelCount:h,frameLength:parseInt(c*l/d+o,10)*f,samplesPerFrame:p}}},isHeaderPattern:function(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])},isHeader:function(t,e){return!!(e+1t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},t.prototype.readBits=function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&o.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?r<>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},t.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},t.prototype.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},t.prototype.readBoolean=function(){return 1===this.readBits(1)},t.prototype.readUByte=function(){return this.readBits(8)},t.prototype.readUShort=function(){return this.readBits(16)},t.prototype.readUInt=function(){return this.readBits(32)},t.prototype.skipScalingList=function(t){var e,r=8,i=8;for(e=0;e=t.length)return void r();if(!(t[e].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(t,e,r,i),!i)return}}},t.prototype.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,r=new Int8Array(e),i=0,a=32;a<=t.length-16;a+=160,i+=16)r.set(t.subarray(a,a+16),i);return r},t.prototype.getAvcDecryptedUnit=function(t,e){e=new Uint8Array(e);for(var r=0,i=32;i<=t.length-16;i+=160,r+=16)t.set(e.subarray(r,r+16),i);return t},t.prototype.decryptAvcSample=function(t,e,r,i,a,n){var o=this.discardEPB(a.data),s=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(s.buffer,function(s){a.data=l.getAvcDecryptedUnit(o,s),n||l.decryptAvcSamples(t,e,r+1,i)})},t.prototype.decryptAvcSamples=function(t,e,r,i){for(;;e++,r=0){if(e>=t.length)return void i();for(var a=t[e].units;!(r>=a.length);r++){var n=a[r];if(!(n.length<=48||1!==n.type&&5!==n.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,r,i,n,o),!o)return}}}},t}();var A={video:0,audio:1,id3:2,text:3},S=function(){function t(e,r,i,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.config=i,this.typeSupported=a,this.remuxer=r,this.sampleAes=null}return t.prototype.setDecryptData=function(t){null!=t&&null!=t.key&&"SAMPLE-AES"===t.method?this.sampleAes=new R(this.observer,this.config,t,this.discardEPB):this.sampleAes=null},t.probe=function(e){var r=t._syncOffset(e);return!(r<0)&&(r&&o.b.warn("MPEG2-TS detected but first sync word found @ offset "+r+", junk ahead ?"),!0)},t._syncOffset=function(t){for(var e=Math.min(1e3,t.length-564),r=0;r>4>1){if((h=l+5+e[l+4])===l+188)continue}else h=l+4;switch(d){case b:u&&(A&&(c=D(A))&&I(c,!1),A={data:[],size:0}),A&&(A.data.push(e.subarray(h,l+188)),A.size+=l+188-h);break;case E:u&&(S&&(c=D(S))&&(y.isAAC?k(c):O(c)),S={data:[],size:0}),S&&(S.data.push(e.subarray(h,l+188)),S.size+=l+188-h);break;case T:u&&(_&&(c=D(_))&&C(c),_={data:[],size:0}),_&&(_.data.push(e.subarray(h,l+188)),_.size+=l+188-h);break;case 0:u&&(h+=e[h]+1),R=this._pmtId=L(e,h);break;case R:u&&(h+=e[h]+1);var x=w(e,h,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=x.avc)>0&&(v.pid=b),(E=x.audio)>0&&(y.pid=E,y.isAAC=x.isAAC),(T=x.id3)>0&&(m.pid=T),p&&!g&&(o.b.log("reparse from beginning"),p=!1,l=P-188),g=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});A&&(c=D(A))?(I(c,!0),v.pesData=null):v.pesData=A,S&&(c=D(S))?(y.isAAC?k(c):O(c),y.pesData=null):(S&&S.size&&o.b.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=S),_&&(c=D(_))?(C(c),m.pesData=null):m.pesData=_,null==this.sampleAes?this.remuxer.remux(y,v,m,this._txtTrack,r,n,s):this.decryptAndRemux(y,v,m,this._txtTrack,r,n,s)},t.prototype.decryptAndRemux=function(t,e,r,i,a,n,o){if(t.samples&&t.isAAC){var s=this;this.sampleAes.decryptAacSamples(t.samples,0,function(){s.decryptAndRemuxAvc(t,e,r,i,a,n,o)})}else this.decryptAndRemuxAvc(t,e,r,i,a,n,o)},t.prototype.decryptAndRemuxAvc=function(t,e,r,i,a,n,o){if(e.samples){var s=this;this.sampleAes.decryptAvcSamples(e.samples,0,0,function(){s.remuxer.remux(t,e,r,i,a,n,o)})}else this.remuxer.remux(t,e,r,i,a,n,o)},t.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t.prototype._parsePAT=function(t,e){return(31&t[e+10])<<8|t[e+11]},t.prototype._parsePMT=function(t,e,r,i){var a,n,s={audio:-1,avc:-1,id3:-1,isAAC:!0};for(a=e+3+((15&t[e+1])<<8|t[e+2])-4,e+=12+((15&t[e+10])<<8|t[e+11]);e1;){var c=new Uint8Array(h[0].length+h[1].length);c.set(h[0]),c.set(h[1],h[0].length),h[0]=c,h.splice(1,1)}if(1===((e=h[0])[0]<<16)+(e[1]<<8)+e[2]){if((i=(e[4]<<8)+e[5])&&i>t.size-6)return null;192&(r=e[7])&&((s=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2)>4294967295&&(s-=8589934592),64&r?((l=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>4294967295&&(l-=8589934592),s-l>54e5&&(o.b.warn(Math.round((s-l)/9e4)+"s delta between PTS and DTS, align them"),s=l)):l=s),u=(a=e[8])+9,t.size-=u,n=new Uint8Array(t.size);for(var f=0,p=h.length;fg){u-=g;continue}e=e.subarray(u),g-=u,u=0}n.set(e,d),d+=g}return i&&(i-=a+3),{data:n,pts:s,dts:l,len:i}}return null},t.prototype.pushAccesUnit=function(t,e){if(t.units.length&&t.frame){var r=e.samples,i=r.length;!this.config.forceKeyFrameOnDiscontinuity||!0===t.key||e.sps&&(i||this.contiguous)?(t.id=i,r.push(t)):e.dropped++}t.debug.length&&o.b.log(t.pts+"/"+t.dts+":"+t.debug)},t.prototype._parseAVCPES=function(t,e){var r,i,a,n=this,o=this._avcTrack,s=this._parseAVCNALu(t.data),l=this.avcSample,u=!1,d=this.pushAccesUnit.bind(this),h=function(t,e,r,i){return{key:t,pts:e,dts:r,units:[],debug:i}};t.data=null,l&&s.length&&!o.audFound&&(d(l,o),l=this.avcSample=h(!1,t.pts,t.dts,"")),s.forEach(function(e){switch(e.type){case 1:i=!0,l||(l=n.avcSample=h(!0,t.pts,t.dts,"")),l.frame=!0;var s=e.data;if(u&&s.length>4){var c=new T(s).readSliceType();2!==c&&4!==c&&7!==c&&9!==c||(l.key=!0)}break;case 5:i=!0,l||(l=n.avcSample=h(!0,t.pts,t.dts,"")),l.key=!0,l.frame=!0;break;case 6:i=!0,(r=new T(n.discardEPB(e.data))).readUByte();for(var f=0,p=0,g=!1,v=0;!g&&r.bytesAvailable>1;){f=0;do{f+=v=r.readUByte()}while(255===v);p=0;do{p+=v=r.readUByte()}while(255===v);if(4===f&&0!==r.bytesAvailable){if(g=!0,181===r.readUByte())if(49===r.readUShort())if(1195456820===r.readUInt())if(3===r.readUByte()){var y=r.readUByte(),m=31&y,b=[y,r.readUByte()];for(a=0;a0){if(e.pts>=t[r-1].pts)t.push(e);else for(var i=r-1;i>=0;i--)if(e.pts=0)i={data:t.subarray(h,n-l-1),type:a},d.push(i);else{var c=this._getLastNalUnit();if(c&&(u&&n<=4-u&&c.state&&(c.data=c.data.subarray(0,c.data.byteLength-u)),(r=n-l-1)>0)){var f=new Uint8Array(c.data.byteLength+r);f.set(c.data,0),f.set(t.subarray(0,r),c.data.byteLength),c.data=f}}n=0&&l>=0&&(i={data:t.subarray(h,o),type:a,state:l},d.push(i)),0===d.length){var p=this._getLastNalUnit();if(p){var g=new Uint8Array(p.data.byteLength+t.byteLength);g.set(p.data,0),g.set(t,p.data.byteLength),p.data=g}}return s.naluState=l,d},t.prototype.discardEPB=function(t){for(var e,r,i=t.byteLength,a=[],n=1;n1&&(o.b.log("AAC: align PTS for overlapping frames by "+Math.round((T-y)/90)),y=T)}for(;n>24&255,e[1]=i>>16&255,e[2]=i>>8&255,e[3]=255&i,e.set(t,4),a=0,i=8;a>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,r,i){return t.box(t.types.moof,t.mfhd(e),t.traf(i,r))},t.moov=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trak(e[r]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(t.mvex(e)))},t.mvex=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trex(e[r]);return t.box.apply(null,[t.types.mvex].concat(i))},t.mvhd=function(e,r){r*=e;var i=Math.floor(r/(w+1)),a=Math.floor(r%(w+1)),n=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,n)},t.sdtp=function(e){var r,i,a=e.samples||[],n=new Uint8Array(4+a.length);for(i=0;i>>8&255),n.push(255&a),n=n.concat(Array.prototype.slice.call(i));for(r=0;r>>8&255),o.push(255&a),o=o.concat(Array.prototype.slice.call(i));var s=t.box(t.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|e.sps.length].concat(n).concat([e.pps.length]).concat(o))),l=e.width,u=e.height,d=e.pixelRatio[0],h=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,h>>24,h>>16&255,h>>8&255,255&h])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var r=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var r=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var r=e.id,i=e.duration*e.timescale,a=e.width,n=e.height,o=Math.floor(i/(w+1)),s=Math.floor(i%(w+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,n>>8&255,255&n,0,0]))},t.traf=function(e,r){var i=t.sdtp(e),a=e.id,n=Math.floor(r/(w+1)),o=Math.floor(r%(w+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o])),t.trun(e,i.length+16+20+8+16+8+8),i)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var r=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,r){var i,a,n,o,s,l,u=e.samples||[],d=u.length,h=12+16*d,c=new Uint8Array(h);for(r+=8+h,c.set([0,0,15,1,d>>>24&255,d>>>16&255,d>>>8&255,255&d,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),i=0;i>>24&255,n>>>16&255,n>>>8&255,255&n,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return t.box(t.types.trun,c)},t.initSegment=function(e){t.types||t.init();var r,i=t.moov(e);return(r=new Uint8Array(t.FTYP.byteLength+i.byteLength)).set(t.FTYP),r.set(i,t.FTYP.byteLength),r},t}();var I=function(){function t(e,r,i,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.config=r,this.typeSupported=i;var n=navigator.userAgent;this.isSafari=a&&a.indexOf("Apple")>-1&&n&&!n.match("CriOS"),this.ISGenerated=!1}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(t){this._initPTS=this._initDTS=t},t.prototype.resetInitSegment=function(){this.ISGenerated=!1},t.prototype.remux=function(t,e,r,a,n,s,l){if(this.ISGenerated||this.generateIS(t,e,n),this.ISGenerated){var u=t.samples.length,d=e.samples.length,h=n,c=n;if(u&&d){var f=(t.samples[0].dts-e.samples[0].dts)/e.inputTimeScale;h+=Math.max(0,f),c+=Math.max(0,-f)}if(u){t.timescale||(o.b.warn("regenerate InitSegment as audio detected"),this.generateIS(t,e,n));var p=this.remuxAudio(t,h,s,l);if(d){var g=void 0;p&&(g=p.endPTS-p.startPTS),e.timescale||(o.b.warn("regenerate InitSegment as video detected"),this.generateIS(t,e,n)),this.remuxVideo(e,c,s,g,l)}}else{var v=void 0;d&&(v=this.remuxVideo(e,c,s,l)),v&&t.codec&&this.remuxEmptyAudio(t,h,s,v)}}r.samples.length&&this.remuxID3(r,n),a.samples.length&&this.remuxText(a,n),this.observer.trigger(i.a.FRAG_PARSED)},t.prototype.generateIS=function(t,e,r){var n,s,l=this.observer,u=t.samples,d=e.samples,h=this.typeSupported,c="audio/mp4",f={},p={tracks:f},g=void 0===this._initPTS;if(g&&(n=s=1/0),t.config&&u.length&&(t.timescale=t.samplerate,o.b.log("audio sampling rate : "+t.samplerate),t.isAAC||(h.mpeg?(c="audio/mpeg",t.codec=""):h.mp3&&(t.codec="mp3")),f.audio={container:c,codec:t.codec,initSegment:!t.isAAC&&h.mpeg?new Uint8Array:D.initSegment([t]),metadata:{channelCount:t.channelCount}},g&&(n=s=u[0].pts-t.inputTimeScale*r)),e.sps&&e.pps&&d.length){var v=e.inputTimeScale;e.timescale=v,f.video={container:"video/mp4",codec:e.codec,initSegment:D.initSegment([e]),metadata:{width:e.width,height:e.height}},g&&(n=Math.min(n,d[0].pts-v*r),s=Math.min(s,d[0].dts-v*r),this.observer.trigger(i.a.INIT_PTS_FOUND,{initPTS:n}))}Object.keys(f).length?(l.trigger(i.a.FRAG_PARSING_INIT_SEGMENT,p),this.ISGenerated=!0,g&&(this._initPTS=n,this._initDTS=s)):l.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.prototype.remuxVideo=function(t,e,r,n,s){var l,u,d,h,c,f,p,g=8,v=t.timescale,y=t.samples,m=[],b=y.length,E=this._PTSNormalize,T=this._initDTS,R=this.nextAvcDts,A=this.isSafari;A&&(r|=y.length&&R&&(s&&Math.abs(e-R/v)<.1||Math.abs(y[0].pts-R-T)1?o.b.log("AVC:"+w+" ms hole between fragments detected,filling it"):w<-1&&o.b.log("AVC:"+-w+" ms overlapping between fragments detected"),c=R,y[0].dts=c,h=Math.max(h-w,R),y[0].pts=h,o.b.log("Video/PTS/DTS adjusted: "+Math.round(h/90)+"/"+Math.round(c/90)+",delta:"+w+" ms")),L=y[y.length-1],p=Math.max(L.dts,0),f=Math.max(L.pts,0,p),A&&(l=Math.round((p-c)/(y.length-1)));for(var I=0,k=0,O=0;O0?B-1:B].dts;if(q.stretchShortVideoTrack){var J=q.maxBufferHole,$=q.maxSeekHole,Z=Math.floor(Math.min(J,$)*v),tt=(n?h+n*v:this.nextAudioPts)-G.pts;tt>Z?((l=tt-Q)<0&&(l=Q),o.b.log("It is approximately "+tt/90+" ms to the next segment; using duration "+l/90+" ms for the last video frame.")):l=Q}else l=Q}K=Math.round(G.pts-G.dts)}m.push({size:H,duration:l,cts:K,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:G.key?2:1,isNonSync:G.key?0:1}})}this.nextAvcDts=p+l;var et=t.dropped;if(t.len=0,t.nbNalu=0,t.dropped=0,m.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var rt=m[0].flags;rt.dependsOn=2,rt.isNonSync=0}t.samples=m,d=D.moof(t.sequenceNumber++,c,t),t.samples=[];var it={data1:d,data2:u,startPTS:h/v,endPTS:(f+l)/v,startDTS:c/v,endDTS:this.nextAvcDts/v,type:"video",nb:m.length,dropped:et};return this.observer.trigger(i.a.FRAG_PARSING_DATA,it),it},t.prototype.remuxAudio=function(t,e,r,n){var s,l,u,d,h,c,f,p=t.inputTimeScale,g=t.timescale,v=p/g,y=(t.isAAC?1024:1152)*v,m=this._PTSNormalize,b=this._initDTS,E=!t.isAAC&&this.typeSupported.mpeg,T=t.samples,R=[],A=this.nextAudioPts;if(r|=T.length&&A&&(n&&Math.abs(e-A/p)<.1||Math.abs(T[0].pts-A-b)<20*y),T.forEach(function(t){t.pts=t.dts=m(t.pts-b,e*p)}),0!==(T=T.filter(function(t){return t.pts>=0})).length){if(r||(A=n?e*p:T[0].pts),t.isAAC)for(var S=this.config.maxAudioFramesDrift,_=0,w=A;_=S*y&&O<1e4&&w){var C=Math.round(I/y);o.b.warn("Injecting "+C+" audio frame @ "+(w/p).toFixed(3)+"s due to "+Math.round(1e3*I/p)+" ms gap.");for(var P=0;P0&&G<1e4)j=Math.round((B-A)/y),o.b.log(G+" ms hole between AAC samples detected,filling it"),j>0&&((u=L.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(u=U.subarray()),t.len+=j*u.length);else if(G<-12){o.b.log("drop overlapping AAC sample, expected/parsed/delta:"+(A/p).toFixed(3)+"s/"+(B/p).toFixed(3)+"s/"+-G+"ms"),t.len-=U.byteLength;continue}B=A}if(c=B,!(t.len>0))return;var H=E?t.len:t.len+8;s=E?0:8;try{d=new Uint8Array(H)}catch(t){return void this.observer.trigger(i.a.ERROR,{type:a.b.MUX_ERROR,details:a.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:H,reason:"fail allocating audio mdat "+H})}E||(new DataView(d.buffer).setUint32(0,H),d.set(D.types.mdat,4));for(var K=0;K=2&&(V=R[Y-2].duration,l.duration=V),Y){this.nextAudioPts=A=f+v*V,t.len=0,t.samples=R,h=E?new Uint8Array:D.moof(t.sequenceNumber++,c/v,t),t.samples=[];var z=c/p,X=A/p,q={data1:h,data2:d,startPTS:z,endPTS:X,startDTS:z,endDTS:X,type:"audio",nb:Y};return this.observer.trigger(i.a.FRAG_PARSING_DATA,q),q}return null}},t.prototype.remuxEmptyAudio=function(t,e,r,i){var a=t.inputTimeScale,n=a/(t.samplerate?t.samplerate:a),s=this.nextAudioPts,l=(void 0!==s?s:i.startDTS*a)+this._initDTS,u=i.endDTS*a+this._initDTS,d=1024*n,h=Math.ceil((u-l)/d),c=L.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(o.b.warn("remux empty Audio"),c){for(var f=[],p=0;p4294967296;)t+=r;return t},t}();var k=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(){},t.prototype.resetInitSegment=function(){},t.prototype.remux=function(t,e,r,a,n,o,s,l){var u=this.observer,d="";t&&(d+="audio"),e&&(d+="video"),u.trigger(i.a.FRAG_PARSING_DATA,{data1:l,startPTS:n,startDTS:n,type:d,nb:1,dropped:0}),u.trigger(i.a.FRAG_PARSED)},t}();var O=function(){function t(e,r,i,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.typeSupported=r,this.config=i,this.vendor=a}return t.prototype.destroy=function(){var t=this.demuxer;t&&t.destroy()},t.prototype.push=function(t,e,r,a,o,s,l,u,d,h,c,f){if(t.byteLength>0&&null!=e&&null!=e.key&&"AES-128"===e.method){var p=this.decrypter;null==p&&(p=this.decrypter=new n.a(this.observer,this.config));var g,v=this;try{g=performance.now()}catch(t){g=Date.now()}p.decrypt(t,e.key.buffer,e.iv.buffer,function(t){var n;try{n=performance.now()}catch(t){n=Date.now()}v.observer.trigger(i.a.FRAG_DECRYPTED,{stats:{tstart:g,tdecrypt:n}}),v.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),a,o,s,l,u,d,h,c,f)})}else this.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),a,o,s,l,u,d,h,c,f)},t.prototype.pushDecrypted=function(t,e,r,n,o,s,l,u,d,h,c,f){var p=this.demuxer;if(!p||l&&!this.probe(t)){for(var g=this.observer,y=this.typeSupported,b=this.config,E=[{demux:S,remux:I},{demux:m,remux:k},{demux:v,remux:I},{demux:_,remux:I}],T=0,R=E.length;T1?r-1:0),a=1;aNumber.MAX_SAFE_INTEGER?1/0:e},t.prototype.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var r=new Uint8Array(e.length/2),i=0;iNumber.MAX_SAFE_INTEGER?1/0:e},t.prototype.decimalFloatingPoint=function(t){return parseFloat(this[t])},t.prototype.enumeratedString=function(t){return this[t]},t.prototype.decimalResolution=function(t){var e=h.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,r={};for(c.lastIndex=0;null!==(e=c.exec(t));){var i=e[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),r[e[1]]=i}return r},t}(),p={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function g(t,e){return MediaSource.isTypeSupported((e||"video")+'/mp4;codecs="'+t+'"')}var v=function(){function t(t,e){for(var r=0;r>8*(15-r)&255;return e},t.prototype.fragmentDecryptdataFromLevelkey=function(t,e){var r=t;return t&&t.method&&t.uri&&!t.iv&&((r=new R).method=t.method,r.baseuri=t.baseuri,r.reluri=t.reluri,r.iv=this.createInitializationVector(e)),r},t.prototype.cloneObj=function(t){return JSON.parse(JSON.stringify(t))},v(t,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=n.a.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(t){this._url=t}},{key:"programDateTime",get:function(){return!this._programDateTime&&this.rawProgramDateTime&&(this._programDateTime=new Date(Date.parse(this.rawProgramDateTime))),this._programDateTime}},{key:"byteRange",get:function(){if(!this._byteRange){var t=this._byteRange=[];if(this.rawByteRange){var e=this.rawByteRange.split("@",2);if(1===e.length){var r=this.lastByteRangeEndOffset;t[0]=r||0}else t[0]=parseInt(e[1]);t[1]=parseInt(e[0])+t[0]}}return this._byteRange}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata}}]),t}();function S(t,e){if(!t)return null;for(var r=null,i=0;i0?a[0]:i[0],t=t.filter(function(t){return-1===i.indexOf(t)})}}),e.unknownCodecs=t}for(m.lastIndex=0;null!=(i=m.exec(t));){var n={},o=n.attrs=new f(i[1]);n.url=this.resolve(i[2],e);var s=o.decimalResolution("RESOLUTION");s&&(n.width=s.width,n.height=s.height),n.bitrate=o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),n.name=o.NAME,a([].concat((o.CODECS||"").split(/[ ,]+/)),n),n.videoCodec&&-1!==n.videoCodec.indexOf("avc1")&&(n.videoCodec=this.avc1toavcoti(n.videoCodec)),r.push(n)}return r},e.prototype.parseMasterPlaylistMedia=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=void 0,n=[],o=0;for(b.lastIndex=0;null!==(a=b.exec(t));){var s={},l=new f(a[1]);if(l.TYPE===r){if(s.groupId=l["GROUP-ID"],s.name=l.NAME,s.type=r,s.default="YES"===l.DEFAULT,s.autoselect="YES"===l.AUTOSELECT,s.forced="YES"===l.FORCED,l.URI&&(s.url=this.resolve(l.URI,e)),s.lang=l.LANGUAGE,s.name||(s.name=s.lang),i.length){var u=S(i,s.groupId);s.audioCodec=u?u.codec:i[0].codec}s.id=o++,n.push(s)}}return n},e.prototype.avc1toavcoti=function(t){var e,r=t.split(".");return r.length>2?(e=r.shift()+".",e+=parseInt(r.shift()).toString(16),e+=("000"+parseInt(r.shift()).toString(16)).substr(-4)):e=t,e},e.prototype.parseLevelPlaylist=function(t,e,r,i){var a,n,o=0,s=0,u={type:null,version:null,url:e,fragments:[],live:!0,startSN:0},d=new R,h=0,c=null,p=new A;for(E.lastIndex=0;null!==(a=E.exec(t));){var g=a[1];if(g){p.duration=parseFloat(g);var v=(" "+a[2]).slice(1);p.title=v||null,p.tagList.push(v?["INF",g,v]:["INF",g])}else if(a[3]){if(!isNaN(p.duration)){var y=o++;p.type=i,p.start=s,p.levelkey=d,p.sn=y,p.level=r,p.cc=h,p.baseurl=e,p.relurl=(" "+a[3]).slice(1),u.fragments.push(p),c=p,s+=p.duration,p=new A}}else if(a[4]){if(p.rawByteRange=(" "+a[4]).slice(1),c){var m=c.byteRangeEndOffset;m&&(p.lastByteRangeEndOffset=m)}}else if(a[5])p.rawProgramDateTime=(" "+a[5]).slice(1),p.tagList.push(["PROGRAM-DATE-TIME",p.rawProgramDateTime]),void 0===u.programDateTime&&(u.programDateTime=new Date(new Date(Date.parse(a[5]))-1e3*s));else{for(a=a[0].match(T),n=1;n=0&&(d.method=L,d.baseuri=e,d.reluri=w,d.key=null,d.iv=D));break;case"START":var I=new f(b).decimalFloatingPoint("TIME-OFFSET");isNaN(I)||(u.startTimeOffset=I);break;case"MAP":var k=new f(b);p.relurl=k.URI,p.rawByteRange=k.BYTERANGE,p.baseurl=e,p.level=r,p.type=i,p.sn="initSegment",u.initSegment=p,p=new A;break;default:l.b.warn("line parsed but not handled: "+a)}}}return(p=c)&&!p.relurl&&(u.fragments.pop(),s-=p.duration),u.totalduration=s,u.averagetargetduration=s/u.fragments.length,u.endSN=o-1,u.startCC=u.fragments[0]?u.fragments[0].cc:0,u.endCC=h,u},e.prototype.loadsuccess=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=t.data,n=t.url,u=r.type,d=r.id,h=r.level,c=this.hls;if(this.loaders[u]=void 0,void 0!==n&&0!==n.indexOf("data:")||(n=r.url),e.tload=performance.now(),0===a.indexOf("#EXTM3U"))if(a.indexOf("#EXTINF:")>0){var f="audioTrack"!==u&&"subtitleTrack"!==u,p=isNaN(h)?isNaN(d)?0:d:h,g=this.parseLevelPlaylist(a,n,p,"audioTrack"===u?"audio":"subtitleTrack"===u?"subtitle":"main");g.tload=e.tload,"manifest"===u&&c.trigger(o.a.MANIFEST_LOADED,{levels:[{url:n,details:g}],audioTracks:[],url:n,stats:e,networkDetails:i}),e.tparsed=performance.now(),g.targetduration?f?c.trigger(o.a.LEVEL_LOADED,{details:g,level:h||0,id:d||0,stats:e,networkDetails:i}):"audioTrack"===u?c.trigger(o.a.AUDIO_TRACK_LOADED,{details:g,id:d,stats:e,networkDetails:i}):"subtitleTrack"===u&&c.trigger(o.a.SUBTITLE_TRACK_LOADED,{details:g,id:d,stats:e,networkDetails:i}):c.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.MANIFEST_PARSING_ERROR,fatal:!0,url:n,reason:"invalid targetduration",networkDetails:i})}else{var v=this.parseMasterPlaylist(a,n);if(v.length){var y=v.map(function(t){return{id:t.attrs.AUDIO,codec:t.audioCodec}}),m=this.parseMasterPlaylistMedia(a,n,"AUDIO",y),b=this.parseMasterPlaylistMedia(a,n,"SUBTITLES");if(m.length){var E=!1;m.forEach(function(t){t.url||(E=!0)}),!1===E&&v[0].audioCodec&&!v[0].attrs.AUDIO&&(l.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),m.unshift({type:"main",name:"main"}))}c.trigger(o.a.MANIFEST_LOADED,{levels:v,audioTracks:m,subtitles:b,url:n,stats:e,networkDetails:i})}else c.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.MANIFEST_PARSING_ERROR,fatal:!0,url:n,reason:"no level found in manifest",networkDetails:i})}else c.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.MANIFEST_PARSING_ERROR,fatal:!0,url:n,reason:"no EXTM3U delimiter",networkDetails:i})},e.prototype.loaderror=function(t,e){var r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e.loader;switch(e.type){case"manifest":r=s.a.MANIFEST_LOAD_ERROR,i=!0;break;case"level":r=s.a.LEVEL_LOAD_ERROR,i=!1;break;case"audioTrack":r=s.a.AUDIO_TRACK_LOAD_ERROR,i=!1}n&&(n.abort(),this.loaders[e.type]=void 0),this.hls.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:r,fatal:i,url:n.url,loader:n,response:t,context:e,networkDetails:a})},e.prototype.loadtimeout=function(t,e){var r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e.loader;switch(e.type){case"manifest":r=s.a.MANIFEST_LOAD_TIMEOUT,i=!0;break;case"level":r=s.a.LEVEL_LOAD_TIMEOUT,i=!1;break;case"audioTrack":r=s.a.AUDIO_TRACK_LOAD_TIMEOUT,i=!1}n&&(n.abort(),this.loaders[e.type]=void 0),this.hls.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:r,fatal:i,url:n.url,loader:n,context:e,networkDetails:a})},e}(d);var L=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.FRAG_LOADING));return i.loaders={},i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){var t=this.loaders;for(var e in t){var r=t[e];r&&r.destroy()}this.loaders={},d.prototype.destroy.call(this)},e.prototype.onFragLoading=function(t){var e=t.frag,r=e.type,i=this.loaders[r],a=this.hls.config;e.loaded=0,i&&(l.b.warn("abort previous fragment loader for type:"+r),i.abort()),i=this.loaders[r]=e.loader=void 0!==a.fLoader?new a.fLoader(a):new a.loader(a);var n,o,s=void 0;s={url:e.url,frag:e,responseType:"arraybuffer",progressData:!1};var u=e.byteRangeStartOffset,d=e.byteRangeEndOffset;isNaN(u)||isNaN(d)||(s.rangeStart=u,s.rangeEnd=d),n={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout},o={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},i.load(s,n,o)},e.prototype.loadsuccess=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=t.data,n=r.frag;n.loader=void 0,this.loaders[n.type]=void 0,this.hls.trigger(o.a.FRAG_LOADED,{payload:a,frag:n,stats:e,networkDetails:i})},e.prototype.loaderror=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=e.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_ERROR,fatal:!1,frag:e.frag,response:t,networkDetails:r})},e.prototype.loadtimeout=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=e.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e.frag,networkDetails:r})},e.prototype.loadprogress=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=e.frag;a.loaded=t.loaded,this.hls.trigger(o.a.FRAG_LOAD_PROGRESS,{frag:a,stats:t,networkDetails:i})},e}(d);var w=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.KEY_LOADING));return i.loaders={},i.decryptkey=null,i.decrypturl=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},d.prototype.destroy.call(this)},e.prototype.onKeyLoading=function(t){var e=t.frag,r=e.type,i=this.loaders[r],a=e.decryptdata,n=a.uri;if(n!==this.decrypturl||null===this.decryptkey){var s=this.hls.config;i&&(l.b.warn("abort previous key loader for type:"+r),i.abort()),e.loader=this.loaders[r]=new s.loader(s),this.decrypturl=n,this.decryptkey=null;var u,d,h;u={url:n,frag:e,responseType:"arraybuffer"},d={timeout:s.fragLoadingTimeOut,maxRetry:s.fragLoadingMaxRetry,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout},h={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},e.loader.load(u,d,h)}else this.decryptkey&&(a.key=this.decryptkey,this.hls.trigger(o.a.KEY_LOADED,{frag:e}))},e.prototype.loadsuccess=function(t,e,r){var i=r.frag;this.decryptkey=i.decryptdata.key=new Uint8Array(t.data),i.loader=void 0,this.loaders[i.type]=void 0,this.hls.trigger(o.a.KEY_LOADED,{frag:i})},e.prototype.loaderror=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},e.prototype.loadtimeout=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},e}(d),D={search:function(t,e){for(var r=0,i=t.length-1,a=null,n=null;r<=i;){var o=e(n=t[a=(r+i)/2|0]);if(o>0)r=a+1;else{if(!(o<0))return n;i=a-1}}return null}},I={isBuffered:function(t,e){try{if(t)for(var r=t.buffered,i=0;i=r.start(i)&&e<=r.end(i))return!0}catch(t){}return!1},bufferInfo:function(t,e,r){try{if(t){var i,a=t.buffered,n=[];for(i=0;id&&(l[u-1].end=t[s].end):l.push(t[s])}else l.push(t[s])}for(s=0,i=0,a=n=e;s=h&&e1?e-1:0),a=1;a1?e-1:0),a=1;ae?i.start+i.duration:Math.max(i.start-a.duration,0):r>e?(i.duration=n-i.start,i.duration<0&&l.b.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(a.duration=i.start-n,a.duration<0&&l.b.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!"))}function B(t,e,r,i,a,n){var o=r;if(!isNaN(e.startPTS)){var s=Math.abs(e.startPTS-r);isNaN(e.deltaPTS)?e.deltaPTS=s:e.deltaPTS=Math.max(s,e.deltaPTS),o=Math.max(r,e.startPTS),r=Math.min(r,e.startPTS),i=Math.max(i,e.endPTS),a=Math.min(a,e.startDTS),n=Math.max(n,e.endDTS)}var l=r-e.start;e.start=e.startPTS=r,e.maxStartPTS=o,e.endPTS=i,e.startDTS=a,e.endDTS=n,e.duration=i-r;var u,d,h,c=e.sn;if(!t||ct.endSN)return 0;for(u=c-t.startSN,(d=t.fragments)[u]=e,h=u;h>0;h--)U(d,h,h-1);for(h=u;h=0&&nr.startCC||t&&t.cc0&&-1===t&&(l.b.log("override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=V.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state=V.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=V.STOPPED,this.forceStartLoad=!1},e.prototype.tick=function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)},e.prototype.doTick=function(){switch(this.state){case V.ERROR:break;case V.BUFFER_FLUSHING:this.fragLoadError=0;break;case V.IDLE:this._doTickIdle();break;case V.WAITING_LEVEL:var t=this.levels[this.level];t&&t.details&&(this.state=V.IDLE);break;case V.FRAG_LOADING_WAITING_RETRY:var e=performance.now(),r=this.retryDate;(!r||e>=r||this.media&&this.media.seeking)&&(l.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=V.IDLE);break;case V.ERROR:case V.STOPPED:case V.FRAG_LOADING:case V.PARSING:case V.PARSED:case V.ENDED:}this._checkBuffer(),this._checkFragmentChanged()},e.prototype._doTickIdle=function(){var t=this.hls,e=t.config,r=this.media;if(void 0!==this.levelLastLoaded&&(r||!this.startFragRequested&&e.startFragPrefetch)){var i=void 0;i=this.loadedmetadata?r.currentTime:this.nextLoadPosition;var a=t.nextLoadLevel,n=this.levels[a];if(n){var s=n.bitrate,u=void 0;u=s?Math.max(8*e.maxBufferSize/s,e.maxBufferLength):e.maxBufferLength,u=Math.min(u,e.maxMaxBufferLength);var d=I.bufferInfo(this.mediaBuffer?this.mediaBuffer:r,i,e.maxBufferHole),h=d.len;if(!(h>=u)){l.b.trace("buffer length of "+h.toFixed(3)+" is below max of "+u.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=a;var c=n.details;if(void 0===c||!0===c.live&&this.levelLastLoaded!==a)this.state=V.WAITING_LEVEL;else{var f=this.fragPrevious;if(!c.live&&f&&!f.backtracked&&f.sn===c.endSN&&!d.nextStart)if(Math.min(r.duration,f.start+f.duration)-Math.max(d.end,f.start)<=Math.max(.2,f.duration)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(o.a.BUFFER_EOS,p),void(this.state=V.ENDED)}this._fetchPayloadOrEos(i,d,c)}}}}},e.prototype._fetchPayloadOrEos=function(t,e,r){var i=this.fragPrevious,a=this.level,n=r.fragments,o=n.length;if(0!==o){var s=n[0].start,u=n[o-1].start+n[o-1].duration,d=e.end,h=void 0;if(r.initSegment&&!r.initSegment.data)h=r.initSegment;else if(r.live){var c=this.config.initialLiveManifestSize;if(oc&&(u.currentTime=c),this.nextLoadPosition=c}if(t.PTSKnown&&e>i&&u&&u.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(a){var f=a.sn+1;if(f>=t.startSN&&f<=t.endSN){var p=n[f-t.startSN];a.cc===p.cc&&(d=p,l.b.log("live playlist, switching playlist, load frag with next SN: "+d.sn))}d||(d=D.search(n,function(t){return a.cc-t.cc}))&&l.b.log("live playlist, switching playlist, load frag with same CC: "+d.sn)}d||(d=n[Math.min(o-1,Math.round(o/2))],l.b.log("live playlist, switching playlist, unknown, load middle frag : "+d.sn))}return d},e.prototype._findFragment=function(t,e,r,i,a,n,o){var s=this.hls.config,u=void 0,d=void 0,h=s.maxFragLookUpTolerance,c=e?i[e.sn-i[0].sn+1]:void 0,f=function(t){var e=Math.min(h,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-e<=a?1:t.start-e>a&&t.start?-1:0};if(an-h&&(h=0),d=c&&!f(c)?c:D.search(i,f)):d=i[r-1],d){var p=(u=d).sn-o.startSN,g=e&&u.level===e.level,v=i[p-1],y=i[p+1];if(e&&u.sn===e.sn)if(g&&!u.backtracked)if(u.sns.maxBufferHole&&e.dropped&&p?(u=v,l.b.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"),e.loadCounter--):(u=y,l.b.log("SN just loaded, load next one: "+u.sn))}else u=null;else u.backtracked&&(y&&y.backtracked?(l.b.warn("Already backtracked from fragment "+y.sn+", will not backtrack to fragment "+u.sn+". Loading fragment "+y.sn),u=y):(l.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),u.dropped=0,v?(v.loadCounter&&v.loadCounter--,(u=v).backtracked=!0):p&&(u=null)))}return u},e.prototype._loadFragmentOrKey=function(t,e,r,i,a){var n=this.hls,u=n.config;if(!t.decryptdata||null==t.decryptdata.uri||null!=t.decryptdata.key){if(l.b.log("Loading "+t.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+e+", currentTime:"+i.toFixed(3)+",bufferEnd:"+a.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,t.loadCounter){t.loadCounter++;var d=u.fragLoadingLoopThreshold;if(t.loadCounter>d&&Math.abs(this.fragLoadIdx-t.loadIdx)e.endPTS?1:0})},e.prototype.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},e.prototype._checkFragmentChanged=function(){var t,e,r=this.media;if(r&&r.readyState&&!1===r.seeking&&((e=r.currentTime)>r.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=e),I.isBuffered(r,e)?t=this.getBufferedFrag(e):I.isBuffered(r,e+.1)&&(t=this.getBufferedFrag(e+.1)),t)){var i=t;if(i!==this.fragPlaying){this.hls.trigger(o.a.FRAG_CHANGED,{frag:i});var a=i.level;this.fragPlaying&&this.fragPlaying.level===a||this.hls.trigger(o.a.LEVEL_SWITCHED,{level:a}),this.fragPlaying=i}}},e.prototype.immediateLevelSwitch=function(){if(l.b.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t=this.media,e=void 0;t?(e=t.paused,t.pause()):e=!0,this.previouslyPaused=e}var r=this.fragCurrent;r&&r.loader&&r.loader.abort(),this.fragCurrent=null,void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},e.prototype.immediateLevelSwitchEnd=function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,I.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())},e.prototype.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var e,r=void 0,i=void 0;if(void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),(e=this.getBufferedFrag(t.currentTime))&&e.startPTS>1&&this.flushMainBuffer(0,e.startPTS-1),t.paused)r=0;else{var a=this.hls.nextLoadLevel,n=this.levels[a],o=this.fragLastKbps;r=o&&this.fragCurrent?this.fragCurrent.duration*n.bitrate/(1e3*o)+1:0}if((i=this.getBufferedFrag(t.currentTime+r))&&(i=this.followingBufferedFrag(i))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(i.maxStartPTS,Number.POSITIVE_INFINITY)}}},e.prototype.flushMainBuffer=function(t,e){this.state=V.BUFFER_FLUSHING;var r={startOffset:t,endOffset:e};this.altAudio&&(r.type="video"),this.hls.trigger(o.a.BUFFER_FLUSHING,r)},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("seeked",this.onvseeked),e.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.hls.startLoad(r.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(l.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.levels;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.loadCounter=void 0,t.backtracked=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){var t=this.media,e=t?t.currentTime:void 0,r=this.config;isNaN(e)||l.b.log("media seeking to "+e.toFixed(3));var i=this.mediaBuffer?this.mediaBuffer:t,a=I.bufferInfo(i,e,this.config.maxBufferHole);if(this.state===V.FRAG_LOADING){var n=this.fragCurrent;if(0===a.len&&n){var o=r.maxFragLookUpTolerance,s=n.start-o,u=n.start+n.duration+o;eu?(n.loader&&(l.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),n.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=V.IDLE):l.b.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===V.ENDED&&(0===a.len&&(this.fragPrevious=0),this.state=V.IDLE);t&&(this.lastCurrentTime=e),this.state!==V.FRAG_LOADING&&void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*r.fragLoadingLoopThreshold),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=e),this.tick()},e.prototype.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:void 0;isNaN(e)||l.b.log("media seeked to "+e.toFixed(3)),this.tick()},e.prototype.onMediaEnded=function(){l.b.log("media ended"),this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestLoading=function(){l.b.log("trigger BUFFER_RESET"),this.hls.trigger(o.a.BUFFER_RESET),this._bufferedFrags=[],this.stalled=!1,this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestParsed=function(t){var e,r=!1,i=!1;t.levels.forEach(function(t){(e=t.audioCodec)&&(-1!==e.indexOf("mp4a.40.2")&&(r=!0),-1!==e.indexOf("mp4a.40.5")&&(i=!0))}),this.audioCodecSwitch=r&&i,this.audioCodecSwitch&&l.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1;var a=this.config;(a.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(a.startPosition)},e.prototype.onLevelLoaded=function(t){var e=t.details,r=t.level,i=this.levels[this.levelLastLoaded],a=this.levels[r],n=e.totalduration,s=0;if(l.b.log("level "+r+" loaded ["+e.startSN+","+e.endSN+"],duration:"+n),e.live){var u=a.details;u&&e.fragments.length>0?(G(u,e),s=e.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(s,u),e.PTSKnown&&!isNaN(s)?l.b.log("live playlist sliding:"+s.toFixed(3)):(l.b.log("live playlist - outdated PTS, unknown sliding"),K(this.fragPrevious,i,e))):(l.b.log("live playlist - first load, unknown sliding"),e.PTSKnown=!1,K(this.fragPrevious,i,e))}else e.PTSKnown=!1;if(a.details=e,this.levelLastLoaded=r,this.hls.trigger(o.a.LEVEL_UPDATED,{details:e,level:r}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var d=e.startTimeOffset;isNaN(d)?e.live?(this.startPosition=this.computeLivePosition(s,e),l.b.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(d<0&&(l.b.log("negative start time offset "+d+", count from end of last fragment"),d=s+n+d),l.b.log("start time offset found in playlist, adjust startPosition to "+d),this.startPosition=d),this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===V.WAITING_LEVEL&&(this.state=V.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===V.KEY_LOADING&&(this.state=V.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,r=t.frag;if(this.state===V.FRAG_LOADING&&e&&"main"===r.type&&r.level===e.level&&r.sn===e.sn){var i=t.stats,a=this.levels[e.level],n=a.details;if(l.b.log("Loaded "+e.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+e.level),this.bitrateTest=!1,this.stats=i,!0===r.bitrateTest&&this.hls.nextLoadLevel)this.state=V.IDLE,this.startFragRequested=!1,i.tparsed=i.tbuffered=performance.now(),this.hls.trigger(o.a.FRAG_BUFFERED,{stats:i,frag:e,id:"main"}),this.tick();else if("initSegment"===r.sn)this.state=V.IDLE,i.tparsed=i.tbuffered=performance.now(),n.initSegment.data=t.payload,this.hls.trigger(o.a.FRAG_BUFFERED,{stats:i,frag:e,id:"main"}),this.tick();else{this.state=V.PARSING;var s=n.totalduration,u=e.level,d=e.sn,h=this.config.defaultAudioCodec||a.audioCodec;this.audioCodecSwap&&(l.b.log("swapping playlist audio codec"),void 0===h&&(h=this.lastAudioCodec),h&&(h=-1!==h.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),this.pendingBuffering=!0,this.appended=!1,l.b.log("Parsing "+d+" of ["+n.startSN+" ,"+n.endSN+"],level "+u+", cc "+e.cc);var c=this.demuxer;c||(c=this.demuxer=new M(this.hls,"main"));var f=this.media,p=!(f&&f.seeking)&&(n.PTSKnown||!n.live),g=n.initSegment?n.initSegment.data:[];c.push(t.payload,g,h,a.videoCodec,e,s,p,void 0)}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,r=t.frag;if(e&&"main"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===V.PARSING){var i,a,n=t.tracks;if(n.audio&&this.altAudio&&delete n.audio,a=n.audio){var s=this.levels[this.level].audioCodec,u=navigator.userAgent.toLowerCase();s&&this.audioCodecSwap&&(l.b.log("swapping playlist audio codec"),s=-1!==s.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==a.metadata.channelCount&&-1===u.indexOf("firefox")&&(s="mp4a.40.5"),-1!==u.indexOf("android")&&"audio/mpeg"!==a.container&&(s="mp4a.40.2",l.b.log("Android: force audio codec to "+s)),a.levelCodec=s,a.id=t.id}for(i in(a=n.video)&&(a.levelCodec=this.levels[this.level].videoCodec,a.id=t.id),this.hls.trigger(o.a.BUFFER_CODECS,n),n){a=n[i],l.b.log("main track:"+i+",container:"+a.container+",codecs[level/parsed]=["+a.levelCodec+"/"+a.codec+"]");var d=a.initSegment;d&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(o.a.BUFFER_APPENDING,{type:i,data:d,parent:"main",content:"initSegment"}))}this.tick()}},e.prototype.onFragParsingData=function(t){var e=this,r=this.fragCurrent,i=t.frag;if(r&&"main"===t.id&&i.sn===r.sn&&i.level===r.level&&("audio"!==t.type||!this.altAudio)&&this.state===V.PARSING){var a=this.levels[this.level],n=r;if(isNaN(t.endPTS)&&(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),l.b.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0)),"video"===t.type)if(n.dropped=t.dropped,n.dropped)if(n.backtracked)l.b.warn("Already backtracked on this fragment, appending with the gap");else{var s=a.details;if(!s||n.sn!==s.startSN)return l.b.warn("missing video frame(s), backtracking fragment"),n.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=V.IDLE,this.fragPrevious=n,void this.tick();l.b.warn("missing video frame(s) on first frag, appending with gap")}else n.backtracked=!1;var u=B(a.details,n,t.startPTS,t.endPTS,t.startDTS,t.endDTS),d=this.hls;d.trigger(o.a.LEVEL_PTS_UPDATED,{details:a.details,level:this.level,drift:u,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach(function(r){r&&r.length&&e.state===V.PARSING&&(e.appended=!0,e.pendingBuffering=!0,d.trigger(o.a.BUFFER_APPENDING,{type:t.type,data:r,parent:"main",content:"data"}))}),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,r=t.frag;e&&"main"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===V.PARSING&&(this.stats.tparsed=performance.now(),this.state=V.PARSED,this._checkAppendedParsed())},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url,r=t.id;if(!e){if(this.mediaBuffer!==this.media){l.b.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var i=this.fragCurrent;i.loader&&(l.b.log("switching to main audio track, cancel main fragment load"),i.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=V.IDLE}var a=this.hls;a.trigger(o.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),a.trigger(o.a.AUDIO_TRACK_SWITCHED,{id:r}),this.altAudio=!1}},e.prototype.onAudioTrackSwitched=function(t){var e=t.id,r=!!this.hls.audioTracks[e].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(l.b.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},e.prototype.onBufferCreated=function(t){var e=t.tracks,r=void 0,i=void 0,a=!1;for(var n in e){var o=e[n];"main"===o.id?(i=n,r=o,"video"===n&&(this.videoBuffer=e[n].buffer)):a=!0}a&&r?(l.b.log("alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media},e.prototype.onBufferAppended=function(t){if("main"===t.parent){var e=this.state;e!==V.PARSING&&e!==V.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==V.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;if(t){var e=this.mediaBuffer?this.mediaBuffer:this.media;l.b.log("main buffered : "+j.toString(e.buffered));var r=this._bufferedFrags.filter(function(t){return I.isBuffered(e,(t.startPTS+t.endPTS)/2)});r.push(t),this._bufferedFrags=r.sort(function(t,e){return t.startPTS-e.startPTS}),this.fragPrevious=t;var i=this.stats;i.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*i.total/(i.tbuffered-i.tfirst)),this.hls.trigger(o.a.FRAG_BUFFERED,{stats:i,frag:t,id:"main"}),this.state=V.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag||this.fragCurrent;if(!e||"main"===e.type){var r=!!this.media&&I.isBuffered(this.media,this.media.currentTime)&&I.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case s.a.FRAG_LOAD_ERROR:case s.a.FRAG_LOAD_TIMEOUT:case s.a.KEY_LOAD_ERROR:case s.a.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var i=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);e.loadCounter=0,l.b.warn("mediaController: frag loading failed, retry in "+i+" ms"),this.retryDate=performance.now()+i,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=V.FRAG_LOADING_WAITING_RETRY}else l.b.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=V.ERROR;break;case s.a.FRAG_LOOP_LOADING_ERROR:t.fatal||(r?(this._reduceMaxBufferLength(e.duration),this.state=V.IDLE):e.autoLevel&&0!==e.level||(t.fatal=!0,this.state=V.ERROR));break;case s.a.LEVEL_LOAD_ERROR:case s.a.LEVEL_LOAD_TIMEOUT:this.state!==V.ERROR&&(t.fatal?(this.state=V.ERROR,l.b.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==V.WAITING_LEVEL||(this.state=V.IDLE));break;case s.a.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==V.PARSING&&this.state!==V.PARSED||(r?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=V.IDLE):(l.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},e.prototype._reduceMaxBufferLength=function(t){var e=this.config;e.maxMaxBufferLength>=t&&(e.maxMaxBufferLength/=2,l.b.warn("main:reduce max buffer length to "+e.maxMaxBufferLength+"s"),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*e.fragLoadingLoopThreshold))},e.prototype._checkBuffer=function(){var t=this.media,e=this.config;if(t&&t.readyState){var r=t.currentTime,i=this.mediaBuffer?this.mediaBuffer:t,a=i.buffered;if(!this.loadedmetadata&&a.length){this.loadedmetadata=!0;var n=t.seeking?r:this.startPosition,u=I.isBuffered(i,n),d=a.start(0),h=!u&&Math.abs(n-d)1e3*e.lowBufferWatchdogPeriod){this.stallReported||(this.stallReported=!0,l.b.warn("playback stalling in low buffer @"+r),g.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:y}));var b=c.nextStart,E=b-r;if(b&&E0){this.nudgeRetry=++m;var T=m*e.nudgeOffset;l.b.log("adjust currentTime from "+t.currentTime+" to next buffered @ "+b+" + nudge "+T),t.currentTime=b+T,this.stalled=void 0,g.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_SEEK_OVER_HOLE,fatal:!1,hole:b+T-r})}}else if(y>.5&&v>1e3*e.highBufferWatchdogPeriod)if(this.stallReported||(this.stallReported=!0,l.b.warn("playback stalling in high buffer @"+r),g.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:y})),this.stalled=void 0,this.nudgeRetry=++m,m"+t),this.hls.trigger(o.a.STREAM_STATE_TRANSITION,{previousState:e,nextState:t})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getBufferedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;return t?this.followingBufferedFrag(this.getBufferedFrag(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(t){this._liveSyncPosition=t}}]),e}(d),z=function(){function t(t,e){for(var r=0;r0){r=e[0].bitrate,e.sort(function(t,e){return t.bitrate-e.bitrate}),this._levels=e;for(var c=0;c0})}else this.hls.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},e.prototype.setLevelInternal=function(t){var e=this._levels,r=this.hls;if(t>=0&&t1&&s.loadError0&&(e=t.urlId,this.hls.trigger(o.a.LEVEL_LOADING,{url:t.url[e],level:this.currentLevelIndex,id:e}))},z(e,[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e=this._levels;e&&(t=Math.min(t,e.length-1),this.currentLevelIndex===t&&void 0!==e[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}]),e}(d),q=r(3);var Q=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.MEDIA_ATTACHED,o.a.MEDIA_DETACHING,o.a.FRAG_PARSING_METADATA));return i.id3Track=void 0,i.media=void 0,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){d.prototype.destroy.call(this)},e.prototype.onMediaAttached=function(t){this.media=t.media,this.media},e.prototype.onMediaDetaching=function(){this.media=void 0},e.prototype.onFragParsingMetadata=function(t){var e=t.frag,r=t.samples;this.id3Track||(this.id3Track=this.media.addTextTrack("metadata","id3"),this.id3Track.mode="hidden");for(var i=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,a=0;a=this.minWeight_},t.prototype.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.prototype.destroy=function(){},t}(),Z=function(){function t(t,e){for(var r=0;r500*r.duration/u){var d=t.levels,h=Math.max(1,n.bw?n.bw/8:1e3*n.loaded/s),c=d[r.level],f=c.realBitrate?Math.max(c.realBitrate,c.bitrate):c.bitrate,p=n.total?n.total:Math.max(n.loaded,Math.round(r.duration*f/8)),g=e.currentTime,v=(p-n.loaded)/h,y=(I.bufferInfo(e,g,t.config.maxBufferHole).end-g)/u;if(y<2*r.duration/u&&v>y){var m=void 0,b=void 0;for(b=r.level-1;b>a;b--){var E=d[b].realBitrate?Math.max(d[b].realBitrate,d[b].bitrate):d[b].bitrate;if((m=r.duration*E/(6.4*h))=i;d--){var h=u[d].details,c=h?h.totalduration/h.fragments.length:e,f=!!h&&h.live,p=void 0;p=d<=t?o*r:s*r;var g=u[d].realBitrate?Math.max(u[d].realBitrate,u[d].bitrate):u[d].bitrate,v=g*c/p;if(l.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+d+"/"+Math.round(p)+"/"+g+"/"+c+"/"+n+"/"+v),p>g&&(!v||f&&!this.bitrateTestDelay||v=0)return f;l.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var p=s?Math.min(s,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(0===c){var y=this.bitrateTestDelay;if(y)p=(s?Math.min(s,i.maxLoadingDelay):i.maxLoadingDelay)-y,l.b.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),g=v=1}return f=this._findBestLevel(o,s,h,a,e,c+p,g,v,r),Math.max(f,0)}}]),e}(d);var et=F(),rt=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.MEDIA_ATTACHING,o.a.MEDIA_DETACHING,o.a.MANIFEST_PARSED,o.a.BUFFER_RESET,o.a.BUFFER_APPENDING,o.a.BUFFER_CODECS,o.a.BUFFER_EOS,o.a.BUFFER_FLUSHING,o.a.LEVEL_PTS_UPDATED,o.a.LEVEL_UPDATED));return i._msDuration=null,i._levelDuration=null,i._live=null,i._objectUrl=null,i.onsbue=i.onSBUpdateEnd.bind(i),i.onsbe=i.onSBUpdateError.bind(i),i.pendingTracks={},i.tracks={},i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){d.prototype.destroy.call(this)},e.prototype.onLevelPtsUpdated=function(t){var e=t.type,r=this.tracks.audio;if("audio"===e&&r&&"audio/mpeg"===r.container){var i=this.sourceBuffer.audio;if(Math.abs(i.timestampOffset-t.start)>.1){var a=i.updating;try{i.abort()}catch(t){a=!0,l.b.warn("can not abort audio buffer: "+t)}a?this.audioTimestampOffset=t.start:(l.b.warn("change mpeg audio timestamp offset from "+i.timestampOffset+" to "+t.start),i.timestampOffset=t.start)}}},e.prototype.onManifestParsed=function(t){var e=t.audio,r=t.video||t.levels.length&&t.audio,i=0;t.altAudio&&(e||r)&&(i=(e?1:0)+(r?1:0),l.b.log(i+" sourceBuffer(s) expected")),this.sourceBufferNb=i},e.prototype.onMediaAttaching=function(t){var e=this.media=t.media;if(e){var r=this.mediaSource=new et;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),r.addEventListener("sourceopen",this.onmso),r.addEventListener("sourceended",this.onmse),r.addEventListener("sourceclose",this.onmsc),e.src=URL.createObjectURL(r),this._objectUrl=e.src}},e.prototype.onMediaDetaching=function(){l.b.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){l.b.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this.onmso),t.removeEventListener("sourceended",this.onmse),t.removeEventListener("sourceclose",this.onmsc),this.media&&(URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):l.b.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(o.a.MEDIA_DETACHED)},e.prototype.onMediaSourceOpen=function(){l.b.log("media source opened"),this.hls.trigger(o.a.MEDIA_ATTACHED,{media:this.media});var t=this.mediaSource;t&&t.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()},e.prototype.checkPendingTracks=function(){var t=this.pendingTracks,e=Object.keys(t).length;e&&(this.sourceBufferNb<=e||0===this.sourceBufferNb)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},e.prototype.onMediaSourceClose=function(){l.b.log("media source closed")},e.prototype.onMediaSourceEnded=function(){l.b.log("media source ended")},e.prototype.onSBUpdateEnd=function(){if(this.audioTimestampOffset){var t=this.sourceBuffer.audio;l.b.warn("change mpeg audio timestamp offset from "+t.timestampOffset+" to "+this.audioTimestampOffset),t.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var e=this.parent,r=this.segments.reduce(function(t,r){return r.parent===e?t+1:t},0);this.hls.trigger(o.a.BUFFER_APPENDED,{parent:e,pending:r}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()},e.prototype.onSBUpdateError=function(t){l.b.error("sourceBuffer error:",t),this.hls.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferReset=function(){var t=this.sourceBuffer;for(var e in t){var r=t[e];try{this.mediaSource.removeSourceBuffer(r),r.removeEventListener("updateend",this.onsbue),r.removeEventListener("error",this.onsbe)}catch(t){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},e.prototype.onBufferCodecs=function(t){if(0===Object.keys(this.sourceBuffer).length){for(var e in t)this.pendingTracks[e]=t[e];var r=this.mediaSource;r&&"open"===r.readyState&&this.checkPendingTracks()}},e.prototype.createSourceBuffers=function(t){var e=this.sourceBuffer,r=this.mediaSource;for(var i in t)if(!e[i]){var a=t[i],n=a.levelCodec||a.codec,u=a.container+";codecs="+n;l.b.log("creating sourceBuffer("+u+")");try{var d=e[i]=r.addSourceBuffer(u);d.addEventListener("updateend",this.onsbue),d.addEventListener("error",this.onsbe),this.tracks[i]={codec:n,container:a.container},a.buffer=d}catch(t){l.b.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:u})}}this.hls.trigger(o.a.BUFFER_CREATED,{tracks:t})},e.prototype.onBufferAppending=function(t){this._needsFlush||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())},e.prototype.onBufferAppendFail=function(t){l.b.error("sourceBuffer error:",t.event),this.hls.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferEos=function(t){var e=this.sourceBuffer,r=t.type;for(var i in e)r&&i!==r||e[i].ended||(e[i].ended=!0,l.b.log(i+" sourceBuffer now EOS"));this.checkEos()},e.prototype.checkEos=function(){var t=this.sourceBuffer,e=this.mediaSource;if(e&&"open"===e.readyState){for(var r in t){var i=t[r];if(!i.ended)return;if(i.updating)return void(this._needsEos=!0)}l.b.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment");try{e.endOfStream()}catch(t){l.b.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},e.prototype.onBufferFlushing=function(t){this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}),this.flushBufferCounter=0,this.doFlush()},e.prototype.onLevelUpdated=function(t){var e=t.details;e.fragments.length>0&&(this._levelDuration=e.totalduration+e.fragments[0].start,this._live=e.live,this.updateMediaElementDuration())},e.prototype.updateMediaElementDuration=function(){var t,e=this.hls.config;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var r in this.sourceBuffer)if(!0===this.sourceBuffer[r].updating)return;t=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===e.liveDurationInfinity?(l.b.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>t||t===1/0||isNaN(t))&&(l.b.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},e.prototype.doFlush=function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var e=0,r=this.sourceBuffer;try{for(var i in r)e+=r[i].buffered.length}catch(t){l.b.error("error while accessing sourceBuffer.buffered")}this.appended=e,this.hls.trigger(o.a.BUFFER_FLUSHED)}},e.prototype.doAppending=function(){var t=this.hls,e=this.sourceBuffer,r=this.segments;if(Object.keys(e).length){if(this.media.error)return this.segments=[],void l.b.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(r&&r.length){var i=r.shift();try{var a=e[i.type];a?a.updating?r.unshift(i):(a.ended=!1,this.parent=i.parent,a.appendBuffer(i.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(e){l.b.error("error while trying to append buffer:"+e.message),r.unshift(i);var n={type:s.b.MEDIA_ERROR,parent:i.parent};if(22===e.code)return this.segments=[],n.details=s.a.BUFFER_FULL_ERROR,n.fatal=!1,void t.trigger(o.a.ERROR,n);if(this.appendError?this.appendError++:this.appendError=1,n.details=s.a.BUFFER_APPEND_ERROR,this.appendError>t.config.appendErrorMaxRetry)return l.b.log("fail "+t.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),r=[],n.fatal=!0,void t.trigger(o.a.ERROR,n);n.fatal=!1,t.trigger(o.a.ERROR,n)}}}},e.prototype.flushBuffer=function(t,e,r){var i,a,n,o,s,u,d=this.sourceBuffer;if(Object.keys(d).length){if(l.b.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+t+"/"+e),this.flushBufferCounter.5)return this.flushBufferCounter++,l.b.log("flush "+h+" ["+s+","+u+"], of ["+n+","+o+"], pos:"+this.media.currentTime),i.remove(s,u),!1}catch(t){l.b.warn("exception while accessing sourcebuffer, it might have been removed from MediaSource")}}}else l.b.warn("abort flushing too many retries");l.b.log("buffer flushed")}return!0},e}(d),it=function(){function t(t,e){for(var r=0;rthis.autoLevelCapping&&e.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},e.prototype.getMaxLevel=function(t){var r=this;if(!this.levels)return-1;var i=this.levels.filter(function(i,a){return e.isLevelAllowed(a,r.restrictedLevels)&&a<=t});return e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},e.isLevelAllowed=function(t){return-1===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).indexOf(t)},e.getMaxLevelByMediaSize=function(t,e,r){if(!t||t&&!t.length)return-1;for(var i,a,n=t.length-1,o=0;o=e||s.height>=r)&&(i=s,!(a=t[o+1])||i.width!==a.width||i.height!==a.height)){n=o;break}}return n},it(e,[{key:"mediaWidth",get:function(){var t=void 0,r=this.media;return r&&(t=r.width||r.clientWidth||r.offsetWidth,t*=e.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t=void 0,r=this.media;return r&&(t=r.height||r.clientHeight||r.offsetHeight,t*=e.contentScaleFactor),t}}],[{key:"contentScaleFactor",get:function(){var t=1;try{t=window.devicePixelRatio}catch(t){}return t}}]),e}(d);var nt=function(t){function e(r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.MEDIA_ATTACHING))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},e.prototype.onMediaAttaching=function(t){var e=this.hls.config;e.capLevelOnFPSDrop&&("function"==typeof(this.video=t.media instanceof HTMLVideoElement?t.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),e.fpsDroppedMonitoringPeriod))},e.prototype.checkFPS=function(t,e,r){var i=performance.now();if(e){if(this.lastTime){var a=i-this.lastTime,n=r-this.lastDroppedFrames,s=e-this.lastDecodedFrames,u=1e3*n/a,d=this.hls;if(d.trigger(o.a.FPS_DROP,{currentDropped:n,currentDecoded:s,totalDroppedFrames:r}),u>0&&n>d.config.fpsDroppedMonitoringThreshold*s){var h=d.currentLevel;l.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(-1===d.autoLevelCapping||d.autoLevelCapping>=h)&&(h-=1,d.trigger(o.a.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:d.currentLevel}),d.autoLevelCapping=h,d.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=r,this.lastDecodedFrames=e}},e.prototype.checkFPSInterval=function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},e}(d);var ot=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}return t.prototype.destroy=function(){this.abort(),this.loader=null},t.prototype.abort=function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},t.prototype.load=function(t,e,r){this.context=t,this.config=e,this.callbacks=r,this.stats={trequest:performance.now(),retry:0},this.retryDelay=e.retryDelay,this.loadInternal()},t.prototype.loadInternal=function(){var t,e=this.context;t=this.loader=new XMLHttpRequest;var r=this.stats;r.tfirst=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(t,e.url)}catch(r){t.open("GET",e.url,!0),i(t,e.url)}t.readyState||t.open("GET",e.url,!0)}catch(r){return void this.callbacks.onError({code:t.status,text:r.message},e,t)}e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=e.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()},t.prototype.readystatechange=function(t){var e=t.currentTarget,r=e.readyState,i=this.stats,a=this.context,n=this.config;if(!i.aborted&&r>=2)if(window.clearTimeout(this.requestTimeout),0===i.tfirst&&(i.tfirst=Math.max(performance.now(),i.trequest)),4===r){var o=e.status;if(o>=200&&o<300){i.tload=Math.max(i.tfirst,performance.now());var s=void 0,u=void 0;u="arraybuffer"===a.responseType?(s=e.response).byteLength:(s=e.responseText).length,i.loaded=i.total=u;var d={url:e.responseURL,data:s};this.callbacks.onSuccess(d,i,a,e)}else i.retry>=n.maxRetry||o>=400&&o<499?(l.b.error(o+" while loading "+a.url),this.callbacks.onError({code:o,text:e.statusText},a,e)):(l.b.warn(o+" while loading "+a.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,n.maxRetryDelay),i.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),n.timeout)},t.prototype.loadtimeout=function(){l.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.prototype.loadprogress=function(t){var e=t.currentTarget,r=this.stats;r.loaded=t.loaded,t.lengthComputable&&(r.total=t.total);var i=this.callbacks.onProgress;i&&i(r,this.context,null,e)},t}(),st=function(){function t(t,e){for(var r=0;r1&&setTimeout(this.tick,1),this.ticks=0)},e.prototype.doTick=function(){this.updateTrack(this.trackId)},e.prototype.onError=function(t){t.fatal&&t.type===s.b.NETWORK_ERROR&&this.cleanTimer()},e.prototype.onManifestLoading=function(){this.tracks=[],this.trackId=-1},e.prototype.onManifestParsed=function(t){var e=this,r=t.audioTracks||[],i=!1;this.tracks=r,this.hls.trigger(o.a.AUDIO_TRACKS_UPDATED,{audioTracks:r});var a=0;r.forEach(function(t){if(t.default&&!i)return e.audioTrack=a,void(i=!0);a++}),!1===i&&r.length&&(l.b.log("no default audio track defined, use first audio track as default"),this.audioTrack=0)},e.prototype.onAudioTrackLoaded=function(t){t.id=0&&t=0&&t0&&-1===t?(l.b.log("audio:override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=dt.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:t,this.state=dt.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=t,this.state=dt.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=dt.STOPPED},e.prototype.tick=function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)},e.prototype.doTick=function(){var t,e,r,i=this.hls,a=i.config;switch(this.state){case dt.ERROR:case dt.PAUSED:case dt.BUFFER_FLUSHING:break;case dt.STARTING:this.state=dt.WAITING_TRACK,this.loadedmetadata=!1;break;case dt.IDLE:var n=this.tracks;if(!n)break;if(!this.media&&(this.startFragRequested||!a.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(void 0===(t=this.nextLoadPosition))break;var u=this.mediaBuffer?this.mediaBuffer:this.media,d=this.videoBuffer?this.videoBuffer:this.media,h=I.bufferInfo(u,t,a.maxBufferHole),c=I.bufferInfo(d,t,a.maxBufferHole),f=h.len,p=h.end,g=this.fragPrevious,v=Math.max(a.maxBufferLength,c.len),y=this.audioSwitch,m=this.trackId;if((fT||h.nextStart))return;l.b.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=T+.05}if(r.initSegment&&!r.initSegment.data)A=r.initSegment;else if(p<=T){if(A=b[0],null!==this.videoTrackCC&&A.cc!==this.videoTrackCC&&(A=function(t,e){return D.search(t,function(t){return t.cce?-1:0})}(b,this.videoTrackCC)),r.live&&A.loadIdx&&A.loadIdx===this.fragLoadIdx){var S=h.nextStart?h.nextStart:T;return l.b.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(S+.05)),void(this.media.currentTime=S+.05)}}else{var _=void 0,L=a.maxFragLookUpTolerance,w=g?b[g.sn-b[0].sn+1]:void 0,k=function(t){var e=Math.min(L,t.duration);return t.start+t.duration-e<=p?1:t.start-e>p&&t.start?-1:0};pR-L&&(L=0),_=w&&!k(w)?w:D.search(b,k)):_=b[E-1],_&&(A=_,T=_.start,g&&A.level===g.level&&A.sn===g.sn&&(A.snO&&Math.abs(this.fragLoadIdx-A.loadIdx)=P||x)&&(l.b.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=dt.IDLE);break;case dt.WAITING_INIT_PTS:var F=this.videoTrackCC;if(void 0===this.initPTS[F])break;var N=this.waitingFragment;if(N){var M=N.frag.cc;F!==M?(e=this.tracks[this.trackId]).details&&e.details.live&&(l.b.warn("Waiting fragment CC ("+M+") does not match video track CC ("+F+")"),this.waitingFragment=null,this.state=dt.IDLE):(this.state=dt.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=dt.IDLE;break;case dt.STOPPED:case dt.FRAG_LOADING:case dt.PARSING:case dt.PARSED:case dt.ENDED:}},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("ended",this.onvended);var r=this.config;this.tracks&&r.autoStartLoad&&this.startLoad(r.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(l.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.tracks;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.loadCounter=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){this.state===dt.ENDED&&(this.state=dt.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.tick()},e.prototype.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},e.prototype.onAudioTracksUpdated=function(t){l.b.log("audio tracks updated"),this.tracks=t.audioTracks},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url;this.trackId=t.id,this.fragCurrent=null,this.state=dt.PAUSED,this.waitingFragment=null,e?this.timer||(this.timer=setInterval(this.ontick,100)):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),e&&(this.audioSwitch=!0,this.state=dt.IDLE,void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold)),this.tick()},e.prototype.onAudioTrackLoaded=function(t){var e=t.details,r=t.id,i=this.tracks[r],a=e.totalduration,n=0;if(l.b.log("track "+r+" loaded ["+e.startSN+","+e.endSN+"],duration:"+a),e.live){var o=i.details;o&&e.fragments.length>0?(G(o,e),n=e.fragments[0].start,e.PTSKnown?l.b.log("live audio playlist sliding:"+n.toFixed(3)):l.b.log("live audio playlist - outdated PTS, unknown sliding")):(e.PTSKnown=!1,l.b.log("live audio playlist - first load, unknown sliding"))}else e.PTSKnown=!1;if(i.details=e,!this.startFragRequested){if(-1===this.startPosition){var s=e.startTimeOffset;isNaN(s)?this.startPosition=0:(l.b.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s)}this.nextLoadPosition=this.startPosition}this.state===dt.WAITING_TRACK&&(this.state=dt.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===dt.KEY_LOADING&&(this.state=dt.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,r=t.frag;if(this.state===dt.FRAG_LOADING&&e&&"audio"===r.type&&r.level===e.level&&r.sn===e.sn){var i=this.tracks[this.trackId],a=i.details,n=a.totalduration,s=e.level,u=e.sn,d=e.cc,h=this.config.defaultAudioCodec||i.audioCodec||"mp4a.40.2",c=this.stats=t.stats;if("initSegment"===u)this.state=dt.IDLE,c.tparsed=c.tbuffered=performance.now(),a.initSegment.data=t.payload,this.hls.trigger(o.a.FRAG_BUFFERED,{stats:c,frag:e,id:"audio"}),this.tick();else{this.state=dt.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new M(this.hls,"audio"));var f=this.initPTS[d],p=a.initSegment?a.initSegment.data:[];if(a.initSegment||void 0!==f){this.pendingBuffering=!0,l.b.log("Demuxing "+u+" of ["+a.startSN+" ,"+a.endSN+"],track "+s);this.demuxer.push(t.payload,p,h,null,e,n,!1,f)}else l.b.log("unknown video PTS for continuity counter "+d+", waiting for video PTS before demuxing audio frag "+u+" of ["+a.startSN+" ,"+a.endSN+"],track "+s),this.waitingFragment=t,this.state=dt.WAITING_INIT_PTS}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,r=t.frag;if(e&&"audio"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===dt.PARSING){var i=t.tracks,a=void 0;if(i.video&&delete i.video,a=i.audio){a.levelCodec=a.codec,a.id=t.id,this.hls.trigger(o.a.BUFFER_CODECS,i),l.b.log("audio track:audio,container:"+a.container+",codecs[level/parsed]=["+a.levelCodec+"/"+a.codec+"]");var n=a.initSegment;if(n){var s={type:"audio",data:n,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[s]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(o.a.BUFFER_APPENDING,s))}this.tick()}}},e.prototype.onFragParsingData=function(t){var e=this,r=this.fragCurrent,i=t.frag;if(r&&"audio"===t.id&&"audio"===t.type&&i.sn===r.sn&&i.level===r.level&&this.state===dt.PARSING){var a=this.trackId,n=this.tracks[a],s=this.hls;isNaN(t.endPTS)&&(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),l.b.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),B(n.details,r,t.startPTS,t.endPTS);var u=this.audioSwitch,d=this.media,h=!1;if(u&&d)if(d.readyState){var c=d.currentTime;l.b.log("switching audio track : currentTime:"+c),c>=t.startPTS&&(l.b.log("switching audio track : flushing all audio"),this.state=dt.BUFFER_FLUSHING,s.trigger(o.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),h=!0,this.audioSwitch=!1,s.trigger(o.a.AUDIO_TRACK_SWITCHED,{id:a}))}else this.audioSwitch=!1,s.trigger(o.a.AUDIO_TRACK_SWITCHED,{id:a});var f=this.pendingData;this.audioSwitch||([t.data1,t.data2].forEach(function(e){e&&e.length&&f.push({type:t.type,data:e,parent:"audio",content:"data"})}),!h&&f.length&&(f.forEach(function(t){e.state===dt.PARSING&&(e.pendingBuffering=!0,e.hls.trigger(o.a.BUFFER_APPENDING,t))}),this.pendingData=[],this.appended=!0)),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,r=t.frag;e&&"audio"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===dt.PARSING&&(this.stats.tparsed=performance.now(),this.state=dt.PARSED,this._checkAppendedParsed())},e.prototype.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},e.prototype.onBufferCreated=function(t){var e=t.tracks.audio;e&&(this.mediaBuffer=e.buffer,this.loadedmetadata=!0),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},e.prototype.onBufferAppended=function(t){if("audio"===t.parent){var e=this.state;e!==dt.PARSING&&e!==dt.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==dt.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent,e=this.stats,r=this.hls;if(t){this.fragPrevious=t,e.tbuffered=performance.now(),r.trigger(o.a.FRAG_BUFFERED,{stats:e,frag:t,id:"audio"});var i=this.mediaBuffer?this.mediaBuffer:this.media;l.b.log("audio buffered : "+j.toString(i.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,r.trigger(o.a.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=dt.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag;if(!e||"audio"===e.type)switch(t.details){case s.a.FRAG_LOAD_ERROR:case s.a.FRAG_LOAD_TIMEOUT:if(!t.fatal){var r=this.fragLoadError;r?r++:r=1;var i=this.config;if(r<=i.fragLoadingMaxRetry){this.fragLoadError=r,e.loadCounter=0;var a=Math.min(Math.pow(2,r-1)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);l.b.warn("audioStreamController: frag loading failed, retry in "+a+" ms"),this.retryDate=performance.now()+a,this.state=dt.FRAG_LOADING_WAITING_RETRY}else l.b.error("audioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=dt.ERROR}break;case s.a.FRAG_LOOP_LOADING_ERROR:case s.a.AUDIO_TRACK_LOAD_ERROR:case s.a.AUDIO_TRACK_LOAD_TIMEOUT:case s.a.KEY_LOAD_ERROR:case s.a.KEY_LOAD_TIMEOUT:this.state!==dt.ERROR&&(this.state=t.fatal?dt.ERROR:dt.IDLE,l.b.warn("audioStreamController: "+t.details+" while loading frag,switch to "+this.state+" state ..."));break;case s.a.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===dt.PARSING||this.state===dt.PARSED)){var n=this.mediaBuffer,u=this.media.currentTime;if(n&&I.isBuffered(n,u)&&I.isBuffered(n,u+.5)){var d=this.config;d.maxMaxBufferLength>=d.maxBufferLength&&(d.maxMaxBufferLength/=2,l.b.warn("audio:reduce max buffer length to "+d.maxMaxBufferLength+"s"),this.fragLoadIdx+=2*d.fragLoadingLoopThreshold),this.state=dt.IDLE}else l.b.warn("buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=dt.BUFFER_FLUSHING,this.hls.trigger(o.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},e.prototype.onBufferFlushed=function(){var t=this,e=this.pendingData;e&&e.length?(l.b.log("appending pending audio data on Buffer Flushed"),e.forEach(function(e){t.hls.trigger(o.a.BUFFER_APPENDING,e)}),this.appended=!0,this.pendingData=[],this.state=dt.PARSED):(this.state=dt.IDLE,this.fragPrevious=null,this.tick())},ut(e,[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,l.b.log("audio stream:"+e+"->"+t)}},get:function(){return this._state}}]),e}(d),ct=function(){if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var t="auto",e={"":!0,lr:!0,rl:!0},r={start:!0,middle:!0,end:!0,left:!0,right:!0};function i(t){return"string"==typeof t&&(!!r[t.toLowerCase()]&&t.toLowerCase())}function a(t){for(var e=1;e100)throw new Error("Position must be between 0 and 100.");E=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",a({},u,{get:function(){return T},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");T=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",a({},u,{get:function(){return R},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");R=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",a({},u,{get:function(){return A},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");A=e,this.hasBeenReset=!0}})),s.displayState=void 0,l)return s}return n.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},n}(),ft=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}};function pt(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new ft,this.regionList=[]}function gt(){this.values=Object.create(null)}function vt(t,e,r,i){var a=i?t.split(i):[t];for(var n in a)if("string"==typeof a[n]){var o=a[n].split(r);if(2===o.length)e(o[0],o[1])}}gt.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,r){return r?this.has(t)?this.values[t]:e[r]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,r){for(var i=0;i=0&&e<=100)&&(this.set(t,e),!0)}};var yt=new ct(0,0,0),mt="middle"===yt.align?"middle":"center";function bt(t,e,r){var i=t;function a(){var e=function(t){function e(t,e,r,i){return 3600*(0|t)+60*(0|e)+(0|r)+(0|i)/1e3}var r=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return r?r[3]?e(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?e(r[1],r[2],0,r[4]):e(0,r[1],r[2],r[4]):null}(t);if(null===e)throw new Error("Malformed timestamp: "+i);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function n(){t=t.replace(/^\s+/,"")}if(n(),e.startTime=a(),n(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);t=t.substr(3),n(),e.endTime=a(),n(),function(t,e){var i=new gt;vt(t,function(t,e){switch(t){case"region":for(var a=r.length-1;a>=0;a--)if(r[a].id===e){i.set(t,r[a].region);break}break;case"vertical":i.alt(t,e,["rl","lr"]);break;case"line":var n=e.split(","),o=n[0];i.integer(t,o),i.percent(t,o)&&i.set("snapToLines",!1),i.alt(t,o,["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",mt,"end"]);break;case"position":n=e.split(","),i.percent(t,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",mt,"end","line-left","line-right","auto"]);break;case"size":i.percent(t,e);break;case"align":i.alt(t,e,["start",mt,"end","left","right"])}},/:/,/\s/),e.region=i.get("region",null),e.vertical=i.get("vertical","");var a=i.get("line","auto");"auto"===a&&-1===yt.line&&(a=-1),e.line=a,e.lineAlign=i.get("lineAlign","start"),e.snapToLines=i.get("snapToLines",!0),e.size=i.get("size",100),e.align=i.get("align",mt);var n=i.get("position","auto");"auto"===n&&50===yt.position&&(n="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=n}(t,e)}function Et(t){return t.replace(//gi,"\n")}pt.prototype={parse:function(t){var e=this;function r(){var t=e.buffer,r=0;for(t=Et(t);r=16?s--:s++,navigator.userAgent.match(/Firefox\//)?n.line=d+1:n.line=d>7?d-2:d+1,n.align="left",n.position=Math.max(0,Math.min(100,s/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),t.addCue(n)}}function At(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var St={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},_t=function(t){var e=t;return St.hasOwnProperty(t)&&(e=St[t]),String.fromCharCode(e)},Lt=15,wt=100,Dt={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},It={17:2,18:4,21:6,22:8,23:10,19:13,20:15},kt={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Ot={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Ct=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Pt={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(t){this.time=t},log:function(t,e){var r=this.verboseFilter[t];this.verboseLevel>=r&&console.log(this.time+" ["+t+"] "+e)}},xt=function(t){for(var e=[],r=0;rwt&&(Pt.log("ERROR","Too large cursor position "+this.pos),this.pos=wt)},t.prototype.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var r=this.pos+1;r=144&&this.backSpace();var e=_t(t);this.pos>=wt?Pt.log("ERROR","Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))},t.prototype.clearFromPos=function(t){var e;for(e=t;e0&&(r=t?"["+e.join(" | ")+"]":e.join("\n")),r},t.prototype.getTextAndFormat=function(){return this.rows},t}(),Bt=function(){function t(e,r){At(this,t),this.chNr=e,this.outputFilter=r,this.mode=null,this.verbose=0,this.displayedMemory=new Ut,this.nonDisplayedMemory=new Ut,this.lastOutputScreen=new Ut,this.currRollUpRow=this.displayedMemory.rows[Lt-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return t.prototype.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[Lt-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},t.prototype.getHandler=function(){return this.outputFilter},t.prototype.setHandler=function(t){this.outputFilter=t},t.prototype.setPAC=function(t){this.writeScreen.setPAC(t)},t.prototype.setBkgData=function(t){this.writeScreen.setBkgData(t)},t.prototype.setMode=function(t){t!==this.mode&&(this.mode=t,Pt.log("INFO","MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},t.prototype.insertChars=function(t){for(var e=0;e=46,e.italics)e.foreground="white";else{var r=Math.floor(t/2)-16;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}Pt.log("INFO","MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},t.prototype.outputDataUpdate=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=Pt.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),!0===t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue()),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},t.prototype.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),Gt=function(){function t(e,r,i){At(this,t),this.field=e||1,this.outputs=[r,i],this.channels=[new Bt(1,r),new Bt(2,i)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return t.prototype.getHandler=function(t){return this.channels[t].getHandler()},t.prototype.setHandler=function(t,e){this.channels[t].setHandler(e)},t.prototype.addData=function(t,e){var r,i,a,n=!1;this.lastTime=t,Pt.setTime(t);for(var o=0;o ("+xt([i,a])+")"),(r=this.parseCmd(i,a))||(r=this.parseMidrow(i,a)),r||(r=this.parsePAC(i,a)),r||(r=this.parseBackgroundAttributes(i,a)),!r)if(n=this.parseChars(i,a))if(this.currChNr&&this.currChNr>=0)this.channels[this.currChNr-1].insertChars(n);else Pt.log("WARNING","No channel found yet. TEXT-MODE?");r?this.dataCounters.cmd+=2:n?this.dataCounters.char+=2:(this.dataCounters.other+=2,Pt.log("WARNING","Couldn't parse cleaned data "+xt([i,a])+" orig: "+xt([e[o],e[o+1]])))}else this.dataCounters.padding+=2},t.prototype.parseCmd=function(t,e){var r=null;if(!((20===t||28===t)&&32<=e&&e<=47)&&!((23===t||31===t)&&33<=e&&e<=35))return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,Pt.log("DEBUG","Repeated command ("+xt([t,e])+") is dropped"),!0;r=20===t||23===t?1:2;var i=this.channels[r-1];return 20===t||28===t?32===e?i.ccRCL():33===e?i.ccBS():34===e?i.ccAOF():35===e?i.ccAON():36===e?i.ccDER():37===e?i.ccRU(2):38===e?i.ccRU(3):39===e?i.ccRU(4):40===e?i.ccFON():41===e?i.ccRDC():42===e?i.ccTR():43===e?i.ccRTD():44===e?i.ccEDM():45===e?i.ccCR():46===e?i.ccENM():47===e&&i.ccEOC():i.ccTO(e-32),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=r,!0},t.prototype.parseMidrow=function(t,e){var r=null;return(17===t||25===t)&&32<=e&&e<=47&&((r=17===t?1:2)!==this.currChNr?(Pt.log("ERROR","Mismatch channel in midrow parsing"),!1):(this.channels[r-1].ccMIDROW(e),Pt.log("DEBUG","MIDROW ("+xt([t,e])+")"),!0))},t.prototype.parsePAC=function(t,e){var r,i=null;if(!((17<=t&&t<=23||25<=t&&t<=31)&&64<=e&&e<=127)&&!((16===t||24===t)&&64<=e&&e<=95))return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;r=t<=23?1:2,i=64<=e&&e<=95?1===r?Dt[t]:kt[t]:1===r?It[t]:Ot[t];var a=this.interpretPAC(i,e);return this.channels[r-1].setPAC(a),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=r,!0},t.prototype.interpretPAC=function(t,e){var r=e,i={color:null,italics:!1,indent:null,underline:!1,row:t};return r=e>95?e-96:e-64,i.underline=1==(1&r),r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i},t.prototype.parseChars=function(t,e){var r=null,i=null,a=null;if(t>=25?(r=2,a=t-8):(r=1,a=t),17<=a&&a<=19){var n=e;n=17===a?e+80:18===a?e+112:e+144,Pt.log("INFO","Special char '"+_t(n)+"' in channel "+r),i=[n]}else 32<=t&&t<=127&&(i=0===e?[t]:[t,e]);if(i){var o=xt(i);Pt.log("DEBUG","Char codes = "+o.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i},t.prototype.parseBackgroundAttributes=function(t,e){var r,i,a;return((16===t||24===t)&&32<=e&&e<=47||(23===t||31===t)&&45<=e&&e<=47)&&(r={},16===t||24===t?(i=Math.floor((e-32)/2),r.background=Ct[i],e%2==1&&(r.background=r.background+"_semi")):45===e?r.background="transparent":(r.foreground="black",47===e&&(r.underline=!0)),a=t<24?1:2,this.channels[a-1].setBkgData(r),this.lastCmdA=null,this.lastCmdB=null,!0)},t.prototype.reset=function(){for(var t=0;tt)&&(this.startTime=t),this.endTime=e,this.screen=r,this.timelineController.createCaptionsTrack(this.track)},t}(),Ht=function(t,e,r){return t.substr(r||0,e.length)===e},Kt=function(t){for(var e=5381,r=t.length;r;)e=33*e^t.charCodeAt(--r);return(e>>>0).toString()},Wt={parse:function(t,e,r,i,a,n){var o=Object(q.b)(new Uint8Array(t)).trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),s="00:00.000",l=0,u=0,d=0,h=[],c=void 0,f=!0,p=new Tt;p.oncue=function(t){var e=r[i],a=r.ccOffset;e&&e.new&&(void 0!==u?a=r.ccOffset=e.start:function(t,e,r){var i=t[e],a=t[i.prevCC];if(!a||!a.new&&i.new)return t.ccOffset=t.presentationOffset=i.start,void(i.new=!1);for(;a&&a.new;)t.ccOffset+=i.start-a.start,i.new=!1,a=t[(i=a).prevCC];t.presentationOffset=r}(r,i,d)),d&&(a=d+r.ccOffset-r.presentationOffset),t.startTime+=a-u,t.endTime+=a-u,t.id=Kt(t.startTime.toString())+Kt(t.endTime.toString())+Kt(t.text),t.text=decodeURIComponent(encodeURIComponent(t.text)),t.endTime>0&&h.push(t)},p.onparsingerror=function(t){c=t},p.onflush=function(){c&&n?n(c):a(h)},o.forEach(function(t){if(f){if(Ht(t,"X-TIMESTAMP-MAP=")){f=!1,t.substr(16).split(",").forEach(function(t){Ht(t,"LOCAL:")?s=t.substr(6):Ht(t,"MPEGTS:")&&(l=parseInt(t.substr(7)))});try{l-=e=e<0?e+8589934592:e,r=s,i=parseInt(r.substr(-3)),a=parseInt(r.substr(-6,2)),n=parseInt(r.substr(-9,2)),o=r.length>9?parseInt(r.substr(0,r.indexOf(":"))):0,u=(isNaN(i)||isNaN(a)||isNaN(n)||isNaN(o)?-1:(i+=1e3*a,i+=6e4*n,i+=36e5*o))/1e3,d=l/9e4,-1===u&&(c=new Error("Malformed X-TIMESTAMP-MAP: "+t))}catch(e){c=new Error("Malformed X-TIMESTAMP-MAP: "+t)}return}""===t&&(f=!1)}var r,i,a,n,o;p.parse(t+"\n")}),p.flush()}};function Vt(t){if(t&&t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}var Yt=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.MEDIA_ATTACHING,o.a.MEDIA_DETACHING,o.a.FRAG_PARSING_USERDATA,o.a.FRAG_DECRYPTED,o.a.MANIFEST_LOADING,o.a.MANIFEST_LOADED,o.a.FRAG_LOADED,o.a.LEVEL_SWITCHING,o.a.INIT_PTS_FOUND));if(i.hls=r,i.config=r.config,i.enabled=!0,i.Cues=r.config.cueHandler,i.textTracks=[],i.tracks=[],i.unparsedVttFrags=[],i.initPTS=void 0,i.cueRanges=[],i.config.enableCEA708Captions){var a=new jt(i,1),n=new jt(i,2);i.cea608Parser=new Gt(0,a,n)}return i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.addCues=function(t,e,r,i){for(var a,n,o,s,l=this.cueRanges,u=!1,d=l.length;d--;){var h=l[d],c=(a=h[0],n=h[1],o=e,s=r,Math.min(n,s)-Math.max(a,o));if(c>=0&&(h[0]=Math.min(h[0],e),h[1]=Math.max(h[1],r),u=!0,c/(r-e)>.5))return}u||l.push([e,r]),this.Cues.newCue(this[t],e,r,i)},e.prototype.onInitPtsFound=function(t){var e=this;void 0===this.initPTS&&(this.initPTS=t.initPTS),this.unparsedVttFrags.length&&(this.unparsedVttFrags.forEach(function(t){e.onFragLoaded(t)}),this.unparsedVttFrags=[])},e.prototype.getExistingTrack=function(t){var e=this.media;if(e)for(var r=0;r=this.tracks.length)){this.timer&&(clearInterval(this.timer),this.timer=null);var e=Xt(this.media.textTracks);if(-1!==this.trackId&&this.subtitleDisplay&&(e[this.trackId].mode="hidden"),this.trackId=t,l.b.log("switching to subtitle track "+t),this.hls.trigger(o.a.SUBTITLE_TRACK_SWITCH,{id:t}),-1!==t){var r=this.tracks[t];this.subtitleDisplay&&(e[t].mode="showing");var i=r.details;void 0!==i&&!0!==i.live||(l.b.log("(re)loading playlist for subtitle track "+t),this.hls.trigger(o.a.SUBTITLE_TRACK_LOADING,{url:r.url,id:t}))}}},zt(e,[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.trackId!==t&&this.setSubtitleTrackInternal(t)}}]),e}(d),Qt=r(4);var Jt={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING"},$t=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.MEDIA_ATTACHED,o.a.ERROR,o.a.KEY_LOADED,o.a.FRAG_LOADED,o.a.SUBTITLE_TRACKS_UPDATED,o.a.SUBTITLE_TRACK_SWITCH,o.a.SUBTITLE_TRACK_LOADED,o.a.SUBTITLE_FRAG_PROCESSED));return i.config=r.config,i.vttFragSNsProcessed={},i.vttFragQueues=void 0,i.currentlyProcessing=null,i.state=Jt.STOPPED,i.currentTrackId=-1,i.ticks=0,i.decrypter=new Qt.a(r.observer,r.config),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){d.prototype.destroy.call(this),this.state=Jt.STOPPED},e.prototype.clearVttFragQueues=function(){var t=this;this.vttFragQueues={},this.tracks.forEach(function(e){t.vttFragQueues[e.id]=[]})},e.prototype.nextFrag=function(){if(null===this.currentlyProcessing&&this.currentTrackId>-1&&this.vttFragQueues[this.currentTrackId].length){var t=this.currentlyProcessing=this.vttFragQueues[this.currentTrackId].shift();this.fragCurrent=t,this.hls.trigger(o.a.FRAG_LOADING,{frag:t}),this.state=Jt.FRAG_LOADING}},e.prototype.onSubtitleFragProcessed=function(t){t.success&&this.vttFragSNsProcessed[t.frag.trackId].push(t.frag.sn),this.currentlyProcessing=null,this.state=Jt.IDLE,this.nextFrag()},e.prototype.onMediaAttached=function(){this.state=Jt.IDLE},e.prototype.onError=function(t){var e=t.frag;e&&"subtitle"!==e.type||this.currentlyProcessing&&(this.currentlyProcessing=null,this.nextFrag())},e.prototype.tick=function(){var t=this;this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(function(){t.tick()},1),this.ticks=0)},e.prototype.doTick=function(){var t=this;switch(this.state){case Jt.IDLE:var e,r=this.tracks,i=this.currentTrackId,a=this.vttFragSNsProcessed[i],n=this.vttFragQueues[i],s=this.currentlyProcessing?this.currentlyProcessing.sn:-1;if(!r)break;if(i-1})(e)||e.sn===s||function(t){return n.some(function(e){return e.sn===t.sn})}(e)||(e.decryptdata&&null!=e.decryptdata.uri&&null==e.decryptdata.key?(l.b.log("Loading key for "+e.sn),t.state=Jt.KEY_LOADING,t.hls.trigger(o.a.KEY_LOADING,{frag:e})):(e.trackId=i,n.push(e),t.nextFrag()))})}},e.prototype.onSubtitleTracksUpdated=function(t){var e=this;l.b.log("subtitle tracks updated"),this.tracks=t.subtitleTracks,this.clearVttFragQueues(),this.vttFragSNsProcessed={},this.tracks.forEach(function(t){e.vttFragSNsProcessed[t.id]=[]})},e.prototype.onSubtitleTrackSwitch=function(t){this.currentTrackId=t.id,this.clearVttFragQueues()},e.prototype.onSubtitleTrackLoaded=function(){this.tick()},e.prototype.onKeyLoaded=function(){this.state===Jt.KEY_LOADING&&(this.state=Jt.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,r=t.frag.decryptdata,i=t.frag,a=this.hls;if(this.state===Jt.FRAG_LOADING&&e&&"subtitle"===t.frag.type&&e.sn===t.frag.sn&&t.payload.byteLength>0&&null!=r&&null!=r.key&&"AES-128"===r.method){var n;try{n=performance.now()}catch(t){n=Date.now()}this.decrypter.decrypt(t.payload,r.key.buffer,r.iv.buffer,function(t){var e;try{e=performance.now()}catch(t){e=Date.now()}a.trigger(o.a.FRAG_DECRYPTED,{frag:i,payload:t,stats:{tstart:n,tdecrypt:e}})})}},e}(d),Zt={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,maxSeekHole:2,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,fragLoadingLoopThreshold:3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:ot,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,fetchSetup:void 0,abrController:tt,bufferController:rt,capLevelController:at,fpsController:nt,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0};Zt.subtitleStreamController=$t,Zt.subtitleTrackController=qt,Zt.timelineController=Yt,Zt.cueHandler=i,Zt.enableCEA708Captions=!0,Zt.enableWebVTT=!0,Zt.captionsTextTrack1Label="English",Zt.captionsTextTrack1LanguageCode="en",Zt.captionsTextTrack2Label="Spanish",Zt.captionsTextTrack2LanguageCode="es",Zt.audioStreamController=ht,Zt.audioTrackController=lt;var te=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=t.DefaultConfig;if((r.liveSyncDurationCount||r.liveMaxLatencyDurationCount)&&(r.liveSyncDuration||r.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var a in i)a in r||(r[a]=i[a]);if(void 0!==r.liveMaxLatencyDurationCount&&r.liveMaxLatencyDurationCount<=r.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==r.liveMaxLatencyDuration&&(r.liveMaxLatencyDuration<=r.liveSyncDuration||void 0===r.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(l.a)(r.debug),this.config=r,this._autoLevelCapping=-1;var n=this.observer=new C.a;n.trigger=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i1?e-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:-1;l.b.log("startLoad("+t+")"),this.networkControllers.forEach(function(e){e.startLoad(t)})},t.prototype.stopLoad=function(){l.b.log("stopLoad"),this.networkControllers.forEach(function(t){t.stopLoad()})},t.prototype.swapAudioCodec=function(){l.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.prototype.recoverMediaError=function(){l.b.log("recoverMediaError");var t=this.media;this.detachMedia(),this.attachMedia(t)},te(t,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){l.b.log("set currentLevel:"+t),this.loadLevel=t,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){l.b.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){l.b.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(t){l.b.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){l.b.log("set startLevel:"+t);-1!==t&&(t=Math.max(t,this.minAutoLevel)),this.levelController.startLevel=t}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){l.b.log("set autoLevelCapping:"+t),this._autoLevelCapping=t}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var t=this.levels,e=this.config.minAutoBitrate,r=t?t.length:0,i=0;ie)return i}return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,e=this.autoLevelCapping;return-1===e&&t&&t.length?t.length-1:e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}}]),t}();e.default=ee},function(t,e,r){function i(t){var e=[],r=t.toString(),i=r.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!i)return e;for(var a,n=i[1],o=new RegExp("(\\\\n|\\W)"+(n+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")+"\\((/\\*.*?\\*/)?s?.*?([\\.|\\-|\\w|/|@]+).*?\\)","g");a=o.exec(r);)e.push(a[3]);return e}t.exports=function(t,e){e=e||{};var a=r.m,n=e.all?Object.keys(a):function(t,e){for(var r=[e],a=[],n={};r.length;){var o=r.pop();if(!n[o]&&t[o]){n[o]=!0,a.push(o);var s=i(t[o]);r=r.concat(s)}}return a}(a,t),o="("+function(t){var e={};function r(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r.oe=function(t){throw console.error(t),t};var i=r(r.s=ENTRY_MODULE);return i.default||i}.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+n.map(function(t){return JSON.stringify(t)+": "+a[t].toString()}).join(",")+"})(self);",s=new window.Blob([o],{type:"text/javascript"});if(e.bare)return s;var l=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(s),u=new window.Worker(l);return u.objectURL=l,u}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(7),a=r(1),n=r(0),o=r(5),s=r.n(o);e.default=function(t){var e=new s.a;e.trigger=function(t){for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a1?r-1:0),a=1;a1?e-1:0),i=1;i "+e}(t,i[0])),e.apply(self.console,i)}:a}(e)})}var l=function(t){if(!0===t||"object"===(void 0===t?"undefined":i(t))){s(t,"debug","log","info","warn","error");try{o.log()}catch(t){o=n}}else o=n},u=n},function(t,e,r){"use strict";e.a={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCH:"hlsLevelSwitch",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCH:"hlsAudioTrackSwitch",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},function(t,e,r){"use strict";r.d(e,"b",function(){return i}),r.d(e,"a",function(){return a});var i={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},a={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException"}},function(t,e,r){"use strict";r.d(e,"b",function(){return a});var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.isHeader=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.isFooter=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.getID3Data=function(e,r){for(var i=r,a=0;t.isHeader(e,r);){a+=10,a+=t._readSize(e,r+6),t.isFooter(e,r+10)&&(a+=10),r+=a}if(a>0)return e.subarray(i,i+a)},t._readSize=function(t,e){var r=0;return r=(127&t[e])<<21,r|=(127&t[e+1])<<14,r|=(127&t[e+2])<<7,r|=127&t[e+3]},t.getTimeStamp=function(e){for(var r=t.getID3Frames(e),i=0;i1&&void 0!==arguments[1]&&arguments[1],r=t.length,i=void 0,a=void 0,n=void 0,o="",s=0;s>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(i);break;case 12:case 13:a=t[s++],o+=String.fromCharCode((31&i)<<6|63&a);break;case 14:a=t[s++],n=t[s++],o+=String.fromCharCode((15&i)<<12|(63&a)<<6|(63&n)<<0)}}return o},t}(),a=i._utf8ArrayToStr;e.a=i},function(t,e,r){"use strict";var i=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.subtle=e,this.aesIV=r}return t.prototype.decrypt=function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)},t}();var a=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.subtle=e,this.key=r}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}();var n=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return t.prototype.uint8ArrayToUint32Array_=function(t){for(var e=new DataView(t),r=new Uint32Array(4),i=0;i<4;i++)r[i]=e.getUint32(4*i);return r},t.prototype.initTable=function(){var t=this.sBox,e=this.invSBox,r=this.subMix,i=r[0],a=r[1],n=r[2],o=r[3],s=this.invSubMix,l=s[0],u=s[1],d=s[2],h=s[3],c=new Uint32Array(256),f=0,p=0,g=0;for(g=0;g<256;g++)c[g]=g<128?g<<1:g<<1^283;for(g=0;g<256;g++){var v=p^p<<1^p<<2^p<<3^p<<4;v=v>>>8^255&v^99,t[f]=v,e[v]=f;var y=c[f],m=c[y],b=c[m],E=257*c[v]^16843008*v;i[f]=E<<24|E>>>8,a[f]=E<<16|E>>>16,n[f]=E<<8|E>>>24,o[f]=E,E=16843009*b^65537*m^257*y^16843008*f,l[v]=E<<24|E>>>8,u[v]=E<<16|E>>>16,d[v]=E<<8|E>>>24,h[v]=E,f?(f=y^c[c[c[b^y]]],p^=c[c[p]]):f=p=1}},t.prototype.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),r=!0,i=0;i0&&this._events[t].length>o&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){if(!i(e))throw TypeError("listener must be a function");var r=!1;function a(){this.removeListener(t,a),r||(r=!0,e.apply(this,arguments))}return a.listener=e,this.on(t,a),this},r.prototype.removeListener=function(t,e){var r,n,o,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(o=(r=this._events[t]).length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(r)){for(s=o;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(i(r=this._events[t]))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){var i,a,n,o,s;i=/^((?:[^\/;?#]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,a=/^([^\/;?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(t,e,r){if(r=r||{},t=t.trim(),!(e=e.trim())){if(!r.alwaysNormalize)return t;var i=this.parseURL(t);if(!o)throw new Error("Error trying to parse base URL.");return i.path=s.normalizePath(i.path),s.buildURLFromParts(i)}var n=this.parseURL(e);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return r.alwaysNormalize?(n.path=s.normalizePath(n.path),s.buildURLFromParts(n)):e;var o=this.parseURL(t);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=a.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(u.netLoc=o.netLoc,"/"!==n.path[0]))if(n.path){var d=o.path,h=d.substring(0,d.lastIndexOf("/")+1)+n.path;u.path=s.normalizePath(h)}else u.path=o.path,n.params||(u.params=o.params,n.query||(u.query=o.query));return null===u.path&&(u.path=r.alwaysNormalize?s.normalizePath(n.path):n.path),s.buildURLFromParts(u)},parseURL:function(t){var e=i.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(n,"");t.length!==(t=t.replace(o,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=s},function(t,e,r){"use strict";var i=r(1),a=r(2),n=r(4),o=r(0);function s(t,e){return 255===t[e]&&240==(246&t[e+1])}function l(t,e){return 1&t[e+1]?7:9}function u(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function d(t,e){return!!(e+1>>6),!((s=(60&e[r+2])>>>2)>f.length-1))return u=(1&e[r+2])<<2,u|=(192&e[r+3])>>>6,o.b.log("manifest codec:"+i+",ADTS data:type:"+n+",sampleingIndex:"+s+"["+f[s]+"Hz],channelConfig:"+u),/firefox/i.test(h)?s>=6?(n=5,d=new Array(4),l=s-3):(n=2,d=new Array(2),l=s):-1!==h.indexOf("android")?(n=2,d=new Array(2),l=s):(n=5,d=new Array(4),i&&(-1!==i.indexOf("mp4a.40.29")||-1!==i.indexOf("mp4a.40.5"))||!i&&s>=6?l=s-3:((i&&-1!==i.indexOf("mp4a.40.2")&&(s>=6&&1===u||/vivaldi/i.test(h))||!i&&1===u)&&(n=2,d=new Array(2)),l=s)),d[0]=n<<3,d[0]|=(14&s)>>1,d[1]|=(1&s)<<7,d[1]|=u<<3,5===n&&(d[1]|=(14&l)>>1,d[2]=(1&l)<<7,d[2]|=8,d[3]=0),{config:d,samplerate:f[s],channelCount:u,codec:"mp4a.40."+n,manifestCodec:c};t.trigger(Event.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+s})}(e,r,i,n);t.config=s.config,t.samplerate=s.samplerate,t.channelCount=s.channelCount,t.codec=s.codec,t.manifestCodec=s.manifestCodec,o.b.log("parsed codec:"+t.codec+",rate:"+s.samplerate+",nb channel:"+s.channelCount)}}function f(t){return 9216e4/t}function p(t,e,r,i,a){var n=function(t,e,r,i,a){var n,o,s=t.length;if(n=l(t,e),o=u(t,e),(o-=n)>0&&e+n+o<=s)return{headerLength:n,frameLength:o,stamp:r+i*a}}(e,r,i,a,f(t.samplerate));if(n){var o=n.stamp,s=n.headerLength,d=n.frameLength,h={unit:e.subarray(r+s,r+s+d),pts:o,dts:o};return t.samples.push(h),t.len+=d,{sample:h,length:d+s}}}var g=r(3);var v=function(){function t(e,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.config=i,this.remuxer=r}return t.prototype.resetInitSegment=function(t,e,r,i){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:e,duration:i,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){if(!t)return!1;for(var e=(g.a.getID3Data(t,0)||[]).length,r=t.length;e0},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint32=function(t,e){t.data&&(e+=t.start,t=t.data);var r=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return r<0?4294967296+r:r},t.writeUint32=function(t,e,r){t.data&&(e+=t.start,t=t.data),t[e]=r>>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r},t.findBox=function(e,r){var i,a,n,o,s,l,u=[];if(e.data?(s=e.start,n=e.end,e=e.data):(s=0,n=e.byteLength),!r.length)return null;for(i=s;i1?i+a:n,t.bin2str(e.subarray(i+4,i+8))===r[0]&&(1===r.length?u.push({data:e,start:i+8,end:l}):(o=t.findBox({data:e,start:i+8,end:l},r.slice(1))).length&&(u=u.concat(o))),i=l;return u},t.parseInitSegment=function(e){var r=[];return t.findBox(e,["moov","trak"]).forEach(function(e){var i=t.findBox(e,["tkhd"])[0];if(i){var a=i.data[i.start],n=0===a?12:20,s=t.readUint32(i,n),l=t.findBox(e,["mdia","mdhd"])[0];if(l){n=0===(a=l.data[l.start])?12:20;var u=t.readUint32(l,n),d=t.findBox(e,["mdia","hdlr"])[0];if(d){var h={soun:"audio",vide:"video"}[t.bin2str(d.data.subarray(d.start+8,d.start+12))];if(h){var c=t.findBox(e,["mdia","minf","stbl","stsd"]);if(c.length){c=c[0];var f=t.bin2str(c.data.subarray(c.start+12,c.start+16));o.b.log("MP4Demuxer:"+h+":"+f+" found")}r[s]={timescale:u,type:h},r[h]={timescale:u,id:s}}}}}}),r},t.getStartDTS=function(e,r){var i,a,n;return i=t.findBox(r,["moof","traf"]),a=[].concat.apply([],i.map(function(r){return t.findBox(r,["tfhd"]).map(function(i){var a,n;return a=t.readUint32(i,4),n=e[a].timescale||9e4,t.findBox(r,["tfdt"]).map(function(e){var r,i;return r=e.data[e.start],i=t.readUint32(e,4),1===r&&(i*=Math.pow(2,32),i+=t.readUint32(e,8)),i})[0]/n})})),n=Math.min.apply(null,a),isFinite(n)?n:0},t.offsetStartDTS=function(e,r,i){t.findBox(r,["moof","traf"]).map(function(r){return t.findBox(r,["tfhd"]).map(function(a){var n=t.readUint32(a,4),o=e[n].timescale||9e4;t.findBox(r,["tfdt"]).map(function(e){var r=e.data[e.start],a=t.readUint32(e,4);if(0===r)t.writeUint32(e,4,a-i*o);else{a*=Math.pow(2,32),a+=t.readUint32(e,8),a-=i*o,a=Math.max(a,0);var n=Math.floor(a/(y+1)),s=Math.floor(a%(y+1));t.writeUint32(e,4,n),t.writeUint32(e,8,s)}})})})},t.prototype.append=function(e,r,a,n){var o=this.initData;o||(this.resetInitSegment(e,this.audioCodec,this.videoCodec),o=this.initData);var s,l=this.initPTS;if(void 0===l){var u=t.getStartDTS(o,e);this.initPTS=l=u-r,this.observer.trigger(i.a.INIT_PTS_FOUND,{initPTS:l})}t.offsetStartDTS(o,e,l),s=t.getStartDTS(o,e),this.remuxer.remux(o.audio,o.video,null,null,s,a,n,e)},t.prototype.destroy=function(){},t}(),b={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(t,e,r,i,a){if(!(r+24>e.length)){var n=this.parseHeader(e,r);if(n&&r+n.frameLength<=e.length){var o=i+a*(9e4*n.samplesPerFrame/n.sampleRate),s={unit:e.subarray(r,r+n.frameLength),pts:o,dts:o};return t.config=[],t.channelCount=n.channelCount,t.samplerate=n.sampleRate,t.samples.push(s),t.len+=n.frameLength,{sample:s,length:n.frameLength}}}},parseHeader:function(t,e){var r=t[e+1]>>3&3,i=t[e+1]>>1&3,a=t[e+2]>>4&15,n=t[e+2]>>2&3,o=t[e+2]>>1&1;if(1!==r&&0!==a&&15!==a&&3!==n){var s=3===r?3-i:3===i?3:4,l=1e3*b.BitratesMap[14*s+a-1],u=3===r?0:2===r?1:2,d=b.SamplingRateMap[3*u+n],h=t[e+3]>>6==3?1:2,c=b.SamplesCoefficients[r][i],f=b.BytesInSlot[i],p=8*c*f;return{sampleRate:d,channelCount:h,frameLength:parseInt(c*l/d+o,10)*f,samplesPerFrame:p}}},isHeaderPattern:function(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])},isHeader:function(t,e){return!!(e+1t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},t.prototype.readBits=function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&o.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?r<>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},t.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},t.prototype.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},t.prototype.readBoolean=function(){return 1===this.readBits(1)},t.prototype.readUByte=function(){return this.readBits(8)},t.prototype.readUShort=function(){return this.readBits(16)},t.prototype.readUInt=function(){return this.readBits(32)},t.prototype.skipScalingList=function(t){var e,r=8,i=8;for(e=0;e=t.length)return void r();if(!(t[e].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(t,e,r,i),!i)return}}},t.prototype.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,r=new Int8Array(e),i=0,a=32;a<=t.length-16;a+=160,i+=16)r.set(t.subarray(a,a+16),i);return r},t.prototype.getAvcDecryptedUnit=function(t,e){e=new Uint8Array(e);for(var r=0,i=32;i<=t.length-16;i+=160,r+=16)t.set(e.subarray(r,r+16),i);return t},t.prototype.decryptAvcSample=function(t,e,r,i,a,n){var o=this.discardEPB(a.data),s=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(s.buffer,function(s){a.data=l.getAvcDecryptedUnit(o,s),n||l.decryptAvcSamples(t,e,r+1,i)})},t.prototype.decryptAvcSamples=function(t,e,r,i){for(;;e++,r=0){if(e>=t.length)return void i();for(var a=t[e].units;!(r>=a.length);r++){var n=a[r];if(!(n.length<=48||1!==n.type&&5!==n.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,r,i,n,o),!o)return}}}},t}();var A={video:0,audio:1,id3:2,text:3},S=function(){function t(e,r,i,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.config=i,this.typeSupported=a,this.remuxer=r,this.sampleAes=null}return t.prototype.setDecryptData=function(t){null!=t&&null!=t.key&&"SAMPLE-AES"===t.method?this.sampleAes=new R(this.observer,this.config,t,this.discardEPB):this.sampleAes=null},t.probe=function(e){var r=t._syncOffset(e);return!(r<0)&&(r&&o.b.warn("MPEG2-TS detected but first sync word found @ offset "+r+", junk ahead ?"),!0)},t._syncOffset=function(t){for(var e=Math.min(1e3,t.length-564),r=0;r>4>1){if((h=l+5+e[l+4])===l+188)continue}else h=l+4;switch(d){case b:u&&(A&&(c=D(A))&&I(c,!1),A={data:[],size:0}),A&&(A.data.push(e.subarray(h,l+188)),A.size+=l+188-h);break;case E:u&&(S&&(c=D(S))&&(y.isAAC?k(c):O(c)),S={data:[],size:0}),S&&(S.data.push(e.subarray(h,l+188)),S.size+=l+188-h);break;case T:u&&(_&&(c=D(_))&&C(c),_={data:[],size:0}),_&&(_.data.push(e.subarray(h,l+188)),_.size+=l+188-h);break;case 0:u&&(h+=e[h]+1),R=this._pmtId=L(e,h);break;case R:u&&(h+=e[h]+1);var x=w(e,h,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=x.avc)>0&&(v.pid=b),(E=x.audio)>0&&(y.pid=E,y.isAAC=x.isAAC),(T=x.id3)>0&&(m.pid=T),p&&!g&&(o.b.log("reparse from beginning"),p=!1,l=P-188),g=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});A&&(c=D(A))?(I(c,!0),v.pesData=null):v.pesData=A,S&&(c=D(S))?(y.isAAC?k(c):O(c),y.pesData=null):(S&&S.size&&o.b.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=S),_&&(c=D(_))?(C(c),m.pesData=null):m.pesData=_,null==this.sampleAes?this.remuxer.remux(y,v,m,this._txtTrack,r,n,s):this.decryptAndRemux(y,v,m,this._txtTrack,r,n,s)},t.prototype.decryptAndRemux=function(t,e,r,i,a,n,o){if(t.samples&&t.isAAC){var s=this;this.sampleAes.decryptAacSamples(t.samples,0,function(){s.decryptAndRemuxAvc(t,e,r,i,a,n,o)})}else this.decryptAndRemuxAvc(t,e,r,i,a,n,o)},t.prototype.decryptAndRemuxAvc=function(t,e,r,i,a,n,o){if(e.samples){var s=this;this.sampleAes.decryptAvcSamples(e.samples,0,0,function(){s.remuxer.remux(t,e,r,i,a,n,o)})}else this.remuxer.remux(t,e,r,i,a,n,o)},t.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t.prototype._parsePAT=function(t,e){return(31&t[e+10])<<8|t[e+11]},t.prototype._parsePMT=function(t,e,r,i){var a,n,s={audio:-1,avc:-1,id3:-1,isAAC:!0};for(a=e+3+((15&t[e+1])<<8|t[e+2])-4,e+=12+((15&t[e+10])<<8|t[e+11]);e1;){var c=new Uint8Array(h[0].length+h[1].length);c.set(h[0]),c.set(h[1],h[0].length),h[0]=c,h.splice(1,1)}if(1===((e=h[0])[0]<<16)+(e[1]<<8)+e[2]){if((i=(e[4]<<8)+e[5])&&i>t.size-6)return null;192&(r=e[7])&&((s=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2)>4294967295&&(s-=8589934592),64&r?((l=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>4294967295&&(l-=8589934592),s-l>54e5&&(o.b.warn(Math.round((s-l)/9e4)+"s delta between PTS and DTS, align them"),s=l)):l=s),u=(a=e[8])+9,t.size-=u,n=new Uint8Array(t.size);for(var f=0,p=h.length;fg){u-=g;continue}e=e.subarray(u),g-=u,u=0}n.set(e,d),d+=g}return i&&(i-=a+3),{data:n,pts:s,dts:l,len:i}}return null},t.prototype.pushAccesUnit=function(t,e){if(t.units.length&&t.frame){var r=e.samples,i=r.length;!this.config.forceKeyFrameOnDiscontinuity||!0===t.key||e.sps&&(i||this.contiguous)?(t.id=i,r.push(t)):e.dropped++}t.debug.length&&o.b.log(t.pts+"/"+t.dts+":"+t.debug)},t.prototype._parseAVCPES=function(t,e){var r,i,a,n=this,o=this._avcTrack,s=this._parseAVCNALu(t.data),l=this.avcSample,u=!1,d=this.pushAccesUnit.bind(this),h=function(t,e,r,i){return{key:t,pts:e,dts:r,units:[],debug:i}};t.data=null,l&&s.length&&!o.audFound&&(d(l,o),l=this.avcSample=h(!1,t.pts,t.dts,"")),s.forEach(function(e){switch(e.type){case 1:i=!0,l||(l=n.avcSample=h(!0,t.pts,t.dts,"")),l.frame=!0;var s=e.data;if(u&&s.length>4){var c=new T(s).readSliceType();2!==c&&4!==c&&7!==c&&9!==c||(l.key=!0)}break;case 5:i=!0,l||(l=n.avcSample=h(!0,t.pts,t.dts,"")),l.key=!0,l.frame=!0;break;case 6:i=!0,(r=new T(n.discardEPB(e.data))).readUByte();for(var f=0,p=0,g=!1,v=0;!g&&r.bytesAvailable>1;){f=0;do{f+=v=r.readUByte()}while(255===v);p=0;do{p+=v=r.readUByte()}while(255===v);if(4===f&&0!==r.bytesAvailable){if(g=!0,181===r.readUByte())if(49===r.readUShort())if(1195456820===r.readUInt())if(3===r.readUByte()){var y=r.readUByte(),m=31&y,b=[y,r.readUByte()];for(a=0;a0){if(e.pts>=t[r-1].pts)t.push(e);else for(var i=r-1;i>=0;i--)if(e.pts=0)i={data:t.subarray(h,n-l-1),type:a},d.push(i);else{var c=this._getLastNalUnit();if(c&&(u&&n<=4-u&&c.state&&(c.data=c.data.subarray(0,c.data.byteLength-u)),(r=n-l-1)>0)){var f=new Uint8Array(c.data.byteLength+r);f.set(c.data,0),f.set(t.subarray(0,r),c.data.byteLength),c.data=f}}n=0&&l>=0&&(i={data:t.subarray(h,o),type:a,state:l},d.push(i)),0===d.length){var p=this._getLastNalUnit();if(p){var g=new Uint8Array(p.data.byteLength+t.byteLength);g.set(p.data,0),g.set(t,p.data.byteLength),p.data=g}}return s.naluState=l,d},t.prototype.discardEPB=function(t){for(var e,r,i=t.byteLength,a=[],n=1;n1&&(o.b.log("AAC: align PTS for overlapping frames by "+Math.round((T-y)/90)),y=T)}for(;n>24&255,e[1]=i>>16&255,e[2]=i>>8&255,e[3]=255&i,e.set(t,4),a=0,i=8;a>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,r,i){return t.box(t.types.moof,t.mfhd(e),t.traf(i,r))},t.moov=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trak(e[r]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(t.mvex(e)))},t.mvex=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trex(e[r]);return t.box.apply(null,[t.types.mvex].concat(i))},t.mvhd=function(e,r){r*=e;var i=Math.floor(r/(w+1)),a=Math.floor(r%(w+1)),n=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,n)},t.sdtp=function(e){var r,i,a=e.samples||[],n=new Uint8Array(4+a.length);for(i=0;i>>8&255),n.push(255&a),n=n.concat(Array.prototype.slice.call(i));for(r=0;r>>8&255),o.push(255&a),o=o.concat(Array.prototype.slice.call(i));var s=t.box(t.types.avcC,new Uint8Array([1,n[3],n[4],n[5],255,224|e.sps.length].concat(n).concat([e.pps.length]).concat(o))),l=e.width,u=e.height,d=e.pixelRatio[0],h=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,h>>24,h>>16&255,h>>8&255,255&h])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var r=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var r=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var r=e.id,i=e.duration*e.timescale,a=e.width,n=e.height,o=Math.floor(i/(w+1)),s=Math.floor(i%(w+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,n>>8&255,255&n,0,0]))},t.traf=function(e,r){var i=t.sdtp(e),a=e.id,n=Math.floor(r/(w+1)),o=Math.floor(r%(w+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o])),t.trun(e,i.length+16+20+8+16+8+8),i)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var r=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,r){var i,a,n,o,s,l,u=e.samples||[],d=u.length,h=12+16*d,c=new Uint8Array(h);for(r+=8+h,c.set([0,0,15,1,d>>>24&255,d>>>16&255,d>>>8&255,255&d,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),i=0;i>>24&255,n>>>16&255,n>>>8&255,255&n,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return t.box(t.types.trun,c)},t.initSegment=function(e){t.types||t.init();var r,i=t.moov(e);return(r=new Uint8Array(t.FTYP.byteLength+i.byteLength)).set(t.FTYP),r.set(i,t.FTYP.byteLength),r},t}();var I=function(){function t(e,r,i,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.config=r,this.typeSupported=i;var n=navigator.userAgent;this.isSafari=a&&a.indexOf("Apple")>-1&&n&&!n.match("CriOS"),this.ISGenerated=!1}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(t){this._initPTS=this._initDTS=t},t.prototype.resetInitSegment=function(){this.ISGenerated=!1},t.prototype.remux=function(t,e,r,a,n,s,l){if(this.ISGenerated||this.generateIS(t,e,n),this.ISGenerated){var u=t.samples.length,d=e.samples.length,h=n,c=n;if(u&&d){var f=(t.samples[0].dts-e.samples[0].dts)/e.inputTimeScale;h+=Math.max(0,f),c+=Math.max(0,-f)}if(u){t.timescale||(o.b.warn("regenerate InitSegment as audio detected"),this.generateIS(t,e,n));var p=this.remuxAudio(t,h,s,l);if(d){var g=void 0;p&&(g=p.endPTS-p.startPTS),e.timescale||(o.b.warn("regenerate InitSegment as video detected"),this.generateIS(t,e,n)),this.remuxVideo(e,c,s,g,l)}}else{var v=void 0;d&&(v=this.remuxVideo(e,c,s,l)),v&&t.codec&&this.remuxEmptyAudio(t,h,s,v)}}r.samples.length&&this.remuxID3(r,n),a.samples.length&&this.remuxText(a,n),this.observer.trigger(i.a.FRAG_PARSED)},t.prototype.generateIS=function(t,e,r){var n,s,l=this.observer,u=t.samples,d=e.samples,h=this.typeSupported,c="audio/mp4",f={},p={tracks:f},g=void 0===this._initPTS;if(g&&(n=s=1/0),t.config&&u.length&&(t.timescale=t.samplerate,o.b.log("audio sampling rate : "+t.samplerate),t.isAAC||(h.mpeg?(c="audio/mpeg",t.codec=""):h.mp3&&(t.codec="mp3")),f.audio={container:c,codec:t.codec,initSegment:!t.isAAC&&h.mpeg?new Uint8Array:D.initSegment([t]),metadata:{channelCount:t.channelCount}},g&&(n=s=u[0].pts-t.inputTimeScale*r)),e.sps&&e.pps&&d.length){var v=e.inputTimeScale;e.timescale=v,f.video={container:"video/mp4",codec:e.codec,initSegment:D.initSegment([e]),metadata:{width:e.width,height:e.height}},g&&(n=Math.min(n,d[0].pts-v*r),s=Math.min(s,d[0].dts-v*r),this.observer.trigger(i.a.INIT_PTS_FOUND,{initPTS:n}))}Object.keys(f).length?(l.trigger(i.a.FRAG_PARSING_INIT_SEGMENT,p),this.ISGenerated=!0,g&&(this._initPTS=n,this._initDTS=s)):l.trigger(i.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.prototype.remuxVideo=function(t,e,r,n,s){var l,u,d,h,c,f,p,g=8,v=t.timescale,y=t.samples,m=[],b=y.length,E=this._PTSNormalize,T=this._initDTS,R=this.nextAvcDts,A=this.isSafari;A&&(r|=y.length&&R&&(s&&Math.abs(e-R/v)<.1||Math.abs(y[0].pts-R-T)1?o.b.log("AVC:"+w+" ms hole between fragments detected,filling it"):w<-1&&o.b.log("AVC:"+-w+" ms overlapping between fragments detected"),c=R,y[0].dts=c,h=Math.max(h-w,R),y[0].pts=h,o.b.log("Video/PTS/DTS adjusted: "+Math.round(h/90)+"/"+Math.round(c/90)+",delta:"+w+" ms")),L=y[y.length-1],p=Math.max(L.dts,0),f=Math.max(L.pts,0,p),A&&(l=Math.round((p-c)/(y.length-1)));for(var I=0,k=0,O=0;O0?B-1:B].dts;if(q.stretchShortVideoTrack){var J=q.maxBufferHole,$=q.maxSeekHole,Z=Math.floor(Math.min(J,$)*v),tt=(n?h+n*v:this.nextAudioPts)-G.pts;tt>Z?((l=tt-Q)<0&&(l=Q),o.b.log("It is approximately "+tt/90+" ms to the next segment; using duration "+l/90+" ms for the last video frame.")):l=Q}else l=Q}K=Math.round(G.pts-G.dts)}m.push({size:H,duration:l,cts:K,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:G.key?2:1,isNonSync:G.key?0:1}})}this.nextAvcDts=p+l;var et=t.dropped;if(t.len=0,t.nbNalu=0,t.dropped=0,m.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var rt=m[0].flags;rt.dependsOn=2,rt.isNonSync=0}t.samples=m,d=D.moof(t.sequenceNumber++,c,t),t.samples=[];var it={data1:d,data2:u,startPTS:h/v,endPTS:(f+l)/v,startDTS:c/v,endDTS:this.nextAvcDts/v,type:"video",nb:m.length,dropped:et};return this.observer.trigger(i.a.FRAG_PARSING_DATA,it),it},t.prototype.remuxAudio=function(t,e,r,n){var s,l,u,d,h,c,f,p=t.inputTimeScale,g=t.timescale,v=p/g,y=(t.isAAC?1024:1152)*v,m=this._PTSNormalize,b=this._initDTS,E=!t.isAAC&&this.typeSupported.mpeg,T=t.samples,R=[],A=this.nextAudioPts;if(r|=T.length&&A&&(n&&Math.abs(e-A/p)<.1||Math.abs(T[0].pts-A-b)<20*y),T.forEach(function(t){t.pts=t.dts=m(t.pts-b,e*p)}),0!==(T=T.filter(function(t){return t.pts>=0})).length){if(r||(A=n?e*p:T[0].pts),t.isAAC)for(var S=this.config.maxAudioFramesDrift,_=0,w=A;_=S*y&&O<1e4&&w){var C=Math.round(I/y);o.b.warn("Injecting "+C+" audio frame @ "+(w/p).toFixed(3)+"s due to "+Math.round(1e3*I/p)+" ms gap.");for(var P=0;P0&&G<1e4)j=Math.round((B-A)/y),o.b.log(G+" ms hole between AAC samples detected,filling it"),j>0&&((u=L.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(u=U.subarray()),t.len+=j*u.length);else if(G<-12){o.b.log("drop overlapping AAC sample, expected/parsed/delta:"+(A/p).toFixed(3)+"s/"+(B/p).toFixed(3)+"s/"+-G+"ms"),t.len-=U.byteLength;continue}B=A}if(c=B,!(t.len>0))return;var H=E?t.len:t.len+8;s=E?0:8;try{d=new Uint8Array(H)}catch(t){return void this.observer.trigger(i.a.ERROR,{type:a.b.MUX_ERROR,details:a.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:H,reason:"fail allocating audio mdat "+H})}E||(new DataView(d.buffer).setUint32(0,H),d.set(D.types.mdat,4));for(var K=0;K=2&&(V=R[Y-2].duration,l.duration=V),Y){this.nextAudioPts=A=f+v*V,t.len=0,t.samples=R,h=E?new Uint8Array:D.moof(t.sequenceNumber++,c/v,t),t.samples=[];var z=c/p,X=A/p,q={data1:h,data2:d,startPTS:z,endPTS:X,startDTS:z,endDTS:X,type:"audio",nb:Y};return this.observer.trigger(i.a.FRAG_PARSING_DATA,q),q}return null}},t.prototype.remuxEmptyAudio=function(t,e,r,i){var a=t.inputTimeScale,n=a/(t.samplerate?t.samplerate:a),s=this.nextAudioPts,l=(void 0!==s?s:i.startDTS*a)+this._initDTS,u=i.endDTS*a+this._initDTS,d=1024*n,h=Math.ceil((u-l)/d),c=L.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(o.b.warn("remux empty Audio"),c){for(var f=[],p=0;p4294967296;)t+=r;return t},t}();var k=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(){},t.prototype.resetInitSegment=function(){},t.prototype.remux=function(t,e,r,a,n,o,s,l){var u=this.observer,d="";t&&(d+="audio"),e&&(d+="video"),u.trigger(i.a.FRAG_PARSING_DATA,{data1:l,startPTS:n,startDTS:n,type:d,nb:1,dropped:0}),u.trigger(i.a.FRAG_PARSED)},t}();var O=function(){function t(e,r,i,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.observer=e,this.typeSupported=r,this.config=i,this.vendor=a}return t.prototype.destroy=function(){var t=this.demuxer;t&&t.destroy()},t.prototype.push=function(t,e,r,a,o,s,l,u,d,h,c,f){if(t.byteLength>0&&null!=e&&null!=e.key&&"AES-128"===e.method){var p=this.decrypter;null==p&&(p=this.decrypter=new n.a(this.observer,this.config));var g,v=this;try{g=performance.now()}catch(t){g=Date.now()}p.decrypt(t,e.key.buffer,e.iv.buffer,function(t){var n;try{n=performance.now()}catch(t){n=Date.now()}v.observer.trigger(i.a.FRAG_DECRYPTED,{stats:{tstart:g,tdecrypt:n}}),v.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),a,o,s,l,u,d,h,c,f)})}else this.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),a,o,s,l,u,d,h,c,f)},t.prototype.pushDecrypted=function(t,e,r,n,o,s,l,u,d,h,c,f){var p=this.demuxer;if(!p||l&&!this.probe(t)){for(var g=this.observer,y=this.typeSupported,b=this.config,E=[{demux:S,remux:I},{demux:m,remux:k},{demux:v,remux:I},{demux:_,remux:I}],T=0,R=E.length;T1?r-1:0),a=1;aNumber.MAX_SAFE_INTEGER?1/0:e},t.prototype.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var r=new Uint8Array(e.length/2),i=0;iNumber.MAX_SAFE_INTEGER?1/0:e},t.prototype.decimalFloatingPoint=function(t){return parseFloat(this[t])},t.prototype.enumeratedString=function(t){return this[t]},t.prototype.decimalResolution=function(t){var e=h.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,r={};for(c.lastIndex=0;null!==(e=c.exec(t));){var i=e[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),r[e[1]]=i}return r},t}(),p={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function g(t,e){return MediaSource.isTypeSupported((e||"video")+'/mp4;codecs="'+t+'"')}var v=function(){function t(t,e){for(var r=0;r>8*(15-r)&255;return e},t.prototype.fragmentDecryptdataFromLevelkey=function(t,e){var r=t;return t&&t.method&&t.uri&&!t.iv&&((r=new R).method=t.method,r.baseuri=t.baseuri,r.reluri=t.reluri,r.iv=this.createInitializationVector(e)),r},t.prototype.cloneObj=function(t){return JSON.parse(JSON.stringify(t))},v(t,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=n.a.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(t){this._url=t}},{key:"programDateTime",get:function(){return!this._programDateTime&&this.rawProgramDateTime&&(this._programDateTime=new Date(Date.parse(this.rawProgramDateTime))),this._programDateTime}},{key:"byteRange",get:function(){if(!this._byteRange){var t=this._byteRange=[];if(this.rawByteRange){var e=this.rawByteRange.split("@",2);if(1===e.length){var r=this.lastByteRangeEndOffset;t[0]=r||0}else t[0]=parseInt(e[1]);t[1]=parseInt(e[0])+t[0]}}return this._byteRange}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata}}]),t}();function S(t,e){if(!t)return null;for(var r=null,i=0;i0?a[0]:i[0],t=t.filter(function(t){return-1===i.indexOf(t)})}}),e.unknownCodecs=t}for(m.lastIndex=0;null!=(i=m.exec(t));){var n={},o=n.attrs=new f(i[1]);n.url=this.resolve(i[2],e);var s=o.decimalResolution("RESOLUTION");s&&(n.width=s.width,n.height=s.height),n.bitrate=o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),n.name=o.NAME,a([].concat((o.CODECS||"").split(/[ ,]+/)),n),n.videoCodec&&-1!==n.videoCodec.indexOf("avc1")&&(n.videoCodec=this.avc1toavcoti(n.videoCodec)),r.push(n)}return r},e.prototype.parseMasterPlaylistMedia=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=void 0,n=[],o=0;for(b.lastIndex=0;null!==(a=b.exec(t));){var s={},l=new f(a[1]);if(l.TYPE===r){if(s.groupId=l["GROUP-ID"],s.name=l.NAME,s.type=r,s.default="YES"===l.DEFAULT,s.autoselect="YES"===l.AUTOSELECT,s.forced="YES"===l.FORCED,l.URI&&(s.url=this.resolve(l.URI,e)),s.lang=l.LANGUAGE,s.name||(s.name=s.lang),i.length){var u=S(i,s.groupId);s.audioCodec=u?u.codec:i[0].codec}s.id=o++,n.push(s)}}return n},e.prototype.avc1toavcoti=function(t){var e,r=t.split(".");return r.length>2?(e=r.shift()+".",e+=parseInt(r.shift()).toString(16),e+=("000"+parseInt(r.shift()).toString(16)).substr(-4)):e=t,e},e.prototype.parseLevelPlaylist=function(t,e,r,i){var a,n,o=0,s=0,u={type:null,version:null,url:e,fragments:[],live:!0,startSN:0},d=new R,h=0,c=null,p=new A;for(E.lastIndex=0;null!==(a=E.exec(t));){var g=a[1];if(g){p.duration=parseFloat(g);var v=(" "+a[2]).slice(1);p.title=v||null,p.tagList.push(v?["INF",g,v]:["INF",g])}else if(a[3]){if(!isNaN(p.duration)){var y=o++;p.type=i,p.start=s,p.levelkey=d,p.sn=y,p.level=r,p.cc=h,p.baseurl=e,p.relurl=(" "+a[3]).slice(1),u.fragments.push(p),c=p,s+=p.duration,p=new A}}else if(a[4]){if(p.rawByteRange=(" "+a[4]).slice(1),c){var m=c.byteRangeEndOffset;m&&(p.lastByteRangeEndOffset=m)}}else if(a[5])p.rawProgramDateTime=(" "+a[5]).slice(1),p.tagList.push(["PROGRAM-DATE-TIME",p.rawProgramDateTime]),void 0===u.programDateTime&&(u.programDateTime=new Date(new Date(Date.parse(a[5]))-1e3*s));else{for(a=a[0].match(T),n=1;n=0&&(d.method=L,d.baseuri=e,d.reluri=w,d.key=null,d.iv=D));break;case"START":var I=new f(b).decimalFloatingPoint("TIME-OFFSET");isNaN(I)||(u.startTimeOffset=I);break;case"MAP":var k=new f(b);p.relurl=k.URI,p.rawByteRange=k.BYTERANGE,p.baseurl=e,p.level=r,p.type=i,p.sn="initSegment",u.initSegment=p,p=new A;break;default:l.b.warn("line parsed but not handled: "+a)}}}return(p=c)&&!p.relurl&&(u.fragments.pop(),s-=p.duration),u.totalduration=s,u.averagetargetduration=s/u.fragments.length,u.endSN=o-1,u.startCC=u.fragments[0]?u.fragments[0].cc:0,u.endCC=h,u},e.prototype.loadsuccess=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=t.data,n=t.url,u=r.type,d=r.id,h=r.level,c=this.hls;if(this.loaders[u]=void 0,void 0!==n&&0!==n.indexOf("data:")||(n=r.url),e.tload=performance.now(),0===a.indexOf("#EXTM3U"))if(a.indexOf("#EXTINF:")>0){var f="audioTrack"!==u&&"subtitleTrack"!==u,p=isNaN(h)?isNaN(d)?0:d:h,g=this.parseLevelPlaylist(a,n,p,"audioTrack"===u?"audio":"subtitleTrack"===u?"subtitle":"main");g.tload=e.tload,"manifest"===u&&c.trigger(o.a.MANIFEST_LOADED,{levels:[{url:n,details:g}],audioTracks:[],url:n,stats:e,networkDetails:i}),e.tparsed=performance.now(),g.targetduration?f?c.trigger(o.a.LEVEL_LOADED,{details:g,level:h||0,id:d||0,stats:e,networkDetails:i}):"audioTrack"===u?c.trigger(o.a.AUDIO_TRACK_LOADED,{details:g,id:d,stats:e,networkDetails:i}):"subtitleTrack"===u&&c.trigger(o.a.SUBTITLE_TRACK_LOADED,{details:g,id:d,stats:e,networkDetails:i}):c.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.MANIFEST_PARSING_ERROR,fatal:!0,url:n,reason:"invalid targetduration",networkDetails:i})}else{var v=this.parseMasterPlaylist(a,n);if(v.length){var y=v.map(function(t){return{id:t.attrs.AUDIO,codec:t.audioCodec}}),m=this.parseMasterPlaylistMedia(a,n,"AUDIO",y),b=this.parseMasterPlaylistMedia(a,n,"SUBTITLES");if(m.length){var E=!1;m.forEach(function(t){t.url||(E=!0)}),!1===E&&v[0].audioCodec&&!v[0].attrs.AUDIO&&(l.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),m.unshift({type:"main",name:"main"}))}c.trigger(o.a.MANIFEST_LOADED,{levels:v,audioTracks:m,subtitles:b,url:n,stats:e,networkDetails:i})}else c.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.MANIFEST_PARSING_ERROR,fatal:!0,url:n,reason:"no level found in manifest",networkDetails:i})}else c.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.MANIFEST_PARSING_ERROR,fatal:!0,url:n,reason:"no EXTM3U delimiter",networkDetails:i})},e.prototype.loaderror=function(t,e){var r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e.loader;switch(e.type){case"manifest":r=s.a.MANIFEST_LOAD_ERROR,i=!0;break;case"level":r=s.a.LEVEL_LOAD_ERROR,i=!1;break;case"audioTrack":r=s.a.AUDIO_TRACK_LOAD_ERROR,i=!1}n&&(n.abort(),this.loaders[e.type]=void 0),this.hls.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:r,fatal:i,url:n.url,loader:n,response:t,context:e,networkDetails:a})},e.prototype.loadtimeout=function(t,e){var r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e.loader;switch(e.type){case"manifest":r=s.a.MANIFEST_LOAD_TIMEOUT,i=!0;break;case"level":r=s.a.LEVEL_LOAD_TIMEOUT,i=!1;break;case"audioTrack":r=s.a.AUDIO_TRACK_LOAD_TIMEOUT,i=!1}n&&(n.abort(),this.loaders[e.type]=void 0),this.hls.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:r,fatal:i,url:n.url,loader:n,context:e,networkDetails:a})},e}(d);var L=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.FRAG_LOADING));return i.loaders={},i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){var t=this.loaders;for(var e in t){var r=t[e];r&&r.destroy()}this.loaders={},d.prototype.destroy.call(this)},e.prototype.onFragLoading=function(t){var e=t.frag,r=e.type,i=this.loaders[r],a=this.hls.config;e.loaded=0,i&&(l.b.warn("abort previous fragment loader for type:"+r),i.abort()),i=this.loaders[r]=e.loader=void 0!==a.fLoader?new a.fLoader(a):new a.loader(a);var n,o,s=void 0;s={url:e.url,frag:e,responseType:"arraybuffer",progressData:!1};var u=e.byteRangeStartOffset,d=e.byteRangeEndOffset;isNaN(u)||isNaN(d)||(s.rangeStart=u,s.rangeEnd=d),n={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout},o={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},i.load(s,n,o)},e.prototype.loadsuccess=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=t.data,n=r.frag;n.loader=void 0,this.loaders[n.type]=void 0,this.hls.trigger(o.a.FRAG_LOADED,{payload:a,frag:n,stats:e,networkDetails:i})},e.prototype.loaderror=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=e.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_ERROR,fatal:!1,frag:e.frag,response:t,networkDetails:r})},e.prototype.loadtimeout=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=e.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e.frag,networkDetails:r})},e.prototype.loadprogress=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=e.frag;a.loaded=t.loaded,this.hls.trigger(o.a.FRAG_LOAD_PROGRESS,{frag:a,stats:t,networkDetails:i})},e}(d);var w=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.KEY_LOADING));return i.loaders={},i.decryptkey=null,i.decrypturl=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},d.prototype.destroy.call(this)},e.prototype.onKeyLoading=function(t){var e=t.frag,r=e.type,i=this.loaders[r],a=e.decryptdata,n=a.uri;if(n!==this.decrypturl||null===this.decryptkey){var s=this.hls.config;i&&(l.b.warn("abort previous key loader for type:"+r),i.abort()),e.loader=this.loaders[r]=new s.loader(s),this.decrypturl=n,this.decryptkey=null;var u,d,h;u={url:n,frag:e,responseType:"arraybuffer"},d={timeout:s.fragLoadingTimeOut,maxRetry:s.fragLoadingMaxRetry,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout},h={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},e.loader.load(u,d,h)}else this.decryptkey&&(a.key=this.decryptkey,this.hls.trigger(o.a.KEY_LOADED,{frag:e}))},e.prototype.loadsuccess=function(t,e,r){var i=r.frag;this.decryptkey=i.decryptdata.key=new Uint8Array(t.data),i.loader=void 0,this.loaders[i.type]=void 0,this.hls.trigger(o.a.KEY_LOADED,{frag:i})},e.prototype.loaderror=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},e.prototype.loadtimeout=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:s.b.NETWORK_ERROR,details:s.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},e}(d),D={search:function(t,e){for(var r=0,i=t.length-1,a=null,n=null;r<=i;){var o=e(n=t[a=(r+i)/2|0]);if(o>0)r=a+1;else{if(!(o<0))return n;i=a-1}}return null}},I={isBuffered:function(t,e){try{if(t)for(var r=t.buffered,i=0;i=r.start(i)&&e<=r.end(i))return!0}catch(t){}return!1},bufferInfo:function(t,e,r){try{if(t){var i,a=t.buffered,n=[];for(i=0;id&&(l[u-1].end=t[s].end):l.push(t[s])}else l.push(t[s])}for(s=0,i=0,a=n=e;s=h&&e1?e-1:0),a=1;a1?e-1:0),a=1;ae?i.start+i.duration:Math.max(i.start-a.duration,0):r>e?(i.duration=n-i.start,i.duration<0&&l.b.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(a.duration=i.start-n,a.duration<0&&l.b.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!"))}function B(t,e,r,i,a,n){var o=r;if(!isNaN(e.startPTS)){var s=Math.abs(e.startPTS-r);isNaN(e.deltaPTS)?e.deltaPTS=s:e.deltaPTS=Math.max(s,e.deltaPTS),o=Math.max(r,e.startPTS),r=Math.min(r,e.startPTS),i=Math.max(i,e.endPTS),a=Math.min(a,e.startDTS),n=Math.max(n,e.endDTS)}var l=r-e.start;e.start=e.startPTS=r,e.maxStartPTS=o,e.endPTS=i,e.startDTS=a,e.endDTS=n,e.duration=i-r;var u,d,h,c=e.sn;if(!t||ct.endSN)return 0;for(u=c-t.startSN,(d=t.fragments)[u]=e,h=u;h>0;h--)U(d,h,h-1);for(h=u;h=0&&nr.startCC||t&&t.cc0&&-1===t&&(l.b.log("override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=V.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state=V.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=V.STOPPED,this.forceStartLoad=!1},e.prototype.tick=function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)},e.prototype.doTick=function(){switch(this.state){case V.ERROR:break;case V.BUFFER_FLUSHING:this.fragLoadError=0;break;case V.IDLE:this._doTickIdle();break;case V.WAITING_LEVEL:var t=this.levels[this.level];t&&t.details&&(this.state=V.IDLE);break;case V.FRAG_LOADING_WAITING_RETRY:var e=performance.now(),r=this.retryDate;(!r||e>=r||this.media&&this.media.seeking)&&(l.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=V.IDLE);break;case V.ERROR:case V.STOPPED:case V.FRAG_LOADING:case V.PARSING:case V.PARSED:case V.ENDED:}this._checkBuffer(),this._checkFragmentChanged()},e.prototype._doTickIdle=function(){var t=this.hls,e=t.config,r=this.media;if(void 0!==this.levelLastLoaded&&(r||!this.startFragRequested&&e.startFragPrefetch)){var i=void 0;i=this.loadedmetadata?r.currentTime:this.nextLoadPosition;var a=t.nextLoadLevel,n=this.levels[a];if(n){var s=n.bitrate,u=void 0;u=s?Math.max(8*e.maxBufferSize/s,e.maxBufferLength):e.maxBufferLength,u=Math.min(u,e.maxMaxBufferLength);var d=I.bufferInfo(this.mediaBuffer?this.mediaBuffer:r,i,e.maxBufferHole),h=d.len;if(!(h>=u)){l.b.trace("buffer length of "+h.toFixed(3)+" is below max of "+u.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=a;var c=n.details;if(void 0===c||!0===c.live&&this.levelLastLoaded!==a)this.state=V.WAITING_LEVEL;else{var f=this.fragPrevious;if(!c.live&&f&&!f.backtracked&&f.sn===c.endSN&&!d.nextStart)if(Math.min(r.duration,f.start+f.duration)-Math.max(d.end,f.start)<=Math.max(.2,f.duration)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(o.a.BUFFER_EOS,p),void(this.state=V.ENDED)}this._fetchPayloadOrEos(i,d,c)}}}}},e.prototype._fetchPayloadOrEos=function(t,e,r){var i=this.fragPrevious,a=this.level,n=r.fragments,o=n.length;if(0!==o){var s=n[0].start,u=n[o-1].start+n[o-1].duration,d=e.end,h=void 0;if(r.initSegment&&!r.initSegment.data)h=r.initSegment;else if(r.live){var c=this.config.initialLiveManifestSize;if(oc&&(u.currentTime=c),this.nextLoadPosition=c}if(t.PTSKnown&&e>i&&u&&u.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(a){var f=a.sn+1;if(f>=t.startSN&&f<=t.endSN){var p=n[f-t.startSN];a.cc===p.cc&&(d=p,l.b.log("live playlist, switching playlist, load frag with next SN: "+d.sn))}d||(d=D.search(n,function(t){return a.cc-t.cc}))&&l.b.log("live playlist, switching playlist, load frag with same CC: "+d.sn)}d||(d=n[Math.min(o-1,Math.round(o/2))],l.b.log("live playlist, switching playlist, unknown, load middle frag : "+d.sn))}return d},e.prototype._findFragment=function(t,e,r,i,a,n,o){var s=this.hls.config,u=void 0,d=void 0,h=s.maxFragLookUpTolerance,c=e?i[e.sn-i[0].sn+1]:void 0,f=function(t){var e=Math.min(h,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-e<=a?1:t.start-e>a&&t.start?-1:0};if(an-h&&(h=0),d=c&&!f(c)?c:D.search(i,f)):d=i[r-1],d){var p=(u=d).sn-o.startSN,g=e&&u.level===e.level,v=i[p-1],y=i[p+1];if(e&&u.sn===e.sn)if(g&&!u.backtracked)if(u.sns.maxBufferHole&&e.dropped&&p?(u=v,l.b.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"),e.loadCounter--):(u=y,l.b.log("SN just loaded, load next one: "+u.sn))}else u=null;else u.backtracked&&(y&&y.backtracked?(l.b.warn("Already backtracked from fragment "+y.sn+", will not backtrack to fragment "+u.sn+". Loading fragment "+y.sn),u=y):(l.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),u.dropped=0,v?(v.loadCounter&&v.loadCounter--,(u=v).backtracked=!0):p&&(u=null)))}return u},e.prototype._loadFragmentOrKey=function(t,e,r,i,a){var n=this.hls,u=n.config;if(!t.decryptdata||null==t.decryptdata.uri||null!=t.decryptdata.key){if(l.b.log("Loading "+t.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+e+", currentTime:"+i.toFixed(3)+",bufferEnd:"+a.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,t.loadCounter){t.loadCounter++;var d=u.fragLoadingLoopThreshold;if(t.loadCounter>d&&Math.abs(this.fragLoadIdx-t.loadIdx)e.endPTS?1:0})},e.prototype.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},e.prototype._checkFragmentChanged=function(){var t,e,r=this.media;if(r&&r.readyState&&!1===r.seeking&&((e=r.currentTime)>r.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=e),I.isBuffered(r,e)?t=this.getBufferedFrag(e):I.isBuffered(r,e+.1)&&(t=this.getBufferedFrag(e+.1)),t)){var i=t;if(i!==this.fragPlaying){this.hls.trigger(o.a.FRAG_CHANGED,{frag:i});var a=i.level;this.fragPlaying&&this.fragPlaying.level===a||this.hls.trigger(o.a.LEVEL_SWITCHED,{level:a}),this.fragPlaying=i}}},e.prototype.immediateLevelSwitch=function(){if(l.b.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t=this.media,e=void 0;t?(e=t.paused,t.pause()):e=!0,this.previouslyPaused=e}var r=this.fragCurrent;r&&r.loader&&r.loader.abort(),this.fragCurrent=null,void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},e.prototype.immediateLevelSwitchEnd=function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,I.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())},e.prototype.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var e,r=void 0,i=void 0;if(void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),(e=this.getBufferedFrag(t.currentTime))&&e.startPTS>1&&this.flushMainBuffer(0,e.startPTS-1),t.paused)r=0;else{var a=this.hls.nextLoadLevel,n=this.levels[a],o=this.fragLastKbps;r=o&&this.fragCurrent?this.fragCurrent.duration*n.bitrate/(1e3*o)+1:0}if((i=this.getBufferedFrag(t.currentTime+r))&&(i=this.followingBufferedFrag(i))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(i.maxStartPTS,Number.POSITIVE_INFINITY)}}},e.prototype.flushMainBuffer=function(t,e){this.state=V.BUFFER_FLUSHING;var r={startOffset:t,endOffset:e};this.altAudio&&(r.type="video"),this.hls.trigger(o.a.BUFFER_FLUSHING,r)},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("seeked",this.onvseeked),e.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.hls.startLoad(r.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(l.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.levels;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.loadCounter=void 0,t.backtracked=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){var t=this.media,e=t?t.currentTime:void 0,r=this.config;isNaN(e)||l.b.log("media seeking to "+e.toFixed(3));var i=this.mediaBuffer?this.mediaBuffer:t,a=I.bufferInfo(i,e,this.config.maxBufferHole);if(this.state===V.FRAG_LOADING){var n=this.fragCurrent;if(0===a.len&&n){var o=r.maxFragLookUpTolerance,s=n.start-o,u=n.start+n.duration+o;eu?(n.loader&&(l.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),n.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=V.IDLE):l.b.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===V.ENDED&&(0===a.len&&(this.fragPrevious=0),this.state=V.IDLE);t&&(this.lastCurrentTime=e),this.state!==V.FRAG_LOADING&&void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*r.fragLoadingLoopThreshold),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=e),this.tick()},e.prototype.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:void 0;isNaN(e)||l.b.log("media seeked to "+e.toFixed(3)),this.tick()},e.prototype.onMediaEnded=function(){l.b.log("media ended"),this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestLoading=function(){l.b.log("trigger BUFFER_RESET"),this.hls.trigger(o.a.BUFFER_RESET),this._bufferedFrags=[],this.stalled=!1,this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestParsed=function(t){var e,r=!1,i=!1;t.levels.forEach(function(t){(e=t.audioCodec)&&(-1!==e.indexOf("mp4a.40.2")&&(r=!0),-1!==e.indexOf("mp4a.40.5")&&(i=!0))}),this.audioCodecSwitch=r&&i,this.audioCodecSwitch&&l.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1;var a=this.config;(a.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(a.startPosition)},e.prototype.onLevelLoaded=function(t){var e=t.details,r=t.level,i=this.levels[this.levelLastLoaded],a=this.levels[r],n=e.totalduration,s=0;if(l.b.log("level "+r+" loaded ["+e.startSN+","+e.endSN+"],duration:"+n),e.live){var u=a.details;u&&e.fragments.length>0?(G(u,e),s=e.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(s,u),e.PTSKnown&&!isNaN(s)?l.b.log("live playlist sliding:"+s.toFixed(3)):(l.b.log("live playlist - outdated PTS, unknown sliding"),K(this.fragPrevious,i,e))):(l.b.log("live playlist - first load, unknown sliding"),e.PTSKnown=!1,K(this.fragPrevious,i,e))}else e.PTSKnown=!1;if(a.details=e,this.levelLastLoaded=r,this.hls.trigger(o.a.LEVEL_UPDATED,{details:e,level:r}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var d=e.startTimeOffset;isNaN(d)?e.live?(this.startPosition=this.computeLivePosition(s,e),l.b.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(d<0&&(l.b.log("negative start time offset "+d+", count from end of last fragment"),d=s+n+d),l.b.log("start time offset found in playlist, adjust startPosition to "+d),this.startPosition=d),this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===V.WAITING_LEVEL&&(this.state=V.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===V.KEY_LOADING&&(this.state=V.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,r=t.frag;if(this.state===V.FRAG_LOADING&&e&&"main"===r.type&&r.level===e.level&&r.sn===e.sn){var i=t.stats,a=this.levels[e.level],n=a.details;if(l.b.log("Loaded "+e.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+e.level),this.bitrateTest=!1,this.stats=i,!0===r.bitrateTest&&this.hls.nextLoadLevel)this.state=V.IDLE,this.startFragRequested=!1,i.tparsed=i.tbuffered=performance.now(),this.hls.trigger(o.a.FRAG_BUFFERED,{stats:i,frag:e,id:"main"}),this.tick();else if("initSegment"===r.sn)this.state=V.IDLE,i.tparsed=i.tbuffered=performance.now(),n.initSegment.data=t.payload,this.hls.trigger(o.a.FRAG_BUFFERED,{stats:i,frag:e,id:"main"}),this.tick();else{this.state=V.PARSING;var s=n.totalduration,u=e.level,d=e.sn,h=this.config.defaultAudioCodec||a.audioCodec;this.audioCodecSwap&&(l.b.log("swapping playlist audio codec"),void 0===h&&(h=this.lastAudioCodec),h&&(h=-1!==h.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),this.pendingBuffering=!0,this.appended=!1,l.b.log("Parsing "+d+" of ["+n.startSN+" ,"+n.endSN+"],level "+u+", cc "+e.cc);var c=this.demuxer;c||(c=this.demuxer=new M(this.hls,"main"));var f=this.media,p=!(f&&f.seeking)&&(n.PTSKnown||!n.live),g=n.initSegment?n.initSegment.data:[];c.push(t.payload,g,h,a.videoCodec,e,s,p,void 0)}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,r=t.frag;if(e&&"main"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===V.PARSING){var i,a,n=t.tracks;if(n.audio&&this.altAudio&&delete n.audio,a=n.audio){var s=this.levels[this.level].audioCodec,u=navigator.userAgent.toLowerCase();s&&this.audioCodecSwap&&(l.b.log("swapping playlist audio codec"),s=-1!==s.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==a.metadata.channelCount&&-1===u.indexOf("firefox")&&(s="mp4a.40.5"),-1!==u.indexOf("android")&&"audio/mpeg"!==a.container&&(s="mp4a.40.2",l.b.log("Android: force audio codec to "+s)),a.levelCodec=s,a.id=t.id}for(i in(a=n.video)&&(a.levelCodec=this.levels[this.level].videoCodec,a.id=t.id),this.hls.trigger(o.a.BUFFER_CODECS,n),n){a=n[i],l.b.log("main track:"+i+",container:"+a.container+",codecs[level/parsed]=["+a.levelCodec+"/"+a.codec+"]");var d=a.initSegment;d&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(o.a.BUFFER_APPENDING,{type:i,data:d,parent:"main",content:"initSegment"}))}this.tick()}},e.prototype.onFragParsingData=function(t){var e=this,r=this.fragCurrent,i=t.frag;if(r&&"main"===t.id&&i.sn===r.sn&&i.level===r.level&&("audio"!==t.type||!this.altAudio)&&this.state===V.PARSING){var a=this.levels[this.level],n=r;if(isNaN(t.endPTS)&&(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),l.b.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0)),"video"===t.type)if(n.dropped=t.dropped,n.dropped)if(n.backtracked)l.b.warn("Already backtracked on this fragment, appending with the gap");else{var s=a.details;if(!s||n.sn!==s.startSN)return l.b.warn("missing video frame(s), backtracking fragment"),n.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=V.IDLE,this.fragPrevious=n,void this.tick();l.b.warn("missing video frame(s) on first frag, appending with gap")}else n.backtracked=!1;var u=B(a.details,n,t.startPTS,t.endPTS,t.startDTS,t.endDTS),d=this.hls;d.trigger(o.a.LEVEL_PTS_UPDATED,{details:a.details,level:this.level,drift:u,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach(function(r){r&&r.length&&e.state===V.PARSING&&(e.appended=!0,e.pendingBuffering=!0,d.trigger(o.a.BUFFER_APPENDING,{type:t.type,data:r,parent:"main",content:"data"}))}),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,r=t.frag;e&&"main"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===V.PARSING&&(this.stats.tparsed=performance.now(),this.state=V.PARSED,this._checkAppendedParsed())},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url,r=t.id;if(!e){if(this.mediaBuffer!==this.media){l.b.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var i=this.fragCurrent;i.loader&&(l.b.log("switching to main audio track, cancel main fragment load"),i.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=V.IDLE}var a=this.hls;a.trigger(o.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),a.trigger(o.a.AUDIO_TRACK_SWITCHED,{id:r}),this.altAudio=!1}},e.prototype.onAudioTrackSwitched=function(t){var e=t.id,r=!!this.hls.audioTracks[e].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(l.b.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},e.prototype.onBufferCreated=function(t){var e=t.tracks,r=void 0,i=void 0,a=!1;for(var n in e){var o=e[n];"main"===o.id?(i=n,r=o,"video"===n&&(this.videoBuffer=e[n].buffer)):a=!0}a&&r?(l.b.log("alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media},e.prototype.onBufferAppended=function(t){if("main"===t.parent){var e=this.state;e!==V.PARSING&&e!==V.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==V.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;if(t){var e=this.mediaBuffer?this.mediaBuffer:this.media;l.b.log("main buffered : "+j.toString(e.buffered));var r=this._bufferedFrags.filter(function(t){return I.isBuffered(e,(t.startPTS+t.endPTS)/2)});r.push(t),this._bufferedFrags=r.sort(function(t,e){return t.startPTS-e.startPTS}),this.fragPrevious=t;var i=this.stats;i.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*i.total/(i.tbuffered-i.tfirst)),this.hls.trigger(o.a.FRAG_BUFFERED,{stats:i,frag:t,id:"main"}),this.state=V.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag||this.fragCurrent;if(!e||"main"===e.type){var r=!!this.media&&I.isBuffered(this.media,this.media.currentTime)&&I.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case s.a.FRAG_LOAD_ERROR:case s.a.FRAG_LOAD_TIMEOUT:case s.a.KEY_LOAD_ERROR:case s.a.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var i=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);e.loadCounter=0,l.b.warn("mediaController: frag loading failed, retry in "+i+" ms"),this.retryDate=performance.now()+i,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=V.FRAG_LOADING_WAITING_RETRY}else l.b.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=V.ERROR;break;case s.a.FRAG_LOOP_LOADING_ERROR:t.fatal||(r?(this._reduceMaxBufferLength(e.duration),this.state=V.IDLE):e.autoLevel&&0!==e.level||(t.fatal=!0,this.state=V.ERROR));break;case s.a.LEVEL_LOAD_ERROR:case s.a.LEVEL_LOAD_TIMEOUT:this.state!==V.ERROR&&(t.fatal?(this.state=V.ERROR,l.b.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==V.WAITING_LEVEL||(this.state=V.IDLE));break;case s.a.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==V.PARSING&&this.state!==V.PARSED||(r?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=V.IDLE):(l.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},e.prototype._reduceMaxBufferLength=function(t){var e=this.config;e.maxMaxBufferLength>=t&&(e.maxMaxBufferLength/=2,l.b.warn("main:reduce max buffer length to "+e.maxMaxBufferLength+"s"),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*e.fragLoadingLoopThreshold))},e.prototype._checkBuffer=function(){var t=this.media,e=this.config;if(t&&t.readyState){var r=t.currentTime,i=this.mediaBuffer?this.mediaBuffer:t,a=i.buffered;if(!this.loadedmetadata&&a.length){this.loadedmetadata=!0;var n=t.seeking?r:this.startPosition,u=I.isBuffered(i,n),d=a.start(0),h=!u&&Math.abs(n-d)1e3*e.lowBufferWatchdogPeriod){this.stallReported||(this.stallReported=!0,l.b.warn("playback stalling in low buffer @"+r),g.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:y}));var b=c.nextStart,E=b-r;if(b&&E0){this.nudgeRetry=++m;var T=m*e.nudgeOffset;l.b.log("adjust currentTime from "+t.currentTime+" to next buffered @ "+b+" + nudge "+T),t.currentTime=b+T,this.stalled=void 0,g.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_SEEK_OVER_HOLE,fatal:!1,hole:b+T-r})}}else if(y>.5&&v>1e3*e.highBufferWatchdogPeriod)if(this.stallReported||(this.stallReported=!0,l.b.warn("playback stalling in high buffer @"+r),g.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:y})),this.stalled=void 0,this.nudgeRetry=++m,m"+t),this.hls.trigger(o.a.STREAM_STATE_TRANSITION,{previousState:e,nextState:t})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getBufferedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;return t?this.followingBufferedFrag(this.getBufferedFrag(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(t){this._liveSyncPosition=t}}]),e}(d),z=function(){function t(t,e){for(var r=0;r0){r=e[0].bitrate,e.sort(function(t,e){return t.bitrate-e.bitrate}),this._levels=e;for(var c=0;c0})}else this.hls.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},e.prototype.setLevelInternal=function(t){var e=this._levels,r=this.hls;if(t>=0&&t1&&s.loadError0&&(e=t.urlId,this.hls.trigger(o.a.LEVEL_LOADING,{url:t.url[e],level:this.currentLevelIndex,id:e}))},z(e,[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e=this._levels;e&&(t=Math.min(t,e.length-1),this.currentLevelIndex===t&&void 0!==e[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}]),e}(d),q=r(3);var Q=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.MEDIA_ATTACHED,o.a.MEDIA_DETACHING,o.a.FRAG_PARSING_METADATA));return i.id3Track=void 0,i.media=void 0,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){d.prototype.destroy.call(this)},e.prototype.onMediaAttached=function(t){this.media=t.media,this.media},e.prototype.onMediaDetaching=function(){this.media=void 0},e.prototype.onFragParsingMetadata=function(t){var e=t.frag,r=t.samples;this.id3Track||(this.id3Track=this.media.addTextTrack("metadata","id3"),this.id3Track.mode="hidden");for(var i=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,a=0;a=this.minWeight_},t.prototype.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.prototype.destroy=function(){},t}(),Z=function(){function t(t,e){for(var r=0;r500*r.duration/u){var d=t.levels,h=Math.max(1,n.bw?n.bw/8:1e3*n.loaded/s),c=d[r.level],f=c.realBitrate?Math.max(c.realBitrate,c.bitrate):c.bitrate,p=n.total?n.total:Math.max(n.loaded,Math.round(r.duration*f/8)),g=e.currentTime,v=(p-n.loaded)/h,y=(I.bufferInfo(e,g,t.config.maxBufferHole).end-g)/u;if(y<2*r.duration/u&&v>y){var m=void 0,b=void 0;for(b=r.level-1;b>a;b--){var E=d[b].realBitrate?Math.max(d[b].realBitrate,d[b].bitrate):d[b].bitrate;if((m=r.duration*E/(6.4*h))=i;d--){var h=u[d].details,c=h?h.totalduration/h.fragments.length:e,f=!!h&&h.live,p=void 0;p=d<=t?o*r:s*r;var g=u[d].realBitrate?Math.max(u[d].realBitrate,u[d].bitrate):u[d].bitrate,v=g*c/p;if(l.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+d+"/"+Math.round(p)+"/"+g+"/"+c+"/"+n+"/"+v),p>g&&(!v||f&&!this.bitrateTestDelay||v=0)return f;l.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var p=s?Math.min(s,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(0===c){var y=this.bitrateTestDelay;if(y)p=(s?Math.min(s,i.maxLoadingDelay):i.maxLoadingDelay)-y,l.b.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),g=v=1}return f=this._findBestLevel(o,s,h,a,e,c+p,g,v,r),Math.max(f,0)}}]),e}(d);var et=F(),rt=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.MEDIA_ATTACHING,o.a.MEDIA_DETACHING,o.a.MANIFEST_PARSED,o.a.BUFFER_RESET,o.a.BUFFER_APPENDING,o.a.BUFFER_CODECS,o.a.BUFFER_EOS,o.a.BUFFER_FLUSHING,o.a.LEVEL_PTS_UPDATED,o.a.LEVEL_UPDATED));return i._msDuration=null,i._levelDuration=null,i._live=null,i._objectUrl=null,i.onsbue=i.onSBUpdateEnd.bind(i),i.onsbe=i.onSBUpdateError.bind(i),i.pendingTracks={},i.tracks={},i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){d.prototype.destroy.call(this)},e.prototype.onLevelPtsUpdated=function(t){var e=t.type,r=this.tracks.audio;if("audio"===e&&r&&"audio/mpeg"===r.container){var i=this.sourceBuffer.audio;if(Math.abs(i.timestampOffset-t.start)>.1){var a=i.updating;try{i.abort()}catch(t){a=!0,l.b.warn("can not abort audio buffer: "+t)}a?this.audioTimestampOffset=t.start:(l.b.warn("change mpeg audio timestamp offset from "+i.timestampOffset+" to "+t.start),i.timestampOffset=t.start)}}},e.prototype.onManifestParsed=function(t){var e=t.audio,r=t.video||t.levels.length&&t.audio,i=0;t.altAudio&&(e||r)&&(i=(e?1:0)+(r?1:0),l.b.log(i+" sourceBuffer(s) expected")),this.sourceBufferNb=i},e.prototype.onMediaAttaching=function(t){var e=this.media=t.media;if(e){var r=this.mediaSource=new et;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),r.addEventListener("sourceopen",this.onmso),r.addEventListener("sourceended",this.onmse),r.addEventListener("sourceclose",this.onmsc),e.src=URL.createObjectURL(r),this._objectUrl=e.src}},e.prototype.onMediaDetaching=function(){l.b.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){l.b.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this.onmso),t.removeEventListener("sourceended",this.onmse),t.removeEventListener("sourceclose",this.onmsc),this.media&&(URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):l.b.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(o.a.MEDIA_DETACHED)},e.prototype.onMediaSourceOpen=function(){l.b.log("media source opened"),this.hls.trigger(o.a.MEDIA_ATTACHED,{media:this.media});var t=this.mediaSource;t&&t.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()},e.prototype.checkPendingTracks=function(){var t=this.pendingTracks,e=Object.keys(t).length;e&&(this.sourceBufferNb<=e||0===this.sourceBufferNb)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},e.prototype.onMediaSourceClose=function(){l.b.log("media source closed")},e.prototype.onMediaSourceEnded=function(){l.b.log("media source ended")},e.prototype.onSBUpdateEnd=function(){if(this.audioTimestampOffset){var t=this.sourceBuffer.audio;l.b.warn("change mpeg audio timestamp offset from "+t.timestampOffset+" to "+this.audioTimestampOffset),t.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var e=this.parent,r=this.segments.reduce(function(t,r){return r.parent===e?t+1:t},0);this.hls.trigger(o.a.BUFFER_APPENDED,{parent:e,pending:r}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()},e.prototype.onSBUpdateError=function(t){l.b.error("sourceBuffer error:",t),this.hls.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferReset=function(){var t=this.sourceBuffer;for(var e in t){var r=t[e];try{this.mediaSource.removeSourceBuffer(r),r.removeEventListener("updateend",this.onsbue),r.removeEventListener("error",this.onsbe)}catch(t){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},e.prototype.onBufferCodecs=function(t){if(0===Object.keys(this.sourceBuffer).length){for(var e in t)this.pendingTracks[e]=t[e];var r=this.mediaSource;r&&"open"===r.readyState&&this.checkPendingTracks()}},e.prototype.createSourceBuffers=function(t){var e=this.sourceBuffer,r=this.mediaSource;for(var i in t)if(!e[i]){var a=t[i],n=a.levelCodec||a.codec,u=a.container+";codecs="+n;l.b.log("creating sourceBuffer("+u+")");try{var d=e[i]=r.addSourceBuffer(u);d.addEventListener("updateend",this.onsbue),d.addEventListener("error",this.onsbe),this.tracks[i]={codec:n,container:a.container},a.buffer=d}catch(t){l.b.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:u})}}this.hls.trigger(o.a.BUFFER_CREATED,{tracks:t})},e.prototype.onBufferAppending=function(t){this._needsFlush||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())},e.prototype.onBufferAppendFail=function(t){l.b.error("sourceBuffer error:",t.event),this.hls.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferEos=function(t){var e=this.sourceBuffer,r=t.type;for(var i in e)r&&i!==r||e[i].ended||(e[i].ended=!0,l.b.log(i+" sourceBuffer now EOS"));this.checkEos()},e.prototype.checkEos=function(){var t=this.sourceBuffer,e=this.mediaSource;if(e&&"open"===e.readyState){for(var r in t){var i=t[r];if(!i.ended)return;if(i.updating)return void(this._needsEos=!0)}l.b.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment");try{e.endOfStream()}catch(t){l.b.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},e.prototype.onBufferFlushing=function(t){this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}),this.flushBufferCounter=0,this.doFlush()},e.prototype.onLevelUpdated=function(t){var e=t.details;e.fragments.length>0&&(this._levelDuration=e.totalduration+e.fragments[0].start,this._live=e.live,this.updateMediaElementDuration())},e.prototype.updateMediaElementDuration=function(){var t,e=this.hls.config;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var r in this.sourceBuffer)if(!0===this.sourceBuffer[r].updating)return;t=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===e.liveDurationInfinity?(l.b.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>t||t===1/0||isNaN(t))&&(l.b.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},e.prototype.doFlush=function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var e=0,r=this.sourceBuffer;try{for(var i in r)e+=r[i].buffered.length}catch(t){l.b.error("error while accessing sourceBuffer.buffered")}this.appended=e,this.hls.trigger(o.a.BUFFER_FLUSHED)}},e.prototype.doAppending=function(){var t=this.hls,e=this.sourceBuffer,r=this.segments;if(Object.keys(e).length){if(this.media.error)return this.segments=[],void l.b.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(r&&r.length){var i=r.shift();try{var a=e[i.type];a?a.updating?r.unshift(i):(a.ended=!1,this.parent=i.parent,a.appendBuffer(i.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(e){l.b.error("error while trying to append buffer:"+e.message),r.unshift(i);var n={type:s.b.MEDIA_ERROR,parent:i.parent};if(22===e.code)return this.segments=[],n.details=s.a.BUFFER_FULL_ERROR,n.fatal=!1,void t.trigger(o.a.ERROR,n);if(this.appendError?this.appendError++:this.appendError=1,n.details=s.a.BUFFER_APPEND_ERROR,this.appendError>t.config.appendErrorMaxRetry)return l.b.log("fail "+t.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),r=[],n.fatal=!0,void t.trigger(o.a.ERROR,n);n.fatal=!1,t.trigger(o.a.ERROR,n)}}}},e.prototype.flushBuffer=function(t,e,r){var i,a,n,o,s,u,d=this.sourceBuffer;if(Object.keys(d).length){if(l.b.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+t+"/"+e),this.flushBufferCounter.5)return this.flushBufferCounter++,l.b.log("flush "+h+" ["+s+","+u+"], of ["+n+","+o+"], pos:"+this.media.currentTime),i.remove(s,u),!1}catch(t){l.b.warn("exception while accessing sourcebuffer, it might have been removed from MediaSource")}}}else l.b.warn("abort flushing too many retries");l.b.log("buffer flushed")}return!0},e}(d),it=function(){function t(t,e){for(var r=0;rthis.autoLevelCapping&&e.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},e.prototype.getMaxLevel=function(t){var r=this;if(!this.levels)return-1;var i=this.levels.filter(function(i,a){return e.isLevelAllowed(a,r.restrictedLevels)&&a<=t});return e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},e.isLevelAllowed=function(t){return-1===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).indexOf(t)},e.getMaxLevelByMediaSize=function(t,e,r){if(!t||t&&!t.length)return-1;for(var i,a,n=t.length-1,o=0;o=e||s.height>=r)&&(i=s,!(a=t[o+1])||i.width!==a.width||i.height!==a.height)){n=o;break}}return n},it(e,[{key:"mediaWidth",get:function(){var t=void 0,r=this.media;return r&&(t=r.width||r.clientWidth||r.offsetWidth,t*=e.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t=void 0,r=this.media;return r&&(t=r.height||r.clientHeight||r.offsetHeight,t*=e.contentScaleFactor),t}}],[{key:"contentScaleFactor",get:function(){var t=1;try{t=window.devicePixelRatio}catch(t){}return t}}]),e}(d);var nt=function(t){function e(r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.MEDIA_ATTACHING))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},e.prototype.onMediaAttaching=function(t){var e=this.hls.config;e.capLevelOnFPSDrop&&("function"==typeof(this.video=t.media instanceof HTMLVideoElement?t.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),e.fpsDroppedMonitoringPeriod))},e.prototype.checkFPS=function(t,e,r){var i=performance.now();if(e){if(this.lastTime){var a=i-this.lastTime,n=r-this.lastDroppedFrames,s=e-this.lastDecodedFrames,u=1e3*n/a,d=this.hls;if(d.trigger(o.a.FPS_DROP,{currentDropped:n,currentDecoded:s,totalDroppedFrames:r}),u>0&&n>d.config.fpsDroppedMonitoringThreshold*s){var h=d.currentLevel;l.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(-1===d.autoLevelCapping||d.autoLevelCapping>=h)&&(h-=1,d.trigger(o.a.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:d.currentLevel}),d.autoLevelCapping=h,d.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=r,this.lastDecodedFrames=e}},e.prototype.checkFPSInterval=function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},e}(d);var ot=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}return t.prototype.destroy=function(){this.abort(),this.loader=null},t.prototype.abort=function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},t.prototype.load=function(t,e,r){this.context=t,this.config=e,this.callbacks=r,this.stats={trequest:performance.now(),retry:0},this.retryDelay=e.retryDelay,this.loadInternal()},t.prototype.loadInternal=function(){var t,e=this.context;t=this.loader=new XMLHttpRequest;var r=this.stats;r.tfirst=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(t,e.url)}catch(r){t.open("GET",e.url,!0),i(t,e.url)}t.readyState||t.open("GET",e.url,!0)}catch(r){return void this.callbacks.onError({code:t.status,text:r.message},e,t)}e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=e.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()},t.prototype.readystatechange=function(t){var e=t.currentTarget,r=e.readyState,i=this.stats,a=this.context,n=this.config;if(!i.aborted&&r>=2)if(window.clearTimeout(this.requestTimeout),0===i.tfirst&&(i.tfirst=Math.max(performance.now(),i.trequest)),4===r){var o=e.status;if(o>=200&&o<300){i.tload=Math.max(i.tfirst,performance.now());var s=void 0,u=void 0;u="arraybuffer"===a.responseType?(s=e.response).byteLength:(s=e.responseText).length,i.loaded=i.total=u;var d={url:e.responseURL,data:s};this.callbacks.onSuccess(d,i,a,e)}else i.retry>=n.maxRetry||o>=400&&o<499?(l.b.error(o+" while loading "+a.url),this.callbacks.onError({code:o,text:e.statusText},a,e)):(l.b.warn(o+" while loading "+a.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,n.maxRetryDelay),i.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),n.timeout)},t.prototype.loadtimeout=function(){l.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.prototype.loadprogress=function(t){var e=t.currentTarget,r=this.stats;r.loaded=t.loaded,t.lengthComputable&&(r.total=t.total);var i=this.callbacks.onProgress;i&&i(r,this.context,null,e)},t}(),st=function(){function t(t,e){for(var r=0;r1&&setTimeout(this.tick,1),this.ticks=0)},e.prototype.doTick=function(){this.updateTrack(this.trackId)},e.prototype.onError=function(t){t.fatal&&t.type===s.b.NETWORK_ERROR&&this.cleanTimer()},e.prototype.onManifestLoading=function(){this.tracks=[],this.trackId=-1},e.prototype.onManifestParsed=function(t){var e=this,r=t.audioTracks||[],i=!1;this.tracks=r,this.hls.trigger(o.a.AUDIO_TRACKS_UPDATED,{audioTracks:r});var a=0;r.forEach(function(t){if(t.default&&!i)return e.audioTrack=a,void(i=!0);a++}),!1===i&&r.length&&(l.b.log("no default audio track defined, use first audio track as default"),this.audioTrack=0)},e.prototype.onAudioTrackLoaded=function(t){t.id=0&&t=0&&t0&&-1===t?(l.b.log("audio:override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=dt.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:t,this.state=dt.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=t,this.state=dt.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=dt.STOPPED},e.prototype.tick=function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)},e.prototype.doTick=function(){var t,e,r,i=this.hls,a=i.config;switch(this.state){case dt.ERROR:case dt.PAUSED:case dt.BUFFER_FLUSHING:break;case dt.STARTING:this.state=dt.WAITING_TRACK,this.loadedmetadata=!1;break;case dt.IDLE:var n=this.tracks;if(!n)break;if(!this.media&&(this.startFragRequested||!a.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(void 0===(t=this.nextLoadPosition))break;var u=this.mediaBuffer?this.mediaBuffer:this.media,d=this.videoBuffer?this.videoBuffer:this.media,h=I.bufferInfo(u,t,a.maxBufferHole),c=I.bufferInfo(d,t,a.maxBufferHole),f=h.len,p=h.end,g=this.fragPrevious,v=Math.max(a.maxBufferLength,c.len),y=this.audioSwitch,m=this.trackId;if((fT||h.nextStart))return;l.b.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=T+.05}if(r.initSegment&&!r.initSegment.data)A=r.initSegment;else if(p<=T){if(A=b[0],null!==this.videoTrackCC&&A.cc!==this.videoTrackCC&&(A=function(t,e){return D.search(t,function(t){return t.cce?-1:0})}(b,this.videoTrackCC)),r.live&&A.loadIdx&&A.loadIdx===this.fragLoadIdx){var S=h.nextStart?h.nextStart:T;return l.b.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(S+.05)),void(this.media.currentTime=S+.05)}}else{var _=void 0,L=a.maxFragLookUpTolerance,w=g?b[g.sn-b[0].sn+1]:void 0,k=function(t){var e=Math.min(L,t.duration);return t.start+t.duration-e<=p?1:t.start-e>p&&t.start?-1:0};pR-L&&(L=0),_=w&&!k(w)?w:D.search(b,k)):_=b[E-1],_&&(A=_,T=_.start,g&&A.level===g.level&&A.sn===g.sn&&(A.snO&&Math.abs(this.fragLoadIdx-A.loadIdx)=P||x)&&(l.b.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=dt.IDLE);break;case dt.WAITING_INIT_PTS:var F=this.videoTrackCC;if(void 0===this.initPTS[F])break;var N=this.waitingFragment;if(N){var M=N.frag.cc;F!==M?(e=this.tracks[this.trackId]).details&&e.details.live&&(l.b.warn("Waiting fragment CC ("+M+") does not match video track CC ("+F+")"),this.waitingFragment=null,this.state=dt.IDLE):(this.state=dt.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=dt.IDLE;break;case dt.STOPPED:case dt.FRAG_LOADING:case dt.PARSING:case dt.PARSED:case dt.ENDED:}},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("ended",this.onvended);var r=this.config;this.tracks&&r.autoStartLoad&&this.startLoad(r.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(l.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.tracks;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.loadCounter=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){this.state===dt.ENDED&&(this.state=dt.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.tick()},e.prototype.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},e.prototype.onAudioTracksUpdated=function(t){l.b.log("audio tracks updated"),this.tracks=t.audioTracks},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url;this.trackId=t.id,this.fragCurrent=null,this.state=dt.PAUSED,this.waitingFragment=null,e?this.timer||(this.timer=setInterval(this.ontick,100)):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),e&&(this.audioSwitch=!0,this.state=dt.IDLE,void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold)),this.tick()},e.prototype.onAudioTrackLoaded=function(t){var e=t.details,r=t.id,i=this.tracks[r],a=e.totalduration,n=0;if(l.b.log("track "+r+" loaded ["+e.startSN+","+e.endSN+"],duration:"+a),e.live){var o=i.details;o&&e.fragments.length>0?(G(o,e),n=e.fragments[0].start,e.PTSKnown?l.b.log("live audio playlist sliding:"+n.toFixed(3)):l.b.log("live audio playlist - outdated PTS, unknown sliding")):(e.PTSKnown=!1,l.b.log("live audio playlist - first load, unknown sliding"))}else e.PTSKnown=!1;if(i.details=e,!this.startFragRequested){if(-1===this.startPosition){var s=e.startTimeOffset;isNaN(s)?this.startPosition=0:(l.b.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s)}this.nextLoadPosition=this.startPosition}this.state===dt.WAITING_TRACK&&(this.state=dt.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===dt.KEY_LOADING&&(this.state=dt.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,r=t.frag;if(this.state===dt.FRAG_LOADING&&e&&"audio"===r.type&&r.level===e.level&&r.sn===e.sn){var i=this.tracks[this.trackId],a=i.details,n=a.totalduration,s=e.level,u=e.sn,d=e.cc,h=this.config.defaultAudioCodec||i.audioCodec||"mp4a.40.2",c=this.stats=t.stats;if("initSegment"===u)this.state=dt.IDLE,c.tparsed=c.tbuffered=performance.now(),a.initSegment.data=t.payload,this.hls.trigger(o.a.FRAG_BUFFERED,{stats:c,frag:e,id:"audio"}),this.tick();else{this.state=dt.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new M(this.hls,"audio"));var f=this.initPTS[d],p=a.initSegment?a.initSegment.data:[];if(a.initSegment||void 0!==f){this.pendingBuffering=!0,l.b.log("Demuxing "+u+" of ["+a.startSN+" ,"+a.endSN+"],track "+s);this.demuxer.push(t.payload,p,h,null,e,n,!1,f)}else l.b.log("unknown video PTS for continuity counter "+d+", waiting for video PTS before demuxing audio frag "+u+" of ["+a.startSN+" ,"+a.endSN+"],track "+s),this.waitingFragment=t,this.state=dt.WAITING_INIT_PTS}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,r=t.frag;if(e&&"audio"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===dt.PARSING){var i=t.tracks,a=void 0;if(i.video&&delete i.video,a=i.audio){a.levelCodec=a.codec,a.id=t.id,this.hls.trigger(o.a.BUFFER_CODECS,i),l.b.log("audio track:audio,container:"+a.container+",codecs[level/parsed]=["+a.levelCodec+"/"+a.codec+"]");var n=a.initSegment;if(n){var s={type:"audio",data:n,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[s]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(o.a.BUFFER_APPENDING,s))}this.tick()}}},e.prototype.onFragParsingData=function(t){var e=this,r=this.fragCurrent,i=t.frag;if(r&&"audio"===t.id&&"audio"===t.type&&i.sn===r.sn&&i.level===r.level&&this.state===dt.PARSING){var a=this.trackId,n=this.tracks[a],s=this.hls;isNaN(t.endPTS)&&(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),l.b.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),B(n.details,r,t.startPTS,t.endPTS);var u=this.audioSwitch,d=this.media,h=!1;if(u&&d)if(d.readyState){var c=d.currentTime;l.b.log("switching audio track : currentTime:"+c),c>=t.startPTS&&(l.b.log("switching audio track : flushing all audio"),this.state=dt.BUFFER_FLUSHING,s.trigger(o.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),h=!0,this.audioSwitch=!1,s.trigger(o.a.AUDIO_TRACK_SWITCHED,{id:a}))}else this.audioSwitch=!1,s.trigger(o.a.AUDIO_TRACK_SWITCHED,{id:a});var f=this.pendingData;this.audioSwitch||([t.data1,t.data2].forEach(function(e){e&&e.length&&f.push({type:t.type,data:e,parent:"audio",content:"data"})}),!h&&f.length&&(f.forEach(function(t){e.state===dt.PARSING&&(e.pendingBuffering=!0,e.hls.trigger(o.a.BUFFER_APPENDING,t))}),this.pendingData=[],this.appended=!0)),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,r=t.frag;e&&"audio"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===dt.PARSING&&(this.stats.tparsed=performance.now(),this.state=dt.PARSED,this._checkAppendedParsed())},e.prototype.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},e.prototype.onBufferCreated=function(t){var e=t.tracks.audio;e&&(this.mediaBuffer=e.buffer,this.loadedmetadata=!0),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},e.prototype.onBufferAppended=function(t){if("audio"===t.parent){var e=this.state;e!==dt.PARSING&&e!==dt.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==dt.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent,e=this.stats,r=this.hls;if(t){this.fragPrevious=t,e.tbuffered=performance.now(),r.trigger(o.a.FRAG_BUFFERED,{stats:e,frag:t,id:"audio"});var i=this.mediaBuffer?this.mediaBuffer:this.media;l.b.log("audio buffered : "+j.toString(i.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,r.trigger(o.a.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=dt.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag;if(!e||"audio"===e.type)switch(t.details){case s.a.FRAG_LOAD_ERROR:case s.a.FRAG_LOAD_TIMEOUT:if(!t.fatal){var r=this.fragLoadError;r?r++:r=1;var i=this.config;if(r<=i.fragLoadingMaxRetry){this.fragLoadError=r,e.loadCounter=0;var a=Math.min(Math.pow(2,r-1)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);l.b.warn("audioStreamController: frag loading failed, retry in "+a+" ms"),this.retryDate=performance.now()+a,this.state=dt.FRAG_LOADING_WAITING_RETRY}else l.b.error("audioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=dt.ERROR}break;case s.a.FRAG_LOOP_LOADING_ERROR:case s.a.AUDIO_TRACK_LOAD_ERROR:case s.a.AUDIO_TRACK_LOAD_TIMEOUT:case s.a.KEY_LOAD_ERROR:case s.a.KEY_LOAD_TIMEOUT:this.state!==dt.ERROR&&(this.state=t.fatal?dt.ERROR:dt.IDLE,l.b.warn("audioStreamController: "+t.details+" while loading frag,switch to "+this.state+" state ..."));break;case s.a.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===dt.PARSING||this.state===dt.PARSED)){var n=this.mediaBuffer,u=this.media.currentTime;if(n&&I.isBuffered(n,u)&&I.isBuffered(n,u+.5)){var d=this.config;d.maxMaxBufferLength>=d.maxBufferLength&&(d.maxMaxBufferLength/=2,l.b.warn("audio:reduce max buffer length to "+d.maxMaxBufferLength+"s"),this.fragLoadIdx+=2*d.fragLoadingLoopThreshold),this.state=dt.IDLE}else l.b.warn("buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=dt.BUFFER_FLUSHING,this.hls.trigger(o.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},e.prototype.onBufferFlushed=function(){var t=this,e=this.pendingData;e&&e.length?(l.b.log("appending pending audio data on Buffer Flushed"),e.forEach(function(e){t.hls.trigger(o.a.BUFFER_APPENDING,e)}),this.appended=!0,this.pendingData=[],this.state=dt.PARSED):(this.state=dt.IDLE,this.fragPrevious=null,this.tick())},ut(e,[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,l.b.log("audio stream:"+e+"->"+t)}},get:function(){return this._state}}]),e}(d),ct=function(){if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var t="auto",e={"":!0,lr:!0,rl:!0},r={start:!0,middle:!0,end:!0,left:!0,right:!0};function i(t){return"string"==typeof t&&(!!r[t.toLowerCase()]&&t.toLowerCase())}function a(t){for(var e=1;e100)throw new Error("Position must be between 0 and 100.");E=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",a({},u,{get:function(){return T},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");T=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",a({},u,{get:function(){return R},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");R=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",a({},u,{get:function(){return A},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");A=e,this.hasBeenReset=!0}})),s.displayState=void 0,l)return s}return n.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},n}(),ft=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}};function pt(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new ft,this.regionList=[]}function gt(){this.values=Object.create(null)}function vt(t,e,r,i){var a=i?t.split(i):[t];for(var n in a)if("string"==typeof a[n]){var o=a[n].split(r);if(2===o.length)e(o[0],o[1])}}gt.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,r){return r?this.has(t)?this.values[t]:e[r]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,r){for(var i=0;i=0&&e<=100)&&(this.set(t,e),!0)}};var yt=new ct(0,0,0),mt="middle"===yt.align?"middle":"center";function bt(t,e,r){var i=t;function a(){var e=function(t){function e(t,e,r,i){return 3600*(0|t)+60*(0|e)+(0|r)+(0|i)/1e3}var r=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return r?r[3]?e(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?e(r[1],r[2],0,r[4]):e(0,r[1],r[2],r[4]):null}(t);if(null===e)throw new Error("Malformed timestamp: "+i);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function n(){t=t.replace(/^\s+/,"")}if(n(),e.startTime=a(),n(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);t=t.substr(3),n(),e.endTime=a(),n(),function(t,e){var i=new gt;vt(t,function(t,e){switch(t){case"region":for(var a=r.length-1;a>=0;a--)if(r[a].id===e){i.set(t,r[a].region);break}break;case"vertical":i.alt(t,e,["rl","lr"]);break;case"line":var n=e.split(","),o=n[0];i.integer(t,o),i.percent(t,o)&&i.set("snapToLines",!1),i.alt(t,o,["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",mt,"end"]);break;case"position":n=e.split(","),i.percent(t,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",mt,"end","line-left","line-right","auto"]);break;case"size":i.percent(t,e);break;case"align":i.alt(t,e,["start",mt,"end","left","right"])}},/:/,/\s/),e.region=i.get("region",null),e.vertical=i.get("vertical","");var a=i.get("line","auto");"auto"===a&&-1===yt.line&&(a=-1),e.line=a,e.lineAlign=i.get("lineAlign","start"),e.snapToLines=i.get("snapToLines",!0),e.size=i.get("size",100),e.align=i.get("align",mt);var n=i.get("position","auto");"auto"===n&&50===yt.position&&(n="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=n}(t,e)}function Et(t){return t.replace(//gi,"\n")}pt.prototype={parse:function(t){var e=this;function r(){var t=e.buffer,r=0;for(t=Et(t);r=16?s--:s++,navigator.userAgent.match(/Firefox\//)?n.line=d+1:n.line=d>7?d-2:d+1,n.align="left",n.position=Math.max(0,Math.min(100,s/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),t.addCue(n)}}function At(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var St={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},_t=function(t){var e=t;return St.hasOwnProperty(t)&&(e=St[t]),String.fromCharCode(e)},Lt=15,wt=100,Dt={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},It={17:2,18:4,21:6,22:8,23:10,19:13,20:15},kt={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Ot={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Ct=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Pt={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(t){this.time=t},log:function(t,e){var r=this.verboseFilter[t];this.verboseLevel>=r&&console.log(this.time+" ["+t+"] "+e)}},xt=function(t){for(var e=[],r=0;rwt&&(Pt.log("ERROR","Too large cursor position "+this.pos),this.pos=wt)},t.prototype.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var r=this.pos+1;r=144&&this.backSpace();var e=_t(t);this.pos>=wt?Pt.log("ERROR","Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))},t.prototype.clearFromPos=function(t){var e;for(e=t;e0&&(r=t?"["+e.join(" | ")+"]":e.join("\n")),r},t.prototype.getTextAndFormat=function(){return this.rows},t}(),Bt=function(){function t(e,r){At(this,t),this.chNr=e,this.outputFilter=r,this.mode=null,this.verbose=0,this.displayedMemory=new Ut,this.nonDisplayedMemory=new Ut,this.lastOutputScreen=new Ut,this.currRollUpRow=this.displayedMemory.rows[Lt-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return t.prototype.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[Lt-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},t.prototype.getHandler=function(){return this.outputFilter},t.prototype.setHandler=function(t){this.outputFilter=t},t.prototype.setPAC=function(t){this.writeScreen.setPAC(t)},t.prototype.setBkgData=function(t){this.writeScreen.setBkgData(t)},t.prototype.setMode=function(t){t!==this.mode&&(this.mode=t,Pt.log("INFO","MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},t.prototype.insertChars=function(t){for(var e=0;e=46,e.italics)e.foreground="white";else{var r=Math.floor(t/2)-16;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}Pt.log("INFO","MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},t.prototype.outputDataUpdate=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=Pt.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),!0===t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue()),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},t.prototype.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),Gt=function(){function t(e,r,i){At(this,t),this.field=e||1,this.outputs=[r,i],this.channels=[new Bt(1,r),new Bt(2,i)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return t.prototype.getHandler=function(t){return this.channels[t].getHandler()},t.prototype.setHandler=function(t,e){this.channels[t].setHandler(e)},t.prototype.addData=function(t,e){var r,i,a,n=!1;this.lastTime=t,Pt.setTime(t);for(var o=0;o ("+xt([i,a])+")"),(r=this.parseCmd(i,a))||(r=this.parseMidrow(i,a)),r||(r=this.parsePAC(i,a)),r||(r=this.parseBackgroundAttributes(i,a)),!r)if(n=this.parseChars(i,a))if(this.currChNr&&this.currChNr>=0)this.channels[this.currChNr-1].insertChars(n);else Pt.log("WARNING","No channel found yet. TEXT-MODE?");r?this.dataCounters.cmd+=2:n?this.dataCounters.char+=2:(this.dataCounters.other+=2,Pt.log("WARNING","Couldn't parse cleaned data "+xt([i,a])+" orig: "+xt([e[o],e[o+1]])))}else this.dataCounters.padding+=2},t.prototype.parseCmd=function(t,e){var r=null;if(!((20===t||28===t)&&32<=e&&e<=47)&&!((23===t||31===t)&&33<=e&&e<=35))return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,Pt.log("DEBUG","Repeated command ("+xt([t,e])+") is dropped"),!0;r=20===t||23===t?1:2;var i=this.channels[r-1];return 20===t||28===t?32===e?i.ccRCL():33===e?i.ccBS():34===e?i.ccAOF():35===e?i.ccAON():36===e?i.ccDER():37===e?i.ccRU(2):38===e?i.ccRU(3):39===e?i.ccRU(4):40===e?i.ccFON():41===e?i.ccRDC():42===e?i.ccTR():43===e?i.ccRTD():44===e?i.ccEDM():45===e?i.ccCR():46===e?i.ccENM():47===e&&i.ccEOC():i.ccTO(e-32),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=r,!0},t.prototype.parseMidrow=function(t,e){var r=null;return(17===t||25===t)&&32<=e&&e<=47&&((r=17===t?1:2)!==this.currChNr?(Pt.log("ERROR","Mismatch channel in midrow parsing"),!1):(this.channels[r-1].ccMIDROW(e),Pt.log("DEBUG","MIDROW ("+xt([t,e])+")"),!0))},t.prototype.parsePAC=function(t,e){var r,i=null;if(!((17<=t&&t<=23||25<=t&&t<=31)&&64<=e&&e<=127)&&!((16===t||24===t)&&64<=e&&e<=95))return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;r=t<=23?1:2,i=64<=e&&e<=95?1===r?Dt[t]:kt[t]:1===r?It[t]:Ot[t];var a=this.interpretPAC(i,e);return this.channels[r-1].setPAC(a),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=r,!0},t.prototype.interpretPAC=function(t,e){var r=e,i={color:null,italics:!1,indent:null,underline:!1,row:t};return r=e>95?e-96:e-64,i.underline=1==(1&r),r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i},t.prototype.parseChars=function(t,e){var r=null,i=null,a=null;if(t>=25?(r=2,a=t-8):(r=1,a=t),17<=a&&a<=19){var n=e;n=17===a?e+80:18===a?e+112:e+144,Pt.log("INFO","Special char '"+_t(n)+"' in channel "+r),i=[n]}else 32<=t&&t<=127&&(i=0===e?[t]:[t,e]);if(i){var o=xt(i);Pt.log("DEBUG","Char codes = "+o.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i},t.prototype.parseBackgroundAttributes=function(t,e){var r,i,a;return((16===t||24===t)&&32<=e&&e<=47||(23===t||31===t)&&45<=e&&e<=47)&&(r={},16===t||24===t?(i=Math.floor((e-32)/2),r.background=Ct[i],e%2==1&&(r.background=r.background+"_semi")):45===e?r.background="transparent":(r.foreground="black",47===e&&(r.underline=!0)),a=t<24?1:2,this.channels[a-1].setBkgData(r),this.lastCmdA=null,this.lastCmdB=null,!0)},t.prototype.reset=function(){for(var t=0;tt)&&(this.startTime=t),this.endTime=e,this.screen=r,this.timelineController.createCaptionsTrack(this.track)},t}(),Ht=function(t,e,r){return t.substr(r||0,e.length)===e},Kt=function(t){for(var e=5381,r=t.length;r;)e=33*e^t.charCodeAt(--r);return(e>>>0).toString()},Wt={parse:function(t,e,r,i,a,n){var o=Object(q.b)(new Uint8Array(t)).trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),s="00:00.000",l=0,u=0,d=0,h=[],c=void 0,f=!0,p=new Tt;p.oncue=function(t){var e=r[i],a=r.ccOffset;e&&e.new&&(void 0!==u?a=r.ccOffset=e.start:function(t,e,r){var i=t[e],a=t[i.prevCC];if(!a||!a.new&&i.new)return t.ccOffset=t.presentationOffset=i.start,void(i.new=!1);for(;a&&a.new;)t.ccOffset+=i.start-a.start,i.new=!1,a=t[(i=a).prevCC];t.presentationOffset=r}(r,i,d)),d&&(a=d+r.ccOffset-r.presentationOffset),t.startTime+=a-u,t.endTime+=a-u,t.id=Kt(t.startTime.toString())+Kt(t.endTime.toString())+Kt(t.text),t.text=decodeURIComponent(encodeURIComponent(t.text)),t.endTime>0&&h.push(t)},p.onparsingerror=function(t){c=t},p.onflush=function(){c&&n?n(c):a(h)},o.forEach(function(t){if(f){if(Ht(t,"X-TIMESTAMP-MAP=")){f=!1,t.substr(16).split(",").forEach(function(t){Ht(t,"LOCAL:")?s=t.substr(6):Ht(t,"MPEGTS:")&&(l=parseInt(t.substr(7)))});try{l-=e=e<0?e+8589934592:e,r=s,i=parseInt(r.substr(-3)),a=parseInt(r.substr(-6,2)),n=parseInt(r.substr(-9,2)),o=r.length>9?parseInt(r.substr(0,r.indexOf(":"))):0,u=(isNaN(i)||isNaN(a)||isNaN(n)||isNaN(o)?-1:(i+=1e3*a,i+=6e4*n,i+=36e5*o))/1e3,d=l/9e4,-1===u&&(c=new Error("Malformed X-TIMESTAMP-MAP: "+t))}catch(e){c=new Error("Malformed X-TIMESTAMP-MAP: "+t)}return}""===t&&(f=!1)}var r,i,a,n,o;p.parse(t+"\n")}),p.flush()}};function Vt(t){if(t&&t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}var Yt=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.MEDIA_ATTACHING,o.a.MEDIA_DETACHING,o.a.FRAG_PARSING_USERDATA,o.a.FRAG_DECRYPTED,o.a.MANIFEST_LOADING,o.a.MANIFEST_LOADED,o.a.FRAG_LOADED,o.a.LEVEL_SWITCHING,o.a.INIT_PTS_FOUND));if(i.hls=r,i.config=r.config,i.enabled=!0,i.Cues=r.config.cueHandler,i.textTracks=[],i.tracks=[],i.unparsedVttFrags=[],i.initPTS=void 0,i.cueRanges=[],i.config.enableCEA708Captions){var a=new jt(i,1),n=new jt(i,2);i.cea608Parser=new Gt(0,a,n)}return i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.addCues=function(t,e,r,i){for(var a,n,o,s,l=this.cueRanges,u=!1,d=l.length;d--;){var h=l[d],c=(a=h[0],n=h[1],o=e,s=r,Math.min(n,s)-Math.max(a,o));if(c>=0&&(h[0]=Math.min(h[0],e),h[1]=Math.max(h[1],r),u=!0,c/(r-e)>.5))return}u||l.push([e,r]),this.Cues.newCue(this[t],e,r,i)},e.prototype.onInitPtsFound=function(t){var e=this;void 0===this.initPTS&&(this.initPTS=t.initPTS),this.unparsedVttFrags.length&&(this.unparsedVttFrags.forEach(function(t){e.onFragLoaded(t)}),this.unparsedVttFrags=[])},e.prototype.getExistingTrack=function(t){var e=this.media;if(e)for(var r=0;r=this.tracks.length)){this.timer&&(clearInterval(this.timer),this.timer=null);var e=Xt(this.media.textTracks);if(-1!==this.trackId&&this.subtitleDisplay&&(e[this.trackId].mode="hidden"),this.trackId=t,l.b.log("switching to subtitle track "+t),this.hls.trigger(o.a.SUBTITLE_TRACK_SWITCH,{id:t}),-1!==t){var r=this.tracks[t];this.subtitleDisplay&&(e[t].mode="showing");var i=r.details;void 0!==i&&!0!==i.live||(l.b.log("(re)loading playlist for subtitle track "+t),this.hls.trigger(o.a.SUBTITLE_TRACK_LOADING,{url:r.url,id:t}))}}},zt(e,[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.trackId!==t&&this.setSubtitleTrackInternal(t)}}]),e}(d),Qt=r(4);var Jt={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING"},$t=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,r,o.a.MEDIA_ATTACHED,o.a.ERROR,o.a.KEY_LOADED,o.a.FRAG_LOADED,o.a.SUBTITLE_TRACKS_UPDATED,o.a.SUBTITLE_TRACK_SWITCH,o.a.SUBTITLE_TRACK_LOADED,o.a.SUBTITLE_FRAG_PROCESSED));return i.config=r.config,i.vttFragSNsProcessed={},i.vttFragQueues=void 0,i.currentlyProcessing=null,i.state=Jt.STOPPED,i.currentTrackId=-1,i.ticks=0,i.decrypter=new Qt.a(r.observer,r.config),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.destroy=function(){d.prototype.destroy.call(this),this.state=Jt.STOPPED},e.prototype.clearVttFragQueues=function(){var t=this;this.vttFragQueues={},this.tracks.forEach(function(e){t.vttFragQueues[e.id]=[]})},e.prototype.nextFrag=function(){if(null===this.currentlyProcessing&&this.currentTrackId>-1&&this.vttFragQueues[this.currentTrackId].length){var t=this.currentlyProcessing=this.vttFragQueues[this.currentTrackId].shift();this.fragCurrent=t,this.hls.trigger(o.a.FRAG_LOADING,{frag:t}),this.state=Jt.FRAG_LOADING}},e.prototype.onSubtitleFragProcessed=function(t){t.success&&this.vttFragSNsProcessed[t.frag.trackId].push(t.frag.sn),this.currentlyProcessing=null,this.state=Jt.IDLE,this.nextFrag()},e.prototype.onMediaAttached=function(){this.state=Jt.IDLE},e.prototype.onError=function(t){var e=t.frag;e&&"subtitle"!==e.type||this.currentlyProcessing&&(this.currentlyProcessing=null,this.nextFrag())},e.prototype.tick=function(){var t=this;this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(function(){t.tick()},1),this.ticks=0)},e.prototype.doTick=function(){var t=this;switch(this.state){case Jt.IDLE:var e,r=this.tracks,i=this.currentTrackId,a=this.vttFragSNsProcessed[i],n=this.vttFragQueues[i],s=this.currentlyProcessing?this.currentlyProcessing.sn:-1;if(!r)break;if(i-1})(e)||e.sn===s||function(t){return n.some(function(e){return e.sn===t.sn})}(e)||(e.decryptdata&&null!=e.decryptdata.uri&&null==e.decryptdata.key?(l.b.log("Loading key for "+e.sn),t.state=Jt.KEY_LOADING,t.hls.trigger(o.a.KEY_LOADING,{frag:e})):(e.trackId=i,n.push(e),t.nextFrag()))})}},e.prototype.onSubtitleTracksUpdated=function(t){var e=this;l.b.log("subtitle tracks updated"),this.tracks=t.subtitleTracks,this.clearVttFragQueues(),this.vttFragSNsProcessed={},this.tracks.forEach(function(t){e.vttFragSNsProcessed[t.id]=[]})},e.prototype.onSubtitleTrackSwitch=function(t){this.currentTrackId=t.id,this.clearVttFragQueues()},e.prototype.onSubtitleTrackLoaded=function(){this.tick()},e.prototype.onKeyLoaded=function(){this.state===Jt.KEY_LOADING&&(this.state=Jt.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,r=t.frag.decryptdata,i=t.frag,a=this.hls;if(this.state===Jt.FRAG_LOADING&&e&&"subtitle"===t.frag.type&&e.sn===t.frag.sn&&t.payload.byteLength>0&&null!=r&&null!=r.key&&"AES-128"===r.method){var n;try{n=performance.now()}catch(t){n=Date.now()}this.decrypter.decrypt(t.payload,r.key.buffer,r.iv.buffer,function(t){var e;try{e=performance.now()}catch(t){e=Date.now()}a.trigger(o.a.FRAG_DECRYPTED,{frag:i,payload:t,stats:{tstart:n,tdecrypt:e}})})}},e}(d),Zt={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,maxSeekHole:2,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,fragLoadingLoopThreshold:3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:ot,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,fetchSetup:void 0,abrController:tt,bufferController:rt,capLevelController:at,fpsController:nt,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0};Zt.subtitleStreamController=$t,Zt.subtitleTrackController=qt,Zt.timelineController=Yt,Zt.cueHandler=i,Zt.enableCEA708Captions=!0,Zt.enableWebVTT=!0,Zt.captionsTextTrack1Label="English",Zt.captionsTextTrack1LanguageCode="en",Zt.captionsTextTrack2Label="Spanish",Zt.captionsTextTrack2LanguageCode="es",Zt.audioStreamController=ht,Zt.audioTrackController=lt;var te=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=t.DefaultConfig;if((r.liveSyncDurationCount||r.liveMaxLatencyDurationCount)&&(r.liveSyncDuration||r.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var a in i)a in r||(r[a]=i[a]);if(void 0!==r.liveMaxLatencyDurationCount&&r.liveMaxLatencyDurationCount<=r.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==r.liveMaxLatencyDuration&&(r.liveMaxLatencyDuration<=r.liveSyncDuration||void 0===r.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(l.a)(r.debug),this.config=r,this._autoLevelCapping=-1;var n=this.observer=new C.a;n.trigger=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i1?e-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:-1;l.b.log("startLoad("+t+")"),this.networkControllers.forEach(function(e){e.startLoad(t)})},t.prototype.stopLoad=function(){l.b.log("stopLoad"),this.networkControllers.forEach(function(t){t.stopLoad()})},t.prototype.swapAudioCodec=function(){l.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.prototype.recoverMediaError=function(){l.b.log("recoverMediaError");var t=this.media;this.detachMedia(),this.attachMedia(t)},te(t,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){l.b.log("set currentLevel:"+t),this.loadLevel=t,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){l.b.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){l.b.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(t){l.b.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){l.b.log("set startLevel:"+t);-1!==t&&(t=Math.max(t,this.minAutoLevel)),this.levelController.startLevel=t}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){l.b.log("set autoLevelCapping:"+t),this._autoLevelCapping=t}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var t=this.levels,e=this.config.minAutoBitrate,r=t?t.length:0,i=0;ie)return i}return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,e=this.autoLevelCapping;return-1===e&&t&&t.length?t.length-1:e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}}]),t}();e.default=ee},function(t,e,r){function i(t){var e=[],r=t.toString(),i=r.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!i)return e;for(var a,n=i[1],o=new RegExp("(\\\\n|\\W)"+(n+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")+"\\((/\\*.*?\\*/)?s?.*?([\\.|\\-|\\w|/|@]+).*?\\)","g");a=o.exec(r);)e.push(a[3]);return e}t.exports=function(t,e){e=e||{};var a=r.m,n=e.all?Object.keys(a):function(t,e){for(var r=[e],a=[],n={};r.length;){var o=r.pop();if(!n[o]&&t[o]){n[o]=!0,a.push(o);var s=i(t[o]);r=r.concat(s)}}return a}(a,t),o="("+function(t){var e={};function r(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r.oe=function(t){throw console.error(t),t};var i=r(r.s=ENTRY_MODULE);return i.default||i}.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+n.map(function(t){return JSON.stringify(t)+": "+a[t].toString()}).join(",")+"})(self);",s=new window.Blob([o],{type:"text/javascript"});if(e.bare)return s;var l=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(s),u=new window.Worker(l);return u.objectURL=l,u}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(7),a=r(1),n=r(0),o=r(5),s=r.n(o);e.default=function(t){var e=new s.a;e.trigger=function(t){for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a1?r-1:0),a=1;a= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.1.11", + "resolved": "http://npm.byted.org/ieee754/-/ieee754-1.1.11.tgz", + "integrity": "sha1-wWOE/+APW3g1gk5ntvK9RKUilFU=" + }, + "iferr": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" + }, + "import-local": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha1-Xk/9wD9P5sAJxnKb6yljHC+CJ7w=", + "dev": true, + "requires": { + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "indexof": { + "version": "0.0.1", + "resolved": "http://npm.byted.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "http://npm.byted.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "inquirer": { + "version": "5.2.0", + "resolved": "http://npm.byted.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha1-2zUMK3Paynf/EkOWLp8i8JloVyY=", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "http://npm.byted.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "http://npm.byted.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=" + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-finite": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-odd": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha1-dkZiRnH9fqVYzNmieVGC8pWPGyQ=", + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=" + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "requires": { + "isobject": "^3.0.1" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "jsesc": { + "version": "0.5.0", + "resolved": "http://npm.byted.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json5": { + "version": "0.5.1", + "resolved": "http://npm.byted.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=" + }, + "lcid": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "leb": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/leb/-/leb-0.3.0.tgz", + "integrity": "sha1-Mr7p+tFoMo1q6oUi2DP0GA7tHaM=" + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=" + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "http://npm.byted.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha1-G3eTz3JZ6jj7NmHU04syYK+K5Oc=" + }, + "long": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "requires": { + "js-tokens": "^3.0.0" + } + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "http://npm.byted.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha1-oRdc80lt/IQ2wVbDNLSVWZK85pw=", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", + "requires": { + "pify": "^3.0.0" + } + }, + "mamacro": { + "version": "0.0.3", + "resolved": "http://npm.byted.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha1-rSyVdhl8nxq/MI0Hh4Zb2XWj8+Q=" + }, + "map-cache": { + "version": "0.2.2", + "resolved": "http://npm.byted.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "map-visit": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.4", + "resolved": "http://npm.byted.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "mem": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "http://npm.byted.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "http://npm.byted.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha1-8IA1HIZbDcViqEYpZtqlNUPHik0=", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha1-LhlN4ERibUoQ5/f7wAznPoPk1cc=" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "http://npm.byted.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "http://npm.byted.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mississippi": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha1-NEKlCPr8KFAEhv7qmUCWduTuWm8=", + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^2.0.1", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha1-pJ5yaNzhoNlpjkUybFYm3zVD0P4=", + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://npm.byted.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "http://npm.byted.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.10.0", + "resolved": "http://npm.byted.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha1-ltDNYQ69WNS03pzAxoKM2pnHVI8=", + "optional": true + }, + "nanomatch": { + "version": "1.2.9", + "resolved": "http://npm.byted.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha1-h59xUMstq3pHElkGbBBO7m4Pp8I=", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "neo-async": { + "version": "2.5.1", + "resolved": "http://npm.byted.org/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha1-rLkJ4yex6H7J7xX0G4omlRKtQe4=" + }, + "next-tick": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "nice-try": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/nice-try/-/nice-try-1.0.4.tgz", + "integrity": "sha1-2Tli9sUvLBVYwPvabVEoGfHv4cQ=", + "dev": true + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha1-X5QmPUBPbkR2fXJpAf/wVHjWAN8=", + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^1.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.0", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "object-copy": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-locale": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha1-QrwpAKa1uL0XN2yOiCtlr8zyS/I=", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha1-DpK2vty1nwIsE9DxlJ3ILRWQnxw=", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "pako": { + "version": "1.0.6", + "resolved": "http://npm.byted.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha1-AQEhG6pwxLykoPY/Igbpe3368lg=" + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "http://npm.byted.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha1-9r8pOBgzK9DatU77Fgh3JHRebKg=", + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "http://npm.byted.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "pbkdf2": { + "version": "3.0.16", + "resolved": "http://npm.byted.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha1-dAQgjsawG2LYW/g4U6gGT42cKlw=", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "requires": { + "find-up": "^2.1.0" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, + "private": { + "version": "0.1.8", + "resolved": "http://npm.byted.org/private/-/private-0.1.8.tgz", + "integrity": "sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=" + }, + "process": { + "version": "0.11.10", + "resolved": "http://npm.byted.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=" + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + }, + "prr": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "http://npm.byted.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha1-RuuRByBr9zSJ+LhbadkTNMZhCZQ=", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "http://npm.byted.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha1-NlE74karJ1cLGjdKXOJ4v9dDcM4=", + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=" + }, + "querystring": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + }, + "randombytes": { + "version": "2.0.6", + "resolved": "http://npm.byted.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha1-0wLFIpSFiISKjTAMkytEwkIx2oA=", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha1-ySGW/IarQr6YPxvzF3giSTHWFFg=", + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://npm.byted.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + } + }, + "regenerate": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha1-SoVuxLVuQHfFV1icroXnpMiGmhE=", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "http://npm.byted.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=" + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "http://npm.byted.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha1-HkmWg3Ix2ot/PPQRTXG1aRoGgN0=", + "dev": true, + "requires": { + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "http://npm.byted.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "repeating": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "requires": { + "is-finite": "^1.0.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "http://npm.byted.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=" + }, + "rimraf": { + "version": "2.6.2", + "resolved": "http://npm.byted.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", + "requires": { + "glob": "^7.0.5" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha1-ocGm9iR1FXe6XQeRTLyShQWFiQw=", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "requires": { + "aproba": "^1.1.1" + } + }, + "rxjs": { + "version": "5.5.11", + "resolved": "http://npm.byted.org/rxjs/-/rxjs-5.5.11.tgz", + "integrity": "sha1-9zMCfKQ+O+xrmURzvkq5itQ87Yc=", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "http://npm.byted.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "http://npm.byted.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", + "dev": true + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "http://npm.byted.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha1-IYNvBgiqwXt4+ePiTa/xSlyhOj4=", + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + }, + "semver": { + "version": "5.5.0", + "resolved": "http://npm.byted.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha1-3Eu8emyp2Rbe5dQ1FvAJK1j3uKs=", + "dev": true + }, + "serialize-javascript": { + "version": "1.5.0", + "resolved": "http://npm.byted.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", + "integrity": "sha1-GqM2FiyIqJDdrVOEuuvJOmVRYf4=" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, + "set-value": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "sha.js": { + "version": "2.4.11", + "resolved": "http://npm.byted.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha1-N6XPC4HsvGlD3hCbopYNGyZYSuc=", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "http://npm.byted.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha1-qqR0A/eyRakvvJfqCPJQ1gh+0IU=" + }, + "source-map": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "http://npm.byted.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha1-cuLMNAlVQ+Q7LGKyxMENSpBU8lk=", + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "http://npm.byted.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha1-Aoam3ovkJkEzhZTpfM6nXwosWF8=", + "requires": { + "source-map": "^0.5.6" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "http://npm.byted.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + }, + "split-string": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "ssri": { + "version": "5.3.0", + "resolved": "http://npm.byted.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha1-ujhyycbTOgcEp9cf8EXl7EiZnQY=", + "requires": { + "safe-buffer": "^5.1.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "http://npm.byted.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.2", + "resolved": "http://npm.byted.org/stream-each/-/stream-each-1.2.2.tgz", + "integrity": "sha1-joxGP5HaiZF3h2WHP+TZYNj2Fr0=", + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "http://npm.byted.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + }, + "tapable": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/tapable/-/tapable-1.0.0.tgz", + "integrity": "sha1-y7Y52QAu7ZxrWXXrIFmNeTbx+fI=" + }, + "through": { + "version": "2.3.8", + "resolved": "http://npm.byted.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "http://npm.byted.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha1-HSjj0qrfHVpZlsTp+VYBzQU0gK4=", + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "http://npm.byted.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha1-bTQzWIl2jSGyvNoKonfO07G/rfk=", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "trim-right": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "http://npm.byted.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + }, + "typedarray": { + "version": "0.0.6", + "resolved": "http://npm.byted.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "uglify-es": { + "version": "3.3.10", + "resolved": "http://npm.byted.org/uglify-es/-/uglify-es-3.3.10.tgz", + "integrity": "sha1-iwt5ks6+IO3CbeG/MlzveXuPP6U=", + "requires": { + "commander": "~2.14.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + } + } + }, + "uglifyjs-webpack-plugin": { + "version": "1.2.5", + "resolved": "http://npm.byted.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz", + "integrity": "sha1-Lvg4fI8akD7F5E+jb588vc6mdkE=", + "requires": { + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "schema-utils": "^0.4.5", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "uglify-es": "^3.3.4", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + } + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "http://npm.byted.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unique-filename": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/unique-slug/-/unique-slug-2.0.0.tgz", + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + } + } + }, + "upath": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha1-NSVll+RqWB20eT0M5H+prr/J+r0=" + }, + "uri-js": { + "version": "4.2.2", + "resolved": "http://npm.byted.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "url": { + "version": "0.11.0", + "resolved": "http://npm.byted.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "http://npm.byted.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "url-toolkit": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/url-toolkit/-/url-toolkit-2.1.4.tgz", + "integrity": "sha512-jAzm/85zNFfkW5Do/37GeGC7uGXBMMawToVdcf5SIpc+x9TmZDrRIUuLRPcvDMfqtt3m8VmDrYhCWh4UbsQLyg==" + }, + "use": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/use/-/use-3.1.0.tgz", + "integrity": "sha1-FHFr8D/f79AwQK71jYtLhfOnxUQ=", + "requires": { + "kind-of": "^6.0.2" + } + }, + "util": { + "version": "0.10.4", + "resolved": "http://npm.byted.org/util/-/util-0.10.4.tgz", + "integrity": "sha1-OqASW/5mikZy3liFfTrOJ+y3aQE=", + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "v8-compile-cache": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/v8-compile-cache/-/v8-compile-cache-2.0.0.tgz", + "integrity": "sha1-UmSS41/GFoZChHALcEPgG67gnwo=", + "dev": true + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "http://npm.byted.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "requires": { + "indexof": "0.0.1" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha1-S8EsLr6KonenHx0/FNaFx7RGzQA=", + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "webpack": { + "version": "4.11.0", + "resolved": "http://npm.byted.org/webpack/-/webpack-4.11.0.tgz", + "integrity": "sha1-t7aLT+ioljoYNwoF+E041ZraT78=", + "requires": { + "@webassemblyjs/ast": "1.5.10", + "@webassemblyjs/helper-module-context": "1.5.10", + "@webassemblyjs/wasm-edit": "1.5.10", + "@webassemblyjs/wasm-opt": "1.5.10", + "@webassemblyjs/wasm-parser": "1.5.10", + "acorn": "^5.0.0", + "acorn-dynamic-import": "^3.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^0.1.1", + "enhanced-resolve": "^4.0.0", + "eslint-scope": "^3.7.1", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^0.4.4", + "tapable": "^1.0.0", + "uglifyjs-webpack-plugin": "^1.2.4", + "watchpack": "^1.5.0", + "webpack-sources": "^1.0.1" + } + }, + "webpack-cli": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/webpack-cli/-/webpack-cli-3.0.2.tgz", + "integrity": "sha1-5IxWYq/47VqsPbX4L1HX8y5QRZ4=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "enhanced-resolve": "^4.0.0", + "global-modules-path": "^2.1.0", + "import-local": "^1.0.0", + "inquirer": "^5.2.0", + "interpret": "^1.1.0", + "loader-utils": "^1.1.0", + "supports-color": "^5.4.0", + "v8-compile-cache": "^2.0.0", + "yargs": "^11.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "webpack-sources": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha1-oQHrrlnWUHNU1x2AE5UKOot6WlQ=", + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + } + } + }, + "which": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/which/-/which-1.3.1.tgz", + "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha1-rsxAWXb6talVJhgIRvDboojzpKA=", + "requires": { + "errno": "~0.1.7" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "http://npm.byted.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "yargs": { + "version": "11.1.0", + "resolved": "http://npm.byted.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha1-kLhpk07W6HERXqL/WLA/RyTtLXc=", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + }, + "dependencies": { + "y18n": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + } + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "http://npm.byted.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } +} diff --git a/packages/xgplayer-hls.js/package.json b/packages/xgplayer-hls.js/package.json new file mode 100644 index 00000000..d1c5b7f3 --- /dev/null +++ b/packages/xgplayer-hls.js/package.json @@ -0,0 +1,47 @@ +{ + "name": "xgplayer-hls.js", + "version": "1.0.2", + "description": "xgplayer plugin for hls", + "main": "./dist/index.js", + "scripts": { + "prepare": "npm run build", + "build": "webpack --progress --display-chunks -p", + "watch": "webpack --progress --display-chunks -p --watch" + }, + "repository": { + "type": "git", + "url": "git@github.com:bytedance/xgplayer.git" + }, + "babel": { + "presets": [ + "es2015" + ], + "plugins": [ + "add-module-exports" + ] + }, + "keywords": [ + "mp4", + "fmp4", + "player", + "video" + ], + "author": "yinguohui@bytedance.com", + "license": "MIT", + "dependencies": { + "babel-core": "^6.26.3", + "babel-loader": "^7.1.4", + "babel-plugin-add-module-exports": "^0.2.1", + "deepmerge": "^2.0.1", + "event-emitter": "^0.3.5", + "hls.js": "^0.8.9", + "webpack": "^4.11.0" + }, + "peerDependency": { + "xgplayer": "^0.1.0" + }, + "devDependencies": { + "babel-preset-es2015": "^6.24.1", + "webpack-cli": "^3.0.2" + } +} diff --git a/packages/xgplayer-hls.js/postcss.config.js b/packages/xgplayer-hls.js/postcss.config.js new file mode 100644 index 00000000..0665a0f3 --- /dev/null +++ b/packages/xgplayer-hls.js/postcss.config.js @@ -0,0 +1,7 @@ +module.exports = { + plugins: { + 'postcss-cssnext': { + browserslist: ['cover 99.5%'], + }, + }, +}; \ No newline at end of file diff --git a/packages/xgplayer-hls.js/src/index.js b/packages/xgplayer-hls.js/src/index.js new file mode 100644 index 00000000..cbbecc67 --- /dev/null +++ b/packages/xgplayer-hls.js/src/index.js @@ -0,0 +1,48 @@ +import Player from 'xgplayer' +import Hls from 'hls.js' + +class HlsJsPlayer extends Player { + constructor (options) { + super(options) + this.hlsOpts = options.hlsOpts || {} + let util = Player.util + let player = this + let url = player.config.url + let hls + hls = new Hls(this.hlsOpts) + hls.on(Hls.Events.MEDIA_ATTACHED, () => { + hls.loadSource(url) + }) + hls.on(Hls.Events.LEVEL_LOADED, (name, e) => { + if (!hls.inited) { + hls.inited = true + if (e && e.details && !e.details.type) { + util.addClass(player.root, 'xgplayer-is-live') + const live = util.createDom('xg-live', '正在直播', {}, 'xgplayer-live') + player.controls.appendChild(live) + } + } + }) + hls.on(Hls.Events.ERROR, (event, data) => { + if (data.fatal) { + switch (data.type) { + case Hls.ErrorTypes.NETWORK_ERROR: + hls.startLoad() + break + case Hls.ErrorTypes.MEDIA_ERROR: + hls.recoverMediaError() + break + default: + player.emit('error', data) + } + } + }) + this.once('complete', () => { + hls.attachMedia(player.video) + }) + } +} + +HlsJsPlayer.isSupported = Hls.isSupported + +export default HlsJsPlayer diff --git a/packages/xgplayer-hls.js/webpack.config.js b/packages/xgplayer-hls.js/webpack.config.js new file mode 100644 index 00000000..c1c7b1e9 --- /dev/null +++ b/packages/xgplayer-hls.js/webpack.config.js @@ -0,0 +1,79 @@ +const polyfill = [] + +const umd = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/dist`, + filename: 'index.js', + library: 'xgplayer-hlsjs.js', + libraryTarget: 'umd' + }, + mode: 'production', + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader', + exclude: /node_modules/ + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true + } + }, + 'postcss-loader', + 'sass-loader' + ] + }] + }, + externals: { + 'xgplayer': 'xgplayer' + }, + optimization: { + minimize: true + } +} + +const client = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/browser`, + filename: 'xgplayer-hlsjs.js', + library: 'HlsJsPlayer', + libraryTarget: 'window' + }, + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader', + exclude: /node_modules/ + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true + } + }, + 'postcss-loader', + 'sass-loader' + ] + }] + }, + externals: { + 'xgplayer': 'Player' + }, + mode: 'production', + optimization: { + minimize: true + } +} + +module.exports = [umd, client] diff --git a/packages/xgplayer-hls/.gitignore b/packages/xgplayer-hls/.gitignore new file mode 100644 index 00000000..93cab344 --- /dev/null +++ b/packages/xgplayer-hls/.gitignore @@ -0,0 +1,2 @@ +node_modules +yarn-error.log diff --git a/packages/xgplayer-hls/browser/xgplayer-hls.js b/packages/xgplayer-hls/browser/xgplayer-hls.js new file mode 100644 index 00000000..6c473a85 --- /dev/null +++ b/packages/xgplayer-hls/browser/xgplayer-hls.js @@ -0,0 +1 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=33)}([function(e,t,n){"use strict";var r=n(22)();e.exports=function(e){return e!==r&&null!==e}},function(e,t,n){"use strict";var r,i,a,o,u,s,f,c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d=n(29),l=n(15),h=Function.prototype.apply,p=Function.prototype.call,v=Object.create,y=Object.defineProperty,b=Object.defineProperties,w=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};u={on:r=function(e,t){var n;return l(t),w.call(this,"__ee__")?n=this.__ee__:(n=m.value=v(null),y(this,"__ee__",m),m.value=null),n[e]?"object"===c(n[e])?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:i=function(e,t){var n,i;return l(t),i=this,r.call(this,e,n=function(){a.call(i,e,n),h.call(t,this,arguments)}),n.__eeOnceListener__=t,this},off:a=function(e,t){var n,r,i,a;if(l(t),!w.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"===(void 0===(r=n[e])?"undefined":c(r)))for(a=0;i=r[a];++a)i!==t&&i.__eeOnceListener__!==t||(2===r.length?n[e]=r[a?0:1]:r.splice(a,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},emit:o=function(e){var t,n,r,i,a;if(w.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"===(void 0===i?"undefined":c(i))){for(n=arguments.length,a=new Array(n-1),t=1;t0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.64001E, mp4a.40.5"';!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=this;(0,i.default)(this),this.codecs=t,this.mediaSource=new window.MediaSource,this.url=window.URL.createObjectURL(this.mediaSource),this.queue=[],this.mediaSource.addEventListener("sourceopen",function(){n.sourceBuffer=n.mediaSource.addSourceBuffer(n.codecs),n.sourceBuffer.addEventListener("error",function(e){n.emit("error",{type:"sourceBuffer",error:e})}),n.sourceBuffer.addEventListener("updateend",function(e){n.emit("updateend");var t=n.queue.shift();t&&n.sourceBuffer.appendBuffer(t)}),n.emit("sourceopen"),n.sourceBuffer.addEventListener("error",function(e){n.emit("error",{type:"mediaSource",error:e})})}),this.mediaSource.addEventListener("sourceclose",function(){n.emit("sourceclose")})}return r(e,[{key:"appendBuffer",value:function(e){var t=this.sourceBuffer;return!1===t.updating&&"open"===this.state?(t.appendBuffer(e),!0):(this.queue.push(e),!1)}},{key:"removeBuffer",value:function(e,t){this.sourceBuffer.remove(e,t)}},{key:"endOfStream",value:function(){"open"===this.mediaSource.readyState&&this.mediaSource.endOfStream()}},{key:"state",get:function(){return this.mediaSource.readyState}},{key:"duration",get:function(){return this.mediaSource.duration},set:function(e){this.mediaSource.duration=e}}],[{key:"isSupported",value:function(e){return window.MediaSource&&window.MediaSource.isTypeSupported(e)}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n>24,e>>16&255,e>>8&255,255&e])}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(11));e.exports=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n>>15,this.payload=t>>>14&1,this.priority=t>>>13&1,this.pid=8191&t,t=e.readUint8(),this.scrambling=t>>6&3,this.adaptation=t>>4&3,this.continuity=15&t,this.packet=0===this.pid?"PAT":"MEDIA"}},{key:"Payload",value:function(t,n){var r=n.header.pid,i=void 0;switch(r){case 0:i=new e.PAT(t);break;case 1:i=new e.CAT(t);break;case 2:i=new e.TSDT(t);break;case 8191:i=!1;break;default:if(e.PATSpace.some(function(e){return e.pid===r}))i=new e.PMT(t,n);else{var a=e.PMTSpace?e.PMTSpace.filter(function(e){return e.pid===r}):[];i=!!a.length&&new e.Media(t,n,s[a[0].streamType][0])}}return i}},{key:"PAT",value:function(t){var n=t.readUint8();t.skip(n),n=t.readUint8(),this.tabelID=n,n=t.readUint16(),this.error=n>>>7,this.zero=n>>>6&1,this.sectionLength=4095&n,this.streamID=t.readUint16(),this.current=1&t.readUint8(),this.sectionNumber=t.readUint8(),this.lastSectionNumber=t.readUint8();for(var r=(this.sectionLength-9)/4,i=[],a=0;a=4&&(this.crc32=t.readUint32())}},{key:"PMT",value:function(t,n){var r=this;n.header.packet="PMT";var i=t.readUint8();t.skip(i),i=t.readUint8(),this.tableID=i,i=t.readUint16(),this.sectionLength=4095&i,this.program=t.readUint16(),this.current=1&t.readUint8(),this.order=t.readUint8(),this.lastOrder=t.readUint8(),this.PCR_PID=8191&t.readUint16(),this.programLength=4095&t.readUint16();for(var a=(this.sectionLength-13)/5,o=[],u=0;u=4&&(this.crc32=t.readUint32())}},{key:"Media",value:function(e,t,n){var r=t.header;if(this.start=e.position,this.type=n,3===r.adaptation&&(this.adaptationLength=e.readUint8(),this.adaptationLength>0)){var i=e.readUint8();this.discontinue=i>>>7,this.access=i>>>6&1,this.priority=i>>>5&1,this.PCR=i>>>4&1,this.OPCR=i>>>3&1,this.splicePoint=i>>>2&1,this.transportPrivate=i>>>1&1,this.adaptationField=1&i;var o=e.position;if(1===this.PCR&&(this.programClockBase=e.readUint32()<<1,i=e.readUint16(),this.programClockBase|=i>>>15,this.programClockExtension=511&i),1===this.OPCR&&(this.originProgramClockBase=e.readUint32()<<1,i=e.readUint16(),this.originProgramClockBase+=i>>>15,this.originProgramClockExtension=511&i),1===this.splicePoint&&(this.spliceCountdown=e.readUint8()),1===this.transportPrivate)for(var u=e.readUint8(),s=[],f=0;f>>6&1,p=d>>>5&1;1===d>>>7&&(d=e.readUint16(),this.ltwValid=d>>>15,this.ltwOffset=61439&d),1===h&&(d=e.readUint24(),this.piecewiseRate=4194303&d),1===p&&(d=e.readInt8(),this.spliceType=d>>>4,this.dtsNextAU1=d>>>1&7,this.marker1=1&d,d=e.readUint16(),this.dtsNextAU2=d>>>1,this.marker2=1&d,d=e.readUint16(),this.dtsNextAU3=d),e.skip(c-1-(e.position-l))}var v=this.adaptationLength-1-(e.position-o);e.skip(v)}this.buffer=new a.default(e.buffer.slice(e.position))}},{key:"PES",value:function(t){var n=t[0],r=n.body.buffer,i=r.readUint24();if(this.header=n.header,1!==i)throw new Error("this is not pes packet");var a=r.readUint8();a>=224&&a<=239&&(this.type="video"),a>=192&&a<=223&&(this.type="audio");var o=r.readUint16();if(this.packetLength=o,"video"!==this.type&&"audio"!==this.type)throw new Error("format is not supported");var u=r.readUint8();if(2!==u>>>6)throw new Error("error when parse pes header");u=r.readUint8(),this.ptsDTSFlag=u>>>6,this.escrFlag=u>>>5&1,this.esRateFlag=u>>>4&1,this.dsmFlag=u>>>3&1,this.additionalFlag=u>>>2&1,this.crcFlag=u>>>1&1,this.extensionFlag=1&u,this.pesHeaderLength=r.readUint8();var s=this.pesHeaderLength;if(2===this.ptsDTSFlag){var f=[];u=r.readUint8(),f.push(u>>>1&7),u=r.readUint16(),f.push(u>>>1),u=r.readUint16(),f.push(u>>>1),this.pts=f[0]<<30|f[1]<<15|f[2],s-=5,"video"===this.type&&(this.dts=this.pts)}if(3===this.ptsDTSFlag){var c=[];u=r.readUint8(),c.push(u>>>1&7),u=r.readUint16(),c.push(u>>>1),u=r.readUint16(),c.push(u>>>1),this.pts=c[0]<<30|c[1]<<15|c[2];var d=[];u=r.readUint8(),d.push(u>>>1&7),u=r.readUint16(),d.push(u>>>1),u=r.readUint16(),d.push(u>>>1),this.dts=d[0]<<30|d[1]<<15|d[2],s-=10}if(1===this.escrFlag){var l=[],h=[];u=r.readUint8(),l.push(u>>>3&7),l.push(3&u),u=r.readUint16(),l.push(u>>>13),l.push(3&u),u=r.readUint16(),l.push(u>>>13),h.push(3&u),u=r.readUint8(),h.push(u>>>1),this.escr=300*(l[0]<<30|l[1]<<28|l[2]<<15|l[3]<<13|l[4])+(h[0]<<7|h[1]),s-=6}if(1===this.esRateFlag&&(u=r.readUint24(),this.esRate=u>>>1&4194303,s-=3),1===this.dsmFlag)throw new Error("not support DSM_trick_mode");if(1===this.additionalFlag&&(u=r.readUint8(),this.additionalCopyInfo=127&u,s-=1),1===this.crcFlag&&(this.pesCRC=r.readUint16(),s-=2),1===this.extensionFlag)throw new Error("not support extension");s>0&&r.skip(s),this.ES=new e.ES(r,this.type,t.slice(1))}},{key:"ES",value:function(t,n,r){var a=void 0;if("video"===n){if(1!==(a=t.readUint32())&&(t.back(4),1!==(a=t.readUint24())))throw new Error("h264 nal header parse failed");t.skip(2),this.sps=function(e){var t=[],n=void 0,r=!0,i=!1;if(1===e.readUint32())do{if(n=e.readUint8(),!i){if(7!=(31&n)){r=!1,e.back(5);break}i=!0}0!==n?t.push(n):1===(n=e.readUint24())?(r=!1,e.back(4)):(e.back(4),t.push(e.readUint8()))}while(r);else e.back(4);return t}(t),this.pps=function(e){var t=[],n=void 0,r=!0,i=!1;if(1===e.readUint32())do{if(n=e.readUint8(),!i){if(8!=(31&n)){r=!1,e.back(5);break}i=!0}0!==n?t.push(n):1===(n=e.readUint16())?(r=!1,e.back(3)):(e.back(3),t.push(e.readUint8()))}while(r);else e.back(4);return t}(t);var u=void 0;if(this.sps.length?(this.info=new o.default(new Uint8Array(this.sps)).readSPS(),u=t.readUint24()):0===(u=t.readUint24())&&(u=t.readUint8()),1!==u)throw new Error("h264 convert to avcc error");var s=e.Merge(t,r);this.buffer=(0,i.default)(Uint8Array,t.writeUint32(s.byteLength),s)}else{if("audio"!==n)throw"ES "+n+" is not supported";if((a=t.readUint16())>>>4!=4095)throw new Error("aac ES parse Error");this.id=0==(a>>>3&1)?"MPEG-4":"MPEG-2",this.layer=a>>>1&3,this.absent=1&a,a=t.readUint16(),this.audioObjectType=1+(a>>>14&3),this.profile=this.audioObjectType-1,this.frequencyIndex=a>>>10&15,this.frequence=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350][this.frequencyIndex],this.channel=a>>>6&7,this.frameLength=(3&a)<<11|t.readUint16()>>>5,this.audioConfig=e.getAudioConfig(this.audioObjectType,this.channel,this.frequencyIndex),t.skip(1),this.buffer=e.Merge(t,r)}}},{key:"TSDT",value:function(){return{}}},{key:"CAT",value:function(e,t){this.tableID=e.readUint8();var n=e.readUint16();this.sectionIndicator=n>>>7,this.sectionLength=4095&n,e.skip(2),n=e.readUint8(),this.version=n>>>3,this.currentNextIndicator=1&n,this.sectionNumber=e.readUint8(),this.lastSectionNumber=e.readUint8();for(var r=(this.sectionLength-9)/4,i=[],a=0;a=6?(e=5,i=new Array(4),a=n-3):(e=2,i=new Array(2),a=n):-1!==r.indexOf("android")?(e=2,i=new Array(2),a=n):(e=5,i=new Array(4),n>=6?a=n-3:(1===t&&(e=2,i=new Array(2)),a=n)),i[0]=e<<3,i[0]|=(14&n)>>1,i[1]=(1&n)<<7,i[1]|=t<<3,5===e&&(i[1]|=(14&a)>>1,i[2]=(1&a)<<7,i[2]|=8,i[3]=0),i}}]),e}();f.PATSpace=[],t.default=f,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=document.createElement("a"),i=new Blob([n]),a=document.createEvent("MouseEvents");a.initEvent("click",!1,!1),r.download=t,r.href=URL.createObjectURL(i),r.dispatchEvent(a)},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n>16&255,t>>8&255,255&t])}},{key:"ftyp",value:function(){var t=new i.default;return t.write(e.size(24),e.type("ftyp"),new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49])),t.buffer}},{key:"moov",value:function(t){var n=new i.default,r=8,a=e.mvhd(t.duration),o=e.videoTrak(t),u=e.audioTrak(t),s=e.mvex(t.duration);return[a,o,u,s].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("moov"),a,o,u,s),n.buffer}},{key:"mvhd",value:function(t){var n=new i.default;t*=9e4;var r=Math.floor(t/(a+1)),o=Math.floor(t%(a+1)),u=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,1,95,144,r>>24,r>>16&255,r>>8&255,255&r,o>>24,o>>16&255,o>>8&255,255&o,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return n.write(e.size(8+u.length),e.type("mvhd"),new Uint8Array(u)),n.buffer}},{key:"videoTrak",value:function(t){var n=new i.default,r=8,a=e.tkhd({id:1,duration:t.duration,timescale:9e4,width:t.width,height:t.height,type:"video"}),o=e.mdia({type:"video",timescale:9e4,duration:t.duration,sps:t.sps,pps:t.pps,pixelRatio:t.pixelRatio,width:t.width,height:t.height});return[a,o].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("trak"),a,o),n.buffer}},{key:"audioTrak",value:function(t){var n=new i.default,r=8,a=e.tkhd({id:2,duration:t.duration,timescale:9e4,width:0,height:0,type:"audio"}),o=e.mdia({type:"audio",timescale:9e4,duration:t.duration,channelCount:t.channelCount,samplerate:t.samplerate,audioConfig:t.audioConfig});return[a,o].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("trak"),a,o),n.buffer}},{key:"tkhd",value:function(t){var n=new i.default,r=t.id,o=t.duration*t.timescale,u=t.width,s=t.height,f=t.type,c=Math.floor(o/(a+1)),d=Math.floor(o%(a+1)),l=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d,0,0,0,0,0,0,0,0,0,0,0,"video"===f?1:0,"audio"===f?1:0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,u>>8&255,255&u,0,0,s>>8&255,255&s,0,0]);return n.write(e.size(8+l.byteLength),e.type("tkhd"),l),n.buffer}},{key:"edts",value:function(t){var n=new i.default,r=t.duration,a=t.mediaTime;return n.write(e.size(36),e.type("edts")),n.write(e.size(28),e.type("elst")),n.write(new Uint8Array([0,0,0,1,r>>24&255,r>>16&255,r>>8&255,255&r,a>>24&255,a>>16&255,a>>8&255,255&a,0,0,0,1])),n.buffer}},{key:"mdia",value:function(t){var n=new i.default,r=8,a=e.mdhd(t.timescale),o=e.hdlr(t.type),u=e.minf(t);return[a,o,u].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("mdia"),a,o,u),n.buffer}},{key:"mdhd",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=new i.default;n*=t;var o=Math.floor(n/(a+1)),u=Math.floor(n%(a+1)),s=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,o>>24,o>>16&255,o>>8&255,255&o,u>>24,u>>16&255,u>>8&255,255&u,85,196,0,0]);return r.write(e.size(12+s.byteLength),e.type("mdhd"),e.extension(1,0),s),r.buffer}},{key:"hdlr",value:function(t){var n=new i.default,r=[0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0];return"audio"===t&&(r.splice.apply(r,[8,4].concat([115,111,117,110])),r.splice.apply(r,[24,13].concat([83,111,117,110,100,72,97,110,100,108,101,114,0]))),n.write(e.size(8+r.length),e.type("hdlr"),new Uint8Array(r)),n.buffer}},{key:"minf",value:function(t){var n=new i.default,r=8,a="video"===t.type?e.vmhd():e.smhd(),o=e.dinf(),u=e.stbl(t);return[a,o,u].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("minf"),a,o,u),n.buffer}},{key:"vmhd",value:function(){var t=new i.default;return t.write(e.size(20),e.type("vmhd"),new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])),t.buffer}},{key:"smhd",value:function(){var t=new i.default;return t.write(e.size(16),e.type("smhd"),new Uint8Array([0,0,0,0,0,0,0,0])),t.buffer}},{key:"dinf",value:function(){var t=new i.default;return t.write(e.size(36),e.type("dinf"),e.size(28),e.type("dref"),new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])),t.buffer}},{key:"stbl",value:function(t){var n=new i.default,r=8,a=e.stsd(t),o=e.stts(),u=e.stsc(),s=e.stsz(),f=e.stco();return[a,o,u,s,f].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("stbl"),a,o,u,s,f),n.buffer}},{key:"stsd",value:function(t){var n=new i.default,r=void 0;return r="audio"===t.type?e.mp4a(t):e.avc1(t),n.write(e.size(16+r.byteLength),e.type("stsd"),e.extension(0,0),new Uint8Array([0,0,0,1]),r),n.buffer}},{key:"mp4a",value:function(t){var n=new i.default,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.samplerate>>8&255,255&t.samplerate,0,0]),a=e.esds(t.audioConfig);return n.write(e.size(8+r.byteLength+a.byteLength),e.type("mp4a"),r,a),n.buffer}},{key:"esds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[43,146,8,0],n=t.length,r=new i.default,a=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(t).concat([6,1,2]));return r.write(e.size(8+a.byteLength),e.type("esds"),a),r.buffer}},{key:"avc1",value:function(t){var n=new i.default,r=t.sps,a=t.pps,o=t.width,u=t.height,s=t.pixelRatio[0],f=t.pixelRatio[1],c=new Uint8Array([1,r[1],r[2],r[3],255,225].concat([r.length>>>8&255,255&r.length]).concat(r).concat(1).concat([a.length>>>8&255,255&a.length]).concat(a)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,255&o,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l=new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]),h=new Uint8Array([s>>24,s>>16&255,s>>8&255,255&s,f>>24,f>>16&255,f>>8&255,255&f]);return n.write(e.size(40+d.byteLength+c.byteLength+l.byteLength),e.type("avc1"),d,e.size(8+c.byteLength),e.type("avcC"),c,e.size(20),e.type("btrt"),l,e.size(16),e.type("pasp"),h),n.buffer}},{key:"stts",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0]);return t.write(e.size(16),e.type("stts"),n),t.buffer}},{key:"stsc",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0]);return t.write(e.size(16),e.type("stsc"),n),t.buffer}},{key:"stco",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0]);return t.write(e.size(16),e.type("stco"),n),t.buffer}},{key:"stsz",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);return t.write(e.size(20),e.type("stsz"),n),t.buffer}},{key:"mvex",value:function(t){var n=new i.default,r=i.default.writeUint32(9e4*t);return n.write(e.size(88),e.type("mvex"),e.size(16),e.type("mehd"),e.extension(0,0),r,e.trex(1),e.trex(2)),n.buffer}},{key:"trex",value:function(t){var n=new i.default,r=new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return n.write(e.size(8+r.byteLength),e.type("trex"),r),n.buffer}},{key:"moof",value:function(t){var n=new i.default,r=8,a=e.mfhd(),o=e.traf(t);return[a,o].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("moof"),a,o),n.buffer}},{key:"mfhd",value:function(){var t=new i.default,n=i.default.writeUint32(e.sequence);return e.sequence+=1,t.write(e.size(16),e.type("mfhd"),e.extension(0,0),n),t.buffer}},{key:"traf",value:function(t){var n=new i.default,r=8,a=e.tfhd(t.id),o=e.tfdt(t.time),u=e.sdtp(t),s=e.trun(t,u.byteLength);return[a,o,u,s].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("traf"),a,o,u,s),n.buffer}},{key:"tfhd",value:function(t){var n=new i.default,r=i.default.writeUint32(t);return n.write(e.size(16),e.type("tfhd"),e.extension(0,0),r),n.buffer}},{key:"tfdt",value:function(t){var n=new i.default,r=Math.floor(t/(a+1)),o=Math.floor(t%(a+1));return n.write(e.size(20),e.type("tfdt"),e.extension(1,0),i.default.writeUint32(r),i.default.writeUint32(o)),n.buffer}},{key:"trun",value:function(t,n){var r=t.id,a=1===r?16:12,o=new i.default,u=i.default.writeUint32(t.samples.length),s=i.default.writeUint32(96+a*t.samples.length+n);return o.write(e.size(20+a*t.samples.length),e.type("trun"),e.extension(0,t.flags),u,s),t.samples.forEach(function(e,t){o.write(i.default.writeUint32(e.duration)),o.write(i.default.writeUint32(e.size)),1===r?(o.write(i.default.writeUint32(e.key?33554432:16842752)),o.write(i.default.writeUint32(e.offset))):o.write(i.default.writeUint32(16777216))}),o.buffer}},{key:"sdtp",value:function(t){var n=new i.default;return n.write(e.size(12+t.samples.length),e.type("sdtp"),e.extension(0,0)),t.samples.forEach(function(e){n.write(new Uint8Array(1===t.id?[e.key?32:16]:[16]))}),n.buffer}},{key:"mdat",value:function(t){var n=new i.default,r=8;return t.samples.forEach(function(e){r+=e.size}),n.write(e.size(r),e.type("mdat")),t.samples.forEach(function(e){n.write(e.buffer)}),n.buffer}}]),e}();o.sequence=1,t.default=o,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;ne?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}},{key:"readBits",value:function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&window.console.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"readUShort",value:function(){return this.readBits(16)}},{key:"readUInt",value:function(){return this.readBits(32)}},{key:"skipScalingList",value:function(e){var t,n=8,r=8;for(t=0;t0&&e.readByte(this.dataview,r)}},{key:"readUint8",value:function(){return e.readByte(this.dataview,1)}},{key:"readUint16",value:function(){return e.readByte(this.dataview,2)}},{key:"readUint24",value:function(){return e.readByte(this.dataview,3)}},{key:"readUint32",value:function(){return e.readByte(this.dataview,4)}},{key:"readUint64",value:function(){return e.readByte(this.dataview,8)}},{key:"readInt8",value:function(){return e.readByte(this.dataview,1,!0)}},{key:"readInt16",value:function(){return e.readByte(this.dataview,2,!0)}},{key:"readInt32",value:function(){return e.readByte(this.dataview,4,!0)}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}},{key:"length",get:function(){return this.buffer.byteLength}},{key:"position",set:function(e){this.dataview.position=e},get:function(){return this.dataview.position}}],[{key:"readByte",value:function(e,t,n){var r=void 0;switch(t){case 1:r=n?e.getInt8(e.position):e.getUint8(e.position);break;case 2:r=n?e.getInt16(e.position):e.getUint16(e.position);break;case 3:if(n)throw"not supported for readByte 3";r=e.getUint8(e.position)<<16,r|=e.getUint8(e.position+1)<<8,r|=e.getUint8(e.position+2);break;case 4:r=n?e.getInt32(e.position):e.getUint32(e.position);break;case 8:if(n)throw"not supported for readBody 8";r=e.getUint32(e.position)<<32,r|=e.getUint32(e.position+4);break;default:r=""}return e.position+=t,r}}]),e}();t.default=i,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=0,n=arguments.length,r=Array(n>1?n-1:0),i=1;i-1&&("video"===a.body.type?1===a.header.payload?((o=[]).push(a),n.push(o)):0===o.length?n.push([a]):o.push(a):"audio"===a.body.type&&(1===a.header.payload?((u=[]).push(a),n.push(u)):0===u.length?n.push([a]):u.push(a)));return n}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,r=t.method,i=void 0===r?"GET":r,a=t.type,o=void 0===a?"arraybuffer":a,u=t.data,s=void 0===u?{}:u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),new Promise(function(e,t){var r=new XMLHttpRequest,a=i.toUpperCase(),u=[];for(var f in o&&(r.responseType=o),s)u.push("k="+s[f]);if("GET"===a)r.open(a,n+"?"+u.join("&")),r.send();else{if("post"!==a)throw"xhr "+a+" is not supported";r.open(a,n),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.send(u.join("&"))}r.onload=function(){200===r.status||206===r.status?e(r):t(r)},r.onerror=function(){t(r)}})},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n-1}},function(e,t,n){"use strict";var r="razdwatrzy";e.exports=function(){return"function"==typeof r.contains&&(!0===r.contains("dwa")&&!1===r.contains("foo"))}},function(e,t,n){"use strict";e.exports=n(17)()?String.prototype.contains:n(16)},function(e,t,n){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";var r=n(0),i=Array.prototype.forEach,a=Object.create;e.exports=function(e){var t=a(null);return i.call(arguments,function(e){r(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)}),t}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=n(0),i=Object.keys;e.exports=function(e){return i(r(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";e.exports=n(24)()?Object.keys:n(23)},function(e,t,n){"use strict";var r=n(25),i=n(21),a=Math.max;e.exports=function(e,t){var n,o,u,s=a(arguments.length,2);for(e=Object(i(e)),u=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},o=1;o=r&&u.end<=i&&(u.downloaded=!0)}}},{key:"download",value:function(){new l.default("ts.mp4",this.cache.buffer)}}]),e}();t.default=p,e.exports=t.default},function(e,t){e.exports=Player},function(e,t,n){"use strict";var r=o(n(31)),i=o(n(30)),a=o(n(2));function o(e){return e&&e.__esModule?e:{default:e}}r.default.install("hlsplayer",function(){var e=this,t=r.default.sniffer,n=r.default.util,o=e.config.preloadTime||15;if(["chrome","firfox","safari"].some(function(e){return e===t.browser})&&a.default.isSupported('video/mp4; codecs="avc1.64001E, mp4a.40.5"')){var u=e.start,s=void 0;e.start=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.config.url;t&&(s=new i.default(t),e.mse=s.mse,e.hls=s,e.download=function(){s.download()},s.m3u8.once("ready",function(){if("live"===s.type){n.addClass(e.root,"xgplayer-is-live");var t=n.createDom("xg-live","正在直播",{},"xgplayer-live");e.controls.appendChild(t);var r=setInterval(function(){if(e.paused&&e.buffered.length)for(var t=0,n=e.buffered.length;te.currentTime){e.currentTime=e.buffered.start(t),clearInterval(r);break}},200)}}),u.call(e,s.mse.url))};var f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.currentTime,n=e.getBufferedRange();tr){e.currentTime=t.start(i)+.1;break}}else s.seek()})}})},function(e,t,n){e.exports=n(32)}]); \ No newline at end of file diff --git a/packages/xgplayer-hls/dist/index.js b/packages/xgplayer-hls/dist/index.js new file mode 100644 index 00000000..fdbe7b7a --- /dev/null +++ b/packages/xgplayer-hls/dist/index.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("xgplayer")):"function"==typeof define&&define.amd?define(["xgplayer"],t):"object"==typeof exports?exports["xgplayer-hls"]=t(require("xgplayer")):e["xgplayer-hls"]=t(e.xgplayer)}(window,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=33)}([function(e,t,n){"use strict";var r=n(22)();e.exports=function(e){return e!==r&&null!==e}},function(e,t,n){"use strict";var r,i,a,o,u,s,f,c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d=n(29),l=n(15),h=Function.prototype.apply,p=Function.prototype.call,v=Object.create,y=Object.defineProperty,b=Object.defineProperties,w=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};u={on:r=function(e,t){var n;return l(t),w.call(this,"__ee__")?n=this.__ee__:(n=g.value=v(null),y(this,"__ee__",g),g.value=null),n[e]?"object"===c(n[e])?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:i=function(e,t){var n,i;return l(t),i=this,r.call(this,e,n=function(){a.call(i,e,n),h.call(t,this,arguments)}),n.__eeOnceListener__=t,this},off:a=function(e,t){var n,r,i,a;if(l(t),!w.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"===(void 0===(r=n[e])?"undefined":c(r)))for(a=0;i=r[a];++a)i!==t&&i.__eeOnceListener__!==t||(2===r.length?n[e]=r[a?0:1]:r.splice(a,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},emit:o=function(e){var t,n,r,i,a;if(w.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"===(void 0===i?"undefined":c(i))){for(n=arguments.length,a=new Array(n-1),t=1;t0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.64001E, mp4a.40.5"';!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=this;(0,i.default)(this),this.codecs=t,this.mediaSource=new window.MediaSource,this.url=window.URL.createObjectURL(this.mediaSource),this.queue=[],this.mediaSource.addEventListener("sourceopen",function(){n.sourceBuffer=n.mediaSource.addSourceBuffer(n.codecs),n.sourceBuffer.addEventListener("error",function(e){n.emit("error",{type:"sourceBuffer",error:e})}),n.sourceBuffer.addEventListener("updateend",function(e){n.emit("updateend");var t=n.queue.shift();t&&n.sourceBuffer.appendBuffer(t)}),n.emit("sourceopen"),n.sourceBuffer.addEventListener("error",function(e){n.emit("error",{type:"mediaSource",error:e})})}),this.mediaSource.addEventListener("sourceclose",function(){n.emit("sourceclose")})}return r(e,[{key:"appendBuffer",value:function(e){var t=this.sourceBuffer;return!1===t.updating&&"open"===this.state?(t.appendBuffer(e),!0):(this.queue.push(e),!1)}},{key:"removeBuffer",value:function(e,t){this.sourceBuffer.remove(e,t)}},{key:"endOfStream",value:function(){"open"===this.mediaSource.readyState&&this.mediaSource.endOfStream()}},{key:"state",get:function(){return this.mediaSource.readyState}},{key:"duration",get:function(){return this.mediaSource.duration},set:function(e){this.mediaSource.duration=e}}],[{key:"isSupported",value:function(e){return window.MediaSource&&window.MediaSource.isTypeSupported(e)}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n>24,e>>16&255,e>>8&255,255&e])}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(11));e.exports=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n>>15,this.payload=t>>>14&1,this.priority=t>>>13&1,this.pid=8191&t,t=e.readUint8(),this.scrambling=t>>6&3,this.adaptation=t>>4&3,this.continuity=15&t,this.packet=0===this.pid?"PAT":"MEDIA"}},{key:"Payload",value:function(t,n){var r=n.header.pid,i=void 0;switch(r){case 0:i=new e.PAT(t);break;case 1:i=new e.CAT(t);break;case 2:i=new e.TSDT(t);break;case 8191:i=!1;break;default:if(e.PATSpace.some(function(e){return e.pid===r}))i=new e.PMT(t,n);else{var a=e.PMTSpace?e.PMTSpace.filter(function(e){return e.pid===r}):[];i=!!a.length&&new e.Media(t,n,s[a[0].streamType][0])}}return i}},{key:"PAT",value:function(t){var n=t.readUint8();t.skip(n),n=t.readUint8(),this.tabelID=n,n=t.readUint16(),this.error=n>>>7,this.zero=n>>>6&1,this.sectionLength=4095&n,this.streamID=t.readUint16(),this.current=1&t.readUint8(),this.sectionNumber=t.readUint8(),this.lastSectionNumber=t.readUint8();for(var r=(this.sectionLength-9)/4,i=[],a=0;a=4&&(this.crc32=t.readUint32())}},{key:"PMT",value:function(t,n){var r=this;n.header.packet="PMT";var i=t.readUint8();t.skip(i),i=t.readUint8(),this.tableID=i,i=t.readUint16(),this.sectionLength=4095&i,this.program=t.readUint16(),this.current=1&t.readUint8(),this.order=t.readUint8(),this.lastOrder=t.readUint8(),this.PCR_PID=8191&t.readUint16(),this.programLength=4095&t.readUint16();for(var a=(this.sectionLength-13)/5,o=[],u=0;u=4&&(this.crc32=t.readUint32())}},{key:"Media",value:function(e,t,n){var r=t.header;if(this.start=e.position,this.type=n,3===r.adaptation&&(this.adaptationLength=e.readUint8(),this.adaptationLength>0)){var i=e.readUint8();this.discontinue=i>>>7,this.access=i>>>6&1,this.priority=i>>>5&1,this.PCR=i>>>4&1,this.OPCR=i>>>3&1,this.splicePoint=i>>>2&1,this.transportPrivate=i>>>1&1,this.adaptationField=1&i;var o=e.position;if(1===this.PCR&&(this.programClockBase=e.readUint32()<<1,i=e.readUint16(),this.programClockBase|=i>>>15,this.programClockExtension=511&i),1===this.OPCR&&(this.originProgramClockBase=e.readUint32()<<1,i=e.readUint16(),this.originProgramClockBase+=i>>>15,this.originProgramClockExtension=511&i),1===this.splicePoint&&(this.spliceCountdown=e.readUint8()),1===this.transportPrivate)for(var u=e.readUint8(),s=[],f=0;f>>6&1,p=d>>>5&1;1===d>>>7&&(d=e.readUint16(),this.ltwValid=d>>>15,this.ltwOffset=61439&d),1===h&&(d=e.readUint24(),this.piecewiseRate=4194303&d),1===p&&(d=e.readInt8(),this.spliceType=d>>>4,this.dtsNextAU1=d>>>1&7,this.marker1=1&d,d=e.readUint16(),this.dtsNextAU2=d>>>1,this.marker2=1&d,d=e.readUint16(),this.dtsNextAU3=d),e.skip(c-1-(e.position-l))}var v=this.adaptationLength-1-(e.position-o);e.skip(v)}this.buffer=new a.default(e.buffer.slice(e.position))}},{key:"PES",value:function(t){var n=t[0],r=n.body.buffer,i=r.readUint24();if(this.header=n.header,1!==i)throw new Error("this is not pes packet");var a=r.readUint8();a>=224&&a<=239&&(this.type="video"),a>=192&&a<=223&&(this.type="audio");var o=r.readUint16();if(this.packetLength=o,"video"!==this.type&&"audio"!==this.type)throw new Error("format is not supported");var u=r.readUint8();if(2!==u>>>6)throw new Error("error when parse pes header");u=r.readUint8(),this.ptsDTSFlag=u>>>6,this.escrFlag=u>>>5&1,this.esRateFlag=u>>>4&1,this.dsmFlag=u>>>3&1,this.additionalFlag=u>>>2&1,this.crcFlag=u>>>1&1,this.extensionFlag=1&u,this.pesHeaderLength=r.readUint8();var s=this.pesHeaderLength;if(2===this.ptsDTSFlag){var f=[];u=r.readUint8(),f.push(u>>>1&7),u=r.readUint16(),f.push(u>>>1),u=r.readUint16(),f.push(u>>>1),this.pts=f[0]<<30|f[1]<<15|f[2],s-=5,"video"===this.type&&(this.dts=this.pts)}if(3===this.ptsDTSFlag){var c=[];u=r.readUint8(),c.push(u>>>1&7),u=r.readUint16(),c.push(u>>>1),u=r.readUint16(),c.push(u>>>1),this.pts=c[0]<<30|c[1]<<15|c[2];var d=[];u=r.readUint8(),d.push(u>>>1&7),u=r.readUint16(),d.push(u>>>1),u=r.readUint16(),d.push(u>>>1),this.dts=d[0]<<30|d[1]<<15|d[2],s-=10}if(1===this.escrFlag){var l=[],h=[];u=r.readUint8(),l.push(u>>>3&7),l.push(3&u),u=r.readUint16(),l.push(u>>>13),l.push(3&u),u=r.readUint16(),l.push(u>>>13),h.push(3&u),u=r.readUint8(),h.push(u>>>1),this.escr=300*(l[0]<<30|l[1]<<28|l[2]<<15|l[3]<<13|l[4])+(h[0]<<7|h[1]),s-=6}if(1===this.esRateFlag&&(u=r.readUint24(),this.esRate=u>>>1&4194303,s-=3),1===this.dsmFlag)throw new Error("not support DSM_trick_mode");if(1===this.additionalFlag&&(u=r.readUint8(),this.additionalCopyInfo=127&u,s-=1),1===this.crcFlag&&(this.pesCRC=r.readUint16(),s-=2),1===this.extensionFlag)throw new Error("not support extension");s>0&&r.skip(s),this.ES=new e.ES(r,this.type,t.slice(1))}},{key:"ES",value:function(t,n,r){var a=void 0;if("video"===n){if(1!==(a=t.readUint32())&&(t.back(4),1!==(a=t.readUint24())))throw new Error("h264 nal header parse failed");t.skip(2),this.sps=function(e){var t=[],n=void 0,r=!0,i=!1;if(1===e.readUint32())do{if(n=e.readUint8(),!i){if(7!=(31&n)){r=!1,e.back(5);break}i=!0}0!==n?t.push(n):1===(n=e.readUint24())?(r=!1,e.back(4)):(e.back(4),t.push(e.readUint8()))}while(r);else e.back(4);return t}(t),this.pps=function(e){var t=[],n=void 0,r=!0,i=!1;if(1===e.readUint32())do{if(n=e.readUint8(),!i){if(8!=(31&n)){r=!1,e.back(5);break}i=!0}0!==n?t.push(n):1===(n=e.readUint16())?(r=!1,e.back(3)):(e.back(3),t.push(e.readUint8()))}while(r);else e.back(4);return t}(t);var u=void 0;if(this.sps.length?(this.info=new o.default(new Uint8Array(this.sps)).readSPS(),u=t.readUint24()):0===(u=t.readUint24())&&(u=t.readUint8()),1!==u)throw new Error("h264 convert to avcc error");var s=e.Merge(t,r);this.buffer=(0,i.default)(Uint8Array,t.writeUint32(s.byteLength),s)}else{if("audio"!==n)throw"ES "+n+" is not supported";if((a=t.readUint16())>>>4!=4095)throw new Error("aac ES parse Error");this.id=0==(a>>>3&1)?"MPEG-4":"MPEG-2",this.layer=a>>>1&3,this.absent=1&a,a=t.readUint16(),this.audioObjectType=1+(a>>>14&3),this.profile=this.audioObjectType-1,this.frequencyIndex=a>>>10&15,this.frequence=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350][this.frequencyIndex],this.channel=a>>>6&7,this.frameLength=(3&a)<<11|t.readUint16()>>>5,this.audioConfig=e.getAudioConfig(this.audioObjectType,this.channel,this.frequencyIndex),t.skip(1),this.buffer=e.Merge(t,r)}}},{key:"TSDT",value:function(){return{}}},{key:"CAT",value:function(e,t){this.tableID=e.readUint8();var n=e.readUint16();this.sectionIndicator=n>>>7,this.sectionLength=4095&n,e.skip(2),n=e.readUint8(),this.version=n>>>3,this.currentNextIndicator=1&n,this.sectionNumber=e.readUint8(),this.lastSectionNumber=e.readUint8();for(var r=(this.sectionLength-9)/4,i=[],a=0;a=6?(e=5,i=new Array(4),a=n-3):(e=2,i=new Array(2),a=n):-1!==r.indexOf("android")?(e=2,i=new Array(2),a=n):(e=5,i=new Array(4),n>=6?a=n-3:(1===t&&(e=2,i=new Array(2)),a=n)),i[0]=e<<3,i[0]|=(14&n)>>1,i[1]=(1&n)<<7,i[1]|=t<<3,5===e&&(i[1]|=(14&a)>>1,i[2]=(1&a)<<7,i[2]|=8,i[3]=0),i}}]),e}();f.PATSpace=[],t.default=f,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=document.createElement("a"),i=new Blob([n]),a=document.createEvent("MouseEvents");a.initEvent("click",!1,!1),r.download=t,r.href=URL.createObjectURL(i),r.dispatchEvent(a)},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n>16&255,t>>8&255,255&t])}},{key:"ftyp",value:function(){var t=new i.default;return t.write(e.size(24),e.type("ftyp"),new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49])),t.buffer}},{key:"moov",value:function(t){var n=new i.default,r=8,a=e.mvhd(t.duration),o=e.videoTrak(t),u=e.audioTrak(t),s=e.mvex(t.duration);return[a,o,u,s].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("moov"),a,o,u,s),n.buffer}},{key:"mvhd",value:function(t){var n=new i.default;t*=9e4;var r=Math.floor(t/(a+1)),o=Math.floor(t%(a+1)),u=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,0,1,95,144,r>>24,r>>16&255,r>>8&255,255&r,o>>24,o>>16&255,o>>8&255,255&o,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return n.write(e.size(8+u.length),e.type("mvhd"),new Uint8Array(u)),n.buffer}},{key:"videoTrak",value:function(t){var n=new i.default,r=8,a=e.tkhd({id:1,duration:t.duration,timescale:9e4,width:t.width,height:t.height,type:"video"}),o=e.mdia({type:"video",timescale:9e4,duration:t.duration,sps:t.sps,pps:t.pps,pixelRatio:t.pixelRatio,width:t.width,height:t.height});return[a,o].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("trak"),a,o),n.buffer}},{key:"audioTrak",value:function(t){var n=new i.default,r=8,a=e.tkhd({id:2,duration:t.duration,timescale:9e4,width:0,height:0,type:"audio"}),o=e.mdia({type:"audio",timescale:9e4,duration:t.duration,channelCount:t.channelCount,samplerate:t.samplerate,audioConfig:t.audioConfig});return[a,o].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("trak"),a,o),n.buffer}},{key:"tkhd",value:function(t){var n=new i.default,r=t.id,o=t.duration*t.timescale,u=t.width,s=t.height,f=t.type,c=Math.floor(o/(a+1)),d=Math.floor(o%(a+1)),l=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d,0,0,0,0,0,0,0,0,0,0,0,"video"===f?1:0,"audio"===f?1:0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,u>>8&255,255&u,0,0,s>>8&255,255&s,0,0]);return n.write(e.size(8+l.byteLength),e.type("tkhd"),l),n.buffer}},{key:"edts",value:function(t){var n=new i.default,r=t.duration,a=t.mediaTime;return n.write(e.size(36),e.type("edts")),n.write(e.size(28),e.type("elst")),n.write(new Uint8Array([0,0,0,1,r>>24&255,r>>16&255,r>>8&255,255&r,a>>24&255,a>>16&255,a>>8&255,255&a,0,0,0,1])),n.buffer}},{key:"mdia",value:function(t){var n=new i.default,r=8,a=e.mdhd(t.timescale),o=e.hdlr(t.type),u=e.minf(t);return[a,o,u].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("mdia"),a,o,u),n.buffer}},{key:"mdhd",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=new i.default;n*=t;var o=Math.floor(n/(a+1)),u=Math.floor(n%(a+1)),s=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,o>>24,o>>16&255,o>>8&255,255&o,u>>24,u>>16&255,u>>8&255,255&u,85,196,0,0]);return r.write(e.size(12+s.byteLength),e.type("mdhd"),e.extension(1,0),s),r.buffer}},{key:"hdlr",value:function(t){var n=new i.default,r=[0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0];return"audio"===t&&(r.splice.apply(r,[8,4].concat([115,111,117,110])),r.splice.apply(r,[24,13].concat([83,111,117,110,100,72,97,110,100,108,101,114,0]))),n.write(e.size(8+r.length),e.type("hdlr"),new Uint8Array(r)),n.buffer}},{key:"minf",value:function(t){var n=new i.default,r=8,a="video"===t.type?e.vmhd():e.smhd(),o=e.dinf(),u=e.stbl(t);return[a,o,u].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("minf"),a,o,u),n.buffer}},{key:"vmhd",value:function(){var t=new i.default;return t.write(e.size(20),e.type("vmhd"),new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])),t.buffer}},{key:"smhd",value:function(){var t=new i.default;return t.write(e.size(16),e.type("smhd"),new Uint8Array([0,0,0,0,0,0,0,0])),t.buffer}},{key:"dinf",value:function(){var t=new i.default;return t.write(e.size(36),e.type("dinf"),e.size(28),e.type("dref"),new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])),t.buffer}},{key:"stbl",value:function(t){var n=new i.default,r=8,a=e.stsd(t),o=e.stts(),u=e.stsc(),s=e.stsz(),f=e.stco();return[a,o,u,s,f].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("stbl"),a,o,u,s,f),n.buffer}},{key:"stsd",value:function(t){var n=new i.default,r=void 0;return r="audio"===t.type?e.mp4a(t):e.avc1(t),n.write(e.size(16+r.byteLength),e.type("stsd"),e.extension(0,0),new Uint8Array([0,0,0,1]),r),n.buffer}},{key:"mp4a",value:function(t){var n=new i.default,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.samplerate>>8&255,255&t.samplerate,0,0]),a=e.esds(t.audioConfig);return n.write(e.size(8+r.byteLength+a.byteLength),e.type("mp4a"),r,a),n.buffer}},{key:"esds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[43,146,8,0],n=t.length,r=new i.default,a=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(t).concat([6,1,2]));return r.write(e.size(8+a.byteLength),e.type("esds"),a),r.buffer}},{key:"avc1",value:function(t){var n=new i.default,r=t.sps,a=t.pps,o=t.width,u=t.height,s=t.pixelRatio[0],f=t.pixelRatio[1],c=new Uint8Array([1,r[1],r[2],r[3],255,225].concat([r.length>>>8&255,255&r.length]).concat(r).concat(1).concat([a.length>>>8&255,255&a.length]).concat(a)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,255&o,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l=new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]),h=new Uint8Array([s>>24,s>>16&255,s>>8&255,255&s,f>>24,f>>16&255,f>>8&255,255&f]);return n.write(e.size(40+d.byteLength+c.byteLength+l.byteLength),e.type("avc1"),d,e.size(8+c.byteLength),e.type("avcC"),c,e.size(20),e.type("btrt"),l,e.size(16),e.type("pasp"),h),n.buffer}},{key:"stts",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0]);return t.write(e.size(16),e.type("stts"),n),t.buffer}},{key:"stsc",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0]);return t.write(e.size(16),e.type("stsc"),n),t.buffer}},{key:"stco",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0]);return t.write(e.size(16),e.type("stco"),n),t.buffer}},{key:"stsz",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);return t.write(e.size(20),e.type("stsz"),n),t.buffer}},{key:"mvex",value:function(t){var n=new i.default,r=i.default.writeUint32(9e4*t);return n.write(e.size(88),e.type("mvex"),e.size(16),e.type("mehd"),e.extension(0,0),r,e.trex(1),e.trex(2)),n.buffer}},{key:"trex",value:function(t){var n=new i.default,r=new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return n.write(e.size(8+r.byteLength),e.type("trex"),r),n.buffer}},{key:"moof",value:function(t){var n=new i.default,r=8,a=e.mfhd(),o=e.traf(t);return[a,o].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("moof"),a,o),n.buffer}},{key:"mfhd",value:function(){var t=new i.default,n=i.default.writeUint32(e.sequence);return e.sequence+=1,t.write(e.size(16),e.type("mfhd"),e.extension(0,0),n),t.buffer}},{key:"traf",value:function(t){var n=new i.default,r=8,a=e.tfhd(t.id),o=e.tfdt(t.time),u=e.sdtp(t),s=e.trun(t,u.byteLength);return[a,o,u,s].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("traf"),a,o,u,s),n.buffer}},{key:"tfhd",value:function(t){var n=new i.default,r=i.default.writeUint32(t);return n.write(e.size(16),e.type("tfhd"),e.extension(0,0),r),n.buffer}},{key:"tfdt",value:function(t){var n=new i.default,r=Math.floor(t/(a+1)),o=Math.floor(t%(a+1));return n.write(e.size(20),e.type("tfdt"),e.extension(1,0),i.default.writeUint32(r),i.default.writeUint32(o)),n.buffer}},{key:"trun",value:function(t,n){var r=t.id,a=1===r?16:12,o=new i.default,u=i.default.writeUint32(t.samples.length),s=i.default.writeUint32(96+a*t.samples.length+n);return o.write(e.size(20+a*t.samples.length),e.type("trun"),e.extension(0,t.flags),u,s),t.samples.forEach(function(e,t){o.write(i.default.writeUint32(e.duration)),o.write(i.default.writeUint32(e.size)),1===r?(o.write(i.default.writeUint32(e.key?33554432:16842752)),o.write(i.default.writeUint32(e.offset))):o.write(i.default.writeUint32(16777216))}),o.buffer}},{key:"sdtp",value:function(t){var n=new i.default;return n.write(e.size(12+t.samples.length),e.type("sdtp"),e.extension(0,0)),t.samples.forEach(function(e){n.write(new Uint8Array(1===t.id?[e.key?32:16]:[16]))}),n.buffer}},{key:"mdat",value:function(t){var n=new i.default,r=8;return t.samples.forEach(function(e){r+=e.size}),n.write(e.size(r),e.type("mdat")),t.samples.forEach(function(e){n.write(e.buffer)}),n.buffer}}]),e}();o.sequence=1,t.default=o,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;ne?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}},{key:"readBits",value:function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&window.console.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"readUShort",value:function(){return this.readBits(16)}},{key:"readUInt",value:function(){return this.readBits(32)}},{key:"skipScalingList",value:function(e){var t,n=8,r=8;for(t=0;t0&&e.readByte(this.dataview,r)}},{key:"readUint8",value:function(){return e.readByte(this.dataview,1)}},{key:"readUint16",value:function(){return e.readByte(this.dataview,2)}},{key:"readUint24",value:function(){return e.readByte(this.dataview,3)}},{key:"readUint32",value:function(){return e.readByte(this.dataview,4)}},{key:"readUint64",value:function(){return e.readByte(this.dataview,8)}},{key:"readInt8",value:function(){return e.readByte(this.dataview,1,!0)}},{key:"readInt16",value:function(){return e.readByte(this.dataview,2,!0)}},{key:"readInt32",value:function(){return e.readByte(this.dataview,4,!0)}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}},{key:"length",get:function(){return this.buffer.byteLength}},{key:"position",set:function(e){this.dataview.position=e},get:function(){return this.dataview.position}}],[{key:"readByte",value:function(e,t,n){var r=void 0;switch(t){case 1:r=n?e.getInt8(e.position):e.getUint8(e.position);break;case 2:r=n?e.getInt16(e.position):e.getUint16(e.position);break;case 3:if(n)throw"not supported for readByte 3";r=e.getUint8(e.position)<<16,r|=e.getUint8(e.position+1)<<8,r|=e.getUint8(e.position+2);break;case 4:r=n?e.getInt32(e.position):e.getUint32(e.position);break;case 8:if(n)throw"not supported for readBody 8";r=e.getUint32(e.position)<<32,r|=e.getUint32(e.position+4);break;default:r=""}return e.position+=t,r}}]),e}();t.default=i,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=0,n=arguments.length,r=Array(n>1?n-1:0),i=1;i-1&&("video"===a.body.type?1===a.header.payload?((o=[]).push(a),n.push(o)):0===o.length?n.push([a]):o.push(a):"audio"===a.body.type&&(1===a.header.payload?((u=[]).push(a),n.push(u)):0===u.length?n.push([a]):u.push(a)));return n}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,r=t.method,i=void 0===r?"GET":r,a=t.type,o=void 0===a?"arraybuffer":a,u=t.data,s=void 0===u?{}:u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),new Promise(function(e,t){var r=new XMLHttpRequest,a=i.toUpperCase(),u=[];for(var f in o&&(r.responseType=o),s)u.push("k="+s[f]);if("GET"===a)r.open(a,n+"?"+u.join("&")),r.send();else{if("post"!==a)throw"xhr "+a+" is not supported";r.open(a,n),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.send(u.join("&"))}r.onload=function(){200===r.status||206===r.status?e(r):t(r)},r.onerror=function(){t(r)}})},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n-1}},function(e,t,n){"use strict";var r="razdwatrzy";e.exports=function(){return"function"==typeof r.contains&&(!0===r.contains("dwa")&&!1===r.contains("foo"))}},function(e,t,n){"use strict";e.exports=n(17)()?String.prototype.contains:n(16)},function(e,t,n){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";var r=n(0),i=Array.prototype.forEach,a=Object.create;e.exports=function(e){var t=a(null);return i.call(arguments,function(e){r(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)}),t}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=n(0),i=Object.keys;e.exports=function(e){return i(r(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";e.exports=n(24)()?Object.keys:n(23)},function(e,t,n){"use strict";var r=n(25),i=n(21),a=Math.max;e.exports=function(e,t){var n,o,u,s=a(arguments.length,2);for(e=Object(i(e)),u=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},o=1;o=r&&u.end<=i&&(u.downloaded=!0)}}},{key:"download",value:function(){new l.default("ts.mp4",this.cache.buffer)}}]),e}();t.default=p,e.exports=t.default},function(t,n){t.exports=e},function(e,t,n){"use strict";var r=o(n(31)),i=o(n(30)),a=o(n(2));function o(e){return e&&e.__esModule?e:{default:e}}r.default.install("hlsplayer",function(){var e=this,t=r.default.sniffer,n=r.default.util,o=e.config.preloadTime||15;if(["chrome","firfox","safari"].some(function(e){return e===t.browser})&&a.default.isSupported('video/mp4; codecs="avc1.64001E, mp4a.40.5"')){var u=e.start,s=void 0;e.start=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.config.url;t&&(s=new i.default(t),e.mse=s.mse,e.hls=s,e.download=function(){s.download()},s.m3u8.once("ready",function(){if("live"===s.type){n.addClass(e.root,"xgplayer-is-live");var t=n.createDom("xg-live","正在直播",{},"xgplayer-live");e.controls.appendChild(t);var r=setInterval(function(){if(e.paused&&e.buffered.length)for(var t=0,n=e.buffered.length;te.currentTime){e.currentTime=e.buffered.start(t),clearInterval(r);break}},200)}}),u.call(e,s.mse.url))};var f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.currentTime,n=e.getBufferedRange();tr){e.currentTime=t.start(i)+.1;break}}else s.seek()})}})},function(e,t,n){e.exports=n(32)}])}); \ No newline at end of file diff --git a/packages/xgplayer-hls/package-lock.json b/packages/xgplayer-hls/package-lock.json new file mode 100755 index 00000000..66c677ab --- /dev/null +++ b/packages/xgplayer-hls/package-lock.json @@ -0,0 +1,3945 @@ +{ + "name": "xgplayer-hls", + "version": "0.1.2-0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@webassemblyjs/ast": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fast/-/ast-1.5.9.tgz", + "integrity": "sha1-sncBgmeGkatJSdWTEFwV1AdP7bY=", + "requires": { + "@webassemblyjs/helper-module-context": "1.5.9", + "@webassemblyjs/helper-wasm-bytecode": "1.5.9", + "@webassemblyjs/wast-parser": "1.5.9", + "debug": "^3.1.0", + "mamacro": "^0.0.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2ffloating-point-hex-parser/-/floating-point-hex-parser-1.5.9.tgz", + "integrity": "sha1-7lYkP2ujB4H/b5L+fxw3clUhmnw=" + }, + "@webassemblyjs/helper-api-error": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-api-error/-/helper-api-error-1.5.9.tgz", + "integrity": "sha1-yA4gSv4a4QLCOwNX8ewlrrYQIqI=" + }, + "@webassemblyjs/helper-buffer": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-buffer/-/helper-buffer-1.5.9.tgz", + "integrity": "sha1-kNma/LD9we4RvEA4lPOuN82SaoE=", + "requires": { + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-code-frame/-/helper-code-frame-1.5.9.tgz", + "integrity": "sha1-tWrAajnD4c/vzEIa3h7kcac4pXA=", + "requires": { + "@webassemblyjs/wast-printer": "1.5.9" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-fsm/-/helper-fsm-1.5.9.tgz", + "integrity": "sha1-j5liaOsH7mcoEwqel/o6rDJ3JFQ=" + }, + "@webassemblyjs/helper-module-context": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-module-context/-/helper-module-context-1.5.9.tgz", + "integrity": "sha1-aeLuoxD3VaC3ULhPivWfiQ8gRqw=" + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-wasm-bytecode/-/helper-wasm-bytecode-1.5.9.tgz", + "integrity": "sha1-Rnug+eTQ5KSL8cUQe59KvjyhFxo=" + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-wasm-section/-/helper-wasm-section-1.5.9.tgz", + "integrity": "sha1-rslIarXVbjy1JSp+2Id3tnkqxiQ=", + "requires": { + "@webassemblyjs/ast": "1.5.9", + "@webassemblyjs/helper-buffer": "1.5.9", + "@webassemblyjs/helper-wasm-bytecode": "1.5.9", + "@webassemblyjs/wasm-gen": "1.5.9", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/ieee754": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fieee754/-/ieee754-1.5.9.tgz", + "integrity": "sha1-hGhW7OBAx969W1ZFsxnCZSNhO88=", + "requires": { + "ieee754": "^1.1.11" + } + }, + "@webassemblyjs/leb128": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fleb128/-/leb128-1.5.9.tgz", + "integrity": "sha1-cklEOg/XV0p+PBw5UyU1xzU5C7w=", + "requires": { + "leb": "^0.3.0" + } + }, + "@webassemblyjs/wasm-edit": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwasm-edit/-/wasm-edit-1.5.9.tgz", + "integrity": "sha1-m44FSy0wWn4FKAiFcclZBL1z30g=", + "requires": { + "@webassemblyjs/ast": "1.5.9", + "@webassemblyjs/helper-buffer": "1.5.9", + "@webassemblyjs/helper-wasm-bytecode": "1.5.9", + "@webassemblyjs/helper-wasm-section": "1.5.9", + "@webassemblyjs/wasm-gen": "1.5.9", + "@webassemblyjs/wasm-opt": "1.5.9", + "@webassemblyjs/wasm-parser": "1.5.9", + "@webassemblyjs/wast-printer": "1.5.9", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwasm-gen/-/wasm-gen-1.5.9.tgz", + "integrity": "sha1-heB8BH+rkX4GsY3uTRY0Ki/TxZw=", + "requires": { + "@webassemblyjs/ast": "1.5.9", + "@webassemblyjs/helper-wasm-bytecode": "1.5.9", + "@webassemblyjs/ieee754": "1.5.9", + "@webassemblyjs/leb128": "1.5.9" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwasm-opt/-/wasm-opt-1.5.9.tgz", + "integrity": "sha1-zKwXxBoETBZ7yV0+hkXPiJoTfOU=", + "requires": { + "@webassemblyjs/ast": "1.5.9", + "@webassemblyjs/helper-buffer": "1.5.9", + "@webassemblyjs/wasm-gen": "1.5.9", + "@webassemblyjs/wasm-parser": "1.5.9", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwasm-parser/-/wasm-parser-1.5.9.tgz", + "integrity": "sha1-3auE2klXtkqvvGHkq3BsxmcILzI=", + "requires": { + "@webassemblyjs/ast": "1.5.9", + "@webassemblyjs/helper-api-error": "1.5.9", + "@webassemblyjs/helper-wasm-bytecode": "1.5.9", + "@webassemblyjs/ieee754": "1.5.9", + "@webassemblyjs/leb128": "1.5.9", + "@webassemblyjs/wasm-parser": "1.5.9" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwast-parser/-/wast-parser-1.5.9.tgz", + "integrity": "sha1-GT0kzPR0Kl+PGRWTZoCrIxQBHfI=", + "requires": { + "@webassemblyjs/ast": "1.5.9", + "@webassemblyjs/floating-point-hex-parser": "1.5.9", + "@webassemblyjs/helper-api-error": "1.5.9", + "@webassemblyjs/helper-code-frame": "1.5.9", + "@webassemblyjs/helper-fsm": "1.5.9", + "long": "^3.2.0", + "mamacro": "^0.0.3" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.5.9", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwast-printer/-/wast-printer-1.5.9.tgz", + "integrity": "sha1-FmBdkKSBwBoTC3xO3rK85QN4frQ=", + "requires": { + "@webassemblyjs/ast": "1.5.9", + "@webassemblyjs/wast-parser": "1.5.9", + "long": "^3.2.0" + } + }, + "acorn": { + "version": "5.6.2", + "resolved": "http://npm.byted.org/acorn/-/acorn-5.6.2.tgz", + "integrity": "sha1-sdode+KsG0oyf7nquFFwLFBFtOc=" + }, + "acorn-dynamic-import": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", + "integrity": "sha1-kBzu5Mf6rvfgetKkfokGddpQong=", + "requires": { + "acorn": "^5.0.0" + } + }, + "ajv": { + "version": "6.5.0", + "resolved": "http://npm.byted.org/ajv/-/ajv-6.5.0.tgz", + "integrity": "sha1-TIr/34CIfY8TLJxSq4otxNC3skw=", + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0", + "uri-js": "^4.2.1" + } + }, + "ajv-keywords": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "anymatch": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=" + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=" + }, + "arr-union": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "http://npm.byted.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "http://npm.byted.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha1-ucK/WAXx5kqt7tbfOiv6+1pz9aA=", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "requires": { + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + }, + "util": { + "version": "0.10.3", + "resolved": "http://npm.byted.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "async-each": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" + }, + "atob": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "http://npm.byted.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha1-suLwnjQtDwyI4vAuBneUEl51wgc=", + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "http://npm.byted.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha1-GERAjTuPDTWkBOp6wYDwh6YBvZA=", + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" + } + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true, + "requires": { + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-loader": { + "version": "7.1.4", + "resolved": "http://npm.byted.org/babel-loader/-/babel-loader-7.1.4.tgz", + "integrity": "sha1-40Y5OL1ObVXRwXTFSF1AahiO0BU=", + "requires": { + "find-cache-dir": "^1.0.0", + "loader-utils": "^1.0.2", + "mkdirp": "^0.5.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-add-module-exports": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-0.2.1.tgz", + "integrity": "sha1-mumh9KjcZ/DN7E9K7aHkOl/2XiU=" + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "dev": true, + "requires": { + "babel-helper-define-map": "^6.24.1", + "babel-helper-function-name": "^6.24.1", + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-helper-replace-supers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "dev": true, + "requires": { + "babel-helper-replace-supers": "^6.24.1", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true, + "requires": { + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "dev": true, + "requires": { + "regenerator-transform": "^0.10.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.24.1", + "babel-plugin-transform-es2015-classes": "^6.24.1", + "babel-plugin-transform-es2015-computed-properties": "^6.24.1", + "babel-plugin-transform-es2015-destructuring": "^6.22.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", + "babel-plugin-transform-es2015-for-of": "^6.22.0", + "babel-plugin-transform-es2015-function-name": "^6.24.1", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-umd": "^6.24.1", + "babel-plugin-transform-es2015-object-super": "^6.24.1", + "babel-plugin-transform-es2015-parameters": "^6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", + "babel-plugin-transform-regenerator": "^6.24.1" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "http://npm.byted.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha1-ry87iPpvXB5MY00aD46sT1WzleM=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base": { + "version": "0.11.2", + "resolved": "http://npm.byted.org/base/-/base-0.11.2.tgz", + "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha1-yrHmEY8FEJXli1KBrqjBzSK/wOM=" + }, + "big.js": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha1-pfwpi4G54Nyi5FiCR4S2XFK6WI4=" + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "http://npm.byted.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" + }, + "bluebird": { + "version": "3.5.1", + "resolved": "http://npm.byted.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha1-2VUfnemPH82h5oPRfukaBgLuLrk=" + }, + "bn.js": { + "version": "4.11.8", + "resolved": "http://npm.byted.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha1-LN4J617jQfSEdGuwMJsyU7GxRC8=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "http://npm.byted.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "http://npm.byted.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha1-Mmc0ZC9APavDADIJhTu3CtQo70g=", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha1-jWR0wbhwv9q807z8wZNKEOlPFfA=", + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/browserify-des/-/browserify-des-1.0.1.tgz", + "integrity": "sha1-M0MSTbbXrVPiaogmMYcSvchFD5w=", + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "http://npm.byted.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha1-KGlFnZqjviRf6P4sofRuLn9U1z8=", + "requires": { + "pako": "~1.0.5" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "http://npm.byted.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-from": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha1-h/yqOimDWOCt5uRCz86EB0DRrQQ=" + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" + }, + "cacache": { + "version": "10.0.4", + "resolved": "http://npm.byted.org/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha1-ZFI2eZnv+dQYiu/ZoU6dfGomNGA=", + "requires": { + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.1", + "mississippi": "^2.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^5.2.4", + "unique-filename": "^1.1.0", + "y18n": "^4.0.0" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "chokidar": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/chokidar/-/chokidar-2.0.3.tgz", + "integrity": "sha1-3L1PbLsqVbR5m6ioQKxSfl9LEXY=", + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.1.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.0" + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" + }, + "chrome-trace-event": { + "version": "0.1.3", + "resolved": "http://npm.byted.org/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz", + "integrity": "sha1-05WvLTHIe5CnFsgx/jJvaXaOwIQ=" + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94=", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "http://npm.byted.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "commander": { + "version": "2.14.1", + "resolved": "http://npm.byted.org/commander/-/commander-2.14.1.tgz", + "integrity": "sha1-IjUSPjevjKPGXfRbAm29NXsBuao=" + }, + "commondir": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "http://npm.byted.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "http://npm.byted.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "http://npm.byted.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "concat-typed-array": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/concat-typed-array/-/concat-typed-array-1.0.2.tgz", + "integrity": "sha1-Z4gMPOGez/EQwxWYtBx/RznUfKA=" + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "requires": { + "date-now": "^0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "http://npm.byted.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=" + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha1-kilzmMrjSTf8r9bsgTnBgFHwteA=", + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, + "core-js": { + "version": "2.5.1", + "resolved": "http://npm.byted.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "http://npm.byted.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha1-yREbbzMEXEaX8UR4f5JUzcd8Rf8=", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "http://npm.byted.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha1-aRcMeLOrlXFHsriwRXLkfq0iQ/8=", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "http://npm.byted.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha1-OWz58xN/A+S45TLFj2mCVOAPgOw=", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "cyclist": { + "version": "0.2.2", + "resolved": "http://npm.byted.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=" + }, + "d": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "requires": { + "es5-ext": "^0.10.9" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" + }, + "debug": { + "version": "2.6.9", + "resolved": "http://npm.byted.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "requires": { + "ms": "2.0.0" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "deepmerge": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/deepmerge/-/deepmerge-2.0.1.tgz", + "integrity": "sha512-VIPwiMJqJ13ZQfaCsIFnp5Me9tnjURiaIFxfz7EH0Ci0dTSQpZtSLrqOicXqEd/z2r+z+Klk9GzmnRsgpgbOsQ==" + }, + "define-property": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "des.js": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "requires": { + "repeating": "^2.0.0" + } + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "http://npm.byted.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha1-QOjumPVaIUlgcUaSHGPhrl89KHU=", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto=" + }, + "duplexify": { + "version": "3.6.0", + "resolved": "http://npm.byted.org/duplexify/-/duplexify-3.6.0.tgz", + "integrity": "sha1-WSkD9dgLONA3IgVBJk1poZj7NBA=", + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "elliptic": { + "version": "6.4.0", + "resolved": "http://npm.byted.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha1-7SljTRm6ukY7bOa4CjchPqtx7EM=", + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", + "integrity": "sha1-40puqnkPYvzNcdk5WfVrK0MtsQo=", + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" + } + }, + "errno": { + "version": "0.1.7", + "resolved": "http://npm.byted.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg=", + "requires": { + "prr": "~1.0.1" + } + }, + "es5-ext": { + "version": "0.10.37", + "resolved": "http://npm.byted.org/es5-ext/-/es5-ext-0.10.37.tgz", + "integrity": "sha1-DudB0Ui4AGm6J9AgOTdWryV978M=", + "requires": { + "es6-iterator": "~2.0.1", + "es6-symbol": "~3.1.1" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "http://npm.byted.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "http://npm.byted.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "http://npm.byted.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "http://npm.byted.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + }, + "esutils": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "http://npm.byted.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "events": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha1-f8vbGY3HGVlDLv4ThCaE4FJaywI=", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "http://npm.byted.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fill-range": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "flush-write-stream": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha1-xdWG7zivYJdlC0m8QbVfq7GfNb0=", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "^0.2.2" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "http://npm.byted.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.2.4", + "resolved": "http://npm.byted.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha1-9B3LGvJYKvNpLaNvxVy9jhBBxCY=", + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true + } + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "http://npm.byted.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, + "glob": { + "version": "7.1.2", + "resolved": "http://npm.byted.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "globals": { + "version": "9.18.0", + "resolved": "http://npm.byted.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=" + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "http://npm.byted.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "http://npm.byted.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha1-NA3tvmKQGHFRweodd3o0SJNd+EY=", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + }, + "ieee754": { + "version": "1.1.11", + "resolved": "http://npm.byted.org/ieee754/-/ieee754-1.1.11.tgz", + "integrity": "sha1-wWOE/+APW3g1gk5ntvK9RKUilFU=" + }, + "iferr": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "indexof": { + "version": "0.0.1", + "resolved": "http://npm.byted.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "http://npm.byted.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "invariant": { + "version": "2.2.2", + "resolved": "http://npm.byted.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "http://npm.byted.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=" + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-finite": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-odd": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha1-dkZiRnH9fqVYzNmieVGC8pWPGyQ=", + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=" + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "requires": { + "isobject": "^3.0.1" + } + }, + "is-windows": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "jsesc": { + "version": "0.5.0", + "resolved": "http://npm.byted.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json5": { + "version": "0.5.1", + "resolved": "http://npm.byted.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=" + }, + "leb": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/leb/-/leb-0.3.0.tgz", + "integrity": "sha1-Mr7p+tFoMo1q6oUi2DP0GA7tHaM=" + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=" + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + }, + "long": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "requires": { + "js-tokens": "^3.0.0" + } + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "http://npm.byted.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha1-oRdc80lt/IQ2wVbDNLSVWZK85pw=", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", + "requires": { + "pify": "^3.0.0" + } + }, + "mamacro": { + "version": "0.0.3", + "resolved": "http://npm.byted.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha1-rSyVdhl8nxq/MI0Hh4Zb2XWj8+Q=" + }, + "map-cache": { + "version": "0.2.2", + "resolved": "http://npm.byted.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "map-visit": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.4", + "resolved": "http://npm.byted.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "http://npm.byted.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "http://npm.byted.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha1-8IA1HIZbDcViqEYpZtqlNUPHik0=", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha1-LhlN4ERibUoQ5/f7wAznPoPk1cc=" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "http://npm.byted.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "http://npm.byted.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mississippi": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha1-NEKlCPr8KFAEhv7qmUCWduTuWm8=", + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^2.0.1", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha1-pJ5yaNzhoNlpjkUybFYm3zVD0P4=", + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://npm.byted.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nan": { + "version": "2.10.0", + "resolved": "http://npm.byted.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha1-ltDNYQ69WNS03pzAxoKM2pnHVI8=", + "optional": true + }, + "nanomatch": { + "version": "1.2.9", + "resolved": "http://npm.byted.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha1-h59xUMstq3pHElkGbBBO7m4Pp8I=", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "neo-async": { + "version": "2.5.1", + "resolved": "http://npm.byted.org/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha1-rLkJ4yex6H7J7xX0G4omlRKtQe4=" + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha1-X5QmPUBPbkR2fXJpAf/wVHjWAN8=", + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^1.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.0", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "object-copy": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-limit": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha1-DpK2vty1nwIsE9DxlJ3ILRWQnxw=", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "pako": { + "version": "1.0.6", + "resolved": "http://npm.byted.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha1-AQEhG6pwxLykoPY/Igbpe3368lg=" + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "http://npm.byted.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha1-9r8pOBgzK9DatU77Fgh3JHRebKg=", + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "http://npm.byted.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "pbkdf2": { + "version": "3.0.16", + "resolved": "http://npm.byted.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha1-dAQgjsawG2LYW/g4U6gGT42cKlw=", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "requires": { + "find-up": "^2.1.0" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, + "private": { + "version": "0.1.8", + "resolved": "http://npm.byted.org/private/-/private-0.1.8.tgz", + "integrity": "sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=" + }, + "process": { + "version": "0.11.10", + "resolved": "http://npm.byted.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=" + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + }, + "prr": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "http://npm.byted.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha1-RuuRByBr9zSJ+LhbadkTNMZhCZQ=", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "http://npm.byted.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha1-NlE74karJ1cLGjdKXOJ4v9dDcM4=", + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=" + }, + "querystring": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + }, + "randombytes": { + "version": "2.0.6", + "resolved": "http://npm.byted.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha1-0wLFIpSFiISKjTAMkytEwkIx2oA=", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha1-ySGW/IarQr6YPxvzF3giSTHWFFg=", + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://npm.byted.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + } + }, + "regenerate": { + "version": "1.3.3", + "resolved": "http://npm.byted.org/regenerate/-/regenerate-1.3.3.tgz", + "integrity": "sha1-DDNtOYBVPXVcObWGrjsgqknIK38=", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.0", + "resolved": "http://npm.byted.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "integrity": "sha1-flT+W1zNXWYk6mJVw0c74JC4AuE=" + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "http://npm.byted.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha1-HkmWg3Ix2ot/PPQRTXG1aRoGgN0=", + "dev": true, + "requires": { + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "http://npm.byted.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "repeating": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "requires": { + "is-finite": "^1.0.0" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "ret": { + "version": "0.1.15", + "resolved": "http://npm.byted.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=" + }, + "rimraf": { + "version": "2.6.2", + "resolved": "http://npm.byted.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", + "requires": { + "glob": "^7.0.5" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha1-ocGm9iR1FXe6XQeRTLyShQWFiQw=", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "requires": { + "aproba": "^1.1.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "http://npm.byted.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "~0.1.10" + } + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "http://npm.byted.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha1-IYNvBgiqwXt4+ePiTa/xSlyhOj4=", + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + }, + "serialize-javascript": { + "version": "1.5.0", + "resolved": "http://npm.byted.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", + "integrity": "sha1-GqM2FiyIqJDdrVOEuuvJOmVRYf4=" + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, + "set-value": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "sha.js": { + "version": "2.4.11", + "resolved": "http://npm.byted.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha1-N6XPC4HsvGlD3hCbopYNGyZYSuc=", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "http://npm.byted.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha1-qqR0A/eyRakvvJfqCPJQ1gh+0IU=" + }, + "source-map": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "http://npm.byted.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha1-cuLMNAlVQ+Q7LGKyxMENSpBU8lk=", + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "http://npm.byted.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha1-Aoam3ovkJkEzhZTpfM6nXwosWF8=", + "requires": { + "source-map": "^0.5.6" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "http://npm.byted.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + }, + "split-string": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "ssri": { + "version": "5.3.0", + "resolved": "http://npm.byted.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha1-ujhyycbTOgcEp9cf8EXl7EiZnQY=", + "requires": { + "safe-buffer": "^5.1.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "http://npm.byted.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.2", + "resolved": "http://npm.byted.org/stream-each/-/stream-each-1.2.2.tgz", + "integrity": "sha1-joxGP5HaiZF3h2WHP+TZYNj2Fr0=", + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "http://npm.byted.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "tapable": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/tapable/-/tapable-1.0.0.tgz", + "integrity": "sha1-y7Y52QAu7ZxrWXXrIFmNeTbx+fI=" + }, + "through2": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "http://npm.byted.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha1-HSjj0qrfHVpZlsTp+VYBzQU0gK4=", + "requires": { + "setimmediate": "^1.0.4" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "trim-right": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "http://npm.byted.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + }, + "typedarray": { + "version": "0.0.6", + "resolved": "http://npm.byted.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "uglify-es": { + "version": "3.3.10", + "resolved": "http://npm.byted.org/uglify-es/-/uglify-es-3.3.10.tgz", + "integrity": "sha1-iwt5ks6+IO3CbeG/MlzveXuPP6U=", + "requires": { + "commander": "~2.14.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + } + } + }, + "uglifyjs-webpack-plugin": { + "version": "1.2.5", + "resolved": "http://npm.byted.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz", + "integrity": "sha1-Lvg4fI8akD7F5E+jb588vc6mdkE=", + "requires": { + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "schema-utils": "^0.4.5", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "uglify-es": "^3.3.4", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + } + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "http://npm.byted.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unique-filename": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/unique-slug/-/unique-slug-2.0.0.tgz", + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + } + } + }, + "upath": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha1-NSVll+RqWB20eT0M5H+prr/J+r0=" + }, + "uri-js": { + "version": "4.2.2", + "resolved": "http://npm.byted.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "url": { + "version": "0.11.0", + "resolved": "http://npm.byted.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "http://npm.byted.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "use": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/use/-/use-3.1.0.tgz", + "integrity": "sha1-FHFr8D/f79AwQK71jYtLhfOnxUQ=", + "requires": { + "kind-of": "^6.0.2" + } + }, + "util": { + "version": "0.10.4", + "resolved": "http://npm.byted.org/util/-/util-0.10.4.tgz", + "integrity": "sha1-OqASW/5mikZy3liFfTrOJ+y3aQE=", + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "http://npm.byted.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "requires": { + "indexof": "0.0.1" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha1-S8EsLr6KonenHx0/FNaFx7RGzQA=", + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "webpack": { + "version": "4.10.2", + "resolved": "http://npm.byted.org/webpack/-/webpack-4.10.2.tgz", + "integrity": "sha1-1qTMPi+nSPlspipw+R6qqTnvOFg=", + "requires": { + "@webassemblyjs/ast": "1.5.9", + "@webassemblyjs/wasm-edit": "1.5.9", + "@webassemblyjs/wasm-opt": "1.5.9", + "@webassemblyjs/wasm-parser": "1.5.9", + "acorn": "^5.0.0", + "acorn-dynamic-import": "^3.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^0.1.1", + "enhanced-resolve": "^4.0.0", + "eslint-scope": "^3.7.1", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^0.4.4", + "tapable": "^1.0.0", + "uglifyjs-webpack-plugin": "^1.2.4", + "watchpack": "^1.5.0", + "webpack-sources": "^1.0.1" + } + }, + "webpack-sources": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha1-oQHrrlnWUHNU1x2AE5UKOot6WlQ=", + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + } + } + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha1-rsxAWXb6talVJhgIRvDboojzpKA=", + "requires": { + "errno": "~0.1.7" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "http://npm.byted.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + } + } +} diff --git a/packages/xgplayer-hls/package.json b/packages/xgplayer-hls/package.json new file mode 100755 index 00000000..7c636471 --- /dev/null +++ b/packages/xgplayer-hls/package.json @@ -0,0 +1,46 @@ +{ + "name": "xgplayer-hls", + "version": "1.0.1", + "description": "xgplayer plugin for hls", + "main": "./dist/index.js", + "scripts": { + "prepare": "npm run build", + "build": "webpack --progress --display-chunks -p", + "watch": "webpack --progress --display-chunks -p --watch" + }, + "repository": { + "type": "git", + "url": "git@github.com:bytedance/xgplayer.git" + }, + "babel": { + "presets": [ + "es2015" + ], + "plugins": [ + "add-module-exports" + ] + }, + "keywords": [ + "mp4", + "fmp4", + "player", + "video" + ], + "author": "yinguohui@bytedance.com", + "license": "MIT", + "dependencies": { + "babel-core": "^6.26.3", + "babel-loader": "^7.1.4", + "babel-plugin-add-module-exports": "^0.2.1", + "concat-typed-array": "^1.0.2", + "deepmerge": "^2.0.1", + "event-emitter": "^0.3.5", + "webpack": "^4.10.2" + }, + "peerDependency": { + "xgplayer": "^0.1.0" + }, + "devDependencies": { + "babel-preset-es2015": "^6.24.1" + } +} diff --git a/packages/xgplayer-hls/postcss.config.js b/packages/xgplayer-hls/postcss.config.js new file mode 100644 index 00000000..0665a0f3 --- /dev/null +++ b/packages/xgplayer-hls/postcss.config.js @@ -0,0 +1,7 @@ +module.exports = { + plugins: { + 'postcss-cssnext': { + browserslist: ['cover 99.5%'], + }, + }, +}; \ No newline at end of file diff --git a/packages/xgplayer-hls/src/fmp4/buffer.js b/packages/xgplayer-hls/src/fmp4/buffer.js new file mode 100644 index 00000000..b05fb78c --- /dev/null +++ b/packages/xgplayer-hls/src/fmp4/buffer.js @@ -0,0 +1,27 @@ +import Concat from 'concat-typed-array' + +class Buffer { + constructor () { + this.buffer = new Uint8Array(0) + } + write (...buffer) { + let self = this + buffer.forEach(item => { + if (item) { + self.buffer = Concat(Uint8Array, self.buffer, item) + } else { + window.console.error(item) + } + }) + } + static writeUint32 (value) { + return new Uint8Array([ + value >> 24, + (value >> 16) & 0xff, + (value >> 8) & 0xff, + value & 0xff + ]) + } +} + +export default Buffer diff --git a/packages/xgplayer-hls/src/fmp4/mp4.js b/packages/xgplayer-hls/src/fmp4/mp4.js new file mode 100644 index 00000000..a1c07e2c --- /dev/null +++ b/packages/xgplayer-hls/src/fmp4/mp4.js @@ -0,0 +1,606 @@ +import Buffer from './buffer' +const UINT32_MAX = Math.pow(2, 32) - 1 +class FMP4 { + static type (name) { + return new Uint8Array([name.charCodeAt(0), name.charCodeAt(1), name.charCodeAt(2), name.charCodeAt(3)]) + } + static size (value) { + return Buffer.writeUint32(value) + } + static extension (version, flag) { + return new Uint8Array([ + version, + (flag >> 16) & 0xff, + (flag >> 8) & 0xff, + flag & 0xff + ]) + } + static ftyp () { + let buffer = new Buffer() + buffer.write(FMP4.size(24), FMP4.type('ftyp'), new Uint8Array([ + 0x69, 0x73, 0x6F, 0x6D, // isom, + 0x0, 0x0, 0x00, 0x01, // minor_version: 0x01 + 0x69, 0x73, 0x6F, 0x6D, // isom + 0x61, 0x76, 0x63, 0x31 // avc1 + ])) + return buffer.buffer + } + static moov (data) { + let buffer = new Buffer(); let size = 8 + let mvhd = FMP4.mvhd(data.duration) + let trak1 = FMP4.videoTrak(data) + let trak2 = FMP4.audioTrak(data) + let mvex = FMP4.mvex(data.duration); + [mvhd, trak1, trak2, mvex].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('moov'), mvhd, trak1, trak2, mvex) + return buffer.buffer + } + static mvhd (duration) { + let buffer = new Buffer() + let timescale = 90000 + duration *= timescale + const upperWordDuration = Math.floor(duration / (UINT32_MAX + 1)) + const lowerWordDuration = Math.floor(duration % (UINT32_MAX + 1)) + let bytes = new Uint8Array([ + 0x01, // version 1 + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // creation_time + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // modification_time + (timescale >> 24) & 0xff, + (timescale >> 16) & 0xff, + (timescale >> 8) & 0xff, + timescale & 0xff, // timescale + (upperWordDuration >> 24), + (upperWordDuration >> 16) & 0xff, + (upperWordDuration >> 8) & 0xff, + upperWordDuration & 0xff, + (lowerWordDuration >> 24), + (lowerWordDuration >> 16) & 0xff, + (lowerWordDuration >> 8) & 0xff, + lowerWordDuration & 0xff, + 0x00, 0x01, 0x00, 0x00, // 1.0 rate + 0x01, 0x00, // 1.0 volume + 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // pre_defined + 0xff, 0xff, 0xff, 0xff // next_track_ID + ]) + buffer.write(FMP4.size(8 + bytes.length), FMP4.type('mvhd'), new Uint8Array(bytes)) + return buffer.buffer + } + static videoTrak (data) { + let buffer = new Buffer(); let size = 8 + let tkhd = FMP4.tkhd({ + id: 1, + duration: data.duration, + timescale: 90000, + width: data.width, + height: data.height, + type: 'video' + }) + let mdia = FMP4.mdia({ + type: 'video', + timescale: 90000, + duration: data.duration, + sps: data.sps, + pps: data.pps, + pixelRatio: data.pixelRatio, + width: data.width, + height: data.height + }); + [tkhd, mdia].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('trak'), tkhd, mdia) + return buffer.buffer + } + static audioTrak (data) { + let buffer = new Buffer(); let size = 8 + let tkhd = FMP4.tkhd({ + id: 2, + duration: data.duration, + timescale: 90000, + width: 0, + height: 0, + type: 'audio' + }) + let mdia = FMP4.mdia({ + type: 'audio', + timescale: 90000, + duration: data.duration, + channelCount: data.channelCount, + samplerate: data.samplerate, + audioConfig: data.audioConfig + }); + [tkhd, mdia].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('trak'), tkhd, mdia) + return buffer.buffer + } + static tkhd (data) { + let buffer = new Buffer() + let id = data.id + + let duration = data.duration * data.timescale + + let width = data.width + + let height = data.height + + let type = data.type + + let upperWordDuration = Math.floor(duration / (UINT32_MAX + 1)) + + let lowerWordDuration = Math.floor(duration % (UINT32_MAX + 1)) + let content = new Uint8Array([ + 0x01, // version 1 + 0x00, 0x00, 0x07, // flags + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // creation_time + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // modification_time + (id >> 24) & 0xff, + (id >> 16) & 0xff, + (id >> 8) & 0xff, + id & 0xff, // track_ID + 0x00, 0x00, 0x00, 0x00, // reserved + (upperWordDuration >> 24), + (upperWordDuration >> 16) & 0xff, + (upperWordDuration >> 8) & 0xff, + upperWordDuration & 0xff, + (lowerWordDuration >> 24), + (lowerWordDuration >> 16) & 0xff, + (lowerWordDuration >> 8) & 0xff, + lowerWordDuration & 0xff, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, // layer + 0x00, type === 'video' ? 0x01 : 0x00, // alternate_group + type === 'audio' ? 0x01 : 0x00, 0x00, // non-audio track volume + 0x00, 0x00, // reserved + 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix + (width >> 8) & 0xff, + width & 0xff, + 0x00, 0x00, // width + (height >> 8) & 0xff, + height & 0xff, + 0x00, 0x00 // height + ]) + buffer.write(FMP4.size(8 + content.byteLength), FMP4.type('tkhd'), content) + return buffer.buffer + } + static edts (data) { + let buffer = new Buffer(); let duration = data.duration; let mediaTime = data.mediaTime + buffer.write(FMP4.size(36), FMP4.type('edts')) + // elst + buffer.write(FMP4.size(28), FMP4.type('elst')) + buffer.write(new Uint8Array([ + 0x00, 0x00, 0x00, 0x01, // entry count + (duration >> 24) & 0xff, (duration >> 16) & 0xff, (duration >> 8) & 0xff, duration & 0xff, + (mediaTime >> 24) & 0xff, (mediaTime >> 16) & 0xff, (mediaTime >> 8) & 0xff, mediaTime & 0xff, + 0x00, 0x00, 0x00, 0x01 // media rate + ])) + return buffer.buffer + } + static mdia (data) { + let buffer = new Buffer(); let size = 8 + let mdhd = FMP4.mdhd(data.timescale) + let hdlr = FMP4.hdlr(data.type) + let minf = FMP4.minf(data); + [mdhd, hdlr, minf].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('mdia'), mdhd, hdlr, minf) + return buffer.buffer + } + static mdhd (timescale, duration = 0) { + let buffer = new Buffer() + duration *= timescale + const upperWordDuration = Math.floor(duration / (UINT32_MAX + 1)) + const lowerWordDuration = Math.floor(duration % (UINT32_MAX + 1)) + let content = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // creation_time + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // modification_time + (timescale >> 24) & 0xff, (timescale >> 16) & 0xff, (timescale >> 8) & 0xff, timescale & 0xff, + (upperWordDuration >> 24), + (upperWordDuration >> 16) & 0xff, + (upperWordDuration >> 8) & 0xff, + upperWordDuration & 0xff, + (lowerWordDuration >> 24), + (lowerWordDuration >> 16) & 0xff, + (lowerWordDuration >> 8) & 0xff, + lowerWordDuration & 0xff, + 0x55, 0xc4, // 'und' language + 0x00, 0x00 + ]) + buffer.write(FMP4.size(12 + content.byteLength), FMP4.type('mdhd'), FMP4.extension(1, 0), content) + return buffer.buffer + } + static hdlr (type) { + let buffer = new Buffer() + let value = [0x00, // version 0 + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00, // pre_defined + 0x76, 0x69, 0x64, 0x65, // handler_type: 'vide' + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, 0x00, // reserved + 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x48, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler' + ] + if (type === 'audio') { + value.splice(8, 4, ...[0x73, 0x6f, 0x75, 0x6e]) + value.splice(24, 13, ...[0x53, 0x6f, 0x75, 0x6e, + 0x64, 0x48, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x72, 0x00]) + } + buffer.write(FMP4.size(8 + value.length), FMP4.type('hdlr'), new Uint8Array(value)) + return buffer.buffer + } + static minf (data) { + let buffer = new Buffer(); let size = 8 + let vmhd = data.type === 'video' ? FMP4.vmhd() : FMP4.smhd() + let dinf = FMP4.dinf() + let stbl = FMP4.stbl(data); + [vmhd, dinf, stbl].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('minf'), vmhd, dinf, stbl) + return buffer.buffer + } + static vmhd () { + let buffer = new Buffer() + buffer.write(FMP4.size(20), FMP4.type('vmhd'), new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x01, // flags + 0x00, 0x00, // graphicsmode + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00 // opcolor + ])) + return buffer.buffer + } + static smhd () { + let buffer = new Buffer() + buffer.write(FMP4.size(16), FMP4.type('smhd'), new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, // balance + 0x00, 0x00 // reserved + ])) + return buffer.buffer + } + static dinf () { + let buffer = new Buffer() + let dref = [0x00, // version 0 + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x01, // entry_count + 0x00, 0x00, 0x00, 0x0c, // entry_size + 0x75, 0x72, 0x6c, 0x20, // 'url' type + 0x00, // version 0 + 0x00, 0x00, 0x01 // entry_flags + ] + buffer.write(FMP4.size(36), FMP4.type('dinf'), FMP4.size(28), FMP4.type('dref'), new Uint8Array(dref)) + return buffer.buffer + } + static stbl (data) { + let buffer = new Buffer(); let size = 8 + let stsd = FMP4.stsd(data) + let stts = FMP4.stts() + let stsc = FMP4.stsc() + let stsz = FMP4.stsz() + let stco = FMP4.stco(); + [stsd, stts, stsc, stsz, stco].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('stbl'), stsd, stts, stsc, stsz, stco) + return buffer.buffer + } + static stsd (data) { + let buffer = new Buffer(); let content + if (data.type === 'audio') { + // if (!data.isAAC && data.codec === 'mp4') { + // content = FMP4.mp3(data); + // } else { + // + // } + // 支持mp4a + content = FMP4.mp4a(data) + } else { + content = FMP4.avc1(data) + } + buffer.write(FMP4.size(16 + content.byteLength), FMP4.type('stsd'), FMP4.extension(0, 0), new Uint8Array([0x00, 0x00, 0x00, 0x01]), content) + return buffer.buffer + } + static mp4a (data) { + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, // reserved + 0x00, 0x01, // data_reference_index + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, data.channelCount, // channelcount + 0x00, 0x10, // sampleSize:16bits + 0x00, 0x00, 0x00, 0x00, // reserved2 + (data.samplerate >> 8) & 0xff, + data.samplerate & 0xff, // + 0x00, 0x00 + ]) + let esds = FMP4.esds(data.audioConfig) + buffer.write(FMP4.size(8 + content.byteLength + esds.byteLength), FMP4.type('mp4a'), content, esds) + return buffer.buffer + } + static esds (config = [43, 146, 8, 0]) { + const configlen = config.length + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, // version 0 + 0x00, 0x00, 0x00, // flags + + 0x03, // descriptor_type + 0x17 + configlen, // length + 0x00, 0x01, // es_id + 0x00, // stream_priority + + 0x04, // descriptor_type + 0x0f + configlen, // length + 0x40, // codec : mpeg4_audio + 0x15, // stream_type + 0x00, 0x00, 0x00, // buffer_size + 0x00, 0x00, 0x00, 0x00, // maxBitrate + 0x00, 0x00, 0x00, 0x00, // avgBitrate + + 0x05 // descriptor_type + ].concat([configlen]).concat(config).concat([0x06, 0x01, 0x02])) + buffer.write(FMP4.size(8 + content.byteLength), FMP4.type('esds'), content) + return buffer.buffer + } + static avc1 (data) { + let buffer = new Buffer(); let size = 40// 8(avc1)+8(avcc)+8(btrt)+16(pasp) + let sps = data.sps; let pps = data.pps; let width = data.width; let height = data.height; let hSpacing = data.pixelRatio[0]; let vSpacing = data.pixelRatio[1] + let avcc = new Uint8Array([ + 0x01, // version + sps[1], // profile + sps[2], // profile compatible + sps[3], // level + 0xfc | 3, + 0xE0 | 1 // 目前只处理一个sps + ].concat([sps.length >>> 8 & 0xff, sps.length & 0xff]).concat(sps).concat(1).concat([pps.length >>> 8 & 0xff, pps.length & 0xff]).concat(pps)) + let avc1 = new Uint8Array([ + 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, // reserved + 0x00, 0x01, // data_reference_index + 0x00, 0x00, // pre_defined + 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // pre_defined + (width >> 8) & 0xff, + width & 0xff, // width + (height >> 8) & 0xff, + height & 0xff, // height + 0x00, 0x48, 0x00, 0x00, // horizresolution + 0x00, 0x48, 0x00, 0x00, // vertresolution + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x01, // frame_count + 0x12, + 0x64, 0x61, 0x69, 0x6C, // dailymotion/hls.js + 0x79, 0x6D, 0x6F, 0x74, + 0x69, 0x6F, 0x6E, 0x2F, + 0x68, 0x6C, 0x73, 0x2E, + 0x6A, 0x73, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, // compressorname + 0x00, 0x18, // depth = 24 + 0x11, 0x11]) // pre_defined = -1 + let btrt = new Uint8Array([ + 0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB + 0x00, 0x2d, 0xc6, 0xc0, // maxBitrate + 0x00, 0x2d, 0xc6, 0xc0 // avgBitrate + ]) + let pasp = new Uint8Array([ + (hSpacing >> 24), // hSpacing + (hSpacing >> 16) & 0xff, + (hSpacing >> 8) & 0xff, + hSpacing & 0xff, + (vSpacing >> 24), // vSpacing + (vSpacing >> 16) & 0xff, + (vSpacing >> 8) & 0xff, + vSpacing & 0xff + ]) + + buffer.write( + FMP4.size(size + avc1.byteLength + avcc.byteLength + btrt.byteLength), FMP4.type('avc1'), avc1, + FMP4.size(8 + avcc.byteLength), FMP4.type('avcC'), avcc, + FMP4.size(20), FMP4.type('btrt'), btrt, + FMP4.size(16), FMP4.type('pasp'), pasp + ) + return buffer.buffer + } + static stts () { + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00 // entry_count + ]) + buffer.write(FMP4.size(16), FMP4.type('stts'), content) + return buffer.buffer + } + static stsc () { + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00 // entry_count + ]) + buffer.write(FMP4.size(16), FMP4.type('stsc'), content) + return buffer.buffer + } + static stco () { + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00 // entry_count + ]) + buffer.write(FMP4.size(16), FMP4.type('stco'), content) + return buffer.buffer + } + static stsz () { + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00, // sample_size + 0x00, 0x00, 0x00, 0x00 // sample_count + ]) + buffer.write(FMP4.size(20), FMP4.type('stsz'), content) + return buffer.buffer + } + static mvex (duration) { + let buffer = new Buffer() + let mehd = Buffer.writeUint32(duration * 90000) + buffer.write(FMP4.size(88), FMP4.type('mvex'), FMP4.size(16), FMP4.type('mehd'), FMP4.extension(0, 0), mehd, FMP4.trex(1), FMP4.trex(2)) + return buffer.buffer + } + static trex (id) { + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, // version 0 + 0x00, 0x00, 0x00, // flags + (id >> 24), + (id >> 16) & 0xff, + (id >> 8) & 0xff, + (id & 0xff), // track_ID + 0x00, 0x00, 0x00, 0x01, // default_sample_description_index + 0x00, 0x00, 0x00, 0x00, // default_sample_duration + 0x00, 0x00, 0x00, 0x00, // default_sample_size + 0x00, 0x01, 0x00, 0x01 // default_sample_flags + ]) + buffer.write(FMP4.size(8 + content.byteLength), FMP4.type('trex'), content) + return buffer.buffer + } + static moof (data) { + let buffer = new Buffer(); let size = 8 + let mfhd = FMP4.mfhd() + let traf = FMP4.traf(data); + [mfhd, traf].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('moof'), mfhd, traf) + return buffer.buffer + } + static mfhd () { + let buffer = new Buffer() + let content = Buffer.writeUint32(FMP4.sequence) + FMP4.sequence += 1 + buffer.write(FMP4.size(16), FMP4.type('mfhd'), FMP4.extension(0, 0), content) + return buffer.buffer + } + static traf (data) { + let buffer = new Buffer(); let size = 8 + let tfhd = FMP4.tfhd(data.id) + let tfdt = FMP4.tfdt(data.time) + let sdtp = FMP4.sdtp(data) + let trun = FMP4.trun(data, sdtp.byteLength); + [tfhd, tfdt, sdtp, trun].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('traf'), tfhd, tfdt, sdtp, trun) + return buffer.buffer + } + static tfhd (id) { + let buffer = new Buffer() + let content = Buffer.writeUint32(id) + buffer.write(FMP4.size(16), FMP4.type('tfhd'), FMP4.extension(0, 0), content) + return buffer.buffer + } + static tfdt (time) { + let buffer = new Buffer() + let upper = Math.floor(time / (UINT32_MAX + 1)) + + let lower = Math.floor(time % (UINT32_MAX + 1)) + buffer.write(FMP4.size(20), FMP4.type('tfdt'), FMP4.extension(1, 0), Buffer.writeUint32(upper), Buffer.writeUint32(lower)) + return buffer.buffer + } + static trun (data, sdtpLength) { + let id = data.id + let ceil = id === 1 ? 16 : 12 + let buffer = new Buffer() + let sampleCount = Buffer.writeUint32(data.samples.length) + // mdat-header 8 + // moof-header 8 + // mfhd 16 + // traf-header 8 + // thhd 16 + // tfdt 20 + // trun-header 12 + // sampleCount 4 + // data-offset 4 + // samples.length + let offset = Buffer.writeUint32(8 + 8 + 16 + 8 + 16 + 20 + 12 + 4 + 4 + ceil * data.samples.length + sdtpLength) + buffer.write(FMP4.size(20 + ceil * data.samples.length), FMP4.type('trun'), FMP4.extension(0, data.flags), sampleCount, offset) + data.samples.forEach((item, idx) => { + buffer.write(Buffer.writeUint32(item.duration)) + buffer.write(Buffer.writeUint32(item.size)) + if (id === 1) { + buffer.write(Buffer.writeUint32(item.key ? 0x02000000 : 0x01010000)) + buffer.write(Buffer.writeUint32(item.offset)) + } else { + buffer.write(Buffer.writeUint32(0x1000000)) + } + }) + return buffer.buffer + } + static sdtp (data) { + let buffer = new Buffer() + buffer.write(FMP4.size(12 + data.samples.length), FMP4.type('sdtp'), FMP4.extension(0, 0)) + data.samples.forEach(item => { + buffer.write(new Uint8Array(data.id === 1 ? [item.key ? 32 : 16] : [16])) + }) + return buffer.buffer + } + static mdat (data) { + let buffer = new Buffer(); let size = 8 + data.samples.forEach(item => { + size += item.size + }) + buffer.write(FMP4.size(size), FMP4.type('mdat')) + data.samples.forEach(item => { + buffer.write(item.buffer) + }) + return buffer.buffer + } +} + +FMP4.sequence = 1 + +export default FMP4 diff --git a/packages/xgplayer-hls/src/hls.js b/packages/xgplayer-hls/src/hls.js new file mode 100644 index 00000000..0082c586 --- /dev/null +++ b/packages/xgplayer-hls/src/hls.js @@ -0,0 +1,218 @@ +import EventEmitter from 'event-emitter' +import M3U8 from './ts/m3u8' +import Parser from './ts/parser' +import TS from './ts/ts' +import Buffer from './fmp4/buffer' +import MP4 from './fmp4/mp4' +import Task from './media/task' +import MSE from './media/mse' +import Download from './util/download' + +class HLS { + constructor (url) { + EventEmitter(this) + let mse = new MSE() + this.mse = mse + this.url = url + this.init(url) + this.inited = false + this.cache = new Buffer() + } + init (url) { + let m3u8 = new M3U8(url) + let hls = this + m3u8.once('ready', () => { + this.type = m3u8.type + if (hls.type === 'vod') { + hls.seek(0) + } else { + if (hls.seeker) { + clearInterval(hls.seeker) + } + this.once('end', () => { + if (hls.seeker) { + clearInterval(hls.seeker) + } + }) + hls.seek() + hls.seeker = setInterval(function () { + hls.seek() + }, 2000) + } + }) + m3u8.once('end', () => { + if (this.type === 'live') { + this.mse.endOfStream() + } + }) + this.m3u8 = m3u8 + } + seek (time) { + let segment = this.m3u8.seek(time) + if (segment.length && !segment[0].downloaded) { + new Task(segment[0].url, (res) => { + let ts = new Parser(res) + this.parse(ts) + let url = segment[0].url + this.m3u8.segments.every(item => { + if (item.url !== url) { + return true + } else { + item.downloaded = true + return false + } + }) + }) + } + } + parse (ts, segment) { + let pes = []; let video = []; let audio = []; let self = this + ts.pes.forEach(item => { + let _pes = new TS.PES(item) + pes.push(_pes) + if (_pes.type === 'video') { + video.push(_pes) + } + if (_pes.type === 'audio') { + audio.push(_pes) + } + }) + video.some(item => { + if (item.ES.sps.length) { + let es = item.ES + let as = audio[0].ES + let duration = 0 + self.m3u8.segments.forEach(item => { + duration += item.duration * 1 + }) + self.meta = { + sps: es.sps, + pps: es.pps, + width: es.info.width, + height: es.info.height, + pixelRatio: es.info.pixelRatio, + channelCount: as.channel, + timescale: as.frequence, + samplerate: as.frequence, + profile: as.profile, + duration: duration, + audioConfig: audio[0].ES.audioConfig + } + return false + } + }) + self.videoSamples = video + self.audioSamples = audio + if (self.meta) { + if (self.startDTS === undefined) { + self.startDTS = Math.min(video[0].dts, audio[0].pts) + } + self.initSegment(self.meta) + } else { + self.seek() + } + } + initSegment (data) { + if (!this.inited) { + let buffer = new Buffer() + buffer.write(MP4.ftyp()) + buffer.write(MP4.moov(data)) + this.mse.appendBuffer(buffer.buffer) + this.inited = true + this.cache.write(buffer.buffer) + } + this.createVideoFragment() + this.createAudioFragment() + } + addFragment (data) { + let buffer = new Buffer() + buffer.write(MP4.moof(data)) + buffer.write(MP4.mdat(data)) + this.mse.appendBuffer(buffer.buffer) + this.cache.write(buffer.buffer) + this.mse.once('updateend', () => { + this.update() + }) + } + createVideoFragment () { + let video = this.videoSamples + + let samplesLength = video.length + + let sampleDuration = (video[samplesLength - 1].dts - video[0].dts) / samplesLength + let samples, startDTS + startDTS = this.startDTS + samples = video.map((item, idx) => { + let duration + if (idx + 1 === samplesLength) { + duration = sampleDuration + } else { + duration = video[idx + 1].dts - item.dts + } + return { + size: item.ES.buffer.byteLength, + duration: duration, + offset: item.pts - item.dts, + buffer: item.ES.buffer, + key: !!item.ES.pps.length + } + }) + this.addFragment({ + id: 1, + time: video[0].dts - startDTS, + firstFlags: 0x2000000, + flags: 0xf01, + samples: samples + }) + } + createAudioFragment () { + let audio = this.audioSamples; let samplesLength = audio.length; let startPTS = this.startDTS || 0 + let samples, duration + samples = audio.map((item, idx) => { + if (idx + 1 === samplesLength) { + duration = (audio[samplesLength - 1].pts - audio[0].pts) / samplesLength + } else { + duration = audio[idx + 1].pts - item.pts + } + return { + size: item.ES.buffer.byteLength, + duration, + offset: 0, + buffer: item.ES.buffer, + key: true + } + }) + this.addFragment({ + id: 2, + time: audio[0].pts - startPTS, + firstFlags: 0x00, + flags: 0x701, + samples: samples + }) + } + reset () { + this.init(this.url) + } + + update () { + let sourceBuffer = this.mse.sourceBuffer + let segments = this.m3u8.segments + let buffer = sourceBuffer.buffered; let start; let end + for (let i = 0, len = buffer.length; i < len; i++) { + start = buffer.start(i) + end = buffer.end(i) + for (let j = 0, jLen = segments.length, segment; j < jLen; j++) { + segment = segments[i] + if (segment.start >= start && segment.end <= end) { + segment.downloaded = true + } + } + } + } + + download () { + new Download('ts.mp4', this.cache.buffer) + } +} + +export default HLS diff --git a/packages/xgplayer-hls/src/index.js b/packages/xgplayer-hls/src/index.js new file mode 100644 index 00000000..c30104ef --- /dev/null +++ b/packages/xgplayer-hls/src/index.js @@ -0,0 +1,97 @@ +import Player from 'xgplayer' +import HLS from './hls' +import MSE from './media/mse' + +const isEnded = (player, hls) => { + if (hls.type === 'vod') { + if (player.duration - player.currentTime < 2) { + const range = player.getBufferedRange() + if (player.currentTime - range[1] < 0.1) { + player.mse.endOfStream() + } + } + } +} + +const hlsplayer = function () { + let player = this + + let sniffer = Player.sniffer + + let util = Player.util + const preloadTime = player.config.preloadTime || 15 + if (['chrome', 'firfox', 'safari'].some(item => item === sniffer.browser) && MSE.isSupported('video/mp4; codecs="avc1.64001E, mp4a.40.5"')) { + const _start = player.start + let hls + player.start = function (url = player.config.url) { + if (!url) { return } + hls = new HLS(url) + player.mse = hls.mse + player.hls = hls + player.download = () => { + hls.download() + } + hls.m3u8.once('ready', () => { + if (hls.type === 'live') { + util.addClass(player.root, 'xgplayer-is-live') + const live = util.createDom('xg-live', '正在直播', {}, 'xgplayer-live') + player.controls.appendChild(live) + const timer = setInterval(() => { + if (player.paused && player.buffered.length) { + for (let i = 0, len = player.buffered.length; i < len; i++) { + if (player.buffered.start(i) > player.currentTime) { + player.currentTime = player.buffered.start(i) + clearInterval(timer) + break + } + } + } + }, 200) + } + }) + _start.call(player, hls.mse.url) + } + + const loadData = (time = player.currentTime) => { + const range = player.getBufferedRange() + if (time < range[1]) { + if (hls.type === 'vod') { + if (range[1] - time < preloadTime) { + hls.seek(range[1] + 1) + } + } + } else { + hls.seek(time) + } + } + + player.on('timeupdate', () => { + loadData(player.currentTime + 1) + isEnded(player, hls) + }) + + player.on('seeking', () => { + loadData() + }) + + player.on('waiting', () => { + if (hls.type === 'live') { + let buffered = player.buffered + + let length = buffered.length + + let currentTime = player.currentTime + for (let i = 0; i < length; i++) { + if (buffered.start(i) > currentTime) { + player.currentTime = buffered.start(i) + 0.1 + break + } + } + } else { + hls.seek() + } + }) + } +} + +Player.install('hlsplayer', hlsplayer) diff --git a/packages/xgplayer-hls/src/media/mp4.js b/packages/xgplayer-hls/src/media/mp4.js new file mode 100644 index 00000000..0024feac --- /dev/null +++ b/packages/xgplayer-hls/src/media/mp4.js @@ -0,0 +1,398 @@ +import Parse from '../parse/index' +import Write from '../write/index' +import EventEmitter from 'event-emitter' +import Merge from 'deepmerge' +import util from '../util/index' +import Mvex from '../fmp4/mvex' +import Moof from '../fmp4/moof' +import Mdat from '../fmp4/mdat' +import Task from './task' + +class MP4 { + constructor (url = '', preloadTime = 10) { + this._config = { + url: url + } + this.CHUNK_SIZE = Math.pow(10, 3) + this.boxes = [] + this.nextBox = null + this.info = null + this.moov = null + this.sequence = 1 + this.status = 'unload' + this.bufferCache = new Set() + this.writer = new Write(this.boxes) + EventEmitter(this) + this.init() + } + + init () { + let self = this + this.loadData().then((value) => { + self.parse(value) + self.getMoov().then((moov) => { + self.boxes = self.boxes.concat(moov) + let start = 0 + self.boxes.every(item => { + if (item) { + item.start = start + start += item.size + return true + } else { + return false + } + }) + self.getInfo() + self.emit('ready') + }) + }) + } + + seek (time) { + let timeStart = time * this.info.videoTimeScale + let fragIndex; let videoFrames = this.videoFrames; let audioFrames = this.audioFrames + videoFrames.every((item, idx) => { + let nowTime = item.time.time; let nextTime = videoFrames[idx + 1] ? videoFrames[idx + 1].time.time : Number.MAX_SAFE_INTEGER + if (nowTime <= timeStart && timeStart < nextTime) { + fragIndex = idx + return false + } else { + return true + } + }) + audioFrames.every((item, idx) => { + let nowTime = item.startTime; let nextTime = audioFrames[idx + 1] ? audioFrames[idx + 1].startTime : Number.MAX_SAFE_INTEGER + if (nowTime <= timeStart && timeStart < nextTime) { + fragIndex = Math.min(idx, fragIndex) + return false + } else { + return true + } + }) + if (this.bufferCache.has(fragIndex)) { + return Promise.resolve([null, fragIndex]) + } else { + return this.loadFragment(fragIndex) + } + } + + loadFragment (fragIndex) { + let start, end + let videoFrame = this.videoFrames[fragIndex] + let audioFrame = this.getSamplesByOrders('audio', this.audioFrames[fragIndex].order, 0) + start = Math.min(videoFrame.offset, audioFrame.offset) + if (fragIndex < this.videoFrames.length - 1) { + let videoNextFrame = this.videoFrames[fragIndex + 1] + let audioNextFrame = this.getSamplesByOrders('audio', this.audioFrames[fragIndex + 1].order, 0) + end = Math.max(videoNextFrame.offset, audioNextFrame.offset) + } + let self = this + if (window.isNaN(start) || window.isNaN(end)) { + throw [videoFrame, audioFrame, start, end] + } + return this.loadData(start + self.mdatStart, end ? self.mdatStart + end : Number.MAX_SAFE_INTEGER).then((value) => { + return self.createFragment(new Uint8Array(value), start, fragIndex) + }) + } + + createFragment (mdatData, start, fragIndex) { + let vTrak = this.videoTrak + let aTrak = this.audioTrak + let trackIDs = []; let boxes = [] + let self = this + trackIDs.push(util.findBox(vTrak, 'tkhd').trackID) + trackIDs.push(util.findBox(aTrak, 'tkhd').trackID); + (function () { + let framesIndex = self.videoFrames.map((item) => item.idx) + let samples = self.getSamplesByOrders('video', framesIndex[fragIndex], framesIndex[fragIndex + 1]) + let moof = new Moof({ + samples, + trackid: trackIDs[0], + sequence: self.sequence, + type: 'video' + }) + let mdat = new Mdat({ + samples, + mdatData, + start + }) + boxes.push(moof.pack()) + boxes.push(mdat.pack()) + })() + + let samples = this.getSamplesByOrders('audio', this.audioFrames[fragIndex].order, this.audioFrames[fragIndex + 1] ? this.audioFrames[fragIndex + 1].order : undefined) + let moof = new Moof({ + samples, + trackid: trackIDs[1], + sequence: self.sequence, + type: 'audio' + }) + let mdat = new Mdat({ + samples, + mdatData, + start + }) + boxes.push(moof.pack()) + boxes.push(mdat.pack()) + return Promise.resolve([boxes, fragIndex]) + } + + parse (buffer) { + let boxParse = new Parse(buffer) + this.boxes = this.boxes.concat(boxParse.boxes) + this.nextBox = boxParse.nextBox + return boxParse + } + + loadData (start = 0, end = start + this.CHUNK_SIZE) { + return new Promise((resolve, reject) => { + new Task(this._config.url, [start, end], resolve) + }) + } + + getMoov () { + let moov; let nextBox = this.nextBox; let moovStart = 0 + this.boxes.every(item => { + moovStart += item.size + if (item.type === 'moov') { + moov = item + return false + } else { + return true + } + }) + if (moov) { + return Promise.resolve(moov) + } else { + if (nextBox) { + if (nextBox.type === 'moov') { + return this.loadData(moovStart, moovStart + nextBox.size + 28).then((value) => { + return Promise.resolve(new Parse(value).boxes) + }) + } else { + return this.loadData(moovStart, moovStart + Math.pow(10, 8)).then((value) => { + return Promise.resolve(new Parse(value).boxes) + }) + } + } else { + return this.loadData(moovStart, moovStart + Math.pow(10, 8)).then((value) => { + return Promise.resolve(new Parse(value)) + }) + } + } + } + + getInfo () { + if (this.info) { + return this.info + } + let moov = this.boxes.find(item => item.type === 'moov') + let mvhd = util.findBox(moov, 'mvhd') + let traks = util.findBox(moov, 'trak') + let videoTrak, audioTrak + let videoCodec, audioCodec + let videoTimeScale, audioTimeScale + traks.forEach(trak => { + let hdlr = util.findBox(trak, 'hdlr') + let mdhd = util.findBox(trak, 'mdhd') + if (hdlr) { + let stsd = util.findBox(trak, 'stsd') + let codecBox = stsd.subBox[0] + if (hdlr.handleType === 'vide') { + let avcC = util.findBox(trak, 'avcC') + videoTrak = trak + videoTimeScale = mdhd.timescale + if (avcC) { + videoCodec = `${codecBox.type}.` + util.toHex(avcC.profile, avcC.profileCompatibility, avcC.AVCLevelIndication).join('') + } else { + videoCodec = `${codecBox.type}` + } + } + if (hdlr.handleType === 'soun') { + audioTrak = trak + let esds = util.findBox(trak, 'esds') + audioTimeScale = mdhd.timescale + if (esds) { + audioCodec = `${codecBox.type}.` + util.toHex(esds.subBox[0].subBox[0].typeID) + `.${esds.subBox[0].subBox[0].subBox[0].type}` + } else { + audioCodec = `${codecBox.type}` + } + } + } + }) + this.videoTrak = Merge({}, videoTrak) + this.audioTrak = Merge({}, audioTrak) + let mdat = this.boxes.find(item => item.type === 'mdat') + this.mdatStart = mdat.start + this.info = { + timeScale: mvhd.timeScale, + duration: mvhd.duration, + videoTimeScale, + audioTimeScale, + videoCodec, + audioCodec, + createTime: mvhd.createTime, + modifyTime: mvhd.modifyTime, + videoDuration: util.seekTrakDuration(videoTrak, videoTimeScale), + audioDutation: util.seekTrakDuration(audioTrak, audioTimeScale) + } + return this.info + } + + getSamplesByOrders (type = 'video', start, end) { + let trak = type === 'video' ? this.videoTrak : this.audioTrak + let stsc = util.findBox(trak, 'stsc')// chunk~samples + let stsz = util.findBox(trak, 'stsz')// sample-size + let stts = util.findBox(trak, 'stts')// sample-time + let stco = util.findBox(trak, 'stco')// chunk-offset + let ctts = util.findBox(trak, 'ctts')// offset-compositime + let mdatStart = this.mdatStart + let samples = [] + end = end !== undefined ? end : stsz.entries.length + if (start instanceof Array) { + start.forEach((item, idx) => { + samples.push({ + idx: item, + size: stsz.entries[item], + time: util.seekSampleTime(stts, ctts, item), + offset: util.seekSampleOffset(stsc, stco, stsz, item, mdatStart) + }) + }) + } else if (end !== 0) { + for (let i = start; i < end; i++) { + samples.push({ + idx: i, + size: stsz.entries[i], + time: util.seekSampleTime(stts, ctts, i), + offset: util.seekSampleOffset(stsc, stco, stsz, i, mdatStart) + }) + } + } else { + samples = { + idx: start, + size: stsz.entries[start], + time: util.seekSampleTime(stts, ctts, start), + offset: util.seekSampleOffset(stsc, stco, stsz, start, mdatStart) + } + } + return samples + } + + get videoFrames () { + if (this._videoFrames) { return this._videoFrames } + let videoTrak = this.videoTrak + let stss = util.findBox(videoTrak, 'stss') + let frames = this.getSamplesByOrders('video', stss.entries.map(item => item - 1)) + this._videoFrames = frames + return frames + } + + get audioFrames () { + if (this._audioFrames) { return this._audioFrames } + let videoScale = util.findBox(this.videoTrak, 'mdhd').timescale + let audioScale = util.findBox(this.audioTrak, 'mdhd').timescale + let audioStts = util.findBox(this.audioTrak, 'stts').entry + let videoFrames = this.videoFrames + let audioIndex = [] + audioIndex = videoFrames.map(item => { + return util.seekOrderSampleByTime(audioStts, audioScale, item.time.time / videoScale) + }) + this._audioFrames = audioIndex + return this._audioFrames + } + + resetMeta () { + let data = this.boxes + let arr = [] + let ftyp = data.find((item) => item.type === 'ftyp') + let moov = this.boxes.find(item => item.type === 'moov') + let mvhd = util.findBox(moov, 'mvhd') + ftyp.compatible_brands.push('iso5') + ftyp.size += 4 + arr.push(ftyp) + arr.push(moov) + let traks = util.findBox(moov, 'trak') + let total = 0 + let trackIDs = [] + traks.forEach((item, idx) => { + let tkhd = util.findBox(item, 'tkhd') + let mdia = util.findBox(item, 'mdia') + let minf = util.findBox(mdia, 'minf') + let stbl = util.findBox(minf, 'stbl') + let stts = util.findBox(stbl, 'stts') + let stsc = util.findBox(stbl, 'stsc') + let stsz = util.findBox(stbl, 'stsz') + let stco = util.findBox(stbl, 'stco') + let ctts = util.findBox(stbl, 'ctts') + let mdhd = util.findBox(mdia, 'mdhd') + let esds = util.findBox(stbl, 'esds') + if (esds) { + esds.subBox[0].esID = 0 + } + mdhd.duration = 0 + let count = 0 + trackIDs.push(tkhd.trackID) + count = stts.count * 8 + stsc.count * 12 + stsz.count * 4 + stco.count * 4 + if (ctts) { + count += ctts.entryCount * 8 + ctts.size -= ctts.entryCount * 8 + ctts.entryCount = 0 + ctts.entry = [] + } + total += count + stts.size -= stts.count * 8 + stts.count = 0 + stts.entry = [] + stsc.size -= stsc.count * 12 + stsc.count = 0 + stsc.entries = [] + stsz.size -= stsz.count * 4 + stsz.count = 0 + stsz.entries = [] + stco.size -= stco.count * 4 + stco.count = 0 + stco.entries = [] + stbl.size -= count + minf.size -= count + mdia.size -= count + item.size -= count; + ['stss', 'ctts'].forEach(sitem => { + stbl.subBox.every((itm, idx) => { + if (itm.type === sitem) { + stbl.size -= itm.size + minf.size -= itm.size + mdia.size -= itm.size + item.size -= itm.size + moov.size -= itm.size + stbl.subBox.splice(idx, 1) + return false + } else { + return true + } + }) + }) + }) + moov.subBox.forEach((item, idx) => { + if (item.type === 'udta') { + moov.size -= item.size + moov.subBox.splice(idx, 1) + } + }) + let mvex = new Mvex(mvhd.duration, trackIDs).pack() + moov.subBox.push(mvex) + moov.size -= total - mvex.size + return arr + } + + getVideoFragmentDuration () { + let timeScale = this.info.videoTimeScale + return this.videoFrames.map((item) => { + return { + idx: item.idx, + start: item.time.time / timeScale + } + }) + } +} + +export default MP4 diff --git a/packages/xgplayer-hls/src/media/mse.js b/packages/xgplayer-hls/src/media/mse.js new file mode 100644 index 00000000..99582b3a --- /dev/null +++ b/packages/xgplayer-hls/src/media/mse.js @@ -0,0 +1,78 @@ +import EventEmitter from 'event-emitter' + +class MSE { + constructor (codecs = 'video/mp4; codecs="avc1.64001E, mp4a.40.5"') { + let self = this + EventEmitter(this) + this.codecs = codecs + this.mediaSource = new window.MediaSource() + this.url = window.URL.createObjectURL(this.mediaSource) + this.queue = [] + + this.mediaSource.addEventListener('sourceopen', function () { + self.sourceBuffer = self.mediaSource.addSourceBuffer(self.codecs) + self.sourceBuffer.addEventListener('error', function (e) { + self.emit('error', { + type: 'sourceBuffer', + error: e + }) + }) + self.sourceBuffer.addEventListener('updateend', function (e) { + self.emit('updateend') + let buffer = self.queue.shift() + if (buffer) { + self.sourceBuffer.appendBuffer(buffer) + } + }) + self.emit('sourceopen') + self.sourceBuffer.addEventListener('error', function (e) { + self.emit('error', { + type: 'mediaSource', + error: e + }) + }) + }) + this.mediaSource.addEventListener('sourceclose', function () { + self.emit('sourceclose') + }) + } + + get state () { + return this.mediaSource.readyState + } + + get duration () { + return this.mediaSource.duration + } + + set duration (value) { + this.mediaSource.duration = value + } + + appendBuffer (buffer) { + let sourceBuffer = this.sourceBuffer + if (sourceBuffer.updating === false && this.state === 'open') { + sourceBuffer.appendBuffer(buffer) + return true + } else { + this.queue.push(buffer) + return false + } + } + + removeBuffer (start, end) { + this.sourceBuffer.remove(start, end) + } + + endOfStream () { + if (this.mediaSource.readyState === 'open') { + this.mediaSource.endOfStream() + } + } + + static isSupported (codecs) { + return window.MediaSource && window.MediaSource.isTypeSupported(codecs) + } +} + +export default MSE diff --git a/packages/xgplayer-hls/src/media/task.js b/packages/xgplayer-hls/src/media/task.js new file mode 100755 index 00000000..e4b54f8e --- /dev/null +++ b/packages/xgplayer-hls/src/media/task.js @@ -0,0 +1,81 @@ +class Task { + constructor (url, callback) { + this.url = url + this.on = false + if (Task.queue.some(item => item.url === url)) { + return + } + let xhr = new XMLHttpRequest() + xhr.target = this + xhr.responseType = 'arraybuffer' + xhr.open('get', url) + xhr.onload = function () { + if (xhr.status === 200 || xhr.status === 206) { + if (callback && callback instanceof Function) { + callback(xhr.response) + } + } + xhr.target.remove() + } + xhr.onerror = function () { + xhr.target.remove() + } + xhr.onabort = function () { + xhr.target.remove() + } + this.xhr = xhr + Task.queue.push(this) + this.update() + } + cancel () { + this.xhr.abort() + } + + remove () { + Task.queue.filter((item, idx) => { + if (item.url === this.url) { + Task.queue.splice(idx, 1) + return true + } else { + return false + } + }) + this.update() + } + + update () { + let Queue = Task.queue + let sended = Queue.filter((item) => item.on) + let wait = Queue.filter(item => !item.on) + let max = Task.limit - sended.length + wait.forEach((item, idx) => { + if (idx < max) { + item.run() + } + }) + } + + run () { + if (this.xhr.readyState === 1) { + this.on = true + this.xhr.send() + } else { + this.remove() + } + } + + static clear () { + Task.queue.forEach(item => { + if (item.on) { + item.cancel() + } + }) + Task.queue.length = 0 + } +} + +Task.queue = [] +Task.limit = 2 +window.Task = Task + +export default Task diff --git a/packages/xgplayer-hls/src/parse/box.js b/packages/xgplayer-hls/src/parse/box.js new file mode 100644 index 00000000..ceba7500 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box.js @@ -0,0 +1,65 @@ +import Stream from './stream' +class Box { + constructor () { + this.headSize = 8 + this.size = 0 + this.type = '' + this.subBox = [] + this.start = -1 + } + readHeader (stream) { + this.start = stream.position + this.size = stream.readUint32() + this.type = String.fromCharCode(stream.readUint8(), stream.readUint8(), stream.readUint8(), stream.readUint8()) + if (this.size === 1) { + this.size = stream.readUint64() + } else if (this.size === 0) { + if (this.type !== 'mdat') { + throw new Error('not supported') + } + } + if (this.type === 'uuid') { + let uuid = [] + for (let i = 0; i < 16; i++) { + uuid.push(stream.readUint8()) + } + } + } + readBody (stream) { + let end = this.size - stream.position + this.start + let type = this.type + this.data = stream.buffer.slice(stream.position, stream.position + end) + stream.position += this.data.byteLength + let parser + if (Box.containerBox.find(item => item === type)) { + parser = Box.containerParser + } else { + parser = Box[type] + } + if (parser && parser instanceof Function) { + parser.call(this) + } + } + read (stream) { + this.readHeader(stream) + this.readBody(stream) + } + + static containerParser () { + let stream = new Stream(this.data) + let size = stream.buffer.byteLength + let self = this + while (stream.position < size) { + let box = new Box() + box.readHeader(stream) + self.subBox.push(box) + box.readBody(stream) + } + delete self.data + stream = null + } +} + +Box.containerBox = ['moov', 'trak', 'edts', 'mdia', 'minf', 'dinf', 'stbl', 'mvex', 'moof', 'traf', 'mfra'] + +export default Box diff --git a/packages/xgplayer-hls/src/parse/box/MP4DecConfigDescrTag.js b/packages/xgplayer-hls/src/parse/box/MP4DecConfigDescrTag.js new file mode 100644 index 00000000..522e0834 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/MP4DecConfigDescrTag.js @@ -0,0 +1,25 @@ +import Box from '../box' +import Stream from '../stream' + +Box.MP4DecConfigDescrTag = function (stream) { + let box = new Box() + let size + box.type = stream.readUint8() + size = stream.readUint8() + if (size === 0x80) { + box.extend = true + stream.skip(2) + size = stream.readUint8() + 5 + } else { + size += 2 + } + box.size = size + box.typeID = stream.readUint8() + // 6 bits stream type,1 bit upstream flag,1 bit reserved flag + box.streamUint = stream.readUint8() + box.bufferSize = Stream.readByte(stream.dataview, 3) + box.maximum = stream.readUint32() + box.average = stream.readUint32() + box.subBox.push(Box.MP4DecSpecificDescrTag(stream)) + return box +} diff --git a/packages/xgplayer-hls/src/parse/box/MP4DecSpecificDescrTag.js b/packages/xgplayer-hls/src/parse/box/MP4DecSpecificDescrTag.js new file mode 100644 index 00000000..e613831b --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/MP4DecSpecificDescrTag.js @@ -0,0 +1,25 @@ +import Box from '../box' + +Box.MP4DecSpecificDescrTag = function (stream) { + let box = new Box() + let size, dataSize + box.type = stream.readUint8() + size = stream.readUint8() + if (size === 0x80) { + box.extend = true + stream.skip(2) + size = stream.readUint8() + 5 + dataSize = size - 5 + } else { + dataSize = size + size += 2 + } + box.size = size + let EScode = [] + for (let i = 0; i < dataSize; i++) { + EScode.push(Number(stream.readUint8()).toString(16).padStart(2, '0')) + } + box.EScode = EScode + delete box.subBox + return box +} diff --git a/packages/xgplayer-hls/src/parse/box/MP4ESDescrTag.js b/packages/xgplayer-hls/src/parse/box/MP4ESDescrTag.js new file mode 100644 index 00000000..1da370d0 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/MP4ESDescrTag.js @@ -0,0 +1,21 @@ +import Box from '../box' + +Box.MP4ESDescrTag = function (stream) { + let box = new Box() + let size + box.type = stream.readUint8() + size = stream.readUint8() + if (size === 0x80) { + box.extend = true + stream.skip(2) + size = stream.readUint8() + 5 + } else { + size += 2 + } + box.size = size + box.esID = stream.readUint16() + box.priority = stream.readUint8() + box.subBox.push(Box.MP4DecConfigDescrTag(stream)) + box.subBox.push(Box.SLConfigDescriptor(stream)) + return box +} diff --git a/packages/xgplayer-hls/src/parse/box/SLConfigDescriptor.js b/packages/xgplayer-hls/src/parse/box/SLConfigDescriptor.js new file mode 100644 index 00000000..6b7aaa34 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/SLConfigDescriptor.js @@ -0,0 +1,19 @@ +import Box from '../box' + +Box.SLConfigDescriptor = function (stream) { + let box = new Box() + let size + box.type = stream.readUint8() + size = stream.readUint8() + if (size === 0x80) { + box.extend = true + stream.skip(2) + size = stream.readUint8() + 5 + } else { + size += 2 + } + box.size = size + box.SL = stream.readUint8() + delete box.subBox + return box +} diff --git a/packages/xgplayer-hls/src/parse/box/avc1.js b/packages/xgplayer-hls/src/parse/box/avc1.js new file mode 100644 index 00000000..d9fa9ab6 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/avc1.js @@ -0,0 +1,30 @@ +import Box from '../box' +import Stream from '../stream' + +Box.avc1 = function () { + let stream = new Stream(this.data) + let self = this + stream.skip(6) + this.dataReferenceIndex = stream.readUint16() + stream.skip(16) + this.width = stream.readUint16() + this.height = stream.readUint16() + this.horizresolution = stream.readUint32() + this.vertresolution = stream.readUint32() + stream.skip(4) + this.frameCount = stream.readUint16() + stream.skip(1) + for (let i = 0; i < 31; i++) { + String.fromCharCode(stream.readUint8()) + } + this.depth = stream.readUint16() + stream.skip(2) + while (stream.position < stream.buffer.byteLength) { + let box = new Box() + box.readHeader(stream) + self.subBox.push(box) + box.readBody(stream) + } + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/avcC.js b/packages/xgplayer-hls/src/parse/box/avcC.js new file mode 100644 index 00000000..c6a85961 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/avcC.js @@ -0,0 +1,34 @@ +import Box from '../box' +import Stream from '../stream' +Box.avcC = function () { + let stream = new Stream(this.data) + this.configVersion = stream.readUint8() + this.profile = stream.readUint8() + this.profileCompatibility = stream.readUint8() + this.AVCLevelIndication = stream.readUint8() + this.lengthSizeMinusOne = (stream.readUint8() & 3) + 1 + this.numOfSequenceParameterSets = stream.readUint8() & 31 + let sequenceLength = stream.readUint16() + this.sequenceLength = sequenceLength + let sequence = [] + for (let i = 0; i < sequenceLength; i++) { + sequence.push(Number(stream.readUint8()).toString(16)) + } + this.ppsCount = stream.readUint8() + let ppsLength = stream.readUint16() + this.ppsLength = ppsLength + let pps = [] + for (let i = 0; i < ppsLength; i++) { + pps.push(Number(stream.readUint8()).toString(16)) + } + this.pps = pps + this.sequence = sequence + let last = []; let dataviewLength = stream.dataview.byteLength + while (stream.position < dataviewLength) { + last.push(stream.readUint8()) + } + this.last = last + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/btrt.js b/packages/xgplayer-hls/src/parse/box/btrt.js new file mode 100644 index 00000000..a6d43312 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/btrt.js @@ -0,0 +1,11 @@ +import Box from '../box' +import Stream from '../stream' +Box.btrt = function () { + let stream = new Stream(this.data) + this.bufferSizeDB = stream.readUint32() + this.maxBitrate = stream.readUint32() + this.avgBitrate = stream.readUint32() + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/co64.js b/packages/xgplayer-hls/src/parse/box/co64.js new file mode 100644 index 00000000..e367eef1 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/co64.js @@ -0,0 +1,17 @@ +import Box from '../box' +import Stream from '../stream' + +Box.co64 = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.count = stream.readUint32() + let entries = [] + this.entries = entries + for (let i = 0, count = this.count; i < count; i++) { + entries.push(stream.readUint64()) + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/ctts.js b/packages/xgplayer-hls/src/parse/box/ctts.js new file mode 100644 index 00000000..96b071d3 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/ctts.js @@ -0,0 +1,21 @@ +import Box from '../box' +import Stream from '../stream' + +Box.ctts = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + + this.entryCount = stream.readUint32() + let entry = [] + this.entry = entry + for (let i = 0, count = this.entryCount; i < count; i++) { + entry.push({ + count: stream.readUint32(), + offset: stream.readUint32() + }) + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/dref.js b/packages/xgplayer-hls/src/parse/box/dref.js new file mode 100644 index 00000000..5a545774 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/dref.js @@ -0,0 +1,19 @@ +import Box from '../box' +import Stream from '../stream' + +Box.dref = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + let entryCount = stream.readUint32() + this.entryCount = entryCount + let self = this + // 暂时不支持离散视频,视频的部分内容由url指定 + for (let i = 0; i < entryCount; i++) { + let box = new Box() + self.subBox.push(box) + box.read(stream) + } + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/elst.js b/packages/xgplayer-hls/src/parse/box/elst.js new file mode 100644 index 00000000..3b667d16 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/elst.js @@ -0,0 +1,27 @@ +import Box from '../box' +import Stream from '../stream' + +Box.elst = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + let entries = [] + let entry_count = stream.readUint32() + this.entries = entries + for (let i = 0; i < entry_count; i++) { + let entry = {} + entries.push(entry) + if (this.version === 1) { + entry.segment_duration = stream.readUint64() + entry.media_time = stream.readUint64() + } else { + entry.segment_duration = stream.readUint32() + entry.media_time = stream.readInt32() + } + entry.media_rate_integer = stream.readInt16() + entry.media_rate_fraction = stream.readInt16() + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/esds.js b/packages/xgplayer-hls/src/parse/box/esds.js new file mode 100644 index 00000000..5c9e4629 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/esds.js @@ -0,0 +1,12 @@ +import Box from '../box' +import Stream from '../stream' + +Box.esds = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + let box = Box.MP4ESDescrTag(stream) + this.subBox.push(box) + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/ftyp.js b/packages/xgplayer-hls/src/parse/box/ftyp.js new file mode 100644 index 00000000..c52167f5 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/ftyp.js @@ -0,0 +1,16 @@ +import Box from '../box' +import Stream from '../stream' + +Box.ftyp = function () { + let stream = new Stream(this.data) + this.major_brand = String.fromCharCode(stream.readUint8(), stream.readUint8(), stream.readUint8(), stream.readUint8()) + this.minor_version = stream.readUint32() + let compatibleBrands = [] + for (let i = 0, len = Math.floor((stream.buffer.byteLength - 8) / 4); i < len; i++) { + compatibleBrands.push(String.fromCharCode(stream.readUint8(), stream.readUint8(), stream.readUint8(), stream.readUint8())) + } + this.compatible_brands = compatibleBrands + stream = null + delete this.subBox + delete this.data +} diff --git a/packages/xgplayer-hls/src/parse/box/hdlr.js b/packages/xgplayer-hls/src/parse/box/hdlr.js new file mode 100644 index 00000000..34231063 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/hdlr.js @@ -0,0 +1,19 @@ +import Box from '../box' +import Stream from '../stream' + +Box.hdlr = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + stream.skip(4) + this.handleType = `${String.fromCharCode(stream.readUint8())}${String.fromCharCode(stream.readUint8())}${String.fromCharCode(stream.readUint8())}${String.fromCharCode(stream.readUint8())}` + stream.skip(12) + let name = [] + while (stream.position < this.size - 8) { + name.push(String.fromCharCode(stream.readUint8())) + } + this.name = name.join('') + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/hmhd.js b/packages/xgplayer-hls/src/parse/box/hmhd.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-hls/src/parse/box/iods.js b/packages/xgplayer-hls/src/parse/box/iods.js new file mode 100644 index 00000000..ca365e58 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/iods.js @@ -0,0 +1,16 @@ +import Box from '../box' +import Stream from '../stream' +Box.iods = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + let content = [] + let length = stream.buffer.byteLength + while (stream.position < length) { + content.push(stream.readUint8()) + } + this.content = content + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/mdat.js b/packages/xgplayer-hls/src/parse/box/mdat.js new file mode 100644 index 00000000..69ca79e3 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/mdat.js @@ -0,0 +1,5 @@ +import Box from '../box' + +Box.mdat = function () { + delete this.subBox +} diff --git a/packages/xgplayer-hls/src/parse/box/mdhd.js b/packages/xgplayer-hls/src/parse/box/mdhd.js new file mode 100644 index 00000000..44d9d405 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/mdhd.js @@ -0,0 +1,29 @@ +import Box from '../box' +import Stream from '../stream' +import UTC from '../date' + +Box.mdhd = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + if (this.version === 1) { + this.create = stream.readUint64() + this.modify = stream.readUint64() + this.createTime = new UTC().setTime(this.create * 1000) + this.modifyTime = new UTC().setTime(this.modify * 1000) + this.timescale = stream.readUint32() + this.duration = stream.readUint64() + } else { + this.create = stream.readUint32() + this.modify = stream.readUint32() + this.createTime = new UTC().setTime(this.create * 1000) + this.modifyTime = new UTC().setTime(this.modify * 1000) + this.timescale = stream.readUint32() + this.duration = stream.readUint32() + } + this.language = stream.readUint16() + stream.readUint16() + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/mfhd.js b/packages/xgplayer-hls/src/parse/box/mfhd.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-hls/src/parse/box/mp4a.js b/packages/xgplayer-hls/src/parse/box/mp4a.js new file mode 100644 index 00000000..9635197f --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/mp4a.js @@ -0,0 +1,19 @@ +import Box from '../box' +import Stream from '../stream' + +Box.mp4a = function () { + let stream = new Stream(this.data) + stream.skip(6) + this.dataReferenceIndex = stream.readUint16() + stream.skip(8) + this.channelCount = stream.readUint16() + this.sampleSize = stream.readUint16() + stream.skip(4) + this.sampleRate = stream.readUint32() + let box = new Box() + box.readHeader(stream) + this.subBox.push(box) + box.readBody(stream) + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/mvhd.js b/packages/xgplayer-hls/src/parse/box/mvhd.js new file mode 100644 index 00000000..89566f24 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/mvhd.js @@ -0,0 +1,31 @@ +import Box from '../box' +import Stream from '../stream' +import UTC from '../date' + +Box.mvhd = function () { + let stream = new Stream(this.data) + + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.create = stream.readUint32() + this.modify = stream.readUint32() + this.createTime = new UTC().setTime(this.create * 1000) + this.modifyTime = new UTC().setTime(this.modify * 1000) + this.timeScale = stream.readUint32() + this.duration = stream.readUint32() + this.rate = stream.readUint16() + '.' + stream.readUint16() + this.volume = stream.readUint8() + '.' + stream.readUint8() + // 越过保留的10字节 + Stream.readByte(stream.dataview, 8) + Stream.readByte(stream.dataview, 2) + // 视频转换矩阵 + let matrix = [] + for (let i = 0; i < 9; i++) { + matrix.push(stream.readUint16() + '.' + stream.readUint16()) + } + this.matrix = matrix + Stream.readByte(stream.dataview, 24) + this.nextTrackID = stream.readUint32() + delete this.subBox + delete this.data +} diff --git a/packages/xgplayer-hls/src/parse/box/nmhd.js b/packages/xgplayer-hls/src/parse/box/nmhd.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-hls/src/parse/box/pasp.js b/packages/xgplayer-hls/src/parse/box/pasp.js new file mode 100644 index 00000000..a0068086 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/pasp.js @@ -0,0 +1,9 @@ +import Box from '../box' +import Stream from '../stream' +Box.pasp = function () { + let stream = new Stream(this.data) + this.content = stream.buffer.slice(0, this.size - 8) + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/sbgp.js b/packages/xgplayer-hls/src/parse/box/sbgp.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-hls/src/parse/box/sdtp.js b/packages/xgplayer-hls/src/parse/box/sdtp.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-hls/src/parse/box/smhd.js b/packages/xgplayer-hls/src/parse/box/smhd.js new file mode 100644 index 00000000..97aab511 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/smhd.js @@ -0,0 +1,12 @@ +import Box from '../box' +import Stream from '../stream' + +Box.smhd = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.balance = stream.readInt8() + '.' + stream.readInt8() + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/stco.js b/packages/xgplayer-hls/src/parse/box/stco.js new file mode 100644 index 00000000..2a32414f --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/stco.js @@ -0,0 +1,17 @@ +import Box from '../box' +import Stream from '../stream' + +Box.stco = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.count = stream.readUint32() + let entries = [] + this.entries = entries + for (let i = 0, count = this.count; i < count; i++) { + entries.push(stream.readUint32()) + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/stsc.js b/packages/xgplayer-hls/src/parse/box/stsc.js new file mode 100644 index 00000000..7ce08bdf --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/stsc.js @@ -0,0 +1,36 @@ +import Box from '../box' +import Stream from '../stream' + +Box.stsc = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.count = stream.readUint32() + let entries = [] + this.entries = entries + for (let i = 0, count = this.count; i < count; i++) { + entries.push({ + first_chunk: stream.readUint32(), + samples_per_chunk: stream.readUint32(), + sample_desc_index: stream.readUint32() + }) + } + for (let i = 0, count = this.count, entry, preEntry; i < count - 1; i++) { + entry = entries[i] + preEntry = entries[i - 1] + entry.chunk_count = entries[i + 1].first_chunk - entry.first_chunk + entry.first_sample = i === 0 ? 1 : preEntry.first_sample + preEntry.chunk_count * preEntry.samples_per_chunk + } + if (this.count === 1) { + let entry = entries[0] + entry.first_sample = 1 + entry.chunk_count = 0 + } else if (this.count > 1) { + let last = entries[this.count - 1]; let pre = entries[this.count - 2] + last.first_sample = pre.first_sample + pre.chunk_count * pre.samples_per_chunk + last.chunk_count = 0 + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/stsd.js b/packages/xgplayer-hls/src/parse/box/stsd.js new file mode 100644 index 00000000..793dcbf8 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/stsd.js @@ -0,0 +1,14 @@ +import Box from '../box' +import Stream from '../stream' +Box.stsd = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.entryCount = stream.readUint32() + let box = new Box() + box.readHeader(stream) + this.subBox.push(box) + box.readBody(stream) + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/stsh.js b/packages/xgplayer-hls/src/parse/box/stsh.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-hls/src/parse/box/stss.js b/packages/xgplayer-hls/src/parse/box/stss.js new file mode 100644 index 00000000..8bd045a3 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/stss.js @@ -0,0 +1,17 @@ +import Box from '../box' +import Stream from '../stream' + +Box.stss = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.count = stream.readUint32() + let entries = [] + this.entries = entries + for (let i = 0, count = this.count; i < count; i++) { + entries.push(stream.readUint32()) + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/stsz.js b/packages/xgplayer-hls/src/parse/box/stsz.js new file mode 100644 index 00000000..6d30f7b2 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/stsz.js @@ -0,0 +1,18 @@ +import Box from '../box' +import Stream from '../stream' + +Box.stsz = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.sampleSize = stream.readUint32() + this.count = stream.readUint32() + let entries = [] + this.entries = entries + for (let i = 0, count = this.count; i < count; i++) { + entries.push(stream.readUint32()) + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/stts.js b/packages/xgplayer-hls/src/parse/box/stts.js new file mode 100644 index 00000000..ea638957 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/stts.js @@ -0,0 +1,20 @@ +import Box from '../box' +import Stream from '../stream' + +Box.stts = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.count = stream.readUint32() + let entry = [] + for (let i = 0, count = this.count; i < count; i++) { + entry.push({ + sampleCount: stream.readUint32(), + sampleDuration: stream.readUint32() + }) + } + this.entry = entry + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/stz2.js b/packages/xgplayer-hls/src/parse/box/stz2.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-hls/src/parse/box/tfhd.js b/packages/xgplayer-hls/src/parse/box/tfhd.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-hls/src/parse/box/tkhd.js b/packages/xgplayer-hls/src/parse/box/tkhd.js new file mode 100644 index 00000000..8ff2e512 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/tkhd.js @@ -0,0 +1,42 @@ +import Box from '../box' +import Stream from '../stream' +import UTC from '../date' + +Box.tkhd = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3, 0) + if (this.version === 1) { + this.create = stream.readUint64() + this.modify = stream.readUint64() + this.createTime = new UTC().setTime(this.create * 1000) + this.modifyTime = new UTC().setTime(this.modify * 1000) + this.trackID = stream.readUint32() + this.reserverd = stream.readUint32() + this.duration = stream.readUint64() + } else { + this.create = stream.readUint32() + this.modify = stream.readUint32() + this.createTime = new UTC().setTime(this.create * 1000) + this.modifyTime = new UTC().setTime(this.modify * 1000) + this.trackID = stream.readUint32() + this.reserverd = stream.readUint32() + this.duration = stream.readUint32() + } + stream.readUint64() + this.layer = stream.readInt16() + this.alternate_group = stream.readInt16() + this.volume = stream.readInt16() >> 8 + stream.readUint16() + // 视频转换矩阵 + let matrix = [] + for (let i = 0; i < 9; i++) { + matrix.push(stream.readUint16() + '.' + stream.readUint16()) + } + this.matrix = matrix + this.width = stream.readUint16() + '.' + stream.readUint16() + this.height = stream.readUint16() + '.' + stream.readUint16() + delete this.data + delete this.subBox + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/traf.js b/packages/xgplayer-hls/src/parse/box/traf.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-hls/src/parse/box/trun.js b/packages/xgplayer-hls/src/parse/box/trun.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-hls/src/parse/box/udta.js b/packages/xgplayer-hls/src/parse/box/udta.js new file mode 100644 index 00000000..7f7655b0 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/udta.js @@ -0,0 +1,4 @@ +import Box from '../box' +Box.udta = function () { + delete this.subBox +} diff --git a/packages/xgplayer-hls/src/parse/box/url.js b/packages/xgplayer-hls/src/parse/box/url.js new file mode 100644 index 00000000..78008a3b --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/url.js @@ -0,0 +1,15 @@ +import Box from '../box' +import Stream from '../stream' +Box['url '] = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = [stream.readUint8(), stream.readUint8(), stream.readUint8()] + let location = []; let length = stream.buffer.byteLength + while (stream.position < length) { + location.push(stream.readUint8()) + } + this.location = location + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/box/vmhd.js b/packages/xgplayer-hls/src/parse/box/vmhd.js new file mode 100644 index 00000000..b85aa2f0 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/box/vmhd.js @@ -0,0 +1,13 @@ +import Box from '../box' +import Stream from '../stream' + +Box.vmhd = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = [stream.readUint8(), stream.readUint8(), stream.readUint8()] + this.graphicsmode = stream.readUint16() + this.opcolor = [stream.readUint16(), stream.readUint16(), stream.readUint16()] + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-hls/src/parse/date.js b/packages/xgplayer-hls/src/parse/date.js new file mode 100644 index 00000000..883bd53d --- /dev/null +++ b/packages/xgplayer-hls/src/parse/date.js @@ -0,0 +1,18 @@ +class UTC { + constructor () { + let time = new Date() + time.setFullYear(1904) + time.setMonth(0) + time.setDate(1) + time.setHours(0) + time.setMinutes(0) + time.setSeconds(0) + this.time = time + } + setTime (value) { + this.time.setTime(this.time.getTime() + value * 1) + return this.time.toLocaleString() + } +} + +export default UTC diff --git a/packages/xgplayer-hls/src/parse/index.js b/packages/xgplayer-hls/src/parse/index.js new file mode 100644 index 00000000..27685a2d --- /dev/null +++ b/packages/xgplayer-hls/src/parse/index.js @@ -0,0 +1,47 @@ +import Box from './box' +import Concat from 'concat-typed-array' +import Stream from './stream' + +// 引入整个目录 +var context = require.context('./box', true, /\.js$/) +context.keys().forEach(function (key) { + context(key) +}) + +class Parse { + constructor (buffer) { + this.buffer = null + this.boxes = [] + this.nextBox = null + this.start = 0 + let self = this + if (self.buffer) { + Concat(Uint8Array, self.buffer, buffer) + } else { + self.buffer = buffer + } + let bufferLength = buffer.byteLength + buffer.position = 0 + let stream = new Stream(buffer) + while (bufferLength - stream.position >= 8) { + let box = new Box() + box.readHeader(stream) + if (box.size - 8 <= (bufferLength - stream.position)) { + box.readBody(stream) + self.boxes.push(box) + } else { + if (box.type === 'mdat') { + box.readBody(stream) + self.boxes.push(box) + } else { + self.nextBox = box + stream.position -= 8 + break + } + } + } + self.buffer = new Uint8Array(self.buffer.slice(stream.position)) + } +} + +export default Parse diff --git a/packages/xgplayer-hls/src/parse/stream.js b/packages/xgplayer-hls/src/parse/stream.js new file mode 100644 index 00000000..e46e7eb1 --- /dev/null +++ b/packages/xgplayer-hls/src/parse/stream.js @@ -0,0 +1,112 @@ +class Stream { + constructor (buffer) { + if (buffer instanceof ArrayBuffer) { + this.buffer = buffer + this.dataview = new DataView(buffer) + this.dataview.position = 0 + } else { + throw new Error('data is invalid') + } + } + + set position (value) { + this.dataview.position = value + } + + get position () { + return this.dataview.position + } + + skip (count) { + let loop = Math.floor(count / 4) + let last = count % 4 + for (let i = 0; i < loop; i++) { + Stream.readByte(this.dataview, 4) + } + if (last > 0) { + Stream.readByte(this.dataview, last) + } + } + + /** + * [readByte 从DataView中读取数据] + * @param {DataView} buffer [DataView实例] + * @param {Number} size [读取字节数] + * @return {Number} [整数] + */ + static readByte (buffer, size, sign) { + let res + switch (size) { + case 1: + if (sign) { + res = buffer.getInt8(buffer.position) + } else { + res = buffer.getUint8(buffer.position) + } + break + case 2: + if (sign) { + res = buffer.getInt16(buffer.position) + } else { + res = buffer.getUint16(buffer.position) + } + break + case 3: + if (sign) { + throw 'not supported for readByte 3' + } else { + res = buffer.getUint8(buffer.position) << 16 + res |= buffer.getUint8(buffer.position + 1) << 8 + res |= buffer.getUint8(buffer.position + 2) + } + break + case 4: + if (sign) { + res = buffer.getInt32(buffer.position) + } else { + res = buffer.getUint32(buffer.position) + } + break + case 8: + if (sign) { + throw 'not supported for readBody 8' + } else { + res = buffer.getUint32(buffer.position) << 32 + res |= buffer.getUint32(buffer.position + 4) + } + break + default: + res = '' + } + buffer.position += size + return res + } + + readUint8 () { + return Stream.readByte(this.dataview, 1) + } + + readUint16 () { + return Stream.readByte(this.dataview, 2) + } + + readUint32 () { + return Stream.readByte(this.dataview, 4) + } + + readUint64 () { + return Stream.readByte(this.dataview, 8) + } + + readInt8 () { + return Stream.readByte(this.dataview, 1, true) + } + readInt16 () { + return Stream.readByte(this.dataview, 2, true) + } + readInt32 () { + return Stream.readByte(this.dataview, 4, true) + } +} + +export default Stream diff --git a/packages/xgplayer-hls/src/ts/expGolomb.js b/packages/xgplayer-hls/src/ts/expGolomb.js new file mode 100644 index 00000000..7287904f --- /dev/null +++ b/packages/xgplayer-hls/src/ts/expGolomb.js @@ -0,0 +1,328 @@ +class ExpGolomb { + constructor (data) { + this.data = data; + // the number of bytes left to examine in this.data + this.bytesAvailable = data.byteLength; + // the current word being examined + this.word = 0; // :uint + // the number of bits left to examine in the current word + this.bitsAvailable = 0; // :uint + } + // ():void + loadWord () { + var data = this.data, + bytesAvailable = this.bytesAvailable, + position = data.byteLength - bytesAvailable, + workingBytes = new Uint8Array(4), + availableBytes = Math.min(4, bytesAvailable); + if (availableBytes === 0) { + throw new Error('no bytes available'); + } + workingBytes.set(data.subarray(position, position + availableBytes)); + this.word = new DataView(workingBytes.buffer).getUint32(0); + // track the amount of this.data that has been processed + this.bitsAvailable = availableBytes * 8; + this.bytesAvailable -= availableBytes; + } + + // (count:int):void + skipBits (count) { + var skipBytes; // :int + if (this.bitsAvailable > count) { + this.word <<= count; + this.bitsAvailable -= count; + } else { + count -= this.bitsAvailable; + skipBytes = count >> 3; + count -= (skipBytes >> 3); + this.bytesAvailable -= skipBytes; + this.loadWord(); + this.word <<= count; + this.bitsAvailable -= count; + } + } + + // (size:int):uint + readBits (size) { + var bits = Math.min(this.bitsAvailable, size), // :uint + valu = this.word >>> (32 - bits); // :uint + if (size > 32) { + window.console.error('Cannot read more than 32 bits at a time'); + } + this.bitsAvailable -= bits; + if (this.bitsAvailable > 0) { + this.word <<= bits; + } else if (this.bytesAvailable > 0) { + this.loadWord(); + } + bits = size - bits; + if (bits > 0 && this.bitsAvailable) { + return valu << bits | this.readBits(bits); + } else { + return valu; + } + } + + // ():uint + skipLZ () { + var leadingZeroCount; // :uint + for (leadingZeroCount = 0; leadingZeroCount < this.bitsAvailable; ++leadingZeroCount) { + if (0 !== (this.word & (0x80000000 >>> leadingZeroCount))) { + // the first bit of working word is 1 + this.word <<= leadingZeroCount; + this.bitsAvailable -= leadingZeroCount; + return leadingZeroCount; + } + } + // we exhausted word and still have not found a 1 + this.loadWord(); + return leadingZeroCount + this.skipLZ(); + } + + // ():void + skipUEG () { + this.skipBits(1 + this.skipLZ()); + } + + // ():void + skipEG () { + this.skipBits(1 + this.skipLZ()); + } + + // ():uint + readUEG () { + var clz = this.skipLZ(); // :uint + return this.readBits(clz + 1) - 1; + } + + // ():int + readEG () { + var valu = this.readUEG(); // :int + if (0x01 & valu) { + // the number is odd if the low order bit is set + return (1 + valu) >>> 1; // add 1 to make it even, and divide by 2 + } else { + return -1 * (valu >>> 1); // divide by two then make it negative + } + } + + // Some convenience functions + // :Boolean + readBoolean () { + return 1 === this.readBits(1); + } + + // ():int + readUByte () { + return this.readBits(8); + } + + // ():int + readUShort () { + return this.readBits(16); + } + // ():int + readUInt () { + return this.readBits(32); + } + + /** +* Advance the ExpGolomb decoder past a scaling list. The scaling +* list is optionally transmitted as part of a sequence parameter +* set and is not relevant to transmuxing. +* @param count {number} the number of entries in this scaling list +* @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1 +*/ + skipScalingList (count) { + var lastScale = 8, + nextScale = 8, + j, + deltaScale; + for (j = 0; j < count; j++) { + if (nextScale !== 0) { + deltaScale = this.readEG(); + nextScale = (lastScale + deltaScale + 256) % 256; + } + lastScale = (nextScale === 0) + ? lastScale + : nextScale; + } + } + + /** +* Read a sequence parameter set and return some interesting video +* properties. A sequence parameter set is the H264 metadata that +* describes the properties of upcoming video frames. +* @param data {Uint8Array} the bytes of a sequence parameter set +* @return {object} an object with configuration parsed from the +* sequence parameter set, including the dimensions of the +* associated video frames. +*/ + readSPS () { + var frameCropLeftOffset = 0, + frameCropRightOffset = 0, + frameCropTopOffset = 0, + frameCropBottomOffset = 0, + profileIdc, + profileCompat, + levelIdc, + numRefFramesInPicOrderCntCycle, + picWidthInMbsMinus1, + picHeightInMapUnitsMinus1, + frameMbsOnlyFlag, + scalingListCount, + i, + readUByte = this.readUByte.bind(this), + readBits = this.readBits.bind(this), + readUEG = this.readUEG.bind(this), + readBoolean = this.readBoolean.bind(this), + skipBits = this.skipBits.bind(this), + skipEG = this.skipEG.bind(this), + skipUEG = this.skipUEG.bind(this), + skipScalingList = this.skipScalingList.bind(this); + + readUByte(); + profileIdc = readUByte(); // profile_idc + profileCompat = readBits(5); // constraint_set[0-4]_flag, u(5) + skipBits(3); // reserved_zero_3bits u(3), + levelIdc = readUByte(); // level_idc u(8) + skipUEG(); // seq_parameter_set_id + // some profiles have more optional data we don't need + if (profileIdc === 100 || profileIdc === 110 || profileIdc === 122 || profileIdc === 244 || profileIdc === 44 || profileIdc === 83 || profileIdc === 86 || profileIdc === 118 || profileIdc === 128) { + var chromaFormatIdc = readUEG(); + if (chromaFormatIdc === 3) { + skipBits(1); // separate_colour_plane_flag + } + skipUEG(); // bit_depth_luma_minus8 + skipUEG(); // bit_depth_chroma_minus8 + skipBits(1); // qpprime_y_zero_transform_bypass_flag + if (readBoolean()) { // seq_scaling_matrix_present_flag + scalingListCount = (chromaFormatIdc !== 3) + ? 8 + : 12; + for (i = 0; i < scalingListCount; i++) { + if (readBoolean()) { // seq_scaling_list_present_flag[ i ] + if (i < 6) { + skipScalingList(16); + } else { + skipScalingList(64); + } + } + } + } + } + skipUEG(); // log2_max_frame_num_minus4 + var picOrderCntType = readUEG(); + if (picOrderCntType === 0) { + readUEG(); // log2_max_pic_order_cnt_lsb_minus4 + } else if (picOrderCntType === 1) { + skipBits(1); // delta_pic_order_always_zero_flag + skipEG(); // offset_for_non_ref_pic + skipEG(); // offset_for_top_to_bottom_field + numRefFramesInPicOrderCntCycle = readUEG(); + for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) { + skipEG(); // offset_for_ref_frame[ i ] + } + } + skipUEG(); // max_num_ref_frames + skipBits(1); // gaps_in_frame_num_value_allowed_flag + picWidthInMbsMinus1 = readUEG(); + picHeightInMapUnitsMinus1 = readUEG(); + frameMbsOnlyFlag = readBits(1); + if (frameMbsOnlyFlag === 0) { + skipBits(1); // mb_adaptive_frame_field_flag + } + skipBits(1); // direct_8x8_inference_flag + if (readBoolean()) { // frame_cropping_flag + frameCropLeftOffset = readUEG(); + frameCropRightOffset = readUEG(); + frameCropTopOffset = readUEG(); + frameCropBottomOffset = readUEG(); + } + let pixelRatio = [1, 1]; + if (readBoolean()) { + // vui_parameters_present_flag + if (readBoolean()) { + // aspect_ratio_info_present_flag + const aspectRatioIdc = readUByte(); + switch (aspectRatioIdc) { + case 1: + pixelRatio = [1, 1]; + break; + case 2: + pixelRatio = [12, 11]; + break; + case 3: + pixelRatio = [10, 11]; + break; + case 4: + pixelRatio = [16, 11]; + break; + case 5: + pixelRatio = [40, 33]; + break; + case 6: + pixelRatio = [24, 11]; + break; + case 7: + pixelRatio = [20, 11]; + break; + case 8: + pixelRatio = [32, 11]; + break; + case 9: + pixelRatio = [80, 33]; + break; + case 10: + pixelRatio = [18, 11]; + break; + case 11: + pixelRatio = [15, 11]; + break; + case 12: + pixelRatio = [64, 33]; + break; + case 13: + pixelRatio = [160, 99]; + break; + case 14: + pixelRatio = [4, 3]; + break; + case 15: + pixelRatio = [3, 2]; + break; + case 16: + pixelRatio = [2, 1]; + break; + case 255: + { + pixelRatio = [ + readUByte() << 8 | readUByte(), + readUByte() << 8 | readUByte(), + ]; + break; + } + } + } + } + return { + width: Math.ceil((((picWidthInMbsMinus1 + 1) * 16) - frameCropLeftOffset * 2 - frameCropRightOffset * 2)), + height: ((2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16) - (( + frameMbsOnlyFlag + ? 2 + : 4) * (frameCropTopOffset + frameCropBottomOffset)), + pixelRatio: pixelRatio, + }; + } + + readSliceType () { + // skip NALu type + this.readUByte(); + // discard first_mb_in_slice + this.readUEG(); + // return slice_type + return this.readUEG(); + } +} + +export default ExpGolomb; diff --git a/packages/xgplayer-hls/src/ts/m3u8.js b/packages/xgplayer-hls/src/ts/m3u8.js new file mode 100644 index 00000000..80070b2e --- /dev/null +++ b/packages/xgplayer-hls/src/ts/m3u8.js @@ -0,0 +1,187 @@ +import EventEmitter from 'event-emitter'; +import XHR from '../util/xhr'; + +class M3U8 { + constructor (url) { + this.url = url; + this.segments = []; + this.retryMax = 10; + this.retry = 0; + this.type = 'live'; + this.isEnd = false; + this.timer = null; + this.rangeDuration = 2000; + this.duration = 0; + this.init(url); + EventEmitter(this); + } + fetch (url) { + let meta = {TYPE: 'LIVE', ENDLIST: ''}, segments = []; + return new Promise((resolve, reject)=>{ + new XHR({type: '', url}).then((res) => { + let ctx = res.responseText; + if (ctx) { + const metaCtx = ctx.substring(0, ctx.indexOf('#EXTINF')); + const endList = ctx.substring(ctx.lastIndexOf('#EXTINF')); + const Tag = M3U8.Tag; + const EXTINFItem = new RegExp(Tag.EXTINF.source); + Object.keys(Tag).forEach((key) => { + if (key !== 'EXTINF' && (Tag[key].test(metaCtx) || Tag[key].test(endList))) { + meta[key] = RegExp.$2 ? [RegExp.$1, RegExp.$2] : RegExp.$1 || true; + } + }); + ctx.match(Tag.EXTINF).forEach((item, idx) => { + if (EXTINFItem.test(item)) { + let time = RegExp.$1 * 1, title = RegExp.$2, _url = M3U8.resolve(url, title); + segments.push({ + idx, + duration: time, + title: title, + downloaded: false, + url: _url, + }); + } + }); + if (meta['SEQUENCE'] * 1 === 0 && meta['ENDLIST']) { + meta.TYPE = 'VOD'; + } + resolve({meta, segments}); + } else { + reject(); + } + }).catch((err) => { + reject(err); + }); + }); + } + init (url) { + let self = this, segments = self.segments; + this.fetch(url).then((res)=>{ + self.type = res.meta.TYPE.toLocaleLowerCase(); + self.isEnd = res.meta.ENDLIST; + res.segments.forEach(item=>{ + segments.push(item); + }); + self.emit('ready'); + }, err=>{ + segments.length = 0; + self.retry++; + if (self.retry < self.retryMax) { + self.init(url); + } + }); + } + seek (time) { + let segments = this.segments, + r; + if (this.type === 'vod' && time !== undefined) { + if (segments[0].start === undefined) { + let start = 0; + for (let i = 0, len = segments.length, segment; i < len; i++) { + segment = segments[i]; + segment.start = start; + start += segment.duration; + segment.end = start; + } + } + r = segments.filter((item) => { + return item.start <= time && time < item.end && !item.downloaded; + }); + } else { + r = segments.filter(item => !item.downloaded); + if (this.type === 'live' && segments.filter(item => !item.downloaded).length < 3) { + this.update(1); + } + } + return r; + } + reset () { + this.segments.length = 0; + this.isEnd = false; + this.type = 'live'; + if (this.timer) { + clearInterval(this.timer); + this.timer = null; + } + this.init(this.url); + } + update (rightnow) { + let self = this; + let url = self.url; + let segments = self.segments; + if (self.timer) { + clearTimeout(self.timer); + } + self.timer = setTimeout(function () { + let count = 0; + self.fetch(url).then(res => { + res.segments.forEach(item=>{ + if (!segments.some(url=>item.url === url.url)) { + count++; + segments.push(item); + } + }); + if (count <= 0) { + self.update(); + } + }, err=>{ + self.retry++; + if (self.retry < self.retryMax) { + self.update(); + } else { + self.emit('end'); + } + }); + }, rightnow ? 0 : self.rangeDuration); + } + static resolve (base, url) { + let result = []; + let a = document.createElement('a'); + a.href = base; + let b = url; + let a_arr = a.pathname.replace(/^\/+/, '').split('/'); + let b_arr = b.split('/'); + a_arr.pop(); + let find = () => { + switch (b_arr[0]) { + case '': + result = b_arr.slice(1); + break; + case '.': + result = a_arr.concat(b_arr.slice(1)); + break; + case '..': + b_arr.shift(); + if (a_arr.length) { + a_arr.pop(); + find(); + } else { + throw 'path in invalid'; + } + break; + default: + result = a_arr.concat(b_arr); + } + }; + find(); + if (result.length) { + result = a.protocol + '//' + a.host + '/' + result.join('/'); + } else { + result = b.href; + } + return result; + } +} + +M3U8.Tag = { + EXTM3U: /^#EXTM3U/, + TYPE: /#EXT-X-PLAYLIST-TYPE:(\w+)/, + EXTINF: /#EXTINF:(\d+\.?\d*)(?:,(?:[^\r|\n]*)(?:\r|\n)*)(.*(?!#))/g, + DURATION: /#EXT-X-TARGETDURATION:(\d+\.?\d*)/, + SEQUENCE: /#EXT-X-MEDIA-SEQUENCE:(\d+)/, + ENDLIST: /#EXT-X-ENDLIST/, + VERSION: /#EXT-X-VERSION:(\d+)/, + STREAM: /#EXT-X-STREAM-INF:(\w+=\w+)+/, +}; + +export default M3U8; diff --git a/packages/xgplayer-hls/src/ts/parser.js b/packages/xgplayer-hls/src/ts/parser.js new file mode 100644 index 00000000..7fcb7e7d --- /dev/null +++ b/packages/xgplayer-hls/src/ts/parser.js @@ -0,0 +1,63 @@ +import TS from './ts'; +class Parser { + constructor (ctx) { + this.buffer = ctx; + this.ts = []; + let count = 0, length = this.buffer.byteLength; + while (count < length) { + this.ts.push(new TS(this.buffer.slice(count, count + 188), count / 188)); + count += 188; + } + delete this.buffer; + } + get pat () { + return this.ts.filter((item) => item.header.pid === 0); + } + + get pmt () { + let pat = this.pat, list = []; + pat.forEach(item=>{ + item.body.list.filter(sub=>{ + list.push(sub.pid); + }); + }); + return this.ts.filter((item) => list.some(b=>b === item.header.pid)); + } + + get pes () { + let pmt = this.pmt, pid = [], pes = []; + pmt.forEach(item=>{ + pid = pid.concat(item.body.list.map(b=>{ return b.pid; })); + }); + let ts = this.ts, length = ts.length, cur, videoGroup = [], audioGroup = []; + for (var i = 0; i < length; i++) { + cur = ts[i]; + if (pid.indexOf(cur.header.pid) > -1) { + if (cur.body.type === 'video') { + if (cur.header.payload === 1) { + videoGroup = []; + videoGroup.push(cur); + pes.push(videoGroup); + } else if (videoGroup.length === 0) { + pes.push([cur]); + } else { + videoGroup.push(cur); + } + + } else if (cur.body.type === 'audio') { + if (cur.header.payload === 1) { + audioGroup = []; + audioGroup.push(cur); + pes.push(audioGroup); + } else if (audioGroup.length === 0) { + pes.push([cur]); + } else { + audioGroup.push(cur); + } + } + } + } + return pes; + } +} +export default Parser; diff --git a/packages/xgplayer-hls/src/ts/stream.js b/packages/xgplayer-hls/src/ts/stream.js new file mode 100644 index 00000000..ca0c06ef --- /dev/null +++ b/packages/xgplayer-hls/src/ts/stream.js @@ -0,0 +1,129 @@ +class Stream { + constructor (buffer) { + if (buffer instanceof ArrayBuffer) { + this.buffer = buffer; + this.dataview = new DataView(buffer); + this.dataview.position = 0; + } else { + throw new Error('data is invalid'); + } + } + get length () { + return this.buffer.byteLength; + } + set position (value) { + this.dataview.position = value; + } + + get position () { + return this.dataview.position; + } + back (count) { + this.position -= count; + } + skip (count) { + let loop = Math.floor(count / 4); + let last = count % 4; + for (let i = 0; i < loop; i++) { + Stream.readByte(this.dataview, 4); + } + if (last > 0) { + Stream.readByte(this.dataview, last); + } + } + + /** + * [readByte 从DataView中读取数据] + * @param {DataView} buffer [DataView实例] + * @param {Number} size [读取字节数] + * @return {Number} [整数] + */ + static readByte (buffer, size, sign) { + let res; + switch (size) { + case 1: + if (sign) { + res = buffer.getInt8(buffer.position); + } else { + res = buffer.getUint8(buffer.position); + } + break; + case 2: + if (sign) { + res = buffer.getInt16(buffer.position); + } else { + res = buffer.getUint16(buffer.position); + } + break; + case 3: + if (sign) { + throw 'not supported for readByte 3'; + } else { + res = buffer.getUint8(buffer.position) << 16; + res |= buffer.getUint8(buffer.position + 1) << 8; + res |= buffer.getUint8(buffer.position + 2); + } + break; + case 4: + if (sign) { + res = buffer.getInt32(buffer.position); + } else { + res = buffer.getUint32(buffer.position); + } + break; + case 8: + if (sign) { + throw 'not supported for readBody 8'; + } else { + res = buffer.getUint32(buffer.position) << 32; + res |= buffer.getUint32(buffer.position + 4); + } + break; + default: + res = ''; + } + buffer.position += size; + return res; + } + + readUint8 () { + return Stream.readByte(this.dataview, 1); + } + + readUint16 () { + return Stream.readByte(this.dataview, 2); + } + + readUint24 () { + return Stream.readByte(this.dataview, 3); + } + + readUint32 () { + return Stream.readByte(this.dataview, 4); + } + + readUint64 () { + return Stream.readByte(this.dataview, 8); + } + + readInt8 () { + return Stream.readByte(this.dataview, 1, true); + } + readInt16 () { + return Stream.readByte(this.dataview, 2, true); + } + readInt32 () { + return Stream.readByte(this.dataview, 4, true); + } + writeUint32 (value) { + return new Uint8Array([ + value >>> 24 & 0xff, + value >>> 16 & 0xff, + value >>> 8 & 0xff, + value & 0xff, + ]); + } + +} + +export default Stream; diff --git a/packages/xgplayer-hls/src/ts/ts.js b/packages/xgplayer-hls/src/ts/ts.js new file mode 100644 index 00000000..8a54892f --- /dev/null +++ b/packages/xgplayer-hls/src/ts/ts.js @@ -0,0 +1,529 @@ +import Concat from 'concat-typed-array'; +import Stream from './stream'; +import ExpGolomb from './expGolomb'; + +const StreamType = { + 0x01: ['video', 'MPEG-1'], + 0x02: ['video', 'MPEG-2'], + 0x1b: ['video', 'AVC.H264'], + 0xea: ['video', 'VC-1'], + 0x03: ['audio', 'MPEG-1'], + 0x04: ['audio', 'MPEG-2'], + 0x0f: ['audio', 'MPEG-2.AAC'], + 0x11: ['audio', 'MPEG-4.AAC'], + 0x80: ['audio', 'LPCM'], + 0x81: ['audio', 'AC3'], + 0x06: ['audio', 'AC3'], + 0x82: ['audio', 'DTS'], + 0x83: ['audio', 'Dolby TrueHD'], + 0x84: ['audio', 'AC3-Plus'], + 0x85: ['audio', 'DTS-HD'], + 0x86: ['audio', 'DTS-MA'], + 0xa1: ['audio', 'AC3-Plus-SEC'], + 0xa2: ['audio', 'DTS-HD-SEC'], +}; + +const readSPS = (buffer)=>{ + let start = buffer.readUint32(); + let sps = [], next, flag = true, check = false; + + if (start === 1) { + do { + next = buffer.readUint8(); + if (!check) { + if ((next & 0x1f) !== 7) { + flag = false; + buffer.back(5); + break; + } else { + check = true; + } + } + if (next !== 0) { + sps.push(next); + } else { + next = buffer.readUint24(); + if (next === 1) { + flag = false; + buffer.back(4); + } else { + buffer.back(4); + sps.push(buffer.readUint8()); + } + } + } while (flag); + } else { + buffer.back(4); + } + return sps; +}; + +const readPPS = (buffer)=>{ + let start = buffer.readUint32(); + let pps = [], next, flag = true, check = false; + if (start === 1) { + do { + next = buffer.readUint8(); + if (!check) { + if ((next & 0x1f) !== 8) { + flag = false; + buffer.back(5); + break; + } else { + check = true; + } + } + if (next !== 0) { + pps.push(next); + } else { + next = buffer.readUint16(); + if (next === 1) { + flag = false; + buffer.back(3); + } else { + buffer.back(3); + pps.push(buffer.readUint8()); + } + } + } while (flag); + } else { + buffer.back(4); + } + return pps; +}; + +class TS { + constructor (ctx) { + let buffer = new Stream(ctx); + this.header = new TS.Header(buffer); + this.body = new TS.Payload(buffer, this); + } + static Header (buffer) { + this.sync = buffer.readUint8(); + let next = buffer.readUint16(); + this.error = next >>> 15; + this.payload = next >>> 14 & 1; + this.priority = next >>> 13 & 1; + this.pid = next & 0x1fff; + next = buffer.readUint8(); + this.scrambling = next >> 6 & 0x3; // 是否加密,00表示不加密 + + /** + * 00 ISO/IEC未来使用保留 + * 01 没有调整字段,仅含有184B有效净荷 + * 02 没有有效净荷,仅含有183B调整字段 + * 03 0~182B调整字段后为有效净荷 + */ + this.adaptation = next >> 4 & 0x3; + this.continuity = next & 15; + this.packet = this.pid === 0 ? 'PAT' : 'MEDIA'; + } + static Payload (buffer, root) { + let header = root.header, pid = header.pid, r; + switch (pid) { + case 0: + r = new TS.PAT(buffer); + break; + case 1: + r = new TS.CAT(buffer); + break; + case 2: + r = new TS.TSDT(buffer); + break; + case 0x1fff: + r = false; + break; + default: + if (TS.PATSpace.some((item) => { return item.pid === pid; })) { + r = new TS.PMT(buffer, root); + } else { + let ts = TS.PMTSpace ? TS.PMTSpace.filter((item) => item.pid === pid) : []; + r = ts.length ? new TS.Media(buffer, root, StreamType[ts[0].streamType][0]) : false; + } + } + return r; + } + static PAT (buffer) { + let next = buffer.readUint8(); + buffer.skip(next); + next = buffer.readUint8(); + this.tabelID = next; + next = buffer.readUint16(); + this.error = next >>> 7; + this.zero = next >>> 6 & 1; + this.sectionLength = next & 0xfff; + this.streamID = buffer.readUint16(); + this.current = buffer.readUint8() & 1; + this.sectionNumber = buffer.readUint8(); + this.lastSectionNumber = buffer.readUint8(); + // N=(section_length-9)/4 + let N = (this.sectionLength - 9) / 4, list = []; + for (let i = 0; i < N; i++) { + let programNumber = buffer.readUint16(); + let pid = buffer.readUint16() & 0x1fff; + list.push({ + program: programNumber, + pid, + type: programNumber === 0 ? 'network' : 'mapPID', + }); + } + this.list = list; + TS.PATSpace = TS.PATSpace.concat(list); + this.program = buffer.readUint16(); + this.pid = buffer.readUint16() & 0x1fff; + if (buffer.dataview.byteLength - buffer.position >= 4) { + this.crc32 = buffer.readUint32(); + } + } + static PMT (buffer, it) { + it.header.packet = 'PMT'; + let next = buffer.readUint8(); + buffer.skip(next); + next = buffer.readUint8(); + this.tableID = next; + next = buffer.readUint16(); + this.sectionLength = next & 0xfff; + this.program = buffer.readUint16(); + this.current = buffer.readUint8() & 1; + this.order = buffer.readUint8(); + this.lastOrder = buffer.readUint8(); + this.PCR_PID = buffer.readUint16() & 0x1fff; + this.programLength = buffer.readUint16() & 0xfff; + let N = (this.sectionLength - 13) / 5, list = []; + for (let i = 0; i < N; i++) { + list.push({ + streamType: buffer.readUint8(), + pid: buffer.readUint16() & 0x1fff, // 0x07e5 视频,0x07e6 + es: buffer.readUint16() & 0xfff, + }); + } + this.list = list; + if (!TS.PMTSpace) { + TS.PMTSpace = []; + } + TS.PMTSpace = TS.PMTSpace.concat(list.map((item) => { + return { + pid: item.pid, + es: item.es, + streamType: item.streamType, + program: this.program, + }; + })); + if (buffer.dataview.byteLength - buffer.position >= 4) { + this.crc32 = buffer.readUint32(); + } + } + static Media (buffer, it, type) { + let header = it.header; + this.start = buffer.position; + this.type = type; + if (header.adaptation === 0x03) { + this.adaptationLength = buffer.readUint8(); + if (this.adaptationLength > 0) { + let next = buffer.readUint8(); + this.discontinue = next >>> 7; + this.access = next >>> 6 & 0x01; + this.priority = next >>> 5 & 0x01; + this.PCR = next >>> 4 & 0x01; + this.OPCR = next >>> 3 & 0x01; + this.splicePoint = next >>> 2 & 0x01; + this.transportPrivate = next >>> 1 & 0x01; + this.adaptationField = next & 0x01; + let _start = buffer.position; + if (this.PCR === 1) { + this.programClockBase = buffer.readUint32() << 1; + next = buffer.readUint16(); + this.programClockBase |= next >>> 15; + this.programClockExtension = next & 0x1ff; + } + if (this.OPCR === 1) { + this.originProgramClockBase = buffer.readUint32() << 1; + next = buffer.readUint16(); + this.originProgramClockBase += next >>> 15; + this.originProgramClockExtension = next & 0x1ff; + } + if (this.splicePoint === 1) { + this.spliceCountdown = buffer.readUint8(); + } + if (this.transportPrivate === 1) { + let length = buffer.readUint8(), transportPrivateData = []; + for (let i = 0; i < length; i++) { + transportPrivateData.push(buffer.readUint8()); + } + } + if (this.adaptationField === 1) { + let length = buffer.readUint8(), next = buffer.readUint8(), start = buffer.position; + let ltw = next >>> 7, piecewise = next >>> 6 & 0x1, seamless = next >>> 5 & 0x1; + if (ltw === 1) { + next = buffer.readUint16(); + this.ltwValid = next >>> 15; + this.ltwOffset = next & 0xefff; + } + if (piecewise === 1) { + next = buffer.readUint24(); + this.piecewiseRate = next & 0x3fffff; + } + if (seamless === 1) { + next = buffer.readInt8(); + this.spliceType = next >>> 4; + this.dtsNextAU1 = next >>> 1 & 0x7; + this.marker1 = next & 0x1; + next = buffer.readUint16(); + this.dtsNextAU2 = next >>> 1; + this.marker2 = next & 0x1; + next = buffer.readUint16(); + this.dtsNextAU3 = next; + } + buffer.skip(length - 1 - (buffer.position - start)); + } + let lastStuffing = this.adaptationLength - 1 - (buffer.position - _start); + buffer.skip(lastStuffing); + } + } + this.buffer = new Stream(buffer.buffer.slice(buffer.position)); + } + static PES (ts) { + let it = ts[0], buffer = it.body.buffer; + let next = buffer.readUint24(); + this.header = it.header; + if (next !== 1) { + throw new Error('this is not pes packet'); + } else { + let streamID = buffer.readUint8(); + if (streamID >= 0xe0 && streamID <= 0xef) { + this.type = 'video'; + } + if (streamID >= 0xc0 && streamID <= 0xdf) { + this.type = 'audio'; + } + let packetLength = buffer.readUint16(); + this.packetLength = packetLength; + if (this.type === 'video' || this.type === 'audio') { + let next = buffer.readUint8(); + let first = next >>> 6; + if (first !== 0x02) { + throw new Error('error when parse pes header'); + } + next = buffer.readUint8(); + this.ptsDTSFlag = next >>> 6; + this.escrFlag = next >>> 5 & 0x01; + this.esRateFlag = next >>> 4 & 0x01; + this.dsmFlag = next >>> 3 & 0x01; + this.additionalFlag = next >>> 2 & 0x01; + this.crcFlag = next >>> 1 & 0x01; + this.extensionFlag = next & 0x01; + this.pesHeaderLength = buffer.readUint8(); + let N1 = this.pesHeaderLength; + + if (this.ptsDTSFlag === 2) { + let pts = []; + next = buffer.readUint8(); + pts.push(next >>> 1 & 0x07); + next = buffer.readUint16(); + pts.push(next >>> 1); + next = buffer.readUint16(); + pts.push(next >>> 1); + this.pts = (pts[0] << 30 | pts[1] << 15 | pts[2]); + N1 -= 5; + // 视频如果没有dts用pts + if (this.type === 'video') { + this.dts = this.pts; + } + } + if (this.ptsDTSFlag === 3) { + let pts = []; + next = buffer.readUint8(); + pts.push(next >>> 1 & 0x07); + next = buffer.readUint16(); + pts.push(next >>> 1); + next = buffer.readUint16(); + pts.push(next >>> 1); + this.pts = (pts[0] << 30 | pts[1] << 15 | pts[2]); + let dts = []; + next = buffer.readUint8(); + dts.push(next >>> 1 & 0x07); + next = buffer.readUint16(); + dts.push(next >>> 1); + next = buffer.readUint16(); + dts.push(next >>> 1); + this.dts = (dts[0] << 30 | dts[1] << 15 | dts[2]); + N1 -= 10; + } + if (this.escrFlag === 1) { + let escr = [], ex = []; + next = buffer.readUint8(); + escr.push(next >>> 3 & 0x07); + escr.push(next & 0x03); + next = buffer.readUint16(); + escr.push(next >>> 13); + escr.push(next & 0x03); + next = buffer.readUint16(); + escr.push(next >>> 13); + ex.push(next & 0x03); + next = buffer.readUint8(); + ex.push(next >>> 1); + this.escr = (escr[0] << 30 | escr[1] << 28 | escr[2] << 15 | escr[3] << 13 | escr[4]) * 300 + (ex[0] << 7 | ex[1]); + N1 -= 6; + } + if (this.esRateFlag === 1) { + next = buffer.readUint24(); + this.esRate = next >>> 1 & 0x3fffff; + N1 -= 3; + } + if (this.dsmFlag === 1) { + throw new Error('not support DSM_trick_mode'); + } + if (this.additionalFlag === 1) { + next = buffer.readUint8(); + this.additionalCopyInfo = next & 0x7f; + N1 -= 1; + } + if (this.crcFlag === 1) { + this.pesCRC = buffer.readUint16(); + N1 -= 2; + } + if (this.extensionFlag === 1) { + throw new Error('not support extension'); + } + if (N1 > 0) { + buffer.skip(N1); + } + this.ES = new TS.ES(buffer, this.type, ts.slice(1)); + } else { + throw new Error('format is not supported'); + } + } + } + static ES (buffer, type, ts) { + let next; + if (type === 'video') { + next = buffer.readUint32(); + if (next !== 1) { + buffer.back(4); + next = buffer.readUint24(); + if (next !== 1) { + throw new Error('h264 nal header parse failed'); + } + } + buffer.skip(2);// 09 F0 + this.sps = readSPS(buffer); + this.pps = readPPS(buffer); + let nal; + if (this.sps.length) { + this.info = new ExpGolomb(new Uint8Array(this.sps)).readSPS(); + nal = buffer.readUint24(); + } else { + nal = buffer.readUint24(); + if (nal === 0) { + nal = buffer.readUint8(); + } + } + if (nal === 1) { + let vdata = TS.Merge(buffer, ts); + this.buffer = Concat(Uint8Array, buffer.writeUint32(vdata.byteLength), vdata); + } else { + throw new Error('h264 convert to avcc error'); + } + } else if (type === 'audio') { + next = buffer.readUint16(); + // adts的同步字节,12位 + if (next >>> 4 !== 0xfff) { + throw new Error('aac ES parse Error'); + } + const fq = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350]; + this.id = (next >>> 3 & 0x01) === 0 ? 'MPEG-4' : 'MPEG-2'; + this.layer = next >>> 1 & 0x03; + this.absent = next & 0x01; + next = buffer.readUint16(); + this.audioObjectType = (next >>> 14 & 0x03) + 1; + this.profile = this.audioObjectType - 1; + this.frequencyIndex = next >>> 10 & 0x0f; + this.frequence = fq[this.frequencyIndex]; + this.channel = next >>> 6 & 0x07; + this.frameLength = (next & 0x03) << 11 | (buffer.readUint16() >>> 5); + this.audioConfig = TS.getAudioConfig(this.audioObjectType, this.channel, this.frequencyIndex); + buffer.skip(1); + this.buffer = TS.Merge(buffer, ts); + } else { + throw `ES ${type} is not supported`; + } + } + static TSDT () { + return {}; + } + static CAT (buffer, it) { + this.tableID = buffer.readUint8(); + let next = buffer.readUint16(); + this.sectionIndicator = next >>> 7; + this.sectionLength = next & 0x0fff; + buffer.skip(2); + next = buffer.readUint8(); + this.version = next >>> 3; + this.currentNextIndicator = next & 0x01; + this.sectionNumber = buffer.readUint8(); + this.lastSectionNumber = buffer.readUint8(); + let N = (this.sectionLength - 9) / 4, list = []; + for (let i = 0; i < N; i++) { + list.push({}); + } + this.crc32 = buffer.readUint32(); + } + static Merge (buffer, ts) { + let length = buffer.length - buffer.position, data, offset = length; + ts.forEach(item=>{ + length += item.body.buffer.length; + }); + data = new Uint8Array(length); + data.set(new Uint8Array(buffer.buffer, buffer.position), 0); + ts.forEach(item=>{ + buffer = item.body.buffer; + data.set(new Uint8Array(buffer.buffer, buffer.position), offset); + offset += buffer.length - buffer.position; + }); + return data; + } + static getAudioConfig (audioObjectType, channel, sampleIndex) { + let userAgent = navigator.userAgent.toLowerCase(), config, extensionSampleIndex; + if (/firefox/i.test(userAgent)) { + if (sampleIndex >= 6) { + audioObjectType = 5; + config = new Array(4); + extensionSampleIndex = sampleIndex - 3; + } else { + audioObjectType = 2; + config = new Array(2); + extensionSampleIndex = sampleIndex; + } + } else if (userAgent.indexOf('android') !== -1) { + audioObjectType = 2; + config = new Array(2); + extensionSampleIndex = sampleIndex; + } else { + audioObjectType = 5; + config = new Array(4); + if (sampleIndex >= 6) { + extensionSampleIndex = sampleIndex - 3; + } else { + if (channel === 1) { + audioObjectType = 2; + config = new Array(2); + } + extensionSampleIndex = sampleIndex; + } + } + + config[0] = audioObjectType << 3; + config[0] |= (sampleIndex & 0x0e) >> 1; + config[1] = (sampleIndex & 0x01) << 7; + config[1] |= channel << 3; + if (audioObjectType === 5) { + config[1] |= (extensionSampleIndex & 0x0e) >> 1; + config[2] = (extensionSampleIndex & 0x01) << 7; + config[2] |= 2 << 2; + config[3] = 0; + } + return config; + } +} +TS.PATSpace = []; +export default TS; diff --git a/packages/xgplayer-hls/src/util/download.js b/packages/xgplayer-hls/src/util/download.js new file mode 100644 index 00000000..ad956406 --- /dev/null +++ b/packages/xgplayer-hls/src/util/download.js @@ -0,0 +1,13 @@ +class Download { + constructor (filename, content) { + let aLink = document.createElement('a'); + let blob = new Blob([content]); + let evt = document.createEvent('MouseEvents'); + evt.initEvent('click', false, false); + aLink.download = filename; + aLink.href = URL.createObjectURL(blob); + aLink.dispatchEvent(evt); + } +} + +export default Download; diff --git a/packages/xgplayer-hls/src/util/index.js b/packages/xgplayer-hls/src/util/index.js new file mode 100644 index 00000000..f4eb23c4 --- /dev/null +++ b/packages/xgplayer-hls/src/util/index.js @@ -0,0 +1,162 @@ +let util = {}; + +/** + * [使用递归查询指定type的box] + * var mimeCodec = 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'; + * @param {Object} root [JSON对象] + * @param {String} type [box的类型] + * @return {Object} [box] + */ +util.findBox = function (root, type, result = []) { + if (root.type !== type) { + if (root && root.subBox) { + let box = root.subBox.filter(item=>item.type === type); + if (box.length) { + box.forEach(item=>result.push(item)); + } else { + root.subBox.forEach(item=>util.findBox(item, type, result)); + } + } + } else { + result.push(root); + } + result = [].concat(result); + return result.length > 1 ? result : result[0]; +}; + +util.padStart = function (str, length, pad) { + let charstr = String(pad), len = length >> 0, maxlen = Math.ceil(len / charstr.length); + let chars = [], r = String(str); + while (maxlen--) { + chars.push(charstr); + } + return chars.join('').substring(0, len - r.length) + r; +}; + +/** + * [十进制转十六进制] + * @param {Number} value [要转换的十进制数字] + * @return {String} [十六进制] + */ +util.toHex = function (...value) { + let hex = []; + value.forEach(item=>{ + hex.push(util.padStart(Number(item).toString(16), 2, 0)); + }); + return hex; +}; + +/** + * [求和计算] + * @param {[type]} rst [description] + * @return {[type]} [description] + */ +util.sum = function (...rst) { + let count = 0; + rst.forEach(item=>{ count += item; }); + return count; +}; + +/** + * [计算音视频数据在Mdat中的偏移量] + * @param {Array} stsc [块偏移量] + * @param {Number} sample_order [帧次序] + * @return {Object} [块的位置和当前帧的偏移数] + */ +util.stscOffset = function (stsc, sample_order) { + let chunk_index, samples_offset = ''; + let chunk_start = stsc.entries.filter((item) => { + return item.first_sample <= sample_order && sample_order < item.first_sample + item.chunk_count * item.samples_per_chunk; + })[0]; + if (!chunk_start) { + let last_chunk = stsc.entries.pop(); + stsc.entries.push(last_chunk); + let chunk_offset = Math.floor((sample_order - last_chunk.first_sample) / last_chunk.samples_per_chunk); + let last_chunk_index = last_chunk.first_chunk + chunk_offset; + let last_chunk_first_sample = last_chunk.first_sample + last_chunk.samples_per_chunk * chunk_offset; + return { + chunk_index: last_chunk_index, + samples_offset: [last_chunk_first_sample, sample_order], + }; + } else { + let chunk_offset = Math.floor((sample_order - chunk_start.first_sample) / chunk_start.samples_per_chunk); + let chunk_offset_sample = chunk_start.first_sample + chunk_offset * chunk_start.samples_per_chunk; + chunk_index = chunk_start.first_chunk + chunk_offset; + samples_offset = [chunk_offset_sample, sample_order]; + return { + chunk_index: chunk_index, + samples_offset, + }; + } +}; + +util.seekSampleOffset = function (stsc, stco, stsz, order, mdatStart) { + let chunkOffset = util.stscOffset(stsc, order + 1); + let result = stco.entries[chunkOffset.chunk_index - 1] + util.sum.apply(null, stsz.entries.slice(chunkOffset.samples_offset[0] - 1, chunkOffset.samples_offset[1] - 1)) - mdatStart; + if (result === undefined) { + throw `result=${result},stco.length=${stco.entries.length},sum=${util.sum.apply(null, stsz.entries.slice(0, order))}`; + } else if (result < 0) { + throw `result=${result},stco.length=${stco.entries.length},sum=${util.sum.apply(null, stsz.entries.slice(0, order))}`; + } + return result; +}; + +util.seekSampleTime = function (stts, ctts, order) { + let time, duration, count = 0, startTime = 0, offset = 0; + stts.entry.every(item=>{ + duration = item.sampleDuration; + if (order < count + item.sampleCount) { + time = startTime + (order - count) * item.sampleDuration; + return false; + } else { + count += item.sampleCount; + startTime += item.sampleCount * duration; + return true; + } + }); + if (ctts) { + let ct = 0; + ctts.entry.every(item=>{ + ct += item.count; + if (order < ct) { + offset = item.offset; + return false; + } else { + return true; + } + }); + } + if (!time) { + time = startTime + (order - count) * duration; + } + return {time, duration, offset}; +}; + +util.seekOrderSampleByTime = function (stts, timeScale, time) { + let startTime = 0, order = 0, count = 0, itemDuration; + stts.every((item, idx)=>{ + itemDuration = item.sampleCount * item.sampleDuration / timeScale; + if (time <= startTime + itemDuration) { + order = count + Math.ceil((time - startTime) * timeScale / item.sampleDuration); + startTime = startTime + Math.ceil((time - startTime) * timeScale / item.sampleDuration) * item.sampleDuration / timeScale; + return false; + } else { + startTime += itemDuration; + count += item.sampleCount; + return true; + } + + }); + return {order, startTime}; +}; + +util.seekTrakDuration = function (trak, timeScale) { + let stts = util.findBox(trak, 'stts'), duration = 0; + stts.entry.forEach(item=>{ + duration += item.sampleCount * item.sampleDuration; + }); + return Number(duration / timeScale).toFixed(4); +}; + + +export default util; diff --git a/packages/xgplayer-hls/src/util/xhr.js b/packages/xgplayer-hls/src/util/xhr.js new file mode 100644 index 00000000..d1c54b00 --- /dev/null +++ b/packages/xgplayer-hls/src/util/xhr.js @@ -0,0 +1,37 @@ +class XHR { + constructor ({url, method = 'GET', type = 'arraybuffer', data = {}} = {}) { + return new Promise((resolve, reject)=>{ + let R = new XMLHttpRequest(); + let _method = method.toUpperCase(); + let _data = []; + if (type) { + R.responseType = type; + } + for (let k in data) { + _data.push(`k=${data[k]}`); + } + if (_method === 'GET') { + R.open(_method, `${url}?${_data.join('&')}`); + R.send(); + } else if (_method === 'post') { + R.open(_method, url); + R.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + R.send(_data.join('&')); + } else { + throw `xhr ${_method} is not supported`; + } + R.onload = ()=>{ + if (R.status === 200 || R.status === 206) { + resolve(R); + } else { + reject(R); + } + }; + R.onerror = ()=>{ + reject(R); + }; + }); + } +} + +export default XHR; diff --git a/packages/xgplayer-hls/src/write/box.js b/packages/xgplayer-hls/src/write/box.js new file mode 100644 index 00000000..09d9805c --- /dev/null +++ b/packages/xgplayer-hls/src/write/box.js @@ -0,0 +1,38 @@ +import Stream from './stream'; +class Box { + constructor (obj, output) { + this.size = obj.size; + this.type = obj.type; + this.stream = new Stream(new Uint8Array(this.size - 8).buffer); + this.data = obj; + this.output = output; + this.subBox = []; + let header = new Stream(new Uint8Array(8).buffer); + header.writeUint32(obj.size); + header.writeStr(obj.type); + output.write(new Uint8Array(header.buffer)); + } + writeBody () { + let self = this; + let data = this.data; + if (Box.containerBox.find(item=>item === self.type)) { + data.subBox.forEach(item=>{ + let box = new Box(item, self.output); + self.subBox.push(box); + box.writeBody(); + }); + } else { + let run = Box[self.type]; + if (run && run instanceof Function) { + run.call(self, data, self.output); + } else { + throw `write:error,${self.type} write nothing`; + } + } + } +} + +Box.containerBox = ['moov', 'trak', 'edts', 'mdia', 'minf', 'dinf', 'stbl', 'mvex', 'moof', 'mvex', 'traf', 'mfra']; + + +export default Box; diff --git a/packages/xgplayer-hls/src/write/box/MP4DecConfigDescrTag.js b/packages/xgplayer-hls/src/write/box/MP4DecConfigDescrTag.js new file mode 100644 index 00000000..8c1b8970 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/MP4DecConfigDescrTag.js @@ -0,0 +1,21 @@ +import Box from '../box'; +import Stream from '../stream'; +Box.MP4DecConfigDescrTag = function (data, output) { + let stream = new Stream(new Uint8Array(data.size).buffer); + stream.writeUint8(data.type); + if (data.extend) { + for (let i = 0; i < 3; i++) { + stream.writeUint8(0x80); + } + stream.writeUint8(data.size - 5); + } else { + stream.writeUint8(data.size - 2); + } + stream.writeUint8(data.typeID); + stream.writeUint8(data.streamUint); + stream.writeUint24(data.bufferSize); + stream.writeUint32(data.maximum); + stream.writeUint32(data.average); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + Box.MP4DecSpecificDescrTag(data.subBox[0], output); +}; diff --git a/packages/xgplayer-hls/src/write/box/MP4DecSpecificDescrTag.js b/packages/xgplayer-hls/src/write/box/MP4DecSpecificDescrTag.js new file mode 100644 index 00000000..7a29bd14 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/MP4DecSpecificDescrTag.js @@ -0,0 +1,19 @@ +import Box from '../box'; +import Stream from '../stream'; + +Box.MP4DecSpecificDescrTag = function (data, output) { + let stream = new Stream(new Uint8Array(data.size).buffer); + stream.writeUint8(data.type); + if (data.extend) { + for (let i = 0; i < 3; i++) { + stream.writeUint8(0x80); + } + stream.writeUint8(data.size - 5); + } else { + stream.writeUint8(data.size - 2); + } + data.EScode.forEach(item=>{ + stream.writeUint8(Number(`0x${item}`)); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); +}; diff --git a/packages/xgplayer-hls/src/write/box/MP4ESDescrTag.js b/packages/xgplayer-hls/src/write/box/MP4ESDescrTag.js new file mode 100644 index 00000000..c5aad3fe --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/MP4ESDescrTag.js @@ -0,0 +1,19 @@ +import Box from '../box'; +import Stream from '../stream'; +Box.MP4ESDescrTag = function (data, output) { + let stream = new Stream(new Uint8Array(data.size).buffer); + stream.writeUint8(data.type); + if (data.extend) { + for (let i = 0; i < 3; i++) { + stream.writeUint8(0x80); + } + stream.writeUint8(data.size - 5); + } else { + stream.writeUint8(data.size - 2); + } + stream.writeUint16(data.esID); + stream.writeUint8(data.priority); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + Box.MP4DecConfigDescrTag(data.subBox[0], output); + Box.SLConfigDescriptor(data.subBox[1], output); +}; diff --git a/packages/xgplayer-hls/src/write/box/SLConfigDescriptor.js b/packages/xgplayer-hls/src/write/box/SLConfigDescriptor.js new file mode 100644 index 00000000..9d0ff38a --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/SLConfigDescriptor.js @@ -0,0 +1,16 @@ +import Box from '../box'; +import Stream from '../stream'; +Box.SLConfigDescriptor = function (data, output) { + let stream = new Stream(new Uint8Array(data.size).buffer); + stream.writeUint8(data.type); + if (data.extend) { + for (let i = 0; i < 3; i++) { + stream.writeUint8(0x80); + } + stream.writeUint8(data.size - 5); + } else { + stream.writeUint8(data.size - 2); + } + stream.writeUint8(data.SL); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); +}; diff --git a/packages/xgplayer-hls/src/write/box/avc1.js b/packages/xgplayer-hls/src/write/box/avc1.js new file mode 100644 index 00000000..68270026 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/avc1.js @@ -0,0 +1,33 @@ +import Box from '../box'; +Box.avc1 = function (data, output) { + let stream = this.stream; + stream.fill(6); + stream.writeUint16(data.dataReferenceIndex); + stream.fill(16); + stream.writeUint16(data.width); + stream.writeUint16(data.height); + stream.writeUint32(data.horizresolution); + stream.writeUint32(data.vertresolution); + stream.fill(4); + stream.writeUint16(data.frameCount); + stream.fill(32); + stream.writeUint16(data.depth); + stream.fill(2); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + let self = this; + data.subBox.forEach(item=>{ + let box = new Box(item, self.output); + self.subBox.push(box); + box.writeBody(); + }); + let writeSize = stream.position; + self.subBox.forEach(item=>{ + writeSize += item.stream.position + 8; + }); + if (writeSize !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + self.outputSize = writeSize; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/avcC.js b/packages/xgplayer-hls/src/write/box/avcC.js new file mode 100644 index 00000000..4145fc6b --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/avcC.js @@ -0,0 +1,32 @@ +import Box from '../box'; +Box.avcC = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.configVersion); + stream.writeUint8(data.profile); + stream.writeUint8(data.profileCompatibility); + stream.writeUint8(data.AVCLevelIndication); + stream.writeUint8(data.lengthSizeMinusOne - 1); + stream.writeUint8(data.numOfSequenceParameterSets); + stream.writeUint16(data.sequenceLength); + data.sequence.forEach(item=>{ + stream.writeUint8(Number('0x' + item)); + }); + stream.writeUint8(data.ppsCount); + stream.writeUint16(data.ppsLength); + data.pps.forEach(item=>{ + stream.writeUint8(Number('0x' + item)); + }); + if (data.last.length) { + data.last.forEach(item=>{ + stream.writeUint8(item); + }); + } + + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/btrt.js b/packages/xgplayer-hls/src/write/box/btrt.js new file mode 100644 index 00000000..2034463f --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/btrt.js @@ -0,0 +1,14 @@ +import Box from '../box'; +Box.btrt = function (data, output) { + let stream = this.stream; + stream.writeUint32(this.bufferSizeDB); + stream.writeUint32(this.maxBitrate); + stream.writeUint32(this.avgBitrate); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/co64.js b/packages/xgplayer-hls/src/write/box/co64.js new file mode 100644 index 00000000..655b106f --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/co64.js @@ -0,0 +1,17 @@ +import Box from '../box'; +Box.co64 = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.count); + data.entries.forEach(item=>{ + stream.writeUint64(item); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/ctts.js b/packages/xgplayer-hls/src/write/box/ctts.js new file mode 100644 index 00000000..f0d245ec --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/ctts.js @@ -0,0 +1,19 @@ +import Box from '../box'; + +Box.ctts = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.entryCount); + data.entry.forEach(item=>{ + stream.writeUint32(item.count); + stream.writeUint32(item.offset); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/dref.js b/packages/xgplayer-hls/src/write/box/dref.js new file mode 100644 index 00000000..7c59cbac --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/dref.js @@ -0,0 +1,25 @@ +import Box from '../box'; + +Box.dref = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.entryCount); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + let self = this; + data.subBox.forEach(item=>{ + let box = new Box(item, self.output); + self.subBox.push(box); + box.writeBody(); + }); + let writeSize = stream.position; + self.subBox.forEach(item=>{ + writeSize += item.stream.position + 8; + }); + if (writeSize !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/elst.js b/packages/xgplayer-hls/src/write/box/elst.js new file mode 100644 index 00000000..0c16a065 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/elst.js @@ -0,0 +1,27 @@ +import Box from '../box'; + +Box.elst = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.entries.length); + let version = data.version; + data.entries.forEach(item=>{ + if (version === 1) { + stream.writeUint64(item.segment_duration); + stream.writeUint64(item.media_time); + } else { + stream.writeUint32(item.segment_duration); + stream.writeInt32(item.media_time); + } + stream.writeInt16(item.media_rate_integer); + stream.writeInt16(item.media_rate_fraction); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/esds.js b/packages/xgplayer-hls/src/write/box/esds.js new file mode 100644 index 00000000..c06fc040 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/esds.js @@ -0,0 +1,11 @@ +import Box from '../box'; + +Box.esds = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + Box.MP4ESDescrTag(data.subBox[0], output); + this.outputSize = data.size - 8; + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/ftyp.js b/packages/xgplayer-hls/src/write/box/ftyp.js new file mode 100644 index 00000000..d83dc421 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/ftyp.js @@ -0,0 +1,17 @@ +import Box from '../box'; + +Box.ftyp = function (data, output) { + let stream = this.stream; + stream.writeStr(data.major_brand); + stream.writeUint32(data.minor_version); + data.compatible_brands.forEach(item=>{ + stream.writeStr(item); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/hdlr.js b/packages/xgplayer-hls/src/write/box/hdlr.js new file mode 100644 index 00000000..cf54c70a --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/hdlr.js @@ -0,0 +1,15 @@ +import Box from '../box'; +Box.hdlr = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.fill(4); + stream.writeStr(data.handleType); + stream.fill(12); + stream.writeStr(data.name); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/iods.js b/packages/xgplayer-hls/src/write/box/iods.js new file mode 100644 index 00000000..6581034f --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/iods.js @@ -0,0 +1,14 @@ +import Box from '../box'; +Box.iods = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + data.content.forEach(item=>{ + stream.writeUint8(item); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/mdat.js b/packages/xgplayer-hls/src/write/box/mdat.js new file mode 100644 index 00000000..c764f642 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/mdat.js @@ -0,0 +1,5 @@ +import Box from '../box'; +Box.mdat = function (data, output) { + output.write(new Uint8Array(new Uint8Array(data.data))); + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/mdhd.js b/packages/xgplayer-hls/src/write/box/mdhd.js new file mode 100644 index 00000000..a00cd036 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/mdhd.js @@ -0,0 +1,27 @@ +import Box from '../box'; +Box.mdhd = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + let version = data.version; + if (version === 1) { + stream.writeUint64(data.create); + stream.writeUint64(data.modify); + stream.writeUint32(data.timescale); + stream.writeUint64(data.duration); + } else { + stream.writeUint32(data.create); + stream.writeUint32(data.modify); + stream.writeUint32(data.timescale); + stream.writeUint32(data.duration); + } + stream.writeUint16(data.language); + stream.writeUint16(); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/mehd.js b/packages/xgplayer-hls/src/write/box/mehd.js new file mode 100644 index 00000000..b072a691 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/mehd.js @@ -0,0 +1,12 @@ +import Box from '../box'; +Box.mehd = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.duration); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/mfhd.js b/packages/xgplayer-hls/src/write/box/mfhd.js new file mode 100644 index 00000000..fc860aaa --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/mfhd.js @@ -0,0 +1,12 @@ +import Box from '../box'; +Box.mfhd = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.sequence); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/mfro.js b/packages/xgplayer-hls/src/write/box/mfro.js new file mode 100644 index 00000000..aa65181f --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/mfro.js @@ -0,0 +1,14 @@ +import Box from '../box'; +Box.mfro = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.dsize); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/mp4a.js b/packages/xgplayer-hls/src/write/box/mp4a.js new file mode 100644 index 00000000..e8a15a6a --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/mp4a.js @@ -0,0 +1,26 @@ +import Box from '../box'; +Box.mp4a = function (data, output) { + let stream = this.stream; + let self = this; + stream.fill(6); + stream.writeUint16(data.dataReferenceIndex); + stream.fill(8); + stream.writeUint16(data.channelCount); + stream.writeUint16(data.sampleSize); + stream.fill(4); + stream.writeUint32(data.sampleRate); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + let outputSize = stream.position; + data.subBox.forEach(item=>{ + let box = new Box(item, self.output); + self.subBox.push(box); + box.writeBody(); + outputSize += box.outputSize + 8; + }); + if (outputSize !== data.size - 8) { + throw `${data.type} box incomplete,outputSize=${outputSize},size=${data.size}`; + } else { + this.outputSize = outputSize; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/mvhd.js b/packages/xgplayer-hls/src/write/box/mvhd.js new file mode 100644 index 00000000..0455c945 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/mvhd.js @@ -0,0 +1,34 @@ +import Box from '../box'; +Box.mvhd = function (data, output) { + let stream = this.stream; + + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.create); + stream.writeUint32(data.modify); + stream.writeUint32(data.timeScale); + stream.writeUint32(data.duration); + + let rate = data.rate.split('.'); + let volume = data.volume.split('.'); + stream.writeUint16(rate[0]); + stream.writeUint16(rate[1]); + stream.writeUint8(volume[0]); + stream.writeUint8(volume[1]); + stream.fill(10); + data.matrix.forEach(item=>{ + let matrix; + matrix = item.split('.'); + stream.writeUint16(matrix[0]); + stream.writeUint16(matrix[1]); + }); + stream.fill(24); + stream.writeUint32(data.nextTrackID); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/pasp.js b/packages/xgplayer-hls/src/write/box/pasp.js new file mode 100644 index 00000000..f77fdbe2 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/pasp.js @@ -0,0 +1,10 @@ +import Box from '../box'; +Box.pasp = function (data, output) { + let stream = this.stream; + stream.position = data.content.byteLength; + output.write(new Uint8Array(data.content)); + if (data.content.byteLength !== data.size - 8) { + throw `${data.type} box incomplete`; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/smhd.js b/packages/xgplayer-hls/src/write/box/smhd.js new file mode 100644 index 00000000..8ab8a67e --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/smhd.js @@ -0,0 +1,17 @@ +import Box from '../box'; +Box.smhd = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + let balance = data.balance.split('.'); + stream.writeUint8(balance[0]); + stream.writeUint8(balance[1]); + stream.fill(2); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/stco.js b/packages/xgplayer-hls/src/write/box/stco.js new file mode 100644 index 00000000..358978e2 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/stco.js @@ -0,0 +1,17 @@ +import Box from '../box'; +Box.stco = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.count); + data.entries.forEach(item=>{ + stream.writeUint32(item); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/stsc.js b/packages/xgplayer-hls/src/write/box/stsc.js new file mode 100644 index 00000000..6b34792d --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/stsc.js @@ -0,0 +1,19 @@ +import Box from '../box'; +Box.stsc = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.count); + data.entries.forEach(item=>{ + stream.writeUint32(item.first_chunk); + stream.writeUint32(item.samples_per_chunk); + stream.writeUint32(item.sample_desc_index); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/stsd.js b/packages/xgplayer-hls/src/write/box/stsd.js new file mode 100644 index 00000000..48f3c559 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/stsd.js @@ -0,0 +1,23 @@ +import Box from '../box'; +Box.stsd = function (data, output) { + let stream = this.stream; + let self = this; + let outputSize = 0; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.entryCount); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + outputSize = stream.position; + data.subBox.forEach(item=>{ + let box = new Box(item, self.output); + self.subBox.push(box); + box.writeBody(); + outputSize += box.outputSize + 8; + }); + if (outputSize !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = outputSize; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/stss.js b/packages/xgplayer-hls/src/write/box/stss.js new file mode 100644 index 00000000..b9c3dcee --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/stss.js @@ -0,0 +1,17 @@ +import Box from '../box'; +Box.stss = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.count); + data.entries.forEach(item=>{ + stream.writeUint32(item); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/stsz.js b/packages/xgplayer-hls/src/write/box/stsz.js new file mode 100644 index 00000000..e86c4c0d --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/stsz.js @@ -0,0 +1,18 @@ +import Box from '../box'; +Box.stsz = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.sampleSize); + stream.writeUint32(data.count); + data.entries.forEach(item=>{ + stream.writeUint32(item); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/stts.js b/packages/xgplayer-hls/src/write/box/stts.js new file mode 100644 index 00000000..11e50a77 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/stts.js @@ -0,0 +1,18 @@ +import Box from '../box'; +Box.stts = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.count); + data.entry.forEach(item=>{ + stream.writeUint32(item.sampleCount); + stream.writeUint32(item.sampleDuration); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/tfdt.js b/packages/xgplayer-hls/src/write/box/tfdt.js new file mode 100644 index 00000000..79617398 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/tfdt.js @@ -0,0 +1,16 @@ +import Box from '../box'; +Box.tfdt = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + if (data.version === 0) { + stream.writeUint32(data.decodeTime); + } else { + stream.writeUint64(data.decodeTime); + } + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/tfhd.js b/packages/xgplayer-hls/src/write/box/tfhd.js new file mode 100644 index 00000000..3d75c086 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/tfhd.js @@ -0,0 +1,18 @@ +import Box from '../box'; +Box.tfhd = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.trackID); + if (data.sampleDuration) { + stream.writeUint32(data.sampleDuration); + } + if (data.sampleFlag) { + stream.writeUint32(data.sampleFlag); + } + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/tfra.js b/packages/xgplayer-hls/src/write/box/tfra.js new file mode 100644 index 00000000..501e2b23 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/tfra.js @@ -0,0 +1,29 @@ +import Box from '../box'; +Box.tfra = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.trackID); + stream.writeUint32(data.trafTurnSampleNumber); + stream.writeUint32(data.entries.length); + let version = data.version; + data.entries.forEach(item=>{ + if (version === 1) { + stream.writeUint64(item.time); + stream.writeUint64(item.moofOffset); + } else { + stream.writeUint32(item.time); + stream.writeUint32(item.moofOffset); + } + stream.writeUint8(1); + stream.writeUint8(1); + stream.writeUint8(1); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/tkhd.js b/packages/xgplayer-hls/src/write/box/tkhd.js new file mode 100644 index 00000000..d66bf1e1 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/tkhd.js @@ -0,0 +1,44 @@ +import Box from '../box'; +Box.tkhd = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + if (data.version === 1) { + stream.writeUint64(data.create); + stream.writeUint64(data.modify); + stream.writeUint32(data.trackID); + stream.writeUint32(data.reserverd); + stream.writeUint64(data.duration); + } else { + stream.writeUint32(data.create); + stream.writeUint32(data.modify); + stream.writeUint32(data.trackID); + stream.writeUint32(data.reserverd); + stream.writeUint32(data.duration); + } + stream.fill(8); + stream.writeInt16(data.layer); + stream.writeInt16(data.alternate_group); + stream.writeInt16(data.volume << 8); + stream.fill(2); + + data.matrix.forEach(item=>{ + let matrix = item.split('.'); + stream.writeUint16(matrix[0]); + stream.writeUint16(matrix[1]); + }); + + let width = data.width.split('.'); + let height = data.height.split('.'); + stream.writeUint16(width[0]); + stream.writeUint16(width[1]); + stream.writeUint16(height[0]); + stream.writeUint16(height[1]); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/trex.js b/packages/xgplayer-hls/src/write/box/trex.js new file mode 100644 index 00000000..b14c373a --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/trex.js @@ -0,0 +1,16 @@ +import Box from '../box'; +Box.trex = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.trackID); + stream.writeUint32(data.index); + stream.writeUint32(data.duration); + stream.writeUint32(data.dsize); + stream.writeUint32(data.flags); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/trun.js b/packages/xgplayer-hls/src/write/box/trun.js new file mode 100644 index 00000000..3075dbb0 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/trun.js @@ -0,0 +1,41 @@ +import Box from '../box'; +Box.trun = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + stream.writeUint24(data.flag); + stream.writeUint32(data.sampleCount); + stream.writeInt32(data.dataOffset); + if (data.firstSampleFlags) { + stream.writeUint32(data.firstSampleFlags); + if (data.sampleDuration) { + data.samples.forEach(item=>{ + stream.writeUint32(item.size); + stream.writeUint32(item.offsetTime); + }); + } else { + data.samples.forEach(item=>{ + stream.writeUint32(item.duration); + stream.writeUint32(item.size); + stream.writeUint32(item.offsetTime); + }); + } + + } else { + if (data.sampleDuration) { + data.samples.forEach(item=>{ + stream.writeUint32(item.size); + }); + } else { + data.samples.forEach(item=>{ + stream.writeUint32(item.duration); + stream.writeUint32(item.size); + }); + } + } + + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/udta.js b/packages/xgplayer-hls/src/write/box/udta.js new file mode 100644 index 00000000..bb7ec93d --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/udta.js @@ -0,0 +1,5 @@ +import Box from '../box'; +Box.udta = function (data, output) { + output.write(new Uint8Array(new Uint8Array(data.data))); + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/url.js b/packages/xgplayer-hls/src/write/box/url.js new file mode 100644 index 00000000..308420af --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/url.js @@ -0,0 +1,16 @@ +import Box from '../box'; +Box['url '] = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + data.flag.forEach(item=>{ + stream.writeUint8(item); + }); + data.location.forEach(item=>{ + stream.writeUint8(item); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/vmhd.js b/packages/xgplayer-hls/src/write/box/vmhd.js new file mode 100644 index 00000000..18ffad47 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/vmhd.js @@ -0,0 +1,19 @@ +import Box from '../box'; +Box.vmhd = function (data, output) { + let stream = this.stream; + stream.writeUint8(data.version); + data.flag.forEach(item=>{ + stream.writeUint8(item); + }); + stream.writeUint16(data.graphicsmode); + data.opcolor.forEach(item=>{ + stream.writeUint16(item); + }); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/box/wide.js b/packages/xgplayer-hls/src/write/box/wide.js new file mode 100644 index 00000000..bb5b29d3 --- /dev/null +++ b/packages/xgplayer-hls/src/write/box/wide.js @@ -0,0 +1,12 @@ +import Box from '../box'; +Box.wide = function (data, output) { + let stream = this.stream; + stream.fill(data.size - 8); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-hls/src/write/buffer.js b/packages/xgplayer-hls/src/write/buffer.js new file mode 100644 index 00000000..580f89aa --- /dev/null +++ b/packages/xgplayer-hls/src/write/buffer.js @@ -0,0 +1,12 @@ +import Concat from 'concat-typed-array'; + +class Buffer { + constructor () { + this.buffer = new Uint8Array(0); + } + write (buffer) { + this.buffer = Concat(Uint8Array, this.buffer, buffer); + } +} + +export default Buffer; diff --git a/packages/xgplayer-hls/src/write/index.js b/packages/xgplayer-hls/src/write/index.js new file mode 100644 index 00000000..f1a68baa --- /dev/null +++ b/packages/xgplayer-hls/src/write/index.js @@ -0,0 +1,35 @@ +import Box from './box'; +import Buffer from './buffer'; + + +// 引入整个目录 +var context = require.context('./box', true, /\.js$/); +context.keys().forEach(function (key) { + context(key); +}); + +class Write { + + writeMeta (boxes) { + let out = new Buffer(); + boxes.forEach(item=>{ + let box = new Box(item, out); + box.writeBody(); + }); + return out.buffer; + } + + writeFragment (...args) { + let out = new Buffer(); + args.forEach(item=>{ + if (!item) { + return false; + } + let box = new Box(item, out); + box.writeBody(); + }); + return out.buffer; + } +} + +export default Write; diff --git a/packages/xgplayer-hls/src/write/stream.js b/packages/xgplayer-hls/src/write/stream.js new file mode 100644 index 00000000..1d73e15e --- /dev/null +++ b/packages/xgplayer-hls/src/write/stream.js @@ -0,0 +1,99 @@ +class Stream { + constructor (buffer) { + this.buffer = buffer; + this.dataview = new DataView(buffer); + this.dataview.position = 0; + } + + fill (count) { + for (let i = 0; i < count; i++) { + this.writeUint8(0); + } + } + + set position (value) { + this.dataview.position = value; + } + + get position () { + return this.dataview.position || 0; + } + + static writeByte (buffer, value, size, sign) { + switch (size) { + case 1: + if (sign) { + buffer.setInt8(buffer.position, value); + } else { + buffer.setUint8(buffer.position, value); + } + break; + case 2: + if (sign) { + buffer.setInt16(buffer.position, value); + } else { + buffer.setUint16(buffer.position, value); + } + break; + case 3: + if (sign) { + for (let i = 0; i < 3; i++) { + buffer.setInt8(buffer.position + i, value >> (16 - i * 8) & 0xff); + } + } else { + for (let i = 0; i < 3; i++) { + buffer.setUint8(buffer.position + i, value >> (16 - i * 8) & 0xff); + } + } + break; + case 4: + if (sign) { + buffer.setInt32(buffer.position, value); + } else { + buffer.setUint32(buffer.position, value); + } + break; + default: + throw `not support ${size} write`; + } + buffer.position += size; + } + + writeUint8 (value) { + Stream.writeByte(this.dataview, value, 1); + } + writeInt8 (value) { + Stream.writeByte(this.dataview, value, 1, true); + } + writeUint16 (value) { + Stream.writeByte(this.dataview, value, 2); + } + writeInt16 (value) { + Stream.writeByte(this.dataview, value, 2, true); + } + writeUint24 (value) { + Stream.writeByte(this.dataview, value, 3); + } + writeInt24 (value) { + Stream.writeByte(this.dataview, value, 3, true); + } + writeUint32 (value) { + Stream.writeByte(this.dataview, value, 4); + } + writeInt32 (value) { + Stream.writeByte(this.dataview, value, 4, true); + } + writeUint64 (value) { + Stream.writeByte(this.dataview, (value & 0xFFFFFFFF00000000) >> 32, 4); + Stream.writeByte(this.dataview, (value & 0x00000000FFFFFFFF), 4); + } + writeStr (value) { + value = value.toString(); + let length = value.length; + for (let i = 0; i < length; i++) { + this.writeUint8(value.charCodeAt(i)); + } + } +} + +export default Stream; diff --git a/packages/xgplayer-hls/webpack.config.js b/packages/xgplayer-hls/webpack.config.js new file mode 100644 index 00000000..8bf82fec --- /dev/null +++ b/packages/xgplayer-hls/webpack.config.js @@ -0,0 +1,76 @@ +const polyfill = []; + + +const umd = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/dist`, + filename: 'index.js', + library: 'xgplayer-hls', + libraryTarget: 'umd', + }, + mode: 'production', + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader', + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true, + }, + }, + 'postcss-loader', + 'sass-loader', + ], + }], + }, + externals: { + xgplayer: 'xgplayer', + }, + optimization: { + minimize: true, + }, +}; + +const client = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/browser`, + filename: 'xgplayer-hls.js', + }, + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader', + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true, + }, + }, + 'postcss-loader', + 'sass-loader', + ], + }], + }, + externals: { + xgplayer: 'Player', + }, + mode: 'production', + optimization: { + minimize: true, + }, +}; + +module.exports = [umd, client]; diff --git a/packages/xgplayer-mp4/.gitignore b/packages/xgplayer-mp4/.gitignore new file mode 100644 index 00000000..93cab344 --- /dev/null +++ b/packages/xgplayer-mp4/.gitignore @@ -0,0 +1,2 @@ +node_modules +yarn-error.log diff --git a/packages/xgplayer-mp4/browser/xgplayer-mp4.js b/packages/xgplayer-mp4/browser/xgplayer-mp4.js new file mode 100644 index 00000000..8a3948cb --- /dev/null +++ b/packages/xgplayer-mp4/browser/xgplayer-mp4.js @@ -0,0 +1 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=124)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&e.readByte(this.dataview,r)}},{key:"readUint8",value:function(){return e.readByte(this.dataview,1)}},{key:"readUint16",value:function(){return e.readByte(this.dataview,2)}},{key:"readUint32",value:function(){return e.readByte(this.dataview,4)}},{key:"readUint64",value:function(){return e.readByte(this.dataview,8)}},{key:"readInt8",value:function(){return e.readByte(this.dataview,1,!0)}},{key:"readInt16",value:function(){return e.readByte(this.dataview,2,!0)}},{key:"readInt32",value:function(){return e.readByte(this.dataview,4,!0)}},{key:"position",set:function(e){this.dataview.position=e},get:function(){return this.dataview.position}}],[{key:"readByte",value:function(e,t,n){var r=void 0;switch(t){case 1:r=n?e.getInt8(e.position):e.getUint8(e.position);break;case 2:r=n?e.getInt16(e.position):e.getUint16(e.position);break;case 3:if(n)throw"not supported for readByte 3";r=e.getUint8(e.position)<<16,r|=e.getUint8(e.position+1)<<8,r|=e.getUint8(e.position+2);break;case 4:r=n?e.getInt32(e.position):e.getUint32(e.position);break;case 8:if(n)throw new i.default("parse","",{line:73,handle:"[Stream] readByte",msg:"not supported for readBody 8"});r=e.getUint32(e.position)<<32,r|=e.getUint32(e.position+4);break;default:r=""}return e.position+=t,r}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,n){"use strict";var r=n(120)("wks"),i=n(32),a=n(2).Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{default:e}}(n(19)),i=n(80);var a=function(e){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r.version=i.version;var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r));return o.url=a,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.default.Errors),t}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(e){return"object"===(void 0===e?"undefined":r(e))?null!==e:"function"==typeof e}},function(e,t,n){"use strict";var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";e.exports=!n(29)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";var r=e.exports={version:"2.5.1"};"number"==typeof __e&&(__e=r)},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";var r=n(9);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n>24,e>>16&255,e>>8&255,255&e])}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(79));e.exports=r.default},function(e,t){e.exports=Player},function(e,t,n){"use strict";e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(9);e.exports.f=function(e){return new function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}(e)}},function(e,t,n){"use strict";var r,i,a,o=n(10),u=n(110),s=n(109),f=n(28),c=n(2),d=c.process,l=c.setImmediate,h=c.clearImmediate,p=c.MessageChannel,v=c.Dispatch,m=0,y={},b=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},w=function(e){b.call(e.data)};l&&h||(l=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++m]=function(){u("function"==typeof e?e:Function(e),t)},r(m),m},h=function(e){delete y[e]},"process"==n(15)(d)?r=function(e){d.nextTick(o(b,e,1))}:v&&v.now?r=function(e){v.now(o(b,e,1))}:p?(a=(i=new p).port2,i.port1.onmessage=w,r=o(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",w,!1)):r="onreadystatechange"in f("script")?function(e){s.appendChild(f("script")).onreadystatechange=function(){s.removeChild(this),b.call(e)}}:function(e){setTimeout(o(b,e,1),0)}),e.exports={set:l,clear:h}},function(e,t,n){"use strict";var r=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:r)(e)}},function(e,t,n){"use strict";var r=n(23),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,n){"use strict";var r=n(2),i=n(30),a=n(26),o=n(32)("src"),u=Function.toString,s=(""+u).split("toString");n(8).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,u){var f="function"==typeof n;f&&(a(n,"name")||i(n,"name",t)),e[t]!==n&&(f&&(a(n,o)||i(n,o,e[t]?""+e[t]:s.join(String(t)))),e===r?e[t]=n:u?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[o]||u.call(this)})},function(e,t,n){"use strict";var r=n(5),i=n(2).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var r=n(14),i=n(117);e.exports=n(7)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var r=n(2),i=n(8),a=n(30),o=n(27),u=n(10),s=function e(t,n,s){var f,c,d,l,h=t&e.F,p=t&e.G,v=t&e.P,m=t&e.B,y=p?r:t&e.S?r[n]||(r[n]={}):(r[n]||{}).prototype,b=p?i:i[n]||(i[n]={}),w=b.prototype||(b.prototype={});for(f in p&&(s=n),s)d=((c=!h&&y&&void 0!==y[f])?y:s)[f],l=m&&c?u(d,r):v&&"function"==typeof d?u(Function.call,d):d,y&&o(y,f,d,t&e.U),b[f]!=d&&a(b,f,l),v&&w[f]!=d&&(w[f]=d)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){"use strict";var r=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+i).toString(36))}},function(e,t,n){"use strict";var r=n(15),i=n(3)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.64001E, mp4a.40.5"';!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=this;(0,i.default)(this),this.codecs=t,this.mediaSource=new window.MediaSource,this.url=window.URL.createObjectURL(this.mediaSource),this.queue=[],this.updating=!1,this.mediaSource.addEventListener("sourceopen",function(){n.sourceBuffer=n.mediaSource.addSourceBuffer(n.codecs),n.sourceBuffer.addEventListener("error",function(e){n.emit("error",new a.default("mse","",{line:16,handle:"[MSE] constructor sourceopen",msg:e.message}))}),n.sourceBuffer.addEventListener("updateend",function(e){n.emit("updateend");var t=n.queue.shift();t&&n.sourceBuffer.appendBuffer(t)}),n.emit("sourceopen")}),this.mediaSource.addEventListener("sourceclose",function(){n.emit("sourceclose")})}return r(e,[{key:"appendBuffer",value:function(e){var t=this.sourceBuffer;return!1===t.updating&&"open"===this.state?(t.appendBuffer(e),!0):(this.queue.push(e),!1)}},{key:"removeBuffer",value:function(e,t){this.sourceBuffer.remove(e,t)}},{key:"endOfStream",value:function(){"open"===this.state&&this.mediaSource.endOfStream()}},{key:"state",get:function(){return this.mediaSource.readyState}},{key:"duration",get:function(){return this.mediaSource.duration},set:function(e){this.mediaSource.duration=e}}],[{key:"isSupported",value:function(e){return window.MediaSource&&window.MediaSource.isTypeSupported(e)}}]),e}();t.default=u,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={findBox:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e.type!==t){if(e&&e.subBox){var i=e.subBox.filter(function(e){return e.type===t});i.length?i.forEach(function(e){return n.push(e)}):e.subBox.forEach(function(e){return r.findBox(e,t,n)})}}else n.push(e);return(n=[].concat(n)).length>1?n:n[0]},padStart:function(e,t,n){for(var r=String(n),i=t>>0,a=Math.ceil(i/r.length),o=[],u=String(e);a--;)o.push(r);return o.join("").substring(0,i-u.length)+u},toHex:function(){for(var e=[],t=arguments.length,n=Array(t),i=0;i>16&255,t>>8&255,255&t])}},{key:"ftyp",value:function(){var t=new i.default;return t.write(e.size(24),e.type("ftyp"),new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49])),t.buffer}},{key:"moov",value:function(t){var n=new i.default,r=8,a=e.mvhd(t.duration,t.timeScale),o=e.videoTrak(t),u=e.audioTrak(t),s=e.mvex(t.duration,t.timeScale);return[a,o,u,s].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("moov"),a,o,u,s),n.buffer}},{key:"mvhd",value:function(t,n){var r=new i.default;t*=n;var o=Math.floor(t/(a+1)),u=Math.floor(t%(a+1)),s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o,u>>24,u>>16&255,u>>8&255,255&u,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return r.write(e.size(8+s.length),e.type("mvhd"),new Uint8Array(s)),r.buffer}},{key:"videoTrak",value:function(t){var n=new i.default,r=8,a=e.tkhd({id:1,duration:t.videoDuration,timescale:t.videoTimeScale,width:t.width,height:t.height,type:"video"}),o=e.mdia({type:"video",timescale:t.videoTimeScale,duration:t.videoDuration,sps:t.sps,pps:t.pps,pixelRatio:t.pixelRatio,width:t.width,height:t.height});return[a,o].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("trak"),a,o),n.buffer}},{key:"audioTrak",value:function(t){var n=new i.default,r=8,a=e.tkhd({id:2,duration:t.audioDuration,timescale:t.audioTimeScale,width:0,height:0,type:"audio"}),o=e.mdia({type:"audio",timescale:t.audioTimeScale,duration:t.audioDuration,channelCount:t.channelCount,samplerate:t.sampleRate,audioConfig:t.audioConfig});return[a,o].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("trak"),a,o),n.buffer}},{key:"tkhd",value:function(t){var n=new i.default,r=t.id,o=t.duration*t.timeScale,u=t.width,s=t.height,f=t.type,c=Math.floor(o/(a+1)),d=Math.floor(o%(a+1)),l=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d,0,0,0,0,0,0,0,0,0,0,0,"video"===f?1:0,"audio"===f?1:0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,u>>8&255,255&u,0,0,s>>8&255,255&s,0,0]);return n.write(e.size(8+l.byteLength),e.type("tkhd"),l),n.buffer}},{key:"edts",value:function(t){var n=new i.default,r=t.duration,a=t.mediaTime;return n.write(e.size(36),e.type("edts")),n.write(e.size(28),e.type("elst")),n.write(new Uint8Array([0,0,0,1,r>>24&255,r>>16&255,r>>8&255,255&r,a>>24&255,a>>16&255,a>>8&255,255&a,0,0,0,1])),n.buffer}},{key:"mdia",value:function(t){var n=new i.default,r=8,a=e.mdhd(t.timescale),o=e.hdlr(t.type),u=e.minf(t);return[a,o,u].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("mdia"),a,o,u),n.buffer}},{key:"mdhd",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=new i.default;n*=t;var o=Math.floor(n/(a+1)),u=Math.floor(n%(a+1)),s=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,o>>24,o>>16&255,o>>8&255,255&o,u>>24,u>>16&255,u>>8&255,255&u,85,196,0,0]);return r.write(e.size(12+s.byteLength),e.type("mdhd"),e.extension(1,0),s),r.buffer}},{key:"hdlr",value:function(t){var n=new i.default,r=[0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0];return"audio"===t&&(r.splice.apply(r,[8,4].concat([115,111,117,110])),r.splice.apply(r,[24,13].concat([83,111,117,110,100,72,97,110,100,108,101,114,0]))),n.write(e.size(8+r.length),e.type("hdlr"),new Uint8Array(r)),n.buffer}},{key:"minf",value:function(t){var n=new i.default,r=8,a="video"===t.type?e.vmhd():e.smhd(),o=e.dinf(),u=e.stbl(t);return[a,o,u].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("minf"),a,o,u),n.buffer}},{key:"vmhd",value:function(){var t=new i.default;return t.write(e.size(20),e.type("vmhd"),new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])),t.buffer}},{key:"smhd",value:function(){var t=new i.default;return t.write(e.size(16),e.type("smhd"),new Uint8Array([0,0,0,0,0,0,0,0])),t.buffer}},{key:"dinf",value:function(){var t=new i.default;return t.write(e.size(36),e.type("dinf"),e.size(28),e.type("dref"),new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])),t.buffer}},{key:"stbl",value:function(t){var n=new i.default,r=8,a=e.stsd(t),o=e.stts(),u=e.stsc(),s=e.stsz(),f=e.stco();return[a,o,u,s,f].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("stbl"),a,o,u,s,f),n.buffer}},{key:"stsd",value:function(t){var n=new i.default,r=void 0;return r="audio"===t.type?e.mp4a(t):e.avc1(t),n.write(e.size(16+r.byteLength),e.type("stsd"),e.extension(0,0),new Uint8Array([0,0,0,1]),r),n.buffer}},{key:"mp4a",value:function(t){var n=new i.default,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.samplerate>>8&255,255&t.samplerate,0,0]),a=e.esds(t.audioConfig);return n.write(e.size(8+r.byteLength+a.byteLength),e.type("mp4a"),r,a),n.buffer}},{key:"esds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[43,146,8,0],n=t.length,r=new i.default,a=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(t).concat([6,1,2]));return r.write(e.size(8+a.byteLength),e.type("esds"),a),r.buffer}},{key:"avc1",value:function(t){var n=new i.default,r=t.sps,a=t.pps,o=t.width,u=t.height,s=t.pixelRatio[0],f=t.pixelRatio[1],c=new Uint8Array([1,r[1],r[2],r[3],255,225].concat([r.length>>>8&255,255&r.length]).concat(r).concat(1).concat([a.length>>>8&255,255&a.length]).concat(a)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,255&o,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l=new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]),h=new Uint8Array([s>>24,s>>16&255,s>>8&255,255&s,f>>24,f>>16&255,f>>8&255,255&f]);return n.write(e.size(40+d.byteLength+c.byteLength+l.byteLength),e.type("avc1"),d,e.size(8+c.byteLength),e.type("avcC"),c,e.size(20),e.type("btrt"),l,e.size(16),e.type("pasp"),h),n.buffer}},{key:"stts",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0]);return t.write(e.size(16),e.type("stts"),n),t.buffer}},{key:"stsc",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0]);return t.write(e.size(16),e.type("stsc"),n),t.buffer}},{key:"stco",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0]);return t.write(e.size(16),e.type("stco"),n),t.buffer}},{key:"stsz",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);return t.write(e.size(20),e.type("stsz"),n),t.buffer}},{key:"mvex",value:function(t,n){var r=new i.default,a=i.default.writeUint32(t*n);return r.write(e.size(88),e.type("mvex"),e.size(16),e.type("mehd"),e.extension(0,0),a,e.trex(1),e.trex(2)),r.buffer}},{key:"trex",value:function(t){var n=new i.default,r=new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return n.write(e.size(8+r.byteLength),e.type("trex"),r),n.buffer}},{key:"moof",value:function(t){var n=new i.default,r=8,a=e.mfhd(),o=e.traf(t);return[a,o].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("moof"),a,o),n.buffer}},{key:"mfhd",value:function(){var t=new i.default,n=i.default.writeUint32(e.sequence);return e.sequence+=1,t.write(e.size(16),e.type("mfhd"),e.extension(0,0),n),t.buffer}},{key:"traf",value:function(t){var n=new i.default,r=8,a=e.tfhd(t.id),o=e.tfdt(t.time),u=e.sdtp(t),s=e.trun(t,u.byteLength);return[a,o,u,s].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("traf"),a,o,u,s),n.buffer}},{key:"tfhd",value:function(t){var n=new i.default,r=i.default.writeUint32(t);return n.write(e.size(16),e.type("tfhd"),e.extension(0,0),r),n.buffer}},{key:"tfdt",value:function(t){var n=new i.default,r=Math.floor(t/(a+1)),o=Math.floor(t%(a+1));return n.write(e.size(20),e.type("tfdt"),e.extension(1,0),i.default.writeUint32(r),i.default.writeUint32(o)),n.buffer}},{key:"trun",value:function(t,n){var r=t.id,a=1===r?16:12,o=new i.default,u=i.default.writeUint32(t.samples.length),s=i.default.writeUint32(96+a*t.samples.length+n);return o.write(e.size(20+a*t.samples.length),e.type("trun"),e.extension(0,t.flags),u,s),t.samples.forEach(function(e,t){o.write(i.default.writeUint32(e.duration)),o.write(i.default.writeUint32(e.size)),1===r?(o.write(i.default.writeUint32(e.key?33554432:16842752)),o.write(i.default.writeUint32(e.offset))):o.write(i.default.writeUint32(16777216))}),o.buffer}},{key:"sdtp",value:function(t){var n=new i.default;return n.write(e.size(12+t.samples.length),e.type("sdtp"),e.extension(0,0)),t.samples.forEach(function(e){n.write(new Uint8Array(1===t.id?[e.key?32:16]:[16]))}),n.buffer}},{key:"mdat",value:function(t){var n=new i.default,r=8;return t.samples.forEach(function(e){r+=e.size}),n.write(e.size(r),e.type("mdat")),t.samples.forEach(function(e){n.write(e.buffer)}),n.buffer}}]),e}();o.sequence=1,t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=a(n(0)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.avc1=function(){var e=new i.default(this.data);e.skip(6),this.dataReferenceIndex=e.readUint16(),e.skip(16),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.skip(4),this.frameCount=e.readUint16(),e.skip(1);for(var t=0;t<31;t++)String.fromCharCode(e.readUint8());for(this.depth=e.readUint16(),e.skip(2);e.position>16;var t=new r.default;t.readHeader(e),this.subBox.push(t),t.readBody(e),delete this.data,e=null}},function(e,t,n){"use strict";var r=a(n(0)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.MP4DecConfigDescrTag=function(e){var t=new r.default,n=void 0;return t.type=e.readUint8(),128===(n=e.readUint8())?(t.extend=!0,e.skip(2),n=e.readUint8()+5):n+=2,t.size=n,t.typeID=e.readUint8(),t.streamUint=e.readUint8(),t.bufferSize=i.default.readByte(e.dataview,3),t.maximum=e.readUint32(),t.average=e.readUint32(),t.subBox.push(r.default.MP4DecSpecificDescrTag(e)),t}},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.MP4DecSpecificDescrTag=function(e){var t=new r.default,n=void 0,i=void 0;t.type=e.readUint8(),128===(n=e.readUint8())?(t.extend=!0,e.skip(2),i=(n=e.readUint8()+5)-5):(i=n,n+=2),t.size=n;for(var a=[],o=0;o1){var c=t[this.count-1],d=t[this.count-2];c.first_sample=d.first_sample+d.chunk_count*d.samples_per_chunk,c.chunk_count=0}delete this.subBox,delete this.data,e=null}},function(e,t,n){"use strict";var r=a(n(0)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.stsd=function(){var e=new i.default(this.data);this.version=e.readUint8(),this.flag=i.default.readByte(e.dataview,3),this.entryCount=e.readUint32();var t=new r.default;t.readHeader(e),this.subBox.push(t),t.readBody(e),delete this.data,e=null}},function(e,t,n){"use strict"},function(e,t,n){"use strict";var r=a(n(0)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.stss=function(){var e=new i.default(this.data);this.version=e.readUint8(),this.flag=i.default.readByte(e.dataview,3),this.count=e.readUint32();var t=[];this.entries=t;for(var n=0,r=this.count;n>8,e.readUint16();for(var t=[],n=0;n<9;n++)t.push(e.readUint16()+"."+e.readUint16());this.matrix=t,this.width=e.readUint16()+"."+e.readUint16(),this.height=e.readUint16()+"."+e.readUint16(),delete this.data,delete this.subBox,e=null}},function(e,t,n){"use strict"},function(e,t,n){"use strict"},function(e,t,n){"use strict";(function(e){return e&&e.__esModule?e:{default:e}})(n(0)).default.udta=function(){delete this.subBox}},function(e,t,n){"use strict";var r=a(n(0)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default["url "]=function(){var e=new i.default(this.data);this.version=e.readUint8(),this.flag=[e.readUint8(),e.readUint8(),e.readUint8()];for(var t=[],n=e.buffer.byteLength;e.position1?n-1:0),i=1;i=8;){var u=new r.default;if(u.readHeader(o),u.size-8<=n-o.position)u.readBody(o),this.boxes.push(u);else{if("mdat"!==u.type){this.nextBox=u,o.position-=8;break}u.readBody(o),this.boxes.push(u)}}this.buffer=new Uint8Array(this.buffer.slice(o.position))},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e){return function(e){return!!e&&"object"===(void 0===e?"undefined":r(e))}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===a}(e)}(e)};var a="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return(!t||!1!==t.clone)&&i(e)?s(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function u(e,t,n){return e.concat(t).map(function(e){return o(e,n)})}function s(e,t,n){var r=Array.isArray(t);return r===Array.isArray(e)?r?((n||{arrayMerge:u}).arrayMerge||u)(e,t,n):function(e,t,n){var r={};return i(e)&&Object.keys(e).forEach(function(t){r[t]=o(e[t],n)}),Object.keys(t).forEach(function(a){i(t[a])&&e[a]?r[a]=s(e[a],t[a],n):r[a]=o(t[a],n)}),r}(e,t,n):o(t,n)}s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})};var f=s;t.default=f,e.exports=t.default},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";var r=String.prototype.indexOf;e.exports=function(e){return r.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";var r="razdwatrzy";e.exports=function(){return"function"==typeof r.contains&&(!0===r.contains("dwa")&&!1===r.contains("foo"))}},function(e,t,n){"use strict";e.exports=n(85)()?String.prototype.contains:n(84)},function(e,t,n){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";var r=n(12),i=Array.prototype.forEach,a=Object.create;e.exports=function(e){var t=a(null);return i.call(arguments,function(e){r(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)}),t}},function(e,t,n){"use strict";var r=n(12);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=n(12),i=Object.keys;e.exports=function(e){return i(r(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";e.exports=n(92)()?Object.keys:n(91)},function(e,t,n){"use strict";var r=n(93),i=n(89),a=Math.max;e.exports=function(e,t){var n,o,u,s=a(arguments.length,2);for(e=Object(i(e)),u=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},o=1;o1&&void 0!==arguments[1]?arguments[1]:Math.pow(25,4);!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(0,i.default)(this),this.url=t,this.CHUNK_SIZE=n,this.init(t),this.once("moovReady",this.moovParse.bind(this)),this.cache=new u.default,this.bufferCache=new Set,this.timeRage=[],this.canDownload=!0}return r(e,[{key:"getData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t+this.CHUNK_SIZE,r=this;return new Promise(function(i,a){new f.default(e.url,[t,n],i).once("error",function(e){r.emit("error",e)})})}},{key:"moovParse",value:function(){var e=this,t=this,n=this.moovBox,r=c.default.findBox(n,"mvhd"),i=c.default.findBox(n,"trak"),o=void 0,u=void 0,s=void 0,f=void 0,l=void 0,h=void 0,p=void 0,v=void 0,m=void 0,y=void 0,b=void 0,w=void 0,g=void 0,_=void 0;i.forEach(function(e){var n=c.default.findBox(e,"hdlr"),r=c.default.findBox(e,"mdhd");if(n&&r){var i=c.default.findBox(e,"stsd").subBox[0];if("vide"===n.handleType){var a=c.default.findBox(e,"avcC"),x=c.default.findBox(e,"avc1");o=e,l=r.timescale,a?(s=i.type+"."+c.default.toHex(a.profile,a.profileCompatibility,a.AVCLevelIndication).join(""),p=a.sequence&&a.sequence.map(function(e){return Number("0x"+e)}),v=a.pps&&a.pps.map(function(e){return Number("0x"+e)}),m=a.profile):s=""+i.type,x&&(y=x.width,b=x.height)}if("soun"===n.handleType){u=e;var U=c.default.findBox(e,"esds"),k=c.default.findBox(e,"mp4a"),S=c.default.findBox(e,5);h=r.timescale,f=U?i.type+"."+c.default.toHex(U.subBox[0].subBox[0].typeID)+"."+U.subBox[0].subBox[0].subBox[0].type:""+i.type,S&&S.EScode&&(_=S.EScode.map(function(e){return Number("0x"+e)})),k&&(w=k.channelCount,g=k.sampleRate)}}else t.emit("error",new d.default("parse","",{line:72,handle:"[MP4] moovParse",url:t.url}))}),this.videoTrak=(0,a.default)({},o),this.audioTrak=(0,a.default)({},u);var x=this._boxes.find(function(e){return"mdat"===e.type}),U=c.default.seekTrakDuration(o,l),k=c.default.seekTrakDuration(u,h);this.mdatStart=x.start;var S=this.videoKeyFrames,B=S.length-1;S.forEach(function(t,n){n0&&void 0!==arguments[0]?arguments[0]:"video",t=arguments[1],n=arguments[2],r="video"===e?this.videoTrak:this.audioTrak,i=c.default.findBox(r,"stsc"),a=c.default.findBox(r,"stsz"),o=c.default.findBox(r,"stts"),u=c.default.findBox(r,"stco"),s=c.default.findBox(r,"ctts"),f=this.mdatStart,d=[];if(n=void 0!==n?n:a.entries.length,t instanceof Array)t.forEach(function(e,t){d.push({idx:e,size:a.entries[e],time:c.default.seekSampleTime(o,s,e),offset:c.default.seekSampleOffset(i,u,a,e,f)})});else if(0!==n)for(var l=t;l0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t,n){"use strict";var r=n(24),i=n(99),a=n(20);e.exports=function(e,t,n,o){var u=String(a(e)),s=u.length,f=void 0===n?" ":String(n),c=r(t);if(c<=s||""==f)return u;var d=c-s,l=i.call(f,Math.ceil(d/f.length));return l.length>d&&(l=l.slice(0,d)),o?l+u:u+l}},function(e,t,n){"use strict";var r=n(31),i=n(100);r(r.P,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";var r=n(3)("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},e(a)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(2),i=n(14),a=n(7),o=n(3)("species");e.exports=function(e){var t=r[e];a&&t&&!t[o]&&i.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(14).f,i=n(26),a=n(3)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(27);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(6),i=n(5),a=n(21);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){"use strict";var r=n(2),i=n(22).set,a=r.MutationObserver||r.WebKitMutationObserver,o=r.process,u=r.Promise,s="process"==n(15)(o);e.exports=function(){var e,t,n,f=function(){var r,i;for(s&&(r=o.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(s)n=function(){o.nextTick(f)};else if(a){var c=!0,d=document.createTextNode("");new a(f).observe(d,{characterData:!0}),n=function(){d.data=c=!c}}else if(u&&u.resolve){var l=u.resolve();n=function(){l.then(f)}}else n=function(){i.call(r,f)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){"use strict";var r=n(2).document;e.exports=r&&r.documentElement},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){"use strict";var r=n(6),i=n(9),a=n(3)("species");e.exports=function(e,t){var n,o=r(e).constructor;return void 0===o||null==(n=r(o)[a])?t:i(n)}},function(e,t,n){"use strict";var r=n(33),i=n(3)("iterator"),a=n(25);e.exports=n(8).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[r(e)]}},function(e,t,n){"use strict";var r=n(25),i=n(3)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},function(e,t,n){"use strict";var r=n(6);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},function(e,t,n){"use strict";var r=n(10),i=n(114),a=n(113),o=n(6),u=n(24),s=n(112),f={},c={},d=e.exports=function(e,t,n,d,l){var h,p,v,m,y=l?function(){return e}:s(e),b=r(n,d,t?2:1),w=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(a(y)){for(h=u(e.length);h>w;w++)if((m=t?b(o(p=e[w])[0],p[1]):b(e[w]))===f||m===c)return m}else for(v=y.call(e);!(p=v.next()).done;)if((m=i(v,b,p.value,t))===f||m===c)return m};d.BREAK=f,d.RETURN=c},function(e,t,n){"use strict";e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var r=n(5);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";e.exports=!n(7)&&!n(29)(function(){return 7!=Object.defineProperty(n(28)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";var r=n(2),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,n){"use strict";e.exports=!1},function(e,t,n){"use strict";var r,i,a,o,u=n(121),s=n(2),f=n(10),c=n(33),d=n(31),l=n(5),h=n(9),p=n(116),v=n(115),m=n(111),y=n(22).set,b=n(108)(),w=n(21),g=n(107),_=n(106),x=s.TypeError,U=s.process,k=s.Promise,S="process"==c(U),B=function(){},T=i=w.f,M=!!function(){try{var e=k.resolve(1),t=(e.constructor={})[n(3)("species")]=function(e){e(B,B)};return(S||"function"==typeof PromiseRejectionEvent)&&e.then(B)instanceof t}catch(e){}}(),O=function(e){var t;return!(!l(e)||"function"!=typeof(t=e.then))&&t},j=function(e,t){if(!e._n){e._n=!0;var n=e._c;b(function(){for(var r=e._v,i=1==e._s,a=0,o=function(t){var n,a,o=i?t.ok:t.fail,u=t.resolve,s=t.reject,f=t.domain;try{o?(i||(2==e._h&&C(e),e._h=1),!0===o?n=r:(f&&f.enter(),n=o(r),f&&f.exit()),n===t.promise?s(x("Promise-chain cycle")):(a=O(n))?a.call(n,u,s):u(n)):s(r)}catch(e){s(e)}};n.length>a;)o(n[a++]);e._c=[],e._n=!1,t&&!e._h&&E(e)})}},E=function(e){y.call(s,function(){var t,n,r,i=e._v,a=z(e);if(a&&(t=g(function(){S?U.emit("unhandledRejection",i,e):(n=s.onunhandledrejection)?n({promise:e,reason:i}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=S||z(e)?2:1),e._a=void 0,a&&t.e)throw t.v})},z=function e(t){if(1==t._h)return!1;for(var n,r=t._a||t._c,i=0;r.length>i;)if((n=r[i++]).fail||!e(n.promise))return!1;return!0},C=function(e){y.call(s,function(){var t;S?U.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})})},P=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),j(t,!0))},A=function e(t){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw x("Promise can't be resolved itself");(n=O(t))?b(function(){var i={_w:r,_d:!1};try{n.call(t,f(e,i,1),f(P,i,1))}catch(e){P.call(i,e)}}):(r._v=t,r._s=1,j(r,!1))}catch(e){P.call({_w:r,_d:!1},e)}}};M||(k=function(e){p(this,k,"Promise","_h"),h(e),r.call(this);try{e(f(A,this,1),f(P,this,1))}catch(e){P.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(105)(k.prototype,{then:function(e,t){var n=T(m(this,k));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=S?U.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&j(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new r;this.promise=e,this.resolve=f(A,e,1),this.reject=f(P,e,1)},w.f=T=function(e){return e===k||e===o?new a(e):i(e)}),d(d.G+d.W+d.F*!M,{Promise:k}),n(104)(k,"Promise"),n(103)("Promise"),o=n(8).Promise,d(d.S+d.F*!M,"Promise",{reject:function(e){var t=T(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(u||!M),"Promise",{resolve:function(e){return _(u&&this===o?k:this,e)}}),d(d.S+d.F*!(M&&n(102)(function(e){k.all(e).catch(B)})),"Promise",{all:function(e){var t=this,n=T(t),r=n.resolve,i=n.reject,a=g(function(){var n=[],a=0,o=1;v(e,!1,function(e){var u=a++,s=!1;n.push(void 0),o++,t.resolve(e).then(function(e){s||(s=!0,n[u]=e,--o||r(n))},i)}),--o||r(n)});return a.e&&i(a.v),n.promise},race:function(e){var t=this,n=T(t),r=n.reject,i=g(function(){v(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n(122),n(101);var i=s(n(19)),a=s(n(98)),o=s(n(34)),u=s(n(16));function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e,t){t.vid=e.config.vid,t.url=e.src,t.errd&&"object"===r(t.errd)&&e.mp4&&(t.errd.url=e.mp4.url,t.url=e.mp4.url,e.mp4.canDownload=!1),e.emit("DATA_REPORT",t),"network"===t.errt&&e.config._backupURL?e.src=e.config._backupURL:e.src=e.config._mainURL,e.switchURL=null,e._replay=null};i.default.install("mp4player",function(){var e=this,t=i.default.sniffer,n=i.default.util,r=i.default.Errors,s=void 0,c=void 0,d=e.config.preloadTime||15,l=void 0,h=e.config.url,p=e.config.pluginRule||function(){return!0};if(h){"String"===n.typeOf(h)?s=h:"Array"===n.typeOf(h)&&h.length&&(s=h[0].src,c=h[1].src),e.config._mainURL=s,e.config._backupURL=c;var v=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.currentTime;e.timer&&clearTimeout(e.timer),r=Math.max(r,e.currentTime),e.timer=setTimeout(function(){e.mp4.seek(r+.1*n).then(function(t){if(t){var n=e.mse;n.updating=!0,n.appendBuffer(t),n.once("updateend",function(){n.updating=!1})}},function(){n<10&&setTimeout(function(){t(n+1)},2e3)})},50)},m=function(t){var n=new a.default(t),r=void 0;return new Promise(function(t,i){n.once("moovReady",function(){(r=new o.default).on("sourceopen",function(){r.appendBuffer(n.packMeta()),r.once("updateend",v.bind(e))}),r.on("error",function(e){i(e)}),t([n,r])}),n.on("error",function(e){i(e)})})};if(["chrome","firfox","safari"].some(function(e){return e===t.browser})&&o.default.isSupported('video/mp4; codecs="avc1.64001E, mp4a.40.5"')){var y=e.start;if(!p.call(e))return!1;e.start=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;m(n).then(function(t){var n=t[0],r=t[1];y.call(e,r.url),e.mp4=n,e.mse=r,n.on("error",function(t){f(e,t)})},function(t){y.call(e,n),f(e,t)}),e.download=function(){e.mp4.download()},e.once("canplay",function(){if("safari"===t.browser&&e.buffered){var n=e.buffered.start(0);e.currentTime=n+.1}})},e.switchURL=function(n){var r=new a.default(n),i=e.mp4;r.on("moovReady",function(){i.timeRage;var n=e.currentTime,a=i.timeRage.find(function(e){return e[0]-n>2})[0],o=e.getBufferedRange()[1];o-a>0&&"safari"!==t.browser&&e.mse.removeBuffer(a,o),e.mp4=r,e.mse.appendBuffer(r.packMeta())}),r.on("error",function(t){f(e,t)})},e.on("timeupdate",function(){var t=e.mse,n=e.mp4;if(t&&!t.updating&&n.canDownload){var r=n.timeRage,i=e.getBufferedRange(),a=e.currentTime+d;if(i[1]-a>0)return;r.every(function(e,t){var r=(e[0]+e[1])/2;return 0===i[1]?(v(5),!1):!(r>i[1]&&!n.bufferCache.has(t))||void v(0,r)}),function(e,t){if(t.meta.endTime-e.currentTime<2){var n=e.getBufferedRange();e.currentTime-n[1]<.1&&e.mse.endOfStream()}}(e,n)}}),e.on("seeking",function(){var t=e.buffered,n=!1,r=e.currentTime;if(u.default.clear(),t.length){for(var i=0,a=t.length;i=t.start(i)&&r<=t.end(i)){n=!0;break}n||v(0,r)}else v(0,e.currentTime)}),e.on("pause",function(){u.default.clear()}),e.on("playing",function(){l&&clearTimeout(l)}),e.on("waiting",function(){var t=e.mp4;if(t&&t.meta){var n=e.getBufferedRange(),r=t.meta.videoDuration;r-e.currentTime<.5&&r-n[1]<.5?e.mse.endOfStream():(v(0,n[1]+1),l=setTimeout(function(){for(var t=e.buffered,n=void 0,r=0,i=t.length;r=e.currentTime){e.currentTime=n;break}},1500))}}),e._replay=function(){u.default.clear(),e.mp4.bufferCache.clear(),m(e.mp4.url).then(function(t){var n=t[0],r=t[1];e.src=r.url,e.mp4=n,e.mse=r,e.currentTime=0,e.play()},function(t){f(e,t)})}}}else e.emit("error",new r("other",e.config.vid))})},function(e,t,n){e.exports=n(123)}]); \ No newline at end of file diff --git a/packages/xgplayer-mp4/dist/index.js b/packages/xgplayer-mp4/dist/index.js new file mode 100644 index 00000000..a89d129a --- /dev/null +++ b/packages/xgplayer-mp4/dist/index.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("xgplayer")):"function"==typeof define&&define.amd?define(["xgplayer"],t):"object"==typeof exports?exports["xgplayer-mp4"]=t(require("xgplayer")):e["xgplayer-mp4"]=t(e.xgplayer)}(window,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=124)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&e.readByte(this.dataview,r)}},{key:"readUint8",value:function(){return e.readByte(this.dataview,1)}},{key:"readUint16",value:function(){return e.readByte(this.dataview,2)}},{key:"readUint32",value:function(){return e.readByte(this.dataview,4)}},{key:"readUint64",value:function(){return e.readByte(this.dataview,8)}},{key:"readInt8",value:function(){return e.readByte(this.dataview,1,!0)}},{key:"readInt16",value:function(){return e.readByte(this.dataview,2,!0)}},{key:"readInt32",value:function(){return e.readByte(this.dataview,4,!0)}},{key:"position",set:function(e){this.dataview.position=e},get:function(){return this.dataview.position}}],[{key:"readByte",value:function(e,t,n){var r=void 0;switch(t){case 1:r=n?e.getInt8(e.position):e.getUint8(e.position);break;case 2:r=n?e.getInt16(e.position):e.getUint16(e.position);break;case 3:if(n)throw"not supported for readByte 3";r=e.getUint8(e.position)<<16,r|=e.getUint8(e.position+1)<<8,r|=e.getUint8(e.position+2);break;case 4:r=n?e.getInt32(e.position):e.getUint32(e.position);break;case 8:if(n)throw new i.default("parse","",{line:73,handle:"[Stream] readByte",msg:"not supported for readBody 8"});r=e.getUint32(e.position)<<32,r|=e.getUint32(e.position+4);break;default:r=""}return e.position+=t,r}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,n){"use strict";var r=n(120)("wks"),i=n(32),a=n(2).Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{default:e}}(n(19)),i=n(80);var a=function(e){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r.version=i.version;var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r));return o.url=a,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.default.Errors),t}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(e){return"object"===(void 0===e?"undefined":r(e))?null!==e:"function"==typeof e}},function(e,t,n){"use strict";var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";e.exports=!n(29)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";var r=e.exports={version:"2.5.1"};"number"==typeof __e&&(__e=r)},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";var r=n(9);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n>24,e>>16&255,e>>8&255,255&e])}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(79));e.exports=r.default},function(t,n){t.exports=e},function(e,t,n){"use strict";e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(9);e.exports.f=function(e){return new function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}(e)}},function(e,t,n){"use strict";var r,i,a,o=n(10),u=n(110),s=n(109),f=n(28),c=n(2),d=c.process,l=c.setImmediate,h=c.clearImmediate,p=c.MessageChannel,v=c.Dispatch,m=0,y={},b=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},w=function(e){b.call(e.data)};l&&h||(l=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++m]=function(){u("function"==typeof e?e:Function(e),t)},r(m),m},h=function(e){delete y[e]},"process"==n(15)(d)?r=function(e){d.nextTick(o(b,e,1))}:v&&v.now?r=function(e){v.now(o(b,e,1))}:p?(a=(i=new p).port2,i.port1.onmessage=w,r=o(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",w,!1)):r="onreadystatechange"in f("script")?function(e){s.appendChild(f("script")).onreadystatechange=function(){s.removeChild(this),b.call(e)}}:function(e){setTimeout(o(b,e,1),0)}),e.exports={set:l,clear:h}},function(e,t,n){"use strict";var r=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:r)(e)}},function(e,t,n){"use strict";var r=n(23),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,n){"use strict";var r=n(2),i=n(30),a=n(26),o=n(32)("src"),u=Function.toString,s=(""+u).split("toString");n(8).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,u){var f="function"==typeof n;f&&(a(n,"name")||i(n,"name",t)),e[t]!==n&&(f&&(a(n,o)||i(n,o,e[t]?""+e[t]:s.join(String(t)))),e===r?e[t]=n:u?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[o]||u.call(this)})},function(e,t,n){"use strict";var r=n(5),i=n(2).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var r=n(14),i=n(117);e.exports=n(7)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var r=n(2),i=n(8),a=n(30),o=n(27),u=n(10),s=function e(t,n,s){var f,c,d,l,h=t&e.F,p=t&e.G,v=t&e.P,m=t&e.B,y=p?r:t&e.S?r[n]||(r[n]={}):(r[n]||{}).prototype,b=p?i:i[n]||(i[n]={}),w=b.prototype||(b.prototype={});for(f in p&&(s=n),s)d=((c=!h&&y&&void 0!==y[f])?y:s)[f],l=m&&c?u(d,r):v&&"function"==typeof d?u(Function.call,d):d,y&&o(y,f,d,t&e.U),b[f]!=d&&a(b,f,l),v&&w[f]!=d&&(w[f]=d)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){"use strict";var r=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+i).toString(36))}},function(e,t,n){"use strict";var r=n(15),i=n(3)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.64001E, mp4a.40.5"';!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=this;(0,i.default)(this),this.codecs=t,this.mediaSource=new window.MediaSource,this.url=window.URL.createObjectURL(this.mediaSource),this.queue=[],this.updating=!1,this.mediaSource.addEventListener("sourceopen",function(){n.sourceBuffer=n.mediaSource.addSourceBuffer(n.codecs),n.sourceBuffer.addEventListener("error",function(e){n.emit("error",new a.default("mse","",{line:16,handle:"[MSE] constructor sourceopen",msg:e.message}))}),n.sourceBuffer.addEventListener("updateend",function(e){n.emit("updateend");var t=n.queue.shift();t&&n.sourceBuffer.appendBuffer(t)}),n.emit("sourceopen")}),this.mediaSource.addEventListener("sourceclose",function(){n.emit("sourceclose")})}return r(e,[{key:"appendBuffer",value:function(e){var t=this.sourceBuffer;return!1===t.updating&&"open"===this.state?(t.appendBuffer(e),!0):(this.queue.push(e),!1)}},{key:"removeBuffer",value:function(e,t){this.sourceBuffer.remove(e,t)}},{key:"endOfStream",value:function(){"open"===this.state&&this.mediaSource.endOfStream()}},{key:"state",get:function(){return this.mediaSource.readyState}},{key:"duration",get:function(){return this.mediaSource.duration},set:function(e){this.mediaSource.duration=e}}],[{key:"isSupported",value:function(e){return window.MediaSource&&window.MediaSource.isTypeSupported(e)}}]),e}();t.default=u,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={findBox:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e.type!==t){if(e&&e.subBox){var i=e.subBox.filter(function(e){return e.type===t});i.length?i.forEach(function(e){return n.push(e)}):e.subBox.forEach(function(e){return r.findBox(e,t,n)})}}else n.push(e);return(n=[].concat(n)).length>1?n:n[0]},padStart:function(e,t,n){for(var r=String(n),i=t>>0,a=Math.ceil(i/r.length),o=[],u=String(e);a--;)o.push(r);return o.join("").substring(0,i-u.length)+u},toHex:function(){for(var e=[],t=arguments.length,n=Array(t),i=0;i>16&255,t>>8&255,255&t])}},{key:"ftyp",value:function(){var t=new i.default;return t.write(e.size(24),e.type("ftyp"),new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49])),t.buffer}},{key:"moov",value:function(t){var n=new i.default,r=8,a=e.mvhd(t.duration,t.timeScale),o=e.videoTrak(t),u=e.audioTrak(t),s=e.mvex(t.duration,t.timeScale);return[a,o,u,s].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("moov"),a,o,u,s),n.buffer}},{key:"mvhd",value:function(t,n){var r=new i.default;t*=n;var o=Math.floor(t/(a+1)),u=Math.floor(t%(a+1)),s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o,u>>24,u>>16&255,u>>8&255,255&u,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return r.write(e.size(8+s.length),e.type("mvhd"),new Uint8Array(s)),r.buffer}},{key:"videoTrak",value:function(t){var n=new i.default,r=8,a=e.tkhd({id:1,duration:t.videoDuration,timescale:t.videoTimeScale,width:t.width,height:t.height,type:"video"}),o=e.mdia({type:"video",timescale:t.videoTimeScale,duration:t.videoDuration,sps:t.sps,pps:t.pps,pixelRatio:t.pixelRatio,width:t.width,height:t.height});return[a,o].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("trak"),a,o),n.buffer}},{key:"audioTrak",value:function(t){var n=new i.default,r=8,a=e.tkhd({id:2,duration:t.audioDuration,timescale:t.audioTimeScale,width:0,height:0,type:"audio"}),o=e.mdia({type:"audio",timescale:t.audioTimeScale,duration:t.audioDuration,channelCount:t.channelCount,samplerate:t.sampleRate,audioConfig:t.audioConfig});return[a,o].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("trak"),a,o),n.buffer}},{key:"tkhd",value:function(t){var n=new i.default,r=t.id,o=t.duration*t.timeScale,u=t.width,s=t.height,f=t.type,c=Math.floor(o/(a+1)),d=Math.floor(o%(a+1)),l=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d,0,0,0,0,0,0,0,0,0,0,0,"video"===f?1:0,"audio"===f?1:0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,u>>8&255,255&u,0,0,s>>8&255,255&s,0,0]);return n.write(e.size(8+l.byteLength),e.type("tkhd"),l),n.buffer}},{key:"edts",value:function(t){var n=new i.default,r=t.duration,a=t.mediaTime;return n.write(e.size(36),e.type("edts")),n.write(e.size(28),e.type("elst")),n.write(new Uint8Array([0,0,0,1,r>>24&255,r>>16&255,r>>8&255,255&r,a>>24&255,a>>16&255,a>>8&255,255&a,0,0,0,1])),n.buffer}},{key:"mdia",value:function(t){var n=new i.default,r=8,a=e.mdhd(t.timescale),o=e.hdlr(t.type),u=e.minf(t);return[a,o,u].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("mdia"),a,o,u),n.buffer}},{key:"mdhd",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=new i.default;n*=t;var o=Math.floor(n/(a+1)),u=Math.floor(n%(a+1)),s=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,o>>24,o>>16&255,o>>8&255,255&o,u>>24,u>>16&255,u>>8&255,255&u,85,196,0,0]);return r.write(e.size(12+s.byteLength),e.type("mdhd"),e.extension(1,0),s),r.buffer}},{key:"hdlr",value:function(t){var n=new i.default,r=[0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0];return"audio"===t&&(r.splice.apply(r,[8,4].concat([115,111,117,110])),r.splice.apply(r,[24,13].concat([83,111,117,110,100,72,97,110,100,108,101,114,0]))),n.write(e.size(8+r.length),e.type("hdlr"),new Uint8Array(r)),n.buffer}},{key:"minf",value:function(t){var n=new i.default,r=8,a="video"===t.type?e.vmhd():e.smhd(),o=e.dinf(),u=e.stbl(t);return[a,o,u].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("minf"),a,o,u),n.buffer}},{key:"vmhd",value:function(){var t=new i.default;return t.write(e.size(20),e.type("vmhd"),new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])),t.buffer}},{key:"smhd",value:function(){var t=new i.default;return t.write(e.size(16),e.type("smhd"),new Uint8Array([0,0,0,0,0,0,0,0])),t.buffer}},{key:"dinf",value:function(){var t=new i.default;return t.write(e.size(36),e.type("dinf"),e.size(28),e.type("dref"),new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])),t.buffer}},{key:"stbl",value:function(t){var n=new i.default,r=8,a=e.stsd(t),o=e.stts(),u=e.stsc(),s=e.stsz(),f=e.stco();return[a,o,u,s,f].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("stbl"),a,o,u,s,f),n.buffer}},{key:"stsd",value:function(t){var n=new i.default,r=void 0;return r="audio"===t.type?e.mp4a(t):e.avc1(t),n.write(e.size(16+r.byteLength),e.type("stsd"),e.extension(0,0),new Uint8Array([0,0,0,1]),r),n.buffer}},{key:"mp4a",value:function(t){var n=new i.default,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.samplerate>>8&255,255&t.samplerate,0,0]),a=e.esds(t.audioConfig);return n.write(e.size(8+r.byteLength+a.byteLength),e.type("mp4a"),r,a),n.buffer}},{key:"esds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[43,146,8,0],n=t.length,r=new i.default,a=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(t).concat([6,1,2]));return r.write(e.size(8+a.byteLength),e.type("esds"),a),r.buffer}},{key:"avc1",value:function(t){var n=new i.default,r=t.sps,a=t.pps,o=t.width,u=t.height,s=t.pixelRatio[0],f=t.pixelRatio[1],c=new Uint8Array([1,r[1],r[2],r[3],255,225].concat([r.length>>>8&255,255&r.length]).concat(r).concat(1).concat([a.length>>>8&255,255&a.length]).concat(a)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,255&o,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l=new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]),h=new Uint8Array([s>>24,s>>16&255,s>>8&255,255&s,f>>24,f>>16&255,f>>8&255,255&f]);return n.write(e.size(40+d.byteLength+c.byteLength+l.byteLength),e.type("avc1"),d,e.size(8+c.byteLength),e.type("avcC"),c,e.size(20),e.type("btrt"),l,e.size(16),e.type("pasp"),h),n.buffer}},{key:"stts",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0]);return t.write(e.size(16),e.type("stts"),n),t.buffer}},{key:"stsc",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0]);return t.write(e.size(16),e.type("stsc"),n),t.buffer}},{key:"stco",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0]);return t.write(e.size(16),e.type("stco"),n),t.buffer}},{key:"stsz",value:function(){var t=new i.default,n=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);return t.write(e.size(20),e.type("stsz"),n),t.buffer}},{key:"mvex",value:function(t,n){var r=new i.default,a=i.default.writeUint32(t*n);return r.write(e.size(88),e.type("mvex"),e.size(16),e.type("mehd"),e.extension(0,0),a,e.trex(1),e.trex(2)),r.buffer}},{key:"trex",value:function(t){var n=new i.default,r=new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return n.write(e.size(8+r.byteLength),e.type("trex"),r),n.buffer}},{key:"moof",value:function(t){var n=new i.default,r=8,a=e.mfhd(),o=e.traf(t);return[a,o].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("moof"),a,o),n.buffer}},{key:"mfhd",value:function(){var t=new i.default,n=i.default.writeUint32(e.sequence);return e.sequence+=1,t.write(e.size(16),e.type("mfhd"),e.extension(0,0),n),t.buffer}},{key:"traf",value:function(t){var n=new i.default,r=8,a=e.tfhd(t.id),o=e.tfdt(t.time),u=e.sdtp(t),s=e.trun(t,u.byteLength);return[a,o,u,s].forEach(function(e){r+=e.byteLength}),n.write(e.size(r),e.type("traf"),a,o,u,s),n.buffer}},{key:"tfhd",value:function(t){var n=new i.default,r=i.default.writeUint32(t);return n.write(e.size(16),e.type("tfhd"),e.extension(0,0),r),n.buffer}},{key:"tfdt",value:function(t){var n=new i.default,r=Math.floor(t/(a+1)),o=Math.floor(t%(a+1));return n.write(e.size(20),e.type("tfdt"),e.extension(1,0),i.default.writeUint32(r),i.default.writeUint32(o)),n.buffer}},{key:"trun",value:function(t,n){var r=t.id,a=1===r?16:12,o=new i.default,u=i.default.writeUint32(t.samples.length),s=i.default.writeUint32(96+a*t.samples.length+n);return o.write(e.size(20+a*t.samples.length),e.type("trun"),e.extension(0,t.flags),u,s),t.samples.forEach(function(e,t){o.write(i.default.writeUint32(e.duration)),o.write(i.default.writeUint32(e.size)),1===r?(o.write(i.default.writeUint32(e.key?33554432:16842752)),o.write(i.default.writeUint32(e.offset))):o.write(i.default.writeUint32(16777216))}),o.buffer}},{key:"sdtp",value:function(t){var n=new i.default;return n.write(e.size(12+t.samples.length),e.type("sdtp"),e.extension(0,0)),t.samples.forEach(function(e){n.write(new Uint8Array(1===t.id?[e.key?32:16]:[16]))}),n.buffer}},{key:"mdat",value:function(t){var n=new i.default,r=8;return t.samples.forEach(function(e){r+=e.size}),n.write(e.size(r),e.type("mdat")),t.samples.forEach(function(e){n.write(e.buffer)}),n.buffer}}]),e}();o.sequence=1,t.default=o,e.exports=t.default},function(e,t,n){"use strict";var r=a(n(0)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.avc1=function(){var e=new i.default(this.data);e.skip(6),this.dataReferenceIndex=e.readUint16(),e.skip(16),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.skip(4),this.frameCount=e.readUint16(),e.skip(1);for(var t=0;t<31;t++)String.fromCharCode(e.readUint8());for(this.depth=e.readUint16(),e.skip(2);e.position>16;var t=new r.default;t.readHeader(e),this.subBox.push(t),t.readBody(e),delete this.data,e=null}},function(e,t,n){"use strict";var r=a(n(0)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.MP4DecConfigDescrTag=function(e){var t=new r.default,n=void 0;return t.type=e.readUint8(),128===(n=e.readUint8())?(t.extend=!0,e.skip(2),n=e.readUint8()+5):n+=2,t.size=n,t.typeID=e.readUint8(),t.streamUint=e.readUint8(),t.bufferSize=i.default.readByte(e.dataview,3),t.maximum=e.readUint32(),t.average=e.readUint32(),t.subBox.push(r.default.MP4DecSpecificDescrTag(e)),t}},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.MP4DecSpecificDescrTag=function(e){var t=new r.default,n=void 0,i=void 0;t.type=e.readUint8(),128===(n=e.readUint8())?(t.extend=!0,e.skip(2),i=(n=e.readUint8()+5)-5):(i=n,n+=2),t.size=n;for(var a=[],o=0;o1){var c=t[this.count-1],d=t[this.count-2];c.first_sample=d.first_sample+d.chunk_count*d.samples_per_chunk,c.chunk_count=0}delete this.subBox,delete this.data,e=null}},function(e,t,n){"use strict";var r=a(n(0)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.stsd=function(){var e=new i.default(this.data);this.version=e.readUint8(),this.flag=i.default.readByte(e.dataview,3),this.entryCount=e.readUint32();var t=new r.default;t.readHeader(e),this.subBox.push(t),t.readBody(e),delete this.data,e=null}},function(e,t,n){"use strict"},function(e,t,n){"use strict";var r=a(n(0)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.stss=function(){var e=new i.default(this.data);this.version=e.readUint8(),this.flag=i.default.readByte(e.dataview,3),this.count=e.readUint32();var t=[];this.entries=t;for(var n=0,r=this.count;n>8,e.readUint16();for(var t=[],n=0;n<9;n++)t.push(e.readUint16()+"."+e.readUint16());this.matrix=t,this.width=e.readUint16()+"."+e.readUint16(),this.height=e.readUint16()+"."+e.readUint16(),delete this.data,delete this.subBox,e=null}},function(e,t,n){"use strict"},function(e,t,n){"use strict"},function(e,t,n){"use strict";(function(e){return e&&e.__esModule?e:{default:e}})(n(0)).default.udta=function(){delete this.subBox}},function(e,t,n){"use strict";var r=a(n(0)),i=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default["url "]=function(){var e=new i.default(this.data);this.version=e.readUint8(),this.flag=[e.readUint8(),e.readUint8(),e.readUint8()];for(var t=[],n=e.buffer.byteLength;e.position1?n-1:0),i=1;i=8;){var u=new r.default;if(u.readHeader(o),u.size-8<=n-o.position)u.readBody(o),this.boxes.push(u);else{if("mdat"!==u.type){this.nextBox=u,o.position-=8;break}u.readBody(o),this.boxes.push(u)}}this.buffer=new Uint8Array(this.buffer.slice(o.position))},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e){return function(e){return!!e&&"object"===(void 0===e?"undefined":r(e))}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===a}(e)}(e)};var a="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return(!t||!1!==t.clone)&&i(e)?s(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function u(e,t,n){return e.concat(t).map(function(e){return o(e,n)})}function s(e,t,n){var r=Array.isArray(t);return r===Array.isArray(e)?r?((n||{arrayMerge:u}).arrayMerge||u)(e,t,n):function(e,t,n){var r={};return i(e)&&Object.keys(e).forEach(function(t){r[t]=o(e[t],n)}),Object.keys(t).forEach(function(a){i(t[a])&&e[a]?r[a]=s(e[a],t[a],n):r[a]=o(t[a],n)}),r}(e,t,n):o(t,n)}s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})};var f=s;t.default=f,e.exports=t.default},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";var r=String.prototype.indexOf;e.exports=function(e){return r.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";var r="razdwatrzy";e.exports=function(){return"function"==typeof r.contains&&(!0===r.contains("dwa")&&!1===r.contains("foo"))}},function(e,t,n){"use strict";e.exports=n(85)()?String.prototype.contains:n(84)},function(e,t,n){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";var r=n(12),i=Array.prototype.forEach,a=Object.create;e.exports=function(e){var t=a(null);return i.call(arguments,function(e){r(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)}),t}},function(e,t,n){"use strict";var r=n(12);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=n(12),i=Object.keys;e.exports=function(e){return i(r(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";e.exports=n(92)()?Object.keys:n(91)},function(e,t,n){"use strict";var r=n(93),i=n(89),a=Math.max;e.exports=function(e,t){var n,o,u,s=a(arguments.length,2);for(e=Object(i(e)),u=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},o=1;o1&&void 0!==arguments[1]?arguments[1]:Math.pow(25,4);!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(0,i.default)(this),this.url=t,this.CHUNK_SIZE=n,this.init(t),this.once("moovReady",this.moovParse.bind(this)),this.cache=new u.default,this.bufferCache=new Set,this.timeRage=[],this.canDownload=!0}return r(e,[{key:"getData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t+this.CHUNK_SIZE,r=this;return new Promise(function(i,a){new f.default(e.url,[t,n],i).once("error",function(e){r.emit("error",e)})})}},{key:"moovParse",value:function(){var e=this,t=this,n=this.moovBox,r=c.default.findBox(n,"mvhd"),i=c.default.findBox(n,"trak"),o=void 0,u=void 0,s=void 0,f=void 0,l=void 0,h=void 0,p=void 0,v=void 0,m=void 0,y=void 0,b=void 0,w=void 0,g=void 0,_=void 0;i.forEach(function(e){var n=c.default.findBox(e,"hdlr"),r=c.default.findBox(e,"mdhd");if(n&&r){var i=c.default.findBox(e,"stsd").subBox[0];if("vide"===n.handleType){var a=c.default.findBox(e,"avcC"),x=c.default.findBox(e,"avc1");o=e,l=r.timescale,a?(s=i.type+"."+c.default.toHex(a.profile,a.profileCompatibility,a.AVCLevelIndication).join(""),p=a.sequence&&a.sequence.map(function(e){return Number("0x"+e)}),v=a.pps&&a.pps.map(function(e){return Number("0x"+e)}),m=a.profile):s=""+i.type,x&&(y=x.width,b=x.height)}if("soun"===n.handleType){u=e;var U=c.default.findBox(e,"esds"),k=c.default.findBox(e,"mp4a"),S=c.default.findBox(e,5);h=r.timescale,f=U?i.type+"."+c.default.toHex(U.subBox[0].subBox[0].typeID)+"."+U.subBox[0].subBox[0].subBox[0].type:""+i.type,S&&S.EScode&&(_=S.EScode.map(function(e){return Number("0x"+e)})),k&&(w=k.channelCount,g=k.sampleRate)}}else t.emit("error",new d.default("parse","",{line:72,handle:"[MP4] moovParse",url:t.url}))}),this.videoTrak=(0,a.default)({},o),this.audioTrak=(0,a.default)({},u);var x=this._boxes.find(function(e){return"mdat"===e.type}),U=c.default.seekTrakDuration(o,l),k=c.default.seekTrakDuration(u,h);this.mdatStart=x.start;var S=this.videoKeyFrames,B=S.length-1;S.forEach(function(t,n){n0&&void 0!==arguments[0]?arguments[0]:"video",t=arguments[1],n=arguments[2],r="video"===e?this.videoTrak:this.audioTrak,i=c.default.findBox(r,"stsc"),a=c.default.findBox(r,"stsz"),o=c.default.findBox(r,"stts"),u=c.default.findBox(r,"stco"),s=c.default.findBox(r,"ctts"),f=this.mdatStart,d=[];if(n=void 0!==n?n:a.entries.length,t instanceof Array)t.forEach(function(e,t){d.push({idx:e,size:a.entries[e],time:c.default.seekSampleTime(o,s,e),offset:c.default.seekSampleOffset(i,u,a,e,f)})});else if(0!==n)for(var l=t;l0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t,n){"use strict";var r=n(24),i=n(99),a=n(20);e.exports=function(e,t,n,o){var u=String(a(e)),s=u.length,f=void 0===n?" ":String(n),c=r(t);if(c<=s||""==f)return u;var d=c-s,l=i.call(f,Math.ceil(d/f.length));return l.length>d&&(l=l.slice(0,d)),o?l+u:u+l}},function(e,t,n){"use strict";var r=n(31),i=n(100);r(r.P,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";var r=n(3)("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},e(a)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(2),i=n(14),a=n(7),o=n(3)("species");e.exports=function(e){var t=r[e];a&&t&&!t[o]&&i.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(14).f,i=n(26),a=n(3)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(27);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(6),i=n(5),a=n(21);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){"use strict";var r=n(2),i=n(22).set,a=r.MutationObserver||r.WebKitMutationObserver,o=r.process,u=r.Promise,s="process"==n(15)(o);e.exports=function(){var e,t,n,f=function(){var r,i;for(s&&(r=o.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(s)n=function(){o.nextTick(f)};else if(a){var c=!0,d=document.createTextNode("");new a(f).observe(d,{characterData:!0}),n=function(){d.data=c=!c}}else if(u&&u.resolve){var l=u.resolve();n=function(){l.then(f)}}else n=function(){i.call(r,f)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){"use strict";var r=n(2).document;e.exports=r&&r.documentElement},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){"use strict";var r=n(6),i=n(9),a=n(3)("species");e.exports=function(e,t){var n,o=r(e).constructor;return void 0===o||null==(n=r(o)[a])?t:i(n)}},function(e,t,n){"use strict";var r=n(33),i=n(3)("iterator"),a=n(25);e.exports=n(8).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[r(e)]}},function(e,t,n){"use strict";var r=n(25),i=n(3)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},function(e,t,n){"use strict";var r=n(6);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},function(e,t,n){"use strict";var r=n(10),i=n(114),a=n(113),o=n(6),u=n(24),s=n(112),f={},c={},d=e.exports=function(e,t,n,d,l){var h,p,v,m,y=l?function(){return e}:s(e),b=r(n,d,t?2:1),w=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(a(y)){for(h=u(e.length);h>w;w++)if((m=t?b(o(p=e[w])[0],p[1]):b(e[w]))===f||m===c)return m}else for(v=y.call(e);!(p=v.next()).done;)if((m=i(v,b,p.value,t))===f||m===c)return m};d.BREAK=f,d.RETURN=c},function(e,t,n){"use strict";e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var r=n(5);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";e.exports=!n(7)&&!n(29)(function(){return 7!=Object.defineProperty(n(28)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";var r=n(2),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,n){"use strict";e.exports=!1},function(e,t,n){"use strict";var r,i,a,o,u=n(121),s=n(2),f=n(10),c=n(33),d=n(31),l=n(5),h=n(9),p=n(116),v=n(115),m=n(111),y=n(22).set,b=n(108)(),w=n(21),g=n(107),_=n(106),x=s.TypeError,U=s.process,k=s.Promise,S="process"==c(U),B=function(){},T=i=w.f,M=!!function(){try{var e=k.resolve(1),t=(e.constructor={})[n(3)("species")]=function(e){e(B,B)};return(S||"function"==typeof PromiseRejectionEvent)&&e.then(B)instanceof t}catch(e){}}(),j=function(e){var t;return!(!l(e)||"function"!=typeof(t=e.then))&&t},O=function(e,t){if(!e._n){e._n=!0;var n=e._c;b(function(){for(var r=e._v,i=1==e._s,a=0,o=function(t){var n,a,o=i?t.ok:t.fail,u=t.resolve,s=t.reject,f=t.domain;try{o?(i||(2==e._h&&C(e),e._h=1),!0===o?n=r:(f&&f.enter(),n=o(r),f&&f.exit()),n===t.promise?s(x("Promise-chain cycle")):(a=j(n))?a.call(n,u,s):u(n)):s(r)}catch(e){s(e)}};n.length>a;)o(n[a++]);e._c=[],e._n=!1,t&&!e._h&&E(e)})}},E=function(e){y.call(s,function(){var t,n,r,i=e._v,a=z(e);if(a&&(t=g(function(){S?U.emit("unhandledRejection",i,e):(n=s.onunhandledrejection)?n({promise:e,reason:i}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=S||z(e)?2:1),e._a=void 0,a&&t.e)throw t.v})},z=function e(t){if(1==t._h)return!1;for(var n,r=t._a||t._c,i=0;r.length>i;)if((n=r[i++]).fail||!e(n.promise))return!1;return!0},C=function(e){y.call(s,function(){var t;S?U.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})})},P=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),O(t,!0))},A=function e(t){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw x("Promise can't be resolved itself");(n=j(t))?b(function(){var i={_w:r,_d:!1};try{n.call(t,f(e,i,1),f(P,i,1))}catch(e){P.call(i,e)}}):(r._v=t,r._s=1,O(r,!1))}catch(e){P.call({_w:r,_d:!1},e)}}};M||(k=function(e){p(this,k,"Promise","_h"),h(e),r.call(this);try{e(f(A,this,1),f(P,this,1))}catch(e){P.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(105)(k.prototype,{then:function(e,t){var n=T(m(this,k));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=S?U.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new r;this.promise=e,this.resolve=f(A,e,1),this.reject=f(P,e,1)},w.f=T=function(e){return e===k||e===o?new a(e):i(e)}),d(d.G+d.W+d.F*!M,{Promise:k}),n(104)(k,"Promise"),n(103)("Promise"),o=n(8).Promise,d(d.S+d.F*!M,"Promise",{reject:function(e){var t=T(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(u||!M),"Promise",{resolve:function(e){return _(u&&this===o?k:this,e)}}),d(d.S+d.F*!(M&&n(102)(function(e){k.all(e).catch(B)})),"Promise",{all:function(e){var t=this,n=T(t),r=n.resolve,i=n.reject,a=g(function(){var n=[],a=0,o=1;v(e,!1,function(e){var u=a++,s=!1;n.push(void 0),o++,t.resolve(e).then(function(e){s||(s=!0,n[u]=e,--o||r(n))},i)}),--o||r(n)});return a.e&&i(a.v),n.promise},race:function(e){var t=this,n=T(t),r=n.reject,i=g(function(){v(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n(122),n(101);var i=s(n(19)),a=s(n(98)),o=s(n(34)),u=s(n(16));function s(e){return e&&e.__esModule?e:{default:e}}var f=function(e,t){t.vid=e.config.vid,t.url=e.src,t.errd&&"object"===r(t.errd)&&e.mp4&&(t.errd.url=e.mp4.url,t.url=e.mp4.url,e.mp4.canDownload=!1),e.emit("DATA_REPORT",t),"network"===t.errt&&e.config._backupURL?e.src=e.config._backupURL:e.src=e.config._mainURL,e.switchURL=null,e._replay=null};i.default.install("mp4player",function(){var e=this,t=i.default.sniffer,n=i.default.util,r=i.default.Errors,s=void 0,c=void 0,d=e.config.preloadTime||15,l=void 0,h=e.config.url,p=e.config.pluginRule||function(){return!0};if(h){"String"===n.typeOf(h)?s=h:"Array"===n.typeOf(h)&&h.length&&(s=h[0].src,c=h[1].src),e.config._mainURL=s,e.config._backupURL=c;var v=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.currentTime;e.timer&&clearTimeout(e.timer),r=Math.max(r,e.currentTime),e.timer=setTimeout(function(){e.mp4.seek(r+.1*n).then(function(t){if(t){var n=e.mse;n.updating=!0,n.appendBuffer(t),n.once("updateend",function(){n.updating=!1})}},function(){n<10&&setTimeout(function(){t(n+1)},2e3)})},50)},m=function(t){var n=new a.default(t),r=void 0;return new Promise(function(t,i){n.once("moovReady",function(){(r=new o.default).on("sourceopen",function(){r.appendBuffer(n.packMeta()),r.once("updateend",v.bind(e))}),r.on("error",function(e){i(e)}),t([n,r])}),n.on("error",function(e){i(e)})})};if(["chrome","firfox","safari"].some(function(e){return e===t.browser})&&o.default.isSupported('video/mp4; codecs="avc1.64001E, mp4a.40.5"')){var y=e.start;if(!p.call(e))return!1;e.start=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;m(n).then(function(t){var n=t[0],r=t[1];y.call(e,r.url),e.mp4=n,e.mse=r,n.on("error",function(t){f(e,t)})},function(t){y.call(e,n),f(e,t)}),e.download=function(){e.mp4.download()},e.once("canplay",function(){if("safari"===t.browser&&e.buffered){var n=e.buffered.start(0);e.currentTime=n+.1}})},e.switchURL=function(n){var r=new a.default(n),i=e.mp4;r.on("moovReady",function(){i.timeRage;var n=e.currentTime,a=i.timeRage.find(function(e){return e[0]-n>2})[0],o=e.getBufferedRange()[1];o-a>0&&"safari"!==t.browser&&e.mse.removeBuffer(a,o),e.mp4=r,e.mse.appendBuffer(r.packMeta())}),r.on("error",function(t){f(e,t)})},e.on("timeupdate",function(){var t=e.mse,n=e.mp4;if(t&&!t.updating&&n.canDownload){var r=n.timeRage,i=e.getBufferedRange(),a=e.currentTime+d;if(i[1]-a>0)return;r.every(function(e,t){var r=(e[0]+e[1])/2;return 0===i[1]?(v(5),!1):!(r>i[1]&&!n.bufferCache.has(t))||void v(0,r)}),function(e,t){if(t.meta.endTime-e.currentTime<2){var n=e.getBufferedRange();e.currentTime-n[1]<.1&&e.mse.endOfStream()}}(e,n)}}),e.on("seeking",function(){var t=e.buffered,n=!1,r=e.currentTime;if(u.default.clear(),t.length){for(var i=0,a=t.length;i=t.start(i)&&r<=t.end(i)){n=!0;break}n||v(0,r)}else v(0,e.currentTime)}),e.on("pause",function(){u.default.clear()}),e.on("playing",function(){l&&clearTimeout(l)}),e.on("waiting",function(){var t=e.mp4;if(t&&t.meta){var n=e.getBufferedRange(),r=t.meta.videoDuration;r-e.currentTime<.5&&r-n[1]<.5?e.mse.endOfStream():(v(0,n[1]+1),l=setTimeout(function(){for(var t=e.buffered,n=void 0,r=0,i=t.length;r=e.currentTime){e.currentTime=n;break}},1500))}}),e._replay=function(){u.default.clear(),e.mp4.bufferCache.clear(),m(e.mp4.url).then(function(t){var n=t[0],r=t[1];e.src=r.url,e.mp4=n,e.mse=r,e.currentTime=0,e.play()},function(t){f(e,t)})}}}else e.emit("error",new r("other",e.config.vid))})},function(e,t,n){e.exports=n(123)}])}); \ No newline at end of file diff --git a/packages/xgplayer-mp4/package-lock.json b/packages/xgplayer-mp4/package-lock.json new file mode 100644 index 00000000..4c0360a3 --- /dev/null +++ b/packages/xgplayer-mp4/package-lock.json @@ -0,0 +1,3941 @@ +{ + "name": "xgplayer-mp4", + "version": "0.1.2-0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@webassemblyjs/ast": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fast/-/ast-1.5.10.tgz", + "integrity": "sha1-fx6BFJyk4QPJ58wyHqDcuDo5JRI=", + "requires": { + "@webassemblyjs/helper-module-context": "1.5.10", + "@webassemblyjs/helper-wasm-bytecode": "1.5.10", + "@webassemblyjs/wast-parser": "1.5.10", + "debug": "^3.1.0", + "mamacro": "^0.0.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2ffloating-point-hex-parser/-/floating-point-hex-parser-1.5.10.tgz", + "integrity": "sha1-rkhwX9WJJ99iAj8RRSC4IVMw/4Y=" + }, + "@webassemblyjs/helper-api-error": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-api-error/-/helper-api-error-1.5.10.tgz", + "integrity": "sha1-C6+UU84v2NtY8P20+yhSVXxx1ac=" + }, + "@webassemblyjs/helper-buffer": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-buffer/-/helper-buffer-1.5.10.tgz", + "integrity": "sha512-soggPYDku3gDl+zV1TVle3zLWgiU1Kli4QJdWCoeyX95RhGtF2A5tP7U3ypLlBb74SdoYYFVn3Fm7HXIWj1wzA==", + "requires": { + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-code-frame/-/helper-code-frame-1.5.10.tgz", + "integrity": "sha512-1mNetGdoMMSW+spR7eC5kJZCA8g9aK7G0t2Mc5Q0p9Kw8p+gFgf9dO7fbThHP/+tNLHM6+SwUQ+S8s4BLhBtZQ==", + "requires": { + "@webassemblyjs/wast-printer": "1.5.10" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-fsm/-/helper-fsm-1.5.10.tgz", + "integrity": "sha1-SQurYT6iVaknK3ZIJtPMnRUXBnY=" + }, + "@webassemblyjs/helper-module-context": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-module-context/-/helper-module-context-1.5.10.tgz", + "integrity": "sha1-b8qTWFIovzPm2gdtChNz2x/dZYA=", + "requires": { + "mamacro": "^0.0.3" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-wasm-bytecode/-/helper-wasm-bytecode-1.5.10.tgz", + "integrity": "sha1-kPbak8ehhr+y9YfeRCmC/1M8S0Q=" + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fhelper-wasm-section/-/helper-wasm-section-1.5.10.tgz", + "integrity": "sha1-1kKSoZ9/NXxJcZRhBl799+yXXWY=", + "requires": { + "@webassemblyjs/ast": "1.5.10", + "@webassemblyjs/helper-buffer": "1.5.10", + "@webassemblyjs/helper-wasm-bytecode": "1.5.10", + "@webassemblyjs/wasm-gen": "1.5.10", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/ieee754": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fieee754/-/ieee754-1.5.10.tgz", + "integrity": "sha1-JXytRA3WyKM5QC0x4DW6LjjpwkU=", + "requires": { + "ieee754": "^1.1.11" + } + }, + "@webassemblyjs/leb128": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fleb128/-/leb128-1.5.10.tgz", + "integrity": "sha1-qOT+X0sW2q2yQfzETZc16fJ7BaM=", + "requires": { + "leb": "^0.3.0" + } + }, + "@webassemblyjs/utf8": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2futf8/-/utf8-1.5.10.tgz", + "integrity": "sha1-CztryGt2GcXceyeJ22ZlqjVomYM=" + }, + "@webassemblyjs/wasm-edit": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwasm-edit/-/wasm-edit-1.5.10.tgz", + "integrity": "sha512-mrMZw5A0+p6A58iquzq/d0SJej481H4pNwPO65rEjzDsHs+yykT6de26VQD2GtaCTThfSNcw3JJXWJ1biqO/+g==", + "requires": { + "@webassemblyjs/ast": "1.5.10", + "@webassemblyjs/helper-buffer": "1.5.10", + "@webassemblyjs/helper-wasm-bytecode": "1.5.10", + "@webassemblyjs/helper-wasm-section": "1.5.10", + "@webassemblyjs/wasm-gen": "1.5.10", + "@webassemblyjs/wasm-opt": "1.5.10", + "@webassemblyjs/wasm-parser": "1.5.10", + "@webassemblyjs/wast-printer": "1.5.10", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwasm-gen/-/wasm-gen-1.5.10.tgz", + "integrity": "sha1-iynd02USWUCK5dXIFqAR+z8/NYQ=", + "requires": { + "@webassemblyjs/ast": "1.5.10", + "@webassemblyjs/helper-wasm-bytecode": "1.5.10", + "@webassemblyjs/ieee754": "1.5.10", + "@webassemblyjs/leb128": "1.5.10", + "@webassemblyjs/utf8": "1.5.10" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwasm-opt/-/wasm-opt-1.5.10.tgz", + "integrity": "sha1-Vp5Fqxsr8KdwbN9tG1HRGI6eTHs=", + "requires": { + "@webassemblyjs/ast": "1.5.10", + "@webassemblyjs/helper-buffer": "1.5.10", + "@webassemblyjs/wasm-gen": "1.5.10", + "@webassemblyjs/wasm-parser": "1.5.10", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwasm-parser/-/wasm-parser-1.5.10.tgz", + "integrity": "sha1-PhAX5J+DP0a4QNt8+dGU1PAAN/8=", + "requires": { + "@webassemblyjs/ast": "1.5.10", + "@webassemblyjs/helper-api-error": "1.5.10", + "@webassemblyjs/helper-wasm-bytecode": "1.5.10", + "@webassemblyjs/ieee754": "1.5.10", + "@webassemblyjs/leb128": "1.5.10", + "@webassemblyjs/wasm-parser": "1.5.10" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwast-parser/-/wast-parser-1.5.10.tgz", + "integrity": "sha1-GjI1kmSDyYWgDujryoVv/alUSTQ=", + "requires": { + "@webassemblyjs/ast": "1.5.10", + "@webassemblyjs/floating-point-hex-parser": "1.5.10", + "@webassemblyjs/helper-api-error": "1.5.10", + "@webassemblyjs/helper-code-frame": "1.5.10", + "@webassemblyjs/helper-fsm": "1.5.10", + "long": "^3.2.0", + "mamacro": "^0.0.3" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.5.10", + "resolved": "http://npm.byted.org/@webassemblyjs%2fwast-printer/-/wast-printer-1.5.10.tgz", + "integrity": "sha512-n4zZJmnETVc4RRs9wAZQr3dXUwC+Yyx+xwkaWdTk36NqgM89CPVLBpw8htKyKG+BX/tgk+VOXRwO+1x5Cf3J8Q==", + "requires": { + "@webassemblyjs/ast": "1.5.10", + "@webassemblyjs/wast-parser": "1.5.10", + "long": "^3.2.0" + } + }, + "acorn": { + "version": "5.6.2", + "resolved": "http://npm.byted.org/acorn/-/acorn-5.6.2.tgz", + "integrity": "sha1-sdode+KsG0oyf7nquFFwLFBFtOc=" + }, + "acorn-dynamic-import": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", + "integrity": "sha1-kBzu5Mf6rvfgetKkfokGddpQong=", + "requires": { + "acorn": "^5.0.0" + } + }, + "ajv": { + "version": "6.5.0", + "resolved": "http://npm.byted.org/ajv/-/ajv-6.5.0.tgz", + "integrity": "sha1-TIr/34CIfY8TLJxSq4otxNC3skw=", + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0", + "uri-js": "^4.2.1" + } + }, + "ajv-keywords": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "anymatch": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=" + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=" + }, + "arr-union": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "http://npm.byted.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "http://npm.byted.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha1-ucK/WAXx5kqt7tbfOiv6+1pz9aA=", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "requires": { + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + }, + "util": { + "version": "0.10.3", + "resolved": "http://npm.byted.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "async-each": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" + }, + "atob": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "http://npm.byted.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha1-suLwnjQtDwyI4vAuBneUEl51wgc=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "http://npm.byted.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha1-GERAjTuPDTWkBOp6wYDwh6YBvZA=", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + } + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "requires": { + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "requires": { + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "requires": { + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-loader": { + "version": "7.1.4", + "resolved": "http://npm.byted.org/babel-loader/-/babel-loader-7.1.4.tgz", + "integrity": "sha1-40Y5OL1ObVXRwXTFSF1AahiO0BU=", + "requires": { + "find-cache-dir": "^1.0.0", + "loader-utils": "^1.0.2", + "mkdirp": "^0.5.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-add-module-exports": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-0.2.1.tgz", + "integrity": "sha1-mumh9KjcZ/DN7E9K7aHkOl/2XiU=" + }, + "babel-plugin-bulk-import": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/babel-plugin-bulk-import/-/babel-plugin-bulk-import-1.0.2.tgz", + "integrity": "sha1-UDVlEp2LTAMS7nOpK6EC63yY4as=" + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "requires": { + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "requires": { + "babel-helper-define-map": "^6.24.1", + "babel-helper-function-name": "^6.24.1", + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-helper-replace-supers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", + "requires": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "requires": { + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "requires": { + "babel-helper-replace-supers": "^6.24.1", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "requires": { + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "requires": { + "regenerator-transform": "^0.10.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.24.1", + "babel-plugin-transform-es2015-classes": "^6.24.1", + "babel-plugin-transform-es2015-computed-properties": "^6.24.1", + "babel-plugin-transform-es2015-destructuring": "^6.22.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", + "babel-plugin-transform-es2015-for-of": "^6.22.0", + "babel-plugin-transform-es2015-function-name": "^6.24.1", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-umd": "^6.24.1", + "babel-plugin-transform-es2015-object-super": "^6.24.1", + "babel-plugin-transform-es2015-parameters": "^6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", + "babel-plugin-transform-regenerator": "^6.24.1" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "http://npm.byted.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha1-ry87iPpvXB5MY00aD46sT1WzleM=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base": { + "version": "0.11.2", + "resolved": "http://npm.byted.org/base/-/base-0.11.2.tgz", + "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha1-yrHmEY8FEJXli1KBrqjBzSK/wOM=" + }, + "big.js": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha1-pfwpi4G54Nyi5FiCR4S2XFK6WI4=" + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "http://npm.byted.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" + }, + "bluebird": { + "version": "3.5.1", + "resolved": "http://npm.byted.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha1-2VUfnemPH82h5oPRfukaBgLuLrk=" + }, + "bn.js": { + "version": "4.11.8", + "resolved": "http://npm.byted.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha1-LN4J617jQfSEdGuwMJsyU7GxRC8=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "http://npm.byted.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "http://npm.byted.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha1-Mmc0ZC9APavDADIJhTu3CtQo70g=", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha1-jWR0wbhwv9q807z8wZNKEOlPFfA=", + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/browserify-des/-/browserify-des-1.0.1.tgz", + "integrity": "sha1-M0MSTbbXrVPiaogmMYcSvchFD5w=", + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "http://npm.byted.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha1-KGlFnZqjviRf6P4sofRuLn9U1z8=", + "requires": { + "pako": "~1.0.5" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "http://npm.byted.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-from": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha1-h/yqOimDWOCt5uRCz86EB0DRrQQ=" + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" + }, + "cacache": { + "version": "10.0.4", + "resolved": "http://npm.byted.org/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha1-ZFI2eZnv+dQYiu/ZoU6dfGomNGA=", + "requires": { + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.1", + "mississippi": "^2.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^5.2.4", + "unique-filename": "^1.1.0", + "y18n": "^4.0.0" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "chokidar": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/chokidar/-/chokidar-2.0.3.tgz", + "integrity": "sha1-3L1PbLsqVbR5m6ioQKxSfl9LEXY=", + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.1.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.0" + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" + }, + "chrome-trace-event": { + "version": "0.1.3", + "resolved": "http://npm.byted.org/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz", + "integrity": "sha1-05WvLTHIe5CnFsgx/jJvaXaOwIQ=" + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94=", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "http://npm.byted.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "commander": { + "version": "2.14.1", + "resolved": "http://npm.byted.org/commander/-/commander-2.14.1.tgz", + "integrity": "sha1-IjUSPjevjKPGXfRbAm29NXsBuao=" + }, + "commondir": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "http://npm.byted.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "http://npm.byted.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "http://npm.byted.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "concat-typed-array": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/concat-typed-array/-/concat-typed-array-1.0.2.tgz", + "integrity": "sha1-Z4gMPOGez/EQwxWYtBx/RznUfKA=" + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "requires": { + "date-now": "^0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "http://npm.byted.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha1-kilzmMrjSTf8r9bsgTnBgFHwteA=", + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, + "core-js": { + "version": "2.5.1", + "resolved": "http://npm.byted.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "http://npm.byted.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha1-yREbbzMEXEaX8UR4f5JUzcd8Rf8=", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "http://npm.byted.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha1-aRcMeLOrlXFHsriwRXLkfq0iQ/8=", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "http://npm.byted.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha1-OWz58xN/A+S45TLFj2mCVOAPgOw=", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "cyclist": { + "version": "0.2.2", + "resolved": "http://npm.byted.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=" + }, + "d": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "requires": { + "es5-ext": "^0.10.9" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" + }, + "debug": { + "version": "2.6.9", + "resolved": "http://npm.byted.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "requires": { + "ms": "2.0.0" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "deepmerge": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/deepmerge/-/deepmerge-2.0.1.tgz", + "integrity": "sha512-VIPwiMJqJ13ZQfaCsIFnp5Me9tnjURiaIFxfz7EH0Ci0dTSQpZtSLrqOicXqEd/z2r+z+Klk9GzmnRsgpgbOsQ==" + }, + "define-property": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "des.js": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "http://npm.byted.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha1-QOjumPVaIUlgcUaSHGPhrl89KHU=", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto=" + }, + "duplexify": { + "version": "3.6.0", + "resolved": "http://npm.byted.org/duplexify/-/duplexify-3.6.0.tgz", + "integrity": "sha1-WSkD9dgLONA3IgVBJk1poZj7NBA=", + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "elliptic": { + "version": "6.4.0", + "resolved": "http://npm.byted.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha1-7SljTRm6ukY7bOa4CjchPqtx7EM=", + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", + "integrity": "sha1-40puqnkPYvzNcdk5WfVrK0MtsQo=", + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" + } + }, + "errno": { + "version": "0.1.7", + "resolved": "http://npm.byted.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg=", + "requires": { + "prr": "~1.0.1" + } + }, + "es5-ext": { + "version": "0.10.37", + "resolved": "http://npm.byted.org/es5-ext/-/es5-ext-0.10.37.tgz", + "integrity": "sha1-DudB0Ui4AGm6J9AgOTdWryV978M=", + "requires": { + "es6-iterator": "~2.0.1", + "es6-symbol": "~3.1.1" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "http://npm.byted.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "http://npm.byted.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "http://npm.byted.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "http://npm.byted.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + }, + "esutils": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "http://npm.byted.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "events": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha1-f8vbGY3HGVlDLv4ThCaE4FJaywI=", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "http://npm.byted.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fill-range": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "flush-write-stream": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha1-xdWG7zivYJdlC0m8QbVfq7GfNb0=", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "^0.2.2" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "http://npm.byted.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.2.4", + "resolved": "http://npm.byted.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha1-9B3LGvJYKvNpLaNvxVy9jhBBxCY=", + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true + } + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "http://npm.byted.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, + "glob": { + "version": "7.1.2", + "resolved": "http://npm.byted.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "globals": { + "version": "9.18.0", + "resolved": "http://npm.byted.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=" + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "http://npm.byted.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "http://npm.byted.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha1-NA3tvmKQGHFRweodd3o0SJNd+EY=", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" + }, + "ieee754": { + "version": "1.1.11", + "resolved": "http://npm.byted.org/ieee754/-/ieee754-1.1.11.tgz", + "integrity": "sha1-wWOE/+APW3g1gk5ntvK9RKUilFU=" + }, + "iferr": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "indexof": { + "version": "0.0.1", + "resolved": "http://npm.byted.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "http://npm.byted.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "invariant": { + "version": "2.2.2", + "resolved": "http://npm.byted.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "http://npm.byted.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=" + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-finite": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-odd": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha1-dkZiRnH9fqVYzNmieVGC8pWPGyQ=", + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=" + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "requires": { + "isobject": "^3.0.1" + } + }, + "is-windows": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "jsesc": { + "version": "0.5.0", + "resolved": "http://npm.byted.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" + }, + "json-loader": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/json-loader/-/json-loader-0.5.7.tgz", + "integrity": "sha1-3KFKcCNf+C8KyaOr62DTN6NlGF0=" + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json5": { + "version": "0.5.1", + "resolved": "http://npm.byted.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=" + }, + "leb": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/leb/-/leb-0.3.0.tgz", + "integrity": "sha1-Mr7p+tFoMo1q6oUi2DP0GA7tHaM=" + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=" + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + }, + "long": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "requires": { + "js-tokens": "^3.0.0" + } + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "http://npm.byted.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha1-oRdc80lt/IQ2wVbDNLSVWZK85pw=", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", + "requires": { + "pify": "^3.0.0" + } + }, + "mamacro": { + "version": "0.0.3", + "resolved": "http://npm.byted.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha1-rSyVdhl8nxq/MI0Hh4Zb2XWj8+Q=" + }, + "map-cache": { + "version": "0.2.2", + "resolved": "http://npm.byted.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "map-visit": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.4", + "resolved": "http://npm.byted.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "http://npm.byted.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "http://npm.byted.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha1-8IA1HIZbDcViqEYpZtqlNUPHik0=", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha1-LhlN4ERibUoQ5/f7wAznPoPk1cc=" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "http://npm.byted.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "http://npm.byted.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mississippi": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha1-NEKlCPr8KFAEhv7qmUCWduTuWm8=", + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^2.0.1", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha1-pJ5yaNzhoNlpjkUybFYm3zVD0P4=", + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://npm.byted.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nan": { + "version": "2.10.0", + "resolved": "http://npm.byted.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha1-ltDNYQ69WNS03pzAxoKM2pnHVI8=", + "optional": true + }, + "nanomatch": { + "version": "1.2.9", + "resolved": "http://npm.byted.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha1-h59xUMstq3pHElkGbBBO7m4Pp8I=", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "neo-async": { + "version": "2.5.1", + "resolved": "http://npm.byted.org/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha1-rLkJ4yex6H7J7xX0G4omlRKtQe4=" + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha1-X5QmPUBPbkR2fXJpAf/wVHjWAN8=", + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^1.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.0", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-limit": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha1-DpK2vty1nwIsE9DxlJ3ILRWQnxw=", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "pako": { + "version": "1.0.6", + "resolved": "http://npm.byted.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha1-AQEhG6pwxLykoPY/Igbpe3368lg=" + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "http://npm.byted.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha1-9r8pOBgzK9DatU77Fgh3JHRebKg=", + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "http://npm.byted.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "pbkdf2": { + "version": "3.0.16", + "resolved": "http://npm.byted.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha1-dAQgjsawG2LYW/g4U6gGT42cKlw=", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "requires": { + "find-up": "^2.1.0" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, + "private": { + "version": "0.1.8", + "resolved": "http://npm.byted.org/private/-/private-0.1.8.tgz", + "integrity": "sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=" + }, + "process": { + "version": "0.11.10", + "resolved": "http://npm.byted.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=" + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + }, + "prr": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "http://npm.byted.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha1-RuuRByBr9zSJ+LhbadkTNMZhCZQ=", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "http://npm.byted.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha1-NlE74karJ1cLGjdKXOJ4v9dDcM4=", + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=" + }, + "querystring": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + }, + "randombytes": { + "version": "2.0.6", + "resolved": "http://npm.byted.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha1-0wLFIpSFiISKjTAMkytEwkIx2oA=", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha1-ySGW/IarQr6YPxvzF3giSTHWFFg=", + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://npm.byted.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + } + }, + "regenerate": { + "version": "1.3.3", + "resolved": "http://npm.byted.org/regenerate/-/regenerate-1.3.3.tgz", + "integrity": "sha1-DDNtOYBVPXVcObWGrjsgqknIK38=" + }, + "regenerator-runtime": { + "version": "0.11.0", + "resolved": "http://npm.byted.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "integrity": "sha1-flT+W1zNXWYk6mJVw0c74JC4AuE=" + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "http://npm.byted.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha1-HkmWg3Ix2ot/PPQRTXG1aRoGgN0=", + "requires": { + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=" + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "requires": { + "jsesc": "~0.5.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "http://npm.byted.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "repeating": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "ret": { + "version": "0.1.15", + "resolved": "http://npm.byted.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=" + }, + "rimraf": { + "version": "2.6.2", + "resolved": "http://npm.byted.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", + "requires": { + "glob": "^7.0.5" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha1-ocGm9iR1FXe6XQeRTLyShQWFiQw=", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "requires": { + "aproba": "^1.1.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "http://npm.byted.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "~0.1.10" + } + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "http://npm.byted.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha1-IYNvBgiqwXt4+ePiTa/xSlyhOj4=", + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + }, + "serialize-javascript": { + "version": "1.5.0", + "resolved": "http://npm.byted.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", + "integrity": "sha1-GqM2FiyIqJDdrVOEuuvJOmVRYf4=" + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, + "set-value": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "sha.js": { + "version": "2.4.11", + "resolved": "http://npm.byted.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha1-N6XPC4HsvGlD3hCbopYNGyZYSuc=", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "http://npm.byted.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha1-qqR0A/eyRakvvJfqCPJQ1gh+0IU=" + }, + "source-map": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "http://npm.byted.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha1-cuLMNAlVQ+Q7LGKyxMENSpBU8lk=", + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "http://npm.byted.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha1-Aoam3ovkJkEzhZTpfM6nXwosWF8=", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "http://npm.byted.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + }, + "split-string": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "ssri": { + "version": "5.3.0", + "resolved": "http://npm.byted.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha1-ujhyycbTOgcEp9cf8EXl7EiZnQY=", + "requires": { + "safe-buffer": "^5.1.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "http://npm.byted.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.2", + "resolved": "http://npm.byted.org/stream-each/-/stream-each-1.2.2.tgz", + "integrity": "sha1-joxGP5HaiZF3h2WHP+TZYNj2Fr0=", + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "http://npm.byted.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "tapable": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/tapable/-/tapable-1.0.0.tgz", + "integrity": "sha1-y7Y52QAu7ZxrWXXrIFmNeTbx+fI=" + }, + "through2": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "http://npm.byted.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha1-HSjj0qrfHVpZlsTp+VYBzQU0gK4=", + "requires": { + "setimmediate": "^1.0.4" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "trim-right": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "http://npm.byted.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + }, + "typedarray": { + "version": "0.0.6", + "resolved": "http://npm.byted.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "uglify-es": { + "version": "3.3.10", + "resolved": "http://npm.byted.org/uglify-es/-/uglify-es-3.3.10.tgz", + "integrity": "sha1-iwt5ks6+IO3CbeG/MlzveXuPP6U=", + "requires": { + "commander": "~2.14.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + } + } + }, + "uglifyjs-webpack-plugin": { + "version": "1.2.5", + "resolved": "http://npm.byted.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz", + "integrity": "sha1-Lvg4fI8akD7F5E+jb588vc6mdkE=", + "requires": { + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "schema-utils": "^0.4.5", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "uglify-es": "^3.3.4", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + } + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "http://npm.byted.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unique-filename": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/unique-slug/-/unique-slug-2.0.0.tgz", + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + } + } + }, + "upath": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha1-NSVll+RqWB20eT0M5H+prr/J+r0=" + }, + "uri-js": { + "version": "4.2.2", + "resolved": "http://npm.byted.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "url": { + "version": "0.11.0", + "resolved": "http://npm.byted.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "http://npm.byted.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "use": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/use/-/use-3.1.0.tgz", + "integrity": "sha1-FHFr8D/f79AwQK71jYtLhfOnxUQ=", + "requires": { + "kind-of": "^6.0.2" + } + }, + "util": { + "version": "0.10.4", + "resolved": "http://npm.byted.org/util/-/util-0.10.4.tgz", + "integrity": "sha1-OqASW/5mikZy3liFfTrOJ+y3aQE=", + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "http://npm.byted.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "requires": { + "indexof": "0.0.1" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha1-S8EsLr6KonenHx0/FNaFx7RGzQA=", + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "webpack": { + "version": "4.11.0", + "resolved": "http://npm.byted.org/webpack/-/webpack-4.11.0.tgz", + "integrity": "sha1-t7aLT+ioljoYNwoF+E041ZraT78=", + "requires": { + "@webassemblyjs/ast": "1.5.10", + "@webassemblyjs/helper-module-context": "1.5.10", + "@webassemblyjs/wasm-edit": "1.5.10", + "@webassemblyjs/wasm-opt": "1.5.10", + "@webassemblyjs/wasm-parser": "1.5.10", + "acorn": "^5.0.0", + "acorn-dynamic-import": "^3.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^0.1.1", + "enhanced-resolve": "^4.0.0", + "eslint-scope": "^3.7.1", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^0.4.4", + "tapable": "^1.0.0", + "uglifyjs-webpack-plugin": "^1.2.4", + "watchpack": "^1.5.0", + "webpack-sources": "^1.0.1" + } + }, + "webpack-sources": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha1-oQHrrlnWUHNU1x2AE5UKOot6WlQ=", + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + } + } + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha1-rsxAWXb6talVJhgIRvDboojzpKA=", + "requires": { + "errno": "~0.1.7" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "http://npm.byted.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + } + } +} diff --git a/packages/xgplayer-mp4/package.json b/packages/xgplayer-mp4/package.json new file mode 100644 index 00000000..113e0a7e --- /dev/null +++ b/packages/xgplayer-mp4/package.json @@ -0,0 +1,49 @@ +{ + "name": "xgplayer-mp4", + "version": "1.0.2", + "description": "xgplayer plugin for mp4 transform to fmp4", + "main": "./dist/index.js", + "scripts": { + "prepare": "npm run build", + "build": "webpack --progress --display-chunks -p", + "watch": "webpack --progress --display-chunks -p --watch" + }, + "repository": { + "type": "git", + "url": "git@github.com:bytedance/xgplayer.git" + }, + "babel": { + "presets": [ + "es2015" + ], + "plugins": [ + "add-module-exports", + "babel-plugin-bulk-import" + ] + }, + "keywords": [ + "mp4", + "fmp4", + "player", + "video" + ], + "author": "yinguohui@bytedance.com", + "license": "MIT", + "dependencies": { + "babel-loader": "^7.1.4", + "babel-plugin-add-module-exports": "^0.2.1", + "babel-plugin-bulk-import": "^1.0.2", + "babel-preset-es2015": "^6.24.1", + "concat-typed-array": "^1.0.2", + "deepmerge": "^2.0.1", + "event-emitter": "^0.3.5", + "json-loader": "^0.5.7", + "webpack": "^4.11.0" + }, + "peerDependency": { + "xgplayer": "^0.1.0" + }, + "devDependencies": { + "babel-core": "^6.26.3" + } +} diff --git a/packages/xgplayer-mp4/src/error.js b/packages/xgplayer-mp4/src/error.js new file mode 100644 index 00000000..788ee8be --- /dev/null +++ b/packages/xgplayer-mp4/src/error.js @@ -0,0 +1,12 @@ +import Player from 'xgplayer' +import {version} from '../package.json' + +class _Errors extends Player.Errors { + constructor (type, vid, errd = {}, url = '') { + errd.version = version + super(type, vid, errd) + this.url = url + } +} + +export default _Errors diff --git a/packages/xgplayer-mp4/src/fmp4/buffer.js b/packages/xgplayer-mp4/src/fmp4/buffer.js new file mode 100644 index 00000000..b05fb78c --- /dev/null +++ b/packages/xgplayer-mp4/src/fmp4/buffer.js @@ -0,0 +1,27 @@ +import Concat from 'concat-typed-array' + +class Buffer { + constructor () { + this.buffer = new Uint8Array(0) + } + write (...buffer) { + let self = this + buffer.forEach(item => { + if (item) { + self.buffer = Concat(Uint8Array, self.buffer, item) + } else { + window.console.error(item) + } + }) + } + static writeUint32 (value) { + return new Uint8Array([ + value >> 24, + (value >> 16) & 0xff, + (value >> 8) & 0xff, + value & 0xff + ]) + } +} + +export default Buffer diff --git a/packages/xgplayer-mp4/src/fmp4/mp4.js b/packages/xgplayer-mp4/src/fmp4/mp4.js new file mode 100644 index 00000000..62779a69 --- /dev/null +++ b/packages/xgplayer-mp4/src/fmp4/mp4.js @@ -0,0 +1,605 @@ +import Buffer from './buffer' +const UINT32_MAX = Math.pow(2, 32) - 1 +class FMP4 { + static type (name) { + return new Uint8Array([name.charCodeAt(0), name.charCodeAt(1), name.charCodeAt(2), name.charCodeAt(3)]) + } + static size (value) { + return Buffer.writeUint32(value) + } + static extension (version, flag) { + return new Uint8Array([ + version, + (flag >> 16) & 0xff, + (flag >> 8) & 0xff, + flag & 0xff + ]) + } + static ftyp () { + let buffer = new Buffer() + buffer.write(FMP4.size(24), FMP4.type('ftyp'), new Uint8Array([ + 0x69, 0x73, 0x6F, 0x6D, // isom, + 0x0, 0x0, 0x00, 0x01, // minor_version: 0x01 + 0x69, 0x73, 0x6F, 0x6D, // isom + 0x61, 0x76, 0x63, 0x31 // avc1 + ])) + return buffer.buffer + } + static moov (data) { + let buffer = new Buffer(); let size = 8 + let mvhd = FMP4.mvhd(data.duration, data.timeScale) + let trak1 = FMP4.videoTrak(data) + let trak2 = FMP4.audioTrak(data) + let mvex = FMP4.mvex(data.duration, data.timeScale); + [mvhd, trak1, trak2, mvex].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('moov'), mvhd, trak1, trak2, mvex) + return buffer.buffer + } + static mvhd (duration, timescale) { + let buffer = new Buffer() + duration *= timescale + const upperWordDuration = Math.floor(duration / (UINT32_MAX + 1)) + const lowerWordDuration = Math.floor(duration % (UINT32_MAX + 1)) + let bytes = new Uint8Array([ + 0x01, // version 1 + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // creation_time + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // modification_time + (timescale >> 24) & 0xff, + (timescale >> 16) & 0xff, + (timescale >> 8) & 0xff, + timescale & 0xff, // timescale + (upperWordDuration >> 24), + (upperWordDuration >> 16) & 0xff, + (upperWordDuration >> 8) & 0xff, + upperWordDuration & 0xff, + (lowerWordDuration >> 24), + (lowerWordDuration >> 16) & 0xff, + (lowerWordDuration >> 8) & 0xff, + lowerWordDuration & 0xff, + 0x00, 0x01, 0x00, 0x00, // 1.0 rate + 0x01, 0x00, // 1.0 volume + 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // pre_defined + 0xff, 0xff, 0xff, 0xff // next_track_ID + ]) + buffer.write(FMP4.size(8 + bytes.length), FMP4.type('mvhd'), new Uint8Array(bytes)) + return buffer.buffer + } + static videoTrak (data) { + let buffer = new Buffer(); let size = 8 + let tkhd = FMP4.tkhd({ + id: 1, + duration: data.videoDuration, + timescale: data.videoTimeScale, + width: data.width, + height: data.height, + type: 'video' + }) + let mdia = FMP4.mdia({ + type: 'video', + timescale: data.videoTimeScale, + duration: data.videoDuration, + sps: data.sps, + pps: data.pps, + pixelRatio: data.pixelRatio, + width: data.width, + height: data.height + }); + [tkhd, mdia].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('trak'), tkhd, mdia) + return buffer.buffer + } + static audioTrak (data) { + let buffer = new Buffer(); let size = 8 + let tkhd = FMP4.tkhd({ + id: 2, + duration: data.audioDuration, + timescale: data.audioTimeScale, + width: 0, + height: 0, + type: 'audio' + }) + let mdia = FMP4.mdia({ + type: 'audio', + timescale: data.audioTimeScale, + duration: data.audioDuration, + channelCount: data.channelCount, + samplerate: data.sampleRate, + audioConfig: data.audioConfig + }); + [tkhd, mdia].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('trak'), tkhd, mdia) + return buffer.buffer + } + static tkhd (data) { + let buffer = new Buffer() + let id = data.id + + let duration = data.duration * data.timeScale + + let width = data.width + + let height = data.height + + let type = data.type + + let upperWordDuration = Math.floor(duration / (UINT32_MAX + 1)) + + let lowerWordDuration = Math.floor(duration % (UINT32_MAX + 1)) + let content = new Uint8Array([ + 0x01, // version 1 + 0x00, 0x00, 0x07, // flags + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // creation_time + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // modification_time + (id >> 24) & 0xff, + (id >> 16) & 0xff, + (id >> 8) & 0xff, + id & 0xff, // track_ID + 0x00, 0x00, 0x00, 0x00, // reserved + (upperWordDuration >> 24), + (upperWordDuration >> 16) & 0xff, + (upperWordDuration >> 8) & 0xff, + upperWordDuration & 0xff, + (lowerWordDuration >> 24), + (lowerWordDuration >> 16) & 0xff, + (lowerWordDuration >> 8) & 0xff, + lowerWordDuration & 0xff, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, // layer + 0x00, type === 'video' ? 0x01 : 0x00, // alternate_group + type === 'audio' ? 0x01 : 0x00, 0x00, // non-audio track volume + 0x00, 0x00, // reserved + 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix + (width >> 8) & 0xff, + width & 0xff, + 0x00, 0x00, // width + (height >> 8) & 0xff, + height & 0xff, + 0x00, 0x00 // height + ]) + buffer.write(FMP4.size(8 + content.byteLength), FMP4.type('tkhd'), content) + return buffer.buffer + } + static edts (data) { + let buffer = new Buffer(); let duration = data.duration; let mediaTime = data.mediaTime + buffer.write(FMP4.size(36), FMP4.type('edts')) + // elst + buffer.write(FMP4.size(28), FMP4.type('elst')) + buffer.write(new Uint8Array([ + 0x00, 0x00, 0x00, 0x01, // entry count + (duration >> 24) & 0xff, (duration >> 16) & 0xff, (duration >> 8) & 0xff, duration & 0xff, + (mediaTime >> 24) & 0xff, (mediaTime >> 16) & 0xff, (mediaTime >> 8) & 0xff, mediaTime & 0xff, + 0x00, 0x00, 0x00, 0x01 // media rate + ])) + return buffer.buffer + } + static mdia (data) { + let buffer = new Buffer(); let size = 8 + let mdhd = FMP4.mdhd(data.timescale) + let hdlr = FMP4.hdlr(data.type) + let minf = FMP4.minf(data); + [mdhd, hdlr, minf].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('mdia'), mdhd, hdlr, minf) + return buffer.buffer + } + static mdhd (timescale, duration = 0) { + let buffer = new Buffer() + duration *= timescale + const upperWordDuration = Math.floor(duration / (UINT32_MAX + 1)) + const lowerWordDuration = Math.floor(duration % (UINT32_MAX + 1)) + let content = new Uint8Array([ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // creation_time + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // modification_time + (timescale >> 24) & 0xff, (timescale >> 16) & 0xff, (timescale >> 8) & 0xff, timescale & 0xff, + (upperWordDuration >> 24), + (upperWordDuration >> 16) & 0xff, + (upperWordDuration >> 8) & 0xff, + upperWordDuration & 0xff, + (lowerWordDuration >> 24), + (lowerWordDuration >> 16) & 0xff, + (lowerWordDuration >> 8) & 0xff, + lowerWordDuration & 0xff, + 0x55, 0xc4, // 'und' language + 0x00, 0x00 + ]) + buffer.write(FMP4.size(12 + content.byteLength), FMP4.type('mdhd'), FMP4.extension(1, 0), content) + return buffer.buffer + } + static hdlr (type) { + let buffer = new Buffer() + let value = [0x00, // version 0 + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00, // pre_defined + 0x76, 0x69, 0x64, 0x65, // handler_type: 'vide' + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, 0x00, // reserved + 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x48, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler' + ] + if (type === 'audio') { + value.splice(8, 4, ...[0x73, 0x6f, 0x75, 0x6e]) + value.splice(24, 13, ...[0x53, 0x6f, 0x75, 0x6e, + 0x64, 0x48, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x72, 0x00]) + } + buffer.write(FMP4.size(8 + value.length), FMP4.type('hdlr'), new Uint8Array(value)) + return buffer.buffer + } + static minf (data) { + let buffer = new Buffer(); let size = 8 + let vmhd = data.type === 'video' ? FMP4.vmhd() : FMP4.smhd() + let dinf = FMP4.dinf() + let stbl = FMP4.stbl(data); + [vmhd, dinf, stbl].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('minf'), vmhd, dinf, stbl) + return buffer.buffer + } + static vmhd () { + let buffer = new Buffer() + buffer.write(FMP4.size(20), FMP4.type('vmhd'), new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x01, // flags + 0x00, 0x00, // graphicsmode + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00 // opcolor + ])) + return buffer.buffer + } + static smhd () { + let buffer = new Buffer() + buffer.write(FMP4.size(16), FMP4.type('smhd'), new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, // balance + 0x00, 0x00 // reserved + ])) + return buffer.buffer + } + static dinf () { + let buffer = new Buffer() + let dref = [0x00, // version 0 + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x01, // entry_count + 0x00, 0x00, 0x00, 0x0c, // entry_size + 0x75, 0x72, 0x6c, 0x20, // 'url' type + 0x00, // version 0 + 0x00, 0x00, 0x01 // entry_flags + ] + buffer.write(FMP4.size(36), FMP4.type('dinf'), FMP4.size(28), FMP4.type('dref'), new Uint8Array(dref)) + return buffer.buffer + } + static stbl (data) { + let buffer = new Buffer(); let size = 8 + let stsd = FMP4.stsd(data) + let stts = FMP4.stts() + let stsc = FMP4.stsc() + let stsz = FMP4.stsz() + let stco = FMP4.stco(); + [stsd, stts, stsc, stsz, stco].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('stbl'), stsd, stts, stsc, stsz, stco) + return buffer.buffer + } + static stsd (data) { + let buffer = new Buffer(); let content + if (data.type === 'audio') { + // if (!data.isAAC && data.codec === 'mp4') { + // content = FMP4.mp3(data); + // } else { + // + // } + // 支持mp4a + content = FMP4.mp4a(data) + } else { + content = FMP4.avc1(data) + } + buffer.write(FMP4.size(16 + content.byteLength), FMP4.type('stsd'), FMP4.extension(0, 0), new Uint8Array([0x00, 0x00, 0x00, 0x01]), content) + return buffer.buffer + } + static mp4a (data) { + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, // reserved + 0x00, 0x01, // data_reference_index + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, data.channelCount, // channelcount + 0x00, 0x10, // sampleSize:16bits + 0x00, 0x00, 0x00, 0x00, // reserved2 + (data.samplerate >> 8) & 0xff, + data.samplerate & 0xff, // + 0x00, 0x00 + ]) + let esds = FMP4.esds(data.audioConfig) + buffer.write(FMP4.size(8 + content.byteLength + esds.byteLength), FMP4.type('mp4a'), content, esds) + return buffer.buffer + } + static esds (config = [43, 146, 8, 0]) { + const configlen = config.length + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, // version 0 + 0x00, 0x00, 0x00, // flags + + 0x03, // descriptor_type + 0x17 + configlen, // length + 0x00, 0x01, // es_id + 0x00, // stream_priority + + 0x04, // descriptor_type + 0x0f + configlen, // length + 0x40, // codec : mpeg4_audio + 0x15, // stream_type + 0x00, 0x00, 0x00, // buffer_size + 0x00, 0x00, 0x00, 0x00, // maxBitrate + 0x00, 0x00, 0x00, 0x00, // avgBitrate + + 0x05 // descriptor_type + ].concat([configlen]).concat(config).concat([0x06, 0x01, 0x02])) + buffer.write(FMP4.size(8 + content.byteLength), FMP4.type('esds'), content) + return buffer.buffer + } + static avc1 (data) { + let buffer = new Buffer(); let size = 40// 8(avc1)+8(avcc)+8(btrt)+16(pasp) + let sps = data.sps; let pps = data.pps; let width = data.width; let height = data.height; let hSpacing = data.pixelRatio[0]; let vSpacing = data.pixelRatio[1] + let avcc = new Uint8Array([ + 0x01, // version + sps[1], // profile + sps[2], // profile compatible + sps[3], // level + 0xfc | 3, + 0xE0 | 1 // 目前只处理一个sps + ].concat([sps.length >>> 8 & 0xff, sps.length & 0xff]).concat(sps).concat(1).concat([pps.length >>> 8 & 0xff, pps.length & 0xff]).concat(pps)) + let avc1 = new Uint8Array([ + 0x00, 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, // reserved + 0x00, 0x01, // data_reference_index + 0x00, 0x00, // pre_defined + 0x00, 0x00, // reserved + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // pre_defined + (width >> 8) & 0xff, + width & 0xff, // width + (height >> 8) & 0xff, + height & 0xff, // height + 0x00, 0x48, 0x00, 0x00, // horizresolution + 0x00, 0x48, 0x00, 0x00, // vertresolution + 0x00, 0x00, 0x00, 0x00, // reserved + 0x00, 0x01, // frame_count + 0x12, + 0x64, 0x61, 0x69, 0x6C, // dailymotion/hls.js + 0x79, 0x6D, 0x6F, 0x74, + 0x69, 0x6F, 0x6E, 0x2F, + 0x68, 0x6C, 0x73, 0x2E, + 0x6A, 0x73, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, // compressorname + 0x00, 0x18, // depth = 24 + 0x11, 0x11]) // pre_defined = -1 + let btrt = new Uint8Array([ + 0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB + 0x00, 0x2d, 0xc6, 0xc0, // maxBitrate + 0x00, 0x2d, 0xc6, 0xc0 // avgBitrate + ]) + let pasp = new Uint8Array([ + (hSpacing >> 24), // hSpacing + (hSpacing >> 16) & 0xff, + (hSpacing >> 8) & 0xff, + hSpacing & 0xff, + (vSpacing >> 24), // vSpacing + (vSpacing >> 16) & 0xff, + (vSpacing >> 8) & 0xff, + vSpacing & 0xff + ]) + + buffer.write( + FMP4.size(size + avc1.byteLength + avcc.byteLength + btrt.byteLength), FMP4.type('avc1'), avc1, + FMP4.size(8 + avcc.byteLength), FMP4.type('avcC'), avcc, + FMP4.size(20), FMP4.type('btrt'), btrt, + FMP4.size(16), FMP4.type('pasp'), pasp + ) + return buffer.buffer + } + static stts () { + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00 // entry_count + ]) + buffer.write(FMP4.size(16), FMP4.type('stts'), content) + return buffer.buffer + } + static stsc () { + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00 // entry_count + ]) + buffer.write(FMP4.size(16), FMP4.type('stsc'), content) + return buffer.buffer + } + static stco () { + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00 // entry_count + ]) + buffer.write(FMP4.size(16), FMP4.type('stco'), content) + return buffer.buffer + } + static stsz () { + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, // version + 0x00, 0x00, 0x00, // flags + 0x00, 0x00, 0x00, 0x00, // sample_size + 0x00, 0x00, 0x00, 0x00 // sample_count + ]) + buffer.write(FMP4.size(20), FMP4.type('stsz'), content) + return buffer.buffer + } + static mvex (duration, timeScale) { + let buffer = new Buffer() + let mehd = Buffer.writeUint32(duration * timeScale) + buffer.write(FMP4.size(88), FMP4.type('mvex'), FMP4.size(16), FMP4.type('mehd'), FMP4.extension(0, 0), mehd, FMP4.trex(1), FMP4.trex(2)) + return buffer.buffer + } + static trex (id) { + let buffer = new Buffer() + let content = new Uint8Array([ + 0x00, // version 0 + 0x00, 0x00, 0x00, // flags + (id >> 24), + (id >> 16) & 0xff, + (id >> 8) & 0xff, + (id & 0xff), // track_ID + 0x00, 0x00, 0x00, 0x01, // default_sample_description_index + 0x00, 0x00, 0x00, 0x00, // default_sample_duration + 0x00, 0x00, 0x00, 0x00, // default_sample_size + 0x00, 0x01, 0x00, 0x01 // default_sample_flags + ]) + buffer.write(FMP4.size(8 + content.byteLength), FMP4.type('trex'), content) + return buffer.buffer + } + static moof (data) { + let buffer = new Buffer(); let size = 8 + let mfhd = FMP4.mfhd() + let traf = FMP4.traf(data); + [mfhd, traf].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('moof'), mfhd, traf) + return buffer.buffer + } + static mfhd () { + let buffer = new Buffer() + let content = Buffer.writeUint32(FMP4.sequence) + FMP4.sequence += 1 + buffer.write(FMP4.size(16), FMP4.type('mfhd'), FMP4.extension(0, 0), content) + return buffer.buffer + } + static traf (data) { + let buffer = new Buffer(); let size = 8 + let tfhd = FMP4.tfhd(data.id) + let tfdt = FMP4.tfdt(data.time) + let sdtp = FMP4.sdtp(data) + let trun = FMP4.trun(data, sdtp.byteLength); + [tfhd, tfdt, sdtp, trun].forEach(item => { + size += item.byteLength + }) + buffer.write(FMP4.size(size), FMP4.type('traf'), tfhd, tfdt, sdtp, trun) + return buffer.buffer + } + static tfhd (id) { + let buffer = new Buffer() + let content = Buffer.writeUint32(id) + buffer.write(FMP4.size(16), FMP4.type('tfhd'), FMP4.extension(0, 0), content) + return buffer.buffer + } + static tfdt (time) { + let buffer = new Buffer() + let upper = Math.floor(time / (UINT32_MAX + 1)) + + let lower = Math.floor(time % (UINT32_MAX + 1)) + buffer.write(FMP4.size(20), FMP4.type('tfdt'), FMP4.extension(1, 0), Buffer.writeUint32(upper), Buffer.writeUint32(lower)) + return buffer.buffer + } + static trun (data, sdtpLength) { + let id = data.id + let ceil = id === 1 ? 16 : 12 + let buffer = new Buffer() + let sampleCount = Buffer.writeUint32(data.samples.length) + // mdat-header 8 + // moof-header 8 + // mfhd 16 + // traf-header 8 + // thhd 16 + // tfdt 20 + // trun-header 12 + // sampleCount 4 + // data-offset 4 + // samples.length + let offset = Buffer.writeUint32(8 + 8 + 16 + 8 + 16 + 20 + 12 + 4 + 4 + ceil * data.samples.length + sdtpLength) + buffer.write(FMP4.size(20 + ceil * data.samples.length), FMP4.type('trun'), FMP4.extension(0, data.flags), sampleCount, offset) + data.samples.forEach((item, idx) => { + buffer.write(Buffer.writeUint32(item.duration)) + buffer.write(Buffer.writeUint32(item.size)) + if (id === 1) { + buffer.write(Buffer.writeUint32(item.key ? 0x02000000 : 0x01010000)) + buffer.write(Buffer.writeUint32(item.offset)) + } else { + buffer.write(Buffer.writeUint32(0x1000000)) + } + }) + return buffer.buffer + } + static sdtp (data) { + let buffer = new Buffer() + buffer.write(FMP4.size(12 + data.samples.length), FMP4.type('sdtp'), FMP4.extension(0, 0)) + data.samples.forEach(item => { + buffer.write(new Uint8Array(data.id === 1 ? [item.key ? 32 : 16] : [16])) + }) + return buffer.buffer + } + static mdat (data) { + let buffer = new Buffer(); let size = 8 + data.samples.forEach(item => { + size += item.size + }) + buffer.write(FMP4.size(size), FMP4.type('mdat')) + data.samples.forEach(item => { + buffer.write(item.buffer) + }) + return buffer.buffer + } +} + +FMP4.sequence = 1 + +export default FMP4 diff --git a/packages/xgplayer-mp4/src/index.js b/packages/xgplayer-mp4/src/index.js new file mode 100644 index 00000000..309ab118 --- /dev/null +++ b/packages/xgplayer-mp4/src/index.js @@ -0,0 +1,243 @@ +import 'core-js/modules/es6.promise.js' +import 'core-js/modules/es7.string.pad-start' +import Player from 'xgplayer' +import MP4 from './mp4' +import MSE from './media/mse' +import Task from './media/task' + +let isEnded = (player, mp4) => { + if (mp4.meta.endTime - player.currentTime < 2) { + let range = player.getBufferedRange() + if (player.currentTime - range[1] < 0.1) { + player.mse.endOfStream() + } + } +} + +let errorHandle = (player, err) => { + err.vid = player.config.vid + err.url = player.src + if (err.errd && typeof err.errd === 'object') { + if (player.mp4) { + err.errd.url = player.mp4.url + err.url = player.mp4.url + player.mp4.canDownload = false + } + } + player.emit('DATA_REPORT', err) + if (err.errt === 'network' && player.config._backupURL) { + player.src = player.config._backupURL + } else { + player.src = player.config._mainURL + } + player.switchURL = null + player._replay = null +} + +let mp4player = function () { + let player = this; let sniffer = Player.sniffer; let util = Player.util + let Errors = Player.Errors; let mainURL; let backupURL + let preloadTime = player.config.preloadTime || 15 + let waiterTimer + let url = player.config.url + let rule = player.config.pluginRule || function () { return true } + if (!url) { + player.emit('error', new Errors('other', player.config.vid)) + return + } + if (util.typeOf(url) === 'String') { + mainURL = url + } else if (util.typeOf(url) === 'Array' && url.length) { + mainURL = url[0].src + backupURL = url[1].src + } + player.config._mainURL = mainURL + player.config._backupURL = backupURL + let loadData = (i = 0, time = player.currentTime) => { + if (player.timer) { + clearTimeout(player.timer) + } + time = Math.max(time, player.currentTime) + player.timer = setTimeout(function () { + player.mp4.seek(time + i * 0.1).then(buffer => { + if (buffer) { + let mse = player.mse + mse.updating = true + mse.appendBuffer(buffer) + mse.once('updateend', () => { + mse.updating = false + }) + } + }, () => { + if (i < 10) { + setTimeout(function () { + loadData(i + 1) + }, 2000) + } + }) + }, 50) + } + let init = (url) => { + let mp4 = new MP4(url) + let mse + return new Promise((resolve, reject) => { + mp4.once('moovReady', () => { + mse = new MSE() + mse.on('sourceopen', function () { + mse.appendBuffer(mp4.packMeta()) + mse.once('updateend', loadData.bind(player)) + }) + mse.on('error', function (e) { + reject(e) + }) + resolve([mp4, mse]) + }) + mp4.on('error', (e) => { + reject(e) + }) + }) + } + if (['chrome', 'firfox', 'safari'].some(item => item === sniffer.browser) && MSE.isSupported('video/mp4; codecs="avc1.64001E, mp4a.40.5"')) { + let _start = player.start + if (!rule.call(player)) { + return false + } + player.start = function (url = mainURL) { + init(url).then((result) => { + let mp4 = result[0]; let mse = result[1] + _start.call(player, mse.url) + player.mp4 = mp4 + player.mse = mse + mp4.on('error', err => { + errorHandle(player, err) + }) + }, err => { + _start.call(player, url) + errorHandle(player, err) + }) + player.download = () => { + player.mp4.download() + } + player.once('canplay', () => { + // safari decoder time offset + if (sniffer.browser === 'safari' && player.buffered) { + let start = player.buffered.start(0) + player.currentTime = start + 0.1 + } + }) + } + + player.switchURL = (url) => { + let mp5 = new MP4(url) + let mp4 = player.mp4 + mp5.on('moovReady', () => { + let timeRange = mp4.timeRage; let curTime = player.currentTime + timeRange = mp4.timeRage + let start = timeRange.find(item => item[0] - curTime > 2)[0] + let end = player.getBufferedRange()[1] + if (end - start > 0 && sniffer.browser !== 'safari') { + player.mse.removeBuffer(start, end) + } + player.mp4 = mp5 + player.mse.appendBuffer(mp5.packMeta()) + }) + mp5.on('error', err => { + errorHandle(player, err) + }) + } + + player.on('timeupdate', function () { + let mse = player.mse; let mp4 = player.mp4 + if (mse && !mse.updating && mp4.canDownload) { + let timeRage = mp4.timeRage + let range = player.getBufferedRange(); let cacheMaxTime = player.currentTime + preloadTime + if (range[1] - cacheMaxTime > 0) { + return + } + timeRage.every((item, idx) => { + let start = item[0]; let end = item[1]; let center = (start + end) / 2 + if (range[1] === 0) { + loadData(5) + return false + } else { + if (center > range[1] && !mp4.bufferCache.has(idx)) { + loadData(0, center) + } else { + return true + } + } + }) + isEnded(player, mp4)// hack for older webkit + } + }) + + player.on('seeking', function () { + let buffered = player.buffered; let hasBuffered = false; let curTime = player.currentTime + Task.clear() + if (buffered.length) { + for (let i = 0, len = buffered.length; i < len; i++) { + if (curTime >= buffered.start(i) && curTime <= buffered.end(i)) { + hasBuffered = true + break + } + } + if (!hasBuffered) { + loadData(0, curTime) + } + } else { + loadData(0, player.currentTime) + } + }) + + player.on('pause', function () { + Task.clear() + }) + + player.on('playing', function () { + if (waiterTimer) { + clearTimeout(waiterTimer) + } + }) + + player.on('waiting', function () { + let mp4 = player.mp4 + if (!mp4 || !mp4.meta) { + return + } + let range = player.getBufferedRange() + let duration = mp4.meta.videoDuration + if (duration - player.currentTime < 0.5 && duration - range[1] < 0.5) { + player.mse.endOfStream() + } else { + loadData(0, range[1] + 1) + waiterTimer = setTimeout(function () { + let buffered = player.buffered; let start + for (let i = 0, len = buffered.length; i < len; i++) { + start = buffered.start(i) + if (start >= player.currentTime) { + player.currentTime = start + break + } + } + }, 1500) + } + }) + + player._replay = function () { + Task.clear() + player.mp4.bufferCache.clear() + init(player.mp4.url).then((result) => { + let mp4 = result[0]; let mse = result[1] + player.src = mse.url + player.mp4 = mp4 + player.mse = mse + player.currentTime = 0 + player.play() + }, err => { + errorHandle(player, err) + }) + } + } +} + +Player.install('mp4player', mp4player) diff --git a/packages/xgplayer-mp4/src/media/mse.js b/packages/xgplayer-mp4/src/media/mse.js new file mode 100644 index 00000000..d4423fa7 --- /dev/null +++ b/packages/xgplayer-mp4/src/media/mse.js @@ -0,0 +1,70 @@ +import EventEmitter from 'event-emitter' +import Errors from '../error' + +class MSE { + constructor (codecs = 'video/mp4; codecs="avc1.64001E, mp4a.40.5"') { + let self = this + EventEmitter(this) + this.codecs = codecs + this.mediaSource = new window.MediaSource() + this.url = window.URL.createObjectURL(this.mediaSource) + this.queue = [] + this.updating = false + this.mediaSource.addEventListener('sourceopen', function () { + self.sourceBuffer = self.mediaSource.addSourceBuffer(self.codecs) + self.sourceBuffer.addEventListener('error', function (e) { + self.emit('error', new Errors('mse', '', {line: 16, handle: '[MSE] constructor sourceopen', msg: e.message})) + }) + self.sourceBuffer.addEventListener('updateend', function (e) { + self.emit('updateend') + let buffer = self.queue.shift() + if (buffer) { + self.sourceBuffer.appendBuffer(buffer) + } + }) + self.emit('sourceopen') + }) + this.mediaSource.addEventListener('sourceclose', function () { + self.emit('sourceclose') + }) + } + + get state () { + return this.mediaSource.readyState + } + + get duration () { + return this.mediaSource.duration + } + + set duration (value) { + this.mediaSource.duration = value + } + + appendBuffer (buffer) { + let sourceBuffer = this.sourceBuffer + if (sourceBuffer.updating === false && this.state === 'open') { + sourceBuffer.appendBuffer(buffer) + return true + } else { + this.queue.push(buffer) + return false + } + } + + removeBuffer (start, end) { + this.sourceBuffer.remove(start, end) + } + + endOfStream () { + if (this.state === 'open') { + this.mediaSource.endOfStream() + } + } + + static isSupported (codecs) { + return window.MediaSource && window.MediaSource.isTypeSupported(codecs) + } +} + +export default MSE diff --git a/packages/xgplayer-mp4/src/media/task.js b/packages/xgplayer-mp4/src/media/task.js new file mode 100755 index 00000000..f8d1cff8 --- /dev/null +++ b/packages/xgplayer-mp4/src/media/task.js @@ -0,0 +1,86 @@ +import EventEmitter from 'event-emitter' +import Errors from '../error' + +class Task { + constructor (url, range, callback) { + EventEmitter(this) + this.url = url + this.range = range + this.id = range.join('-') + this.on = false + let xhr = new window.XMLHttpRequest() + xhr.target = this + xhr.responseType = 'arraybuffer' + xhr.open('get', url) + xhr.setRequestHeader('Range', `bytes=${range[0]}-${range[1]}`) + xhr.onload = function () { + if (xhr.status === 200 || xhr.status === 206) { + if (callback && callback instanceof Function) { + callback(xhr.response) + } + } + xhr.target.remove() + } + xhr.onerror = function (e) { + xhr.target.emit('error', new Errors('network', '', {line: 25, handle: '[Task] constructor', msg: e.message, url})) + xhr.target.remove() + } + xhr.onabort = function () { + xhr.target.remove() + } + this.xhr = xhr + Task.queue.push(this) + this.update() + } + cancel () { + this.xhr.abort() + } + + remove () { + Task.queue.filter((item, idx) => { + if (item.url === this.url && item.id === this.id) { + Task.queue.splice(idx, 1) + return true + } else { + return false + } + }) + this.update() + } + + update () { + let Queue = Task.queue + let sended = Queue.filter((item) => item.on) + let wait = Queue.filter(item => !item.on) + let max = Task.limit - sended.length + wait.forEach((item, idx) => { + if (idx < max) { + item.run() + } + }) + } + + run () { + if (this.xhr.readyState === 1) { + this.on = true + this.xhr.send() + } else { + this.remove() + } + } + + static clear () { + Task.queue.forEach(item => { + if (item.on) { + item.cancel() + } + }) + Task.queue.length = 0 + } +} + +Task.queue = [] +Task.limit = 2 +window.Task = Task + +export default Task diff --git a/packages/xgplayer-mp4/src/mp4.js b/packages/xgplayer-mp4/src/mp4.js new file mode 100644 index 00000000..a31c8454 --- /dev/null +++ b/packages/xgplayer-mp4/src/mp4.js @@ -0,0 +1,447 @@ +import EventEmitter from 'event-emitter' +import Merge from 'deepmerge' +import Parser from './parse' +import Buffer from './fmp4/buffer' +import FMP4 from './fmp4/mp4' +import Task from './media/task' +import Download from './util/download' +import util from './util' +import Errors from './error' + +class MP4 { + /** + * [constructor 构造函数] + * @param {String} url [视频地址] + * @param {Number} [chunk_size=Math.pow(25, 4)] [请求的数据块大小,对于长视频设置的较大些可以避免二次请求] + */ + constructor (url, chunkSize = Math.pow(25, 4)) { + EventEmitter(this) + this.url = url + this.CHUNK_SIZE = chunkSize + this.init(url) + this.once('moovReady', this.moovParse.bind(this)) + this.cache = new Buffer() + this.bufferCache = new Set() + this.timeRage = [] + this.canDownload = true + } + + /** + * [getData 根据字节区间下载二进制数据] + * @param {Number} [start=0] [起始字节] + * @param {Number} [end=start + this.CHUNK_SIZE] [截止字节] + */ + getData (start = 0, end = start + this.CHUNK_SIZE) { + let self = this + return new Promise((resolve, reject) => { + let task = new Task(this.url, [ + start, end + ], resolve) + task.once('error', err => { + self.emit('error', err) + }) + }) + } + + /** + * [moovParse 解析视频信息] + * @return {[type]} [description] + */ + moovParse () { + let self = this + let moov = this.moovBox + let mvhd = util.findBox(moov, 'mvhd') + let traks = util.findBox(moov, 'trak') + let videoTrak, + audioTrak + let videoCodec, + audioCodec + let videoTimeScale, + audioTimeScale + let sps, + pps, + profile, + width, + height + let channelCount, + sampleRate, + decoderConfig + traks.forEach(trak => { + let hdlr = util.findBox(trak, 'hdlr') + let mdhd = util.findBox(trak, 'mdhd') + if (!hdlr || !mdhd) { + self.emit('error', new Errors('parse', '', {line: 72, handle: '[MP4] moovParse', url: self.url})) + return + } + let stsd = util.findBox(trak, 'stsd') + let codecBox = stsd.subBox[0] + if (hdlr.handleType === 'vide') { + let avcC = util.findBox(trak, 'avcC') + let avc1 = util.findBox(trak, 'avc1') + videoTrak = trak + videoTimeScale = mdhd.timescale + if (avcC) { + videoCodec = `${codecBox.type}.` + util.toHex(avcC.profile, avcC.profileCompatibility, avcC.AVCLevelIndication).join('') + sps = avcC.sequence && avcC.sequence.map((item) => Number(`0x${item}`)) + pps = avcC.pps && avcC.pps.map((item) => Number(`0x${item}`)) + profile = avcC.profile + } else { + videoCodec = `${codecBox.type}` + } + if (avc1) { + width = avc1.width + height = avc1.height + } + } + if (hdlr.handleType === 'soun') { + audioTrak = trak + let esds = util.findBox(trak, 'esds') + let mp4a = util.findBox(trak, 'mp4a') + let ESDescriptor = util.findBox(trak, 5) + audioTimeScale = mdhd.timescale + if (esds) { + audioCodec = `${codecBox.type}.` + util.toHex(esds.subBox[0].subBox[0].typeID) + `.${esds.subBox[0].subBox[0].subBox[0].type}` + } else { + audioCodec = `${codecBox.type}` + } + if (ESDescriptor && ESDescriptor.EScode) { + decoderConfig = ESDescriptor.EScode.map((item) => Number(`0x${item}`)) + } + if (mp4a) { + channelCount = mp4a.channelCount + sampleRate = mp4a.sampleRate + } + } + }) + this.videoTrak = Merge({}, videoTrak) + this.audioTrak = Merge({}, audioTrak) + let mdat = this._boxes.find(item => item.type === 'mdat') + let videoDuration = util.seekTrakDuration(videoTrak, videoTimeScale) + let audioDuration = util.seekTrakDuration(audioTrak, audioTimeScale) + this.mdatStart = mdat.start + let vf = this.videoKeyFrames + let videoKeyFramesLength = vf.length - 1 + vf.forEach((item, idx) => { + if (idx < videoKeyFramesLength) { + this.timeRage.push([ + item.time.time / videoTimeScale, + vf[idx + 1].time.time / videoTimeScale + ]) + } else { + this.timeRage.push([ + item.time.time / videoTimeScale, + -1 + ]) + } + }) + this.meta = { + videoCodec, + audioCodec, + createTime: mvhd.createTime, + modifyTime: mvhd.modifyTime, + duration: mvhd.duration / mvhd.timeScale, + timeScale: mvhd.timeScale, + videoDuration, + videoTimeScale, + audioDuration, + audioTimeScale, + endTime: Math.min(videoDuration, audioDuration), + sps, + pps, + width, + height, + profile, + pixelRatio: [ + 1, 1 + ], + channelCount, + sampleRate, + audioConfig: decoderConfig + } + } + + /** + * [init 实例的初始化,主要是获取视频的MOOV元信息] + */ + init () { + let self = this + self.getData().then((res) => { + let parsed + + let moovStart = 0 + + let moov + + let boxes + try { + parsed = new Parser(res) + } catch (e) { + self.emit('error', e.type ? e : new Errors('parse', '', {line: 176, handle: '[MP4] init', msg: e.message})) + return false + } + self._boxes = boxes = parsed.boxes + boxes.every(item => { + moovStart += item.size + if (item.type === 'moov') { + moov = item + self.moovBox = moov + self.emit('moovReady', moov) + return false + } else { + return true + } + }) + if (!moov) { + let nextBox = parsed.nextBox + if (nextBox) { + if (nextBox.type === 'moov') { + self.getData(moovStart, moovStart + nextBox.size + 28).then(res => { + let parsed = new Parser(res) + self._boxes = self._boxes.concat(parsed.boxes) + moov = parsed.boxes.filter(box => box.type === 'moov') + if (moov.length) { + self.moovBox = moov[0] + self.emit('moovReady', moov) + } else { + self.emit('error', new Errors('parse', '', {line: 203, handle: '[MP4] init', msg: 'not find moov box'})) + } + }) + } else { + self.emit('error', new Errors('parse', '', {line: 207, handle: '[MP4] init', msg: 'not find moov box'})) + } + } else { + self.getData(moovStart, '').then(res => { + let parsed = new Parser(res) + if (parsed) { + self._boxes = self._boxes.concat(parsed.boxes) + parsed.boxes.every(item => { + if (item.type === 'moov') { + moov = item + self.moovBox = moov + self.emit('moovReady', moov) + return false + } else { + return true + } + }) + } else { + self.emit('error', new Errors('parse', '', {line: 225, handle: '[MP4] init', msg: 'not find moov box'})) + } + }) + } + } + }).catch(() => { + self.emit('error', new Errors('network', '', {line: 231, handle: '[MP4] getData', msg: 'getData failed'})) + }) + } + + getSamplesByOrders (type = 'video', start, end) { + let trak = type === 'video' + ? this.videoTrak + : this.audioTrak + let stsc = util.findBox(trak, 'stsc') // chunk~samples + let stsz = util.findBox(trak, 'stsz') // sample-size + let stts = util.findBox(trak, 'stts') // sample-time + let stco = util.findBox(trak, 'stco') // chunk-offset + let ctts = util.findBox(trak, 'ctts') // offset-compositime + let mdatStart = this.mdatStart + let samples = [] + end = end !== undefined + ? end + : stsz.entries.length + if (start instanceof Array) { + start.forEach((item, idx) => { + samples.push({ + idx: item, + size: stsz.entries[item], + time: util.seekSampleTime(stts, ctts, item), + offset: util.seekSampleOffset(stsc, stco, stsz, item, mdatStart) + }) + }) + } else if (end !== 0) { + for (let i = start; i < end; i++) { + samples.push({ + idx: i, + size: stsz.entries[i], + time: util.seekSampleTime(stts, ctts, i), + offset: util.seekSampleOffset(stsc, stco, stsz, i, mdatStart) + }) + } + } else { + samples = { + idx: start, + size: stsz.entries[start], + time: util.seekSampleTime(stts, ctts, start), + offset: util.seekSampleOffset(stsc, stco, stsz, start, mdatStart) + } + } + return samples + } + + get videoKeyFrames () { + if (this._videoFrames) { + return this._videoFrames + } + let videoTrak = this.videoTrak + let stss = util.findBox(videoTrak, 'stss') + let frames = this.getSamplesByOrders('video', stss.entries.map(item => item - 1)) + this._videoFrames = frames + return frames + } + + get audioKeyFrames () { + if (this._audioFrames) { + return this._audioFrames + } + let videoScale = util.findBox(this.videoTrak, 'mdhd').timescale + let audioScale = util.findBox(this.audioTrak, 'mdhd').timescale + let audioStts = util.findBox(this.audioTrak, 'stts').entry + let videoFrames = this.videoKeyFrames + let audioIndex = [] + audioIndex = videoFrames.map(item => { + return util.seekOrderSampleByTime(audioStts, audioScale, item.time.time / videoScale) + }) + this._audioFrames = audioIndex + return this._audioFrames + } + + packMeta () { + if (!this.meta) { + return + } + let buffer = new Buffer() + buffer.write(FMP4.ftyp()) + buffer.write(FMP4.moov(this.meta)) + this.cache.write(buffer.buffer) + return buffer.buffer + } + + seek (time) { + let timeStart = time * this.meta.videoTimeScale + let fragIndex + + let videoFrames = this.videoKeyFrames + + let audioFrames = this.audioKeyFrames + videoFrames.every((item, idx) => { + let nowTime = item.time.time + + let nextTime = videoFrames[idx + 1] + ? videoFrames[idx + 1].time.time + : Number.MAX_SAFE_INTEGER + if (nowTime <= timeStart && timeStart < nextTime) { + fragIndex = idx + return false + } else { + return true + } + }) + audioFrames.every((item, idx) => { + let nowTime = item.startTime + + let nextTime = audioFrames[idx + 1] + ? audioFrames[idx + 1].startTime + : Number.MAX_SAFE_INTEGER + if (nowTime <= timeStart && timeStart < nextTime) { + fragIndex = Math.min(idx, fragIndex) + return false + } else { + return true + } + }) + if (this.bufferCache.has(fragIndex)) { + return Promise.resolve(null) + } else { + return this.loadFragment(fragIndex) + } + } + + loadFragment (fragIndex) { + let start, + end + let videoFrame = this.videoKeyFrames[fragIndex] + let audioFrame = this.getSamplesByOrders('audio', this.audioKeyFrames[fragIndex].order, 0) + start = Math.min(videoFrame.offset, audioFrame.offset) + if (fragIndex < this.videoKeyFrames.length - 1) { + let videoNextFrame = this.videoKeyFrames[fragIndex + 1] + let audioNextFrame = this.getSamplesByOrders('audio', this.audioKeyFrames[fragIndex + 1].order, 0) + end = Math.max(videoNextFrame.offset, audioNextFrame.offset) + } + let self = this + if (window.isNaN(start) || (end !== undefined && window.isNaN(end))) { + self.emit('error', new Errors('parse', '', { line: 366, handle: '[MP4] loadFragment', url: self.url })) + return false + } + if (this.bufferCache.has(fragIndex)) { + return Promise.resolve(null) + } else { + return this.getData( + start + self.mdatStart, end + ? self.mdatStart + end + : '').then((dat) => { + return self.createFragment(new Uint8Array(dat), start, fragIndex) + }) + } + } + addFragment (data) { + let buffer = new Buffer() + buffer.write(FMP4.moof(data)) + buffer.write(FMP4.mdat(data)) + this.cache.write(buffer.buffer) + return buffer.buffer + } + createFragment (mdatData, start, fragIndex) { + let self = this + let resBuffers = [] + this.bufferCache.add(fragIndex) + { + let framesIndex = self.videoKeyFrames.map((item) => item.idx) + let _samples = self.getSamplesByOrders('video', framesIndex[fragIndex], framesIndex[fragIndex + 1]) + let samples = _samples.map((item, idx) => { + return { + size: item.size, + duration: item.time.duration, + offset: item.time.offset, + buffer: new Uint8Array(mdatData.slice(item.offset - start, item.offset - start + item.size)), + key: idx === 0 + } + }) + resBuffers.push(this.addFragment({id: 1, time: _samples[0].time.time, firstFlags: 0x2000000, flags: 0xf01, samples})) + } + let _samples = this.getSamplesByOrders( + 'audio', this.audioKeyFrames[fragIndex].order, this.audioKeyFrames[fragIndex + 1] + ? this.audioKeyFrames[fragIndex + 1].order + : undefined) + let samples = _samples.map((item, idx) => { + return { + size: item.size, + duration: item.time.duration, + offset: item.time.offset, + buffer: new Uint8Array(mdatData.slice(item.offset - start, item.offset - start + item.size)), + key: idx === 0 + } + }) + resBuffers.push(this.addFragment({id: 2, time: _samples[0].time.time, firstFlags: 0x00, flags: 0x701, samples: samples})) + + let bufferSize = 0 + resBuffers.every(item => { + bufferSize += item.byteLength + return true + }) + let buffer = new Uint8Array(bufferSize) + + let offset = 0 + resBuffers.every(item => { + buffer.set(item, offset) + offset += item.byteLength + return true + }) + return Promise.resolve(buffer) + } + + download () { + // new Download('fmp4.mp4', this.cache.buffer) + } +} + +export default MP4 diff --git a/packages/xgplayer-mp4/src/parse/box.js b/packages/xgplayer-mp4/src/parse/box.js new file mode 100644 index 00000000..5d13fae7 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box.js @@ -0,0 +1,66 @@ +import Stream from './stream' +import Errors from '../error' +class Box { + constructor () { + this.headSize = 8 + this.size = 0 + this.type = '' + this.subBox = [] + this.start = -1 + } + readHeader (stream) { + this.start = stream.position + this.size = stream.readUint32() + this.type = String.fromCharCode(stream.readUint8(), stream.readUint8(), stream.readUint8(), stream.readUint8()) + if (this.size === 1) { + this.size = stream.readUint64() + } else if (this.size === 0) { + if (this.type !== 'mdat') { + throw new Errors('parse', '', {line: 19, handle: '[Box] readHeader', msg: 'parse mp4 mdat box failed'}) + } + } + if (this.type === 'uuid') { + let uuid = [] + for (let i = 0; i < 16; i++) { + uuid.push(stream.readUint8()) + } + } + } + readBody (stream) { + let end = this.size - stream.position + this.start + let type = this.type + this.data = stream.buffer.slice(stream.position, stream.position + end) + stream.position += this.data.byteLength + let parser + if (Box.containerBox.find(item => item === type)) { + parser = Box.containerParser + } else { + parser = Box[type] + } + if (parser && parser instanceof Function) { + parser.call(this) + } + } + read (stream) { + this.readHeader(stream) + this.readBody(stream) + } + + static containerParser () { + let stream = new Stream(this.data) + let size = stream.buffer.byteLength + let self = this + while (stream.position < size) { + let box = new Box() + box.readHeader(stream) + self.subBox.push(box) + box.readBody(stream) + } + delete self.data + stream = null + } +} + +Box.containerBox = ['moov', 'trak', 'edts', 'mdia', 'minf', 'dinf', 'stbl', 'mvex', 'moof', 'traf', 'mfra'] + +export default Box diff --git a/packages/xgplayer-mp4/src/parse/box/MP4DecConfigDescrTag.js b/packages/xgplayer-mp4/src/parse/box/MP4DecConfigDescrTag.js new file mode 100644 index 00000000..522e0834 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/MP4DecConfigDescrTag.js @@ -0,0 +1,25 @@ +import Box from '../box' +import Stream from '../stream' + +Box.MP4DecConfigDescrTag = function (stream) { + let box = new Box() + let size + box.type = stream.readUint8() + size = stream.readUint8() + if (size === 0x80) { + box.extend = true + stream.skip(2) + size = stream.readUint8() + 5 + } else { + size += 2 + } + box.size = size + box.typeID = stream.readUint8() + // 6 bits stream type,1 bit upstream flag,1 bit reserved flag + box.streamUint = stream.readUint8() + box.bufferSize = Stream.readByte(stream.dataview, 3) + box.maximum = stream.readUint32() + box.average = stream.readUint32() + box.subBox.push(Box.MP4DecSpecificDescrTag(stream)) + return box +} diff --git a/packages/xgplayer-mp4/src/parse/box/MP4DecSpecificDescrTag.js b/packages/xgplayer-mp4/src/parse/box/MP4DecSpecificDescrTag.js new file mode 100644 index 00000000..e613831b --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/MP4DecSpecificDescrTag.js @@ -0,0 +1,25 @@ +import Box from '../box' + +Box.MP4DecSpecificDescrTag = function (stream) { + let box = new Box() + let size, dataSize + box.type = stream.readUint8() + size = stream.readUint8() + if (size === 0x80) { + box.extend = true + stream.skip(2) + size = stream.readUint8() + 5 + dataSize = size - 5 + } else { + dataSize = size + size += 2 + } + box.size = size + let EScode = [] + for (let i = 0; i < dataSize; i++) { + EScode.push(Number(stream.readUint8()).toString(16).padStart(2, '0')) + } + box.EScode = EScode + delete box.subBox + return box +} diff --git a/packages/xgplayer-mp4/src/parse/box/MP4ESDescrTag.js b/packages/xgplayer-mp4/src/parse/box/MP4ESDescrTag.js new file mode 100644 index 00000000..1da370d0 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/MP4ESDescrTag.js @@ -0,0 +1,21 @@ +import Box from '../box' + +Box.MP4ESDescrTag = function (stream) { + let box = new Box() + let size + box.type = stream.readUint8() + size = stream.readUint8() + if (size === 0x80) { + box.extend = true + stream.skip(2) + size = stream.readUint8() + 5 + } else { + size += 2 + } + box.size = size + box.esID = stream.readUint16() + box.priority = stream.readUint8() + box.subBox.push(Box.MP4DecConfigDescrTag(stream)) + box.subBox.push(Box.SLConfigDescriptor(stream)) + return box +} diff --git a/packages/xgplayer-mp4/src/parse/box/SLConfigDescriptor.js b/packages/xgplayer-mp4/src/parse/box/SLConfigDescriptor.js new file mode 100644 index 00000000..6b7aaa34 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/SLConfigDescriptor.js @@ -0,0 +1,19 @@ +import Box from '../box' + +Box.SLConfigDescriptor = function (stream) { + let box = new Box() + let size + box.type = stream.readUint8() + size = stream.readUint8() + if (size === 0x80) { + box.extend = true + stream.skip(2) + size = stream.readUint8() + 5 + } else { + size += 2 + } + box.size = size + box.SL = stream.readUint8() + delete box.subBox + return box +} diff --git a/packages/xgplayer-mp4/src/parse/box/avc1.js b/packages/xgplayer-mp4/src/parse/box/avc1.js new file mode 100644 index 00000000..d9fa9ab6 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/avc1.js @@ -0,0 +1,30 @@ +import Box from '../box' +import Stream from '../stream' + +Box.avc1 = function () { + let stream = new Stream(this.data) + let self = this + stream.skip(6) + this.dataReferenceIndex = stream.readUint16() + stream.skip(16) + this.width = stream.readUint16() + this.height = stream.readUint16() + this.horizresolution = stream.readUint32() + this.vertresolution = stream.readUint32() + stream.skip(4) + this.frameCount = stream.readUint16() + stream.skip(1) + for (let i = 0; i < 31; i++) { + String.fromCharCode(stream.readUint8()) + } + this.depth = stream.readUint16() + stream.skip(2) + while (stream.position < stream.buffer.byteLength) { + let box = new Box() + box.readHeader(stream) + self.subBox.push(box) + box.readBody(stream) + } + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/avcC.js b/packages/xgplayer-mp4/src/parse/box/avcC.js new file mode 100644 index 00000000..c6a85961 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/avcC.js @@ -0,0 +1,34 @@ +import Box from '../box' +import Stream from '../stream' +Box.avcC = function () { + let stream = new Stream(this.data) + this.configVersion = stream.readUint8() + this.profile = stream.readUint8() + this.profileCompatibility = stream.readUint8() + this.AVCLevelIndication = stream.readUint8() + this.lengthSizeMinusOne = (stream.readUint8() & 3) + 1 + this.numOfSequenceParameterSets = stream.readUint8() & 31 + let sequenceLength = stream.readUint16() + this.sequenceLength = sequenceLength + let sequence = [] + for (let i = 0; i < sequenceLength; i++) { + sequence.push(Number(stream.readUint8()).toString(16)) + } + this.ppsCount = stream.readUint8() + let ppsLength = stream.readUint16() + this.ppsLength = ppsLength + let pps = [] + for (let i = 0; i < ppsLength; i++) { + pps.push(Number(stream.readUint8()).toString(16)) + } + this.pps = pps + this.sequence = sequence + let last = []; let dataviewLength = stream.dataview.byteLength + while (stream.position < dataviewLength) { + last.push(stream.readUint8()) + } + this.last = last + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/btrt.js b/packages/xgplayer-mp4/src/parse/box/btrt.js new file mode 100644 index 00000000..a6d43312 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/btrt.js @@ -0,0 +1,11 @@ +import Box from '../box' +import Stream from '../stream' +Box.btrt = function () { + let stream = new Stream(this.data) + this.bufferSizeDB = stream.readUint32() + this.maxBitrate = stream.readUint32() + this.avgBitrate = stream.readUint32() + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/co64.js b/packages/xgplayer-mp4/src/parse/box/co64.js new file mode 100644 index 00000000..e367eef1 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/co64.js @@ -0,0 +1,17 @@ +import Box from '../box' +import Stream from '../stream' + +Box.co64 = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.count = stream.readUint32() + let entries = [] + this.entries = entries + for (let i = 0, count = this.count; i < count; i++) { + entries.push(stream.readUint64()) + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/ctts.js b/packages/xgplayer-mp4/src/parse/box/ctts.js new file mode 100644 index 00000000..96b071d3 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/ctts.js @@ -0,0 +1,21 @@ +import Box from '../box' +import Stream from '../stream' + +Box.ctts = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + + this.entryCount = stream.readUint32() + let entry = [] + this.entry = entry + for (let i = 0, count = this.entryCount; i < count; i++) { + entry.push({ + count: stream.readUint32(), + offset: stream.readUint32() + }) + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/dref.js b/packages/xgplayer-mp4/src/parse/box/dref.js new file mode 100644 index 00000000..5a545774 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/dref.js @@ -0,0 +1,19 @@ +import Box from '../box' +import Stream from '../stream' + +Box.dref = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + let entryCount = stream.readUint32() + this.entryCount = entryCount + let self = this + // 暂时不支持离散视频,视频的部分内容由url指定 + for (let i = 0; i < entryCount; i++) { + let box = new Box() + self.subBox.push(box) + box.read(stream) + } + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/elst.js b/packages/xgplayer-mp4/src/parse/box/elst.js new file mode 100644 index 00000000..3b667d16 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/elst.js @@ -0,0 +1,27 @@ +import Box from '../box' +import Stream from '../stream' + +Box.elst = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + let entries = [] + let entry_count = stream.readUint32() + this.entries = entries + for (let i = 0; i < entry_count; i++) { + let entry = {} + entries.push(entry) + if (this.version === 1) { + entry.segment_duration = stream.readUint64() + entry.media_time = stream.readUint64() + } else { + entry.segment_duration = stream.readUint32() + entry.media_time = stream.readInt32() + } + entry.media_rate_integer = stream.readInt16() + entry.media_rate_fraction = stream.readInt16() + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/esds.js b/packages/xgplayer-mp4/src/parse/box/esds.js new file mode 100644 index 00000000..5c9e4629 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/esds.js @@ -0,0 +1,12 @@ +import Box from '../box' +import Stream from '../stream' + +Box.esds = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + let box = Box.MP4ESDescrTag(stream) + this.subBox.push(box) + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/ftyp.js b/packages/xgplayer-mp4/src/parse/box/ftyp.js new file mode 100644 index 00000000..c52167f5 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/ftyp.js @@ -0,0 +1,16 @@ +import Box from '../box' +import Stream from '../stream' + +Box.ftyp = function () { + let stream = new Stream(this.data) + this.major_brand = String.fromCharCode(stream.readUint8(), stream.readUint8(), stream.readUint8(), stream.readUint8()) + this.minor_version = stream.readUint32() + let compatibleBrands = [] + for (let i = 0, len = Math.floor((stream.buffer.byteLength - 8) / 4); i < len; i++) { + compatibleBrands.push(String.fromCharCode(stream.readUint8(), stream.readUint8(), stream.readUint8(), stream.readUint8())) + } + this.compatible_brands = compatibleBrands + stream = null + delete this.subBox + delete this.data +} diff --git a/packages/xgplayer-mp4/src/parse/box/hdlr.js b/packages/xgplayer-mp4/src/parse/box/hdlr.js new file mode 100644 index 00000000..34231063 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/hdlr.js @@ -0,0 +1,19 @@ +import Box from '../box' +import Stream from '../stream' + +Box.hdlr = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + stream.skip(4) + this.handleType = `${String.fromCharCode(stream.readUint8())}${String.fromCharCode(stream.readUint8())}${String.fromCharCode(stream.readUint8())}${String.fromCharCode(stream.readUint8())}` + stream.skip(12) + let name = [] + while (stream.position < this.size - 8) { + name.push(String.fromCharCode(stream.readUint8())) + } + this.name = name.join('') + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/hmhd.js b/packages/xgplayer-mp4/src/parse/box/hmhd.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-mp4/src/parse/box/iods.js b/packages/xgplayer-mp4/src/parse/box/iods.js new file mode 100644 index 00000000..ca365e58 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/iods.js @@ -0,0 +1,16 @@ +import Box from '../box' +import Stream from '../stream' +Box.iods = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + let content = [] + let length = stream.buffer.byteLength + while (stream.position < length) { + content.push(stream.readUint8()) + } + this.content = content + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/mdat.js b/packages/xgplayer-mp4/src/parse/box/mdat.js new file mode 100644 index 00000000..69ca79e3 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/mdat.js @@ -0,0 +1,5 @@ +import Box from '../box' + +Box.mdat = function () { + delete this.subBox +} diff --git a/packages/xgplayer-mp4/src/parse/box/mdhd.js b/packages/xgplayer-mp4/src/parse/box/mdhd.js new file mode 100644 index 00000000..44d9d405 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/mdhd.js @@ -0,0 +1,29 @@ +import Box from '../box' +import Stream from '../stream' +import UTC from '../date' + +Box.mdhd = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + if (this.version === 1) { + this.create = stream.readUint64() + this.modify = stream.readUint64() + this.createTime = new UTC().setTime(this.create * 1000) + this.modifyTime = new UTC().setTime(this.modify * 1000) + this.timescale = stream.readUint32() + this.duration = stream.readUint64() + } else { + this.create = stream.readUint32() + this.modify = stream.readUint32() + this.createTime = new UTC().setTime(this.create * 1000) + this.modifyTime = new UTC().setTime(this.modify * 1000) + this.timescale = stream.readUint32() + this.duration = stream.readUint32() + } + this.language = stream.readUint16() + stream.readUint16() + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/mfhd.js b/packages/xgplayer-mp4/src/parse/box/mfhd.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-mp4/src/parse/box/mp4a.js b/packages/xgplayer-mp4/src/parse/box/mp4a.js new file mode 100644 index 00000000..41035640 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/mp4a.js @@ -0,0 +1,19 @@ +import Box from '../box' +import Stream from '../stream' + +Box.mp4a = function () { + let stream = new Stream(this.data) + stream.skip(6) + this.dataReferenceIndex = stream.readUint16() + stream.skip(8) + this.channelCount = stream.readUint16() + this.sampleSize = stream.readUint16() + stream.skip(4) + this.sampleRate = stream.readUint32() >> 16 + let box = new Box() + box.readHeader(stream) + this.subBox.push(box) + box.readBody(stream) + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/mvhd.js b/packages/xgplayer-mp4/src/parse/box/mvhd.js new file mode 100644 index 00000000..89566f24 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/mvhd.js @@ -0,0 +1,31 @@ +import Box from '../box' +import Stream from '../stream' +import UTC from '../date' + +Box.mvhd = function () { + let stream = new Stream(this.data) + + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.create = stream.readUint32() + this.modify = stream.readUint32() + this.createTime = new UTC().setTime(this.create * 1000) + this.modifyTime = new UTC().setTime(this.modify * 1000) + this.timeScale = stream.readUint32() + this.duration = stream.readUint32() + this.rate = stream.readUint16() + '.' + stream.readUint16() + this.volume = stream.readUint8() + '.' + stream.readUint8() + // 越过保留的10字节 + Stream.readByte(stream.dataview, 8) + Stream.readByte(stream.dataview, 2) + // 视频转换矩阵 + let matrix = [] + for (let i = 0; i < 9; i++) { + matrix.push(stream.readUint16() + '.' + stream.readUint16()) + } + this.matrix = matrix + Stream.readByte(stream.dataview, 24) + this.nextTrackID = stream.readUint32() + delete this.subBox + delete this.data +} diff --git a/packages/xgplayer-mp4/src/parse/box/nmhd.js b/packages/xgplayer-mp4/src/parse/box/nmhd.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-mp4/src/parse/box/pasp.js b/packages/xgplayer-mp4/src/parse/box/pasp.js new file mode 100644 index 00000000..a0068086 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/pasp.js @@ -0,0 +1,9 @@ +import Box from '../box' +import Stream from '../stream' +Box.pasp = function () { + let stream = new Stream(this.data) + this.content = stream.buffer.slice(0, this.size - 8) + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/sbgp.js b/packages/xgplayer-mp4/src/parse/box/sbgp.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-mp4/src/parse/box/sdtp.js b/packages/xgplayer-mp4/src/parse/box/sdtp.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-mp4/src/parse/box/smhd.js b/packages/xgplayer-mp4/src/parse/box/smhd.js new file mode 100644 index 00000000..97aab511 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/smhd.js @@ -0,0 +1,12 @@ +import Box from '../box' +import Stream from '../stream' + +Box.smhd = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.balance = stream.readInt8() + '.' + stream.readInt8() + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/stco.js b/packages/xgplayer-mp4/src/parse/box/stco.js new file mode 100644 index 00000000..2a32414f --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/stco.js @@ -0,0 +1,17 @@ +import Box from '../box' +import Stream from '../stream' + +Box.stco = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.count = stream.readUint32() + let entries = [] + this.entries = entries + for (let i = 0, count = this.count; i < count; i++) { + entries.push(stream.readUint32()) + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/stsc.js b/packages/xgplayer-mp4/src/parse/box/stsc.js new file mode 100644 index 00000000..7ce08bdf --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/stsc.js @@ -0,0 +1,36 @@ +import Box from '../box' +import Stream from '../stream' + +Box.stsc = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.count = stream.readUint32() + let entries = [] + this.entries = entries + for (let i = 0, count = this.count; i < count; i++) { + entries.push({ + first_chunk: stream.readUint32(), + samples_per_chunk: stream.readUint32(), + sample_desc_index: stream.readUint32() + }) + } + for (let i = 0, count = this.count, entry, preEntry; i < count - 1; i++) { + entry = entries[i] + preEntry = entries[i - 1] + entry.chunk_count = entries[i + 1].first_chunk - entry.first_chunk + entry.first_sample = i === 0 ? 1 : preEntry.first_sample + preEntry.chunk_count * preEntry.samples_per_chunk + } + if (this.count === 1) { + let entry = entries[0] + entry.first_sample = 1 + entry.chunk_count = 0 + } else if (this.count > 1) { + let last = entries[this.count - 1]; let pre = entries[this.count - 2] + last.first_sample = pre.first_sample + pre.chunk_count * pre.samples_per_chunk + last.chunk_count = 0 + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/stsd.js b/packages/xgplayer-mp4/src/parse/box/stsd.js new file mode 100644 index 00000000..793dcbf8 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/stsd.js @@ -0,0 +1,14 @@ +import Box from '../box' +import Stream from '../stream' +Box.stsd = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.entryCount = stream.readUint32() + let box = new Box() + box.readHeader(stream) + this.subBox.push(box) + box.readBody(stream) + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/stsh.js b/packages/xgplayer-mp4/src/parse/box/stsh.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-mp4/src/parse/box/stss.js b/packages/xgplayer-mp4/src/parse/box/stss.js new file mode 100644 index 00000000..8bd045a3 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/stss.js @@ -0,0 +1,17 @@ +import Box from '../box' +import Stream from '../stream' + +Box.stss = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.count = stream.readUint32() + let entries = [] + this.entries = entries + for (let i = 0, count = this.count; i < count; i++) { + entries.push(stream.readUint32()) + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/stsz.js b/packages/xgplayer-mp4/src/parse/box/stsz.js new file mode 100644 index 00000000..6d30f7b2 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/stsz.js @@ -0,0 +1,18 @@ +import Box from '../box' +import Stream from '../stream' + +Box.stsz = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.sampleSize = stream.readUint32() + this.count = stream.readUint32() + let entries = [] + this.entries = entries + for (let i = 0, count = this.count; i < count; i++) { + entries.push(stream.readUint32()) + } + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/stts.js b/packages/xgplayer-mp4/src/parse/box/stts.js new file mode 100644 index 00000000..ea638957 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/stts.js @@ -0,0 +1,20 @@ +import Box from '../box' +import Stream from '../stream' + +Box.stts = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3) + this.count = stream.readUint32() + let entry = [] + for (let i = 0, count = this.count; i < count; i++) { + entry.push({ + sampleCount: stream.readUint32(), + sampleDuration: stream.readUint32() + }) + } + this.entry = entry + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/stz2.js b/packages/xgplayer-mp4/src/parse/box/stz2.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-mp4/src/parse/box/tfhd.js b/packages/xgplayer-mp4/src/parse/box/tfhd.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-mp4/src/parse/box/tkhd.js b/packages/xgplayer-mp4/src/parse/box/tkhd.js new file mode 100644 index 00000000..8ff2e512 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/tkhd.js @@ -0,0 +1,42 @@ +import Box from '../box' +import Stream from '../stream' +import UTC from '../date' + +Box.tkhd = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = Stream.readByte(stream.dataview, 3, 0) + if (this.version === 1) { + this.create = stream.readUint64() + this.modify = stream.readUint64() + this.createTime = new UTC().setTime(this.create * 1000) + this.modifyTime = new UTC().setTime(this.modify * 1000) + this.trackID = stream.readUint32() + this.reserverd = stream.readUint32() + this.duration = stream.readUint64() + } else { + this.create = stream.readUint32() + this.modify = stream.readUint32() + this.createTime = new UTC().setTime(this.create * 1000) + this.modifyTime = new UTC().setTime(this.modify * 1000) + this.trackID = stream.readUint32() + this.reserverd = stream.readUint32() + this.duration = stream.readUint32() + } + stream.readUint64() + this.layer = stream.readInt16() + this.alternate_group = stream.readInt16() + this.volume = stream.readInt16() >> 8 + stream.readUint16() + // 视频转换矩阵 + let matrix = [] + for (let i = 0; i < 9; i++) { + matrix.push(stream.readUint16() + '.' + stream.readUint16()) + } + this.matrix = matrix + this.width = stream.readUint16() + '.' + stream.readUint16() + this.height = stream.readUint16() + '.' + stream.readUint16() + delete this.data + delete this.subBox + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/traf.js b/packages/xgplayer-mp4/src/parse/box/traf.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-mp4/src/parse/box/trun.js b/packages/xgplayer-mp4/src/parse/box/trun.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/xgplayer-mp4/src/parse/box/udta.js b/packages/xgplayer-mp4/src/parse/box/udta.js new file mode 100644 index 00000000..7f7655b0 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/udta.js @@ -0,0 +1,4 @@ +import Box from '../box' +Box.udta = function () { + delete this.subBox +} diff --git a/packages/xgplayer-mp4/src/parse/box/url.js b/packages/xgplayer-mp4/src/parse/box/url.js new file mode 100644 index 00000000..78008a3b --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/url.js @@ -0,0 +1,15 @@ +import Box from '../box' +import Stream from '../stream' +Box['url '] = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = [stream.readUint8(), stream.readUint8(), stream.readUint8()] + let location = []; let length = stream.buffer.byteLength + while (stream.position < length) { + location.push(stream.readUint8()) + } + this.location = location + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/box/vmhd.js b/packages/xgplayer-mp4/src/parse/box/vmhd.js new file mode 100644 index 00000000..b85aa2f0 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/box/vmhd.js @@ -0,0 +1,13 @@ +import Box from '../box' +import Stream from '../stream' + +Box.vmhd = function () { + let stream = new Stream(this.data) + this.version = stream.readUint8() + this.flag = [stream.readUint8(), stream.readUint8(), stream.readUint8()] + this.graphicsmode = stream.readUint16() + this.opcolor = [stream.readUint16(), stream.readUint16(), stream.readUint16()] + delete this.subBox + delete this.data + stream = null +} diff --git a/packages/xgplayer-mp4/src/parse/date.js b/packages/xgplayer-mp4/src/parse/date.js new file mode 100644 index 00000000..883bd53d --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/date.js @@ -0,0 +1,18 @@ +class UTC { + constructor () { + let time = new Date() + time.setFullYear(1904) + time.setMonth(0) + time.setDate(1) + time.setHours(0) + time.setMinutes(0) + time.setSeconds(0) + this.time = time + } + setTime (value) { + this.time.setTime(this.time.getTime() + value * 1) + return this.time.toLocaleString() + } +} + +export default UTC diff --git a/packages/xgplayer-mp4/src/parse/index.js b/packages/xgplayer-mp4/src/parse/index.js new file mode 100644 index 00000000..ac8e8c88 --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/index.js @@ -0,0 +1,42 @@ +import Box from './box' +import Concat from 'concat-typed-array' +import Stream from './stream' +import * as SubBox from './box/*.js' + +class Parse { + constructor (buffer) { + this.buffer = null + this.boxes = [] + this.nextBox = null + this.start = 0 + let self = this + if (self.buffer) { + Concat(Uint8Array, self.buffer, buffer) + } else { + self.buffer = buffer + } + let bufferLength = buffer.byteLength + buffer.position = 0 + let stream = new Stream(buffer) + while (bufferLength - stream.position >= 8) { + let box = new Box() + box.readHeader(stream) + if (box.size - 8 <= (bufferLength - stream.position)) { + box.readBody(stream) + self.boxes.push(box) + } else { + if (box.type === 'mdat') { + box.readBody(stream) + self.boxes.push(box) + } else { + self.nextBox = box + stream.position -= 8 + break + } + } + } + self.buffer = new Uint8Array(self.buffer.slice(stream.position)) + } +} + +export default Parse diff --git a/packages/xgplayer-mp4/src/parse/stream.js b/packages/xgplayer-mp4/src/parse/stream.js new file mode 100644 index 00000000..2cae727e --- /dev/null +++ b/packages/xgplayer-mp4/src/parse/stream.js @@ -0,0 +1,113 @@ +import Errors from '../error' +class Stream { + constructor (buffer) { + if (buffer instanceof ArrayBuffer) { + this.buffer = buffer + this.dataview = new DataView(buffer) + this.dataview.position = 0 + } else { + throw new Errors('parse', '', {line: 9, handle: '[Stream] constructor', msg: 'data is valid'}) + } + } + + set position (value) { + this.dataview.position = value + } + + get position () { + return this.dataview.position + } + + skip (count) { + let loop = Math.floor(count / 4) + let last = count % 4 + for (let i = 0; i < loop; i++) { + Stream.readByte(this.dataview, 4) + } + if (last > 0) { + Stream.readByte(this.dataview, last) + } + } + + /** + * [readByte 从DataView中读取数据] + * @param {DataView} buffer [DataView实例] + * @param {Number} size [读取字节数] + * @return {Number} [整数] + */ + static readByte (buffer, size, sign) { + let res + switch (size) { + case 1: + if (sign) { + res = buffer.getInt8(buffer.position) + } else { + res = buffer.getUint8(buffer.position) + } + break + case 2: + if (sign) { + res = buffer.getInt16(buffer.position) + } else { + res = buffer.getUint16(buffer.position) + } + break + case 3: + if (sign) { + throw 'not supported for readByte 3' + } else { + res = buffer.getUint8(buffer.position) << 16 + res |= buffer.getUint8(buffer.position + 1) << 8 + res |= buffer.getUint8(buffer.position + 2) + } + break + case 4: + if (sign) { + res = buffer.getInt32(buffer.position) + } else { + res = buffer.getUint32(buffer.position) + } + break + case 8: + if (sign) { + throw new Errors('parse', '', {line: 73, handle: '[Stream] readByte', msg: 'not supported for readBody 8'}) + } else { + res = buffer.getUint32(buffer.position) << 32 + res |= buffer.getUint32(buffer.position + 4) + } + break + default: + res = '' + } + buffer.position += size + return res + } + + readUint8 () { + return Stream.readByte(this.dataview, 1) + } + + readUint16 () { + return Stream.readByte(this.dataview, 2) + } + + readUint32 () { + return Stream.readByte(this.dataview, 4) + } + + readUint64 () { + return Stream.readByte(this.dataview, 8) + } + + readInt8 () { + return Stream.readByte(this.dataview, 1, true) + } + readInt16 () { + return Stream.readByte(this.dataview, 2, true) + } + readInt32 () { + return Stream.readByte(this.dataview, 4, true) + } +} + +export default Stream diff --git a/packages/xgplayer-mp4/src/util/download.js b/packages/xgplayer-mp4/src/util/download.js new file mode 100644 index 00000000..ca465917 --- /dev/null +++ b/packages/xgplayer-mp4/src/util/download.js @@ -0,0 +1,13 @@ +class Download { + constructor (filename, content) { + let aLink = document.createElement('a') + let blob = new Blob([content]) + let evt = document.createEvent('MouseEvents') + evt.initEvent('click', false, false) + aLink.download = filename + aLink.href = URL.createObjectURL(blob) + aLink.dispatchEvent(evt) + } +} + +export default Download diff --git a/packages/xgplayer-mp4/src/util/index.js b/packages/xgplayer-mp4/src/util/index.js new file mode 100644 index 00000000..03b4df0b --- /dev/null +++ b/packages/xgplayer-mp4/src/util/index.js @@ -0,0 +1,160 @@ +let util = {} + +/** + * [使用递归查询指定type的box] + * var mimeCodec = 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'; + * @param {Object} root [JSON对象] + * @param {String} type [box的类型] + * @return {Object} [box] + */ +util.findBox = function (root, type, result = []) { + if (root.type !== type) { + if (root && root.subBox) { + let box = root.subBox.filter(item => item.type === type) + if (box.length) { + box.forEach(item => result.push(item)) + } else { + root.subBox.forEach(item => util.findBox(item, type, result)) + } + } + } else { + result.push(root) + } + result = [].concat(result) + return result.length > 1 ? result : result[0] +} + +util.padStart = function (str, length, pad) { + let charstr = String(pad); let len = length >> 0; let maxlen = Math.ceil(len / charstr.length) + let chars = []; let r = String(str) + while (maxlen--) { + chars.push(charstr) + } + return chars.join('').substring(0, len - r.length) + r +} + +/** + * [十进制转十六进制] + * @param {Number} value [要转换的十进制数字] + * @return {String} [十六进制] + */ +util.toHex = function (...value) { + let hex = [] + value.forEach(item => { + hex.push(util.padStart(Number(item).toString(16), 2, 0)) + }) + return hex +} + +/** + * [求和计算] + * @param {[type]} rst [description] + * @return {[type]} [description] + */ +util.sum = function (...rst) { + let count = 0 + rst.forEach(item => { count += item }) + return count +} + +/** + * [计算音视频数据在Mdat中的偏移量] + * @param {Array} stsc [块偏移量] + * @param {Number} sample_order [帧次序] + * @return {Object} [块的位置和当前帧的偏移数] + */ +util.stscOffset = function (stsc, sample_order) { + let chunk_index; let samples_offset = '' + let chunk_start = stsc.entries.filter((item) => { + return item.first_sample <= sample_order && sample_order < item.first_sample + item.chunk_count * item.samples_per_chunk + })[0] + if (!chunk_start) { + let last_chunk = stsc.entries.pop() + stsc.entries.push(last_chunk) + let chunk_offset = Math.floor((sample_order - last_chunk.first_sample) / last_chunk.samples_per_chunk) + let last_chunk_index = last_chunk.first_chunk + chunk_offset + let last_chunk_first_sample = last_chunk.first_sample + last_chunk.samples_per_chunk * chunk_offset + return { + chunk_index: last_chunk_index, + samples_offset: [last_chunk_first_sample, sample_order] + } + } else { + let chunk_offset = Math.floor((sample_order - chunk_start.first_sample) / chunk_start.samples_per_chunk) + let chunk_offset_sample = chunk_start.first_sample + chunk_offset * chunk_start.samples_per_chunk + chunk_index = chunk_start.first_chunk + chunk_offset + samples_offset = [chunk_offset_sample, sample_order] + return { + chunk_index: chunk_index, + samples_offset + } + } +} + +util.seekSampleOffset = function (stsc, stco, stsz, order, mdatStart) { + let chunkOffset = util.stscOffset(stsc, order + 1) + let result = stco.entries[chunkOffset.chunk_index - 1] + util.sum.apply(null, stsz.entries.slice(chunkOffset.samples_offset[0] - 1, chunkOffset.samples_offset[1] - 1)) - mdatStart + if (result === undefined) { + throw `result=${result},stco.length=${stco.entries.length},sum=${util.sum.apply(null, stsz.entries.slice(0, order))}` + } else if (result < 0) { + throw `result=${result},stco.length=${stco.entries.length},sum=${util.sum.apply(null, stsz.entries.slice(0, order))}` + } + return result +} + +util.seekSampleTime = function (stts, ctts, order) { + let time; let duration; let count = 0; let startTime = 0; let offset = 0 + stts.entry.every(item => { + duration = item.sampleDuration + if (order < count + item.sampleCount) { + time = startTime + (order - count) * item.sampleDuration + return false + } else { + count += item.sampleCount + startTime += item.sampleCount * duration + return true + } + }) + if (ctts) { + let ct = 0 + ctts.entry.every(item => { + ct += item.count + if (order < ct) { + offset = item.offset + return false + } else { + return true + } + }) + } + if (!time) { + time = startTime + (order - count) * duration + } + return {time, duration, offset} +} + +util.seekOrderSampleByTime = function (stts, timeScale, time) { + let startTime = 0; let order = 0; let count = 0; let itemDuration + stts.every((item, idx) => { + itemDuration = item.sampleCount * item.sampleDuration / timeScale + if (time <= startTime + itemDuration) { + order = count + Math.ceil((time - startTime) * timeScale / item.sampleDuration) + startTime = startTime + Math.ceil((time - startTime) * timeScale / item.sampleDuration) * item.sampleDuration / timeScale + return false + } else { + startTime += itemDuration + count += item.sampleCount + return true + } + }) + return {order, startTime} +} + +util.seekTrakDuration = function (trak, timeScale) { + let stts = util.findBox(trak, 'stts'); let duration = 0 + stts.entry.forEach(item => { + duration += item.sampleCount * item.sampleDuration + }) + return Number(duration / timeScale).toFixed(4) +} + +export default util diff --git a/packages/xgplayer-mp4/src/write/box.js b/packages/xgplayer-mp4/src/write/box.js new file mode 100644 index 00000000..70936307 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box.js @@ -0,0 +1,37 @@ +import Stream from './stream' +class Box { + constructor (obj, output) { + this.size = obj.size + this.type = obj.type + this.stream = new Stream(new Uint8Array(this.size - 8).buffer) + this.data = obj + this.output = output + this.subBox = [] + let header = new Stream(new Uint8Array(8).buffer) + header.writeUint32(obj.size) + header.writeStr(obj.type) + output.write(new Uint8Array(header.buffer)) + } + writeBody () { + let self = this + let data = this.data + if (Box.containerBox.find(item => item === self.type)) { + data.subBox.forEach(item => { + let box = new Box(item, self.output) + self.subBox.push(box) + box.writeBody() + }) + } else { + let run = Box[self.type] + if (run && run instanceof Function) { + run.call(self, data, self.output) + } else { + throw new Error(`write:error,${self.type} write nothing`) + } + } + } +} + +Box.containerBox = ['moov', 'trak', 'edts', 'mdia', 'minf', 'dinf', 'stbl', 'mvex', 'moof', 'mvex', 'traf', 'mfra'] + +export default Box diff --git a/packages/xgplayer-mp4/src/write/box/MP4DecConfigDescrTag.js b/packages/xgplayer-mp4/src/write/box/MP4DecConfigDescrTag.js new file mode 100644 index 00000000..85e3ceca --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/MP4DecConfigDescrTag.js @@ -0,0 +1,21 @@ +import Box from '../box' +import Stream from '../stream' +Box.MP4DecConfigDescrTag = function (data, output) { + let stream = new Stream(new Uint8Array(data.size).buffer) + stream.writeUint8(data.type) + if (data.extend) { + for (let i = 0; i < 3; i++) { + stream.writeUint8(0x80) + } + stream.writeUint8(data.size - 5) + } else { + stream.writeUint8(data.size - 2) + } + stream.writeUint8(data.typeID) + stream.writeUint8(data.streamUint) + stream.writeUint24(data.bufferSize) + stream.writeUint32(data.maximum) + stream.writeUint32(data.average) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + Box.MP4DecSpecificDescrTag(data.subBox[0], output) +} diff --git a/packages/xgplayer-mp4/src/write/box/MP4DecSpecificDescrTag.js b/packages/xgplayer-mp4/src/write/box/MP4DecSpecificDescrTag.js new file mode 100644 index 00000000..1a0e9539 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/MP4DecSpecificDescrTag.js @@ -0,0 +1,19 @@ +import Box from '../box' +import Stream from '../stream' + +Box.MP4DecSpecificDescrTag = function (data, output) { + let stream = new Stream(new Uint8Array(data.size).buffer) + stream.writeUint8(data.type) + if (data.extend) { + for (let i = 0; i < 3; i++) { + stream.writeUint8(0x80) + } + stream.writeUint8(data.size - 5) + } else { + stream.writeUint8(data.size - 2) + } + data.EScode.forEach(item => { + stream.writeUint8(Number(`0x${item}`)) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) +} diff --git a/packages/xgplayer-mp4/src/write/box/MP4ESDescrTag.js b/packages/xgplayer-mp4/src/write/box/MP4ESDescrTag.js new file mode 100644 index 00000000..f1b051ff --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/MP4ESDescrTag.js @@ -0,0 +1,19 @@ +import Box from '../box' +import Stream from '../stream' +Box.MP4ESDescrTag = function (data, output) { + let stream = new Stream(new Uint8Array(data.size).buffer) + stream.writeUint8(data.type) + if (data.extend) { + for (let i = 0; i < 3; i++) { + stream.writeUint8(0x80) + } + stream.writeUint8(data.size - 5) + } else { + stream.writeUint8(data.size - 2) + } + stream.writeUint16(data.esID) + stream.writeUint8(data.priority) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + Box.MP4DecConfigDescrTag(data.subBox[0], output) + Box.SLConfigDescriptor(data.subBox[1], output) +} diff --git a/packages/xgplayer-mp4/src/write/box/SLConfigDescriptor.js b/packages/xgplayer-mp4/src/write/box/SLConfigDescriptor.js new file mode 100644 index 00000000..1e5d781e --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/SLConfigDescriptor.js @@ -0,0 +1,16 @@ +import Box from '../box' +import Stream from '../stream' +Box.SLConfigDescriptor = function (data, output) { + let stream = new Stream(new Uint8Array(data.size).buffer) + stream.writeUint8(data.type) + if (data.extend) { + for (let i = 0; i < 3; i++) { + stream.writeUint8(0x80) + } + stream.writeUint8(data.size - 5) + } else { + stream.writeUint8(data.size - 2) + } + stream.writeUint8(data.SL) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) +} diff --git a/packages/xgplayer-mp4/src/write/box/avc1.js b/packages/xgplayer-mp4/src/write/box/avc1.js new file mode 100644 index 00000000..4440adeb --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/avc1.js @@ -0,0 +1,33 @@ +import Box from '../box' +Box.avc1 = function (data, output) { + let stream = this.stream + stream.fill(6) + stream.writeUint16(data.dataReferenceIndex) + stream.fill(16) + stream.writeUint16(data.width) + stream.writeUint16(data.height) + stream.writeUint32(data.horizresolution) + stream.writeUint32(data.vertresolution) + stream.fill(4) + stream.writeUint16(data.frameCount) + stream.fill(32) + stream.writeUint16(data.depth) + stream.fill(2) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + let self = this + data.subBox.forEach(item => { + let box = new Box(item, self.output) + self.subBox.push(box) + box.writeBody() + }) + let writeSize = stream.position + self.subBox.forEach(item => { + writeSize += item.stream.position + 8 + }) + if (writeSize !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + self.outputSize = writeSize + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/avcC.js b/packages/xgplayer-mp4/src/write/box/avcC.js new file mode 100644 index 00000000..82262cbf --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/avcC.js @@ -0,0 +1,32 @@ +import Box from '../box' +Box.avcC = function (data, output) { + let stream = this.stream + stream.writeUint8(data.configVersion) + stream.writeUint8(data.profile) + stream.writeUint8(data.profileCompatibility) + stream.writeUint8(data.AVCLevelIndication) + stream.writeUint8(data.lengthSizeMinusOne - 1) + stream.writeUint8(data.numOfSequenceParameterSets) + stream.writeUint16(data.sequenceLength) + data.sequence.forEach(item => { + stream.writeUint8(Number('0x' + item)) + }) + stream.writeUint8(data.ppsCount) + stream.writeUint16(data.ppsLength) + data.pps.forEach(item => { + stream.writeUint8(Number('0x' + item)) + }) + if (data.last.length) { + data.last.forEach(item => { + stream.writeUint8(item) + }) + } + + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/btrt.js b/packages/xgplayer-mp4/src/write/box/btrt.js new file mode 100644 index 00000000..2034463f --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/btrt.js @@ -0,0 +1,14 @@ +import Box from '../box'; +Box.btrt = function (data, output) { + let stream = this.stream; + stream.writeUint32(this.bufferSizeDB); + stream.writeUint32(this.maxBitrate); + stream.writeUint32(this.avgBitrate); + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))); + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete`; + } else { + this.outputSize = stream.position; + } + delete this.data; +}; diff --git a/packages/xgplayer-mp4/src/write/box/co64.js b/packages/xgplayer-mp4/src/write/box/co64.js new file mode 100644 index 00000000..e0865daf --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/co64.js @@ -0,0 +1,17 @@ +import Box from '../box' +Box.co64 = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.count) + data.entries.forEach(item => { + stream.writeUint64(item) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/ctts.js b/packages/xgplayer-mp4/src/write/box/ctts.js new file mode 100644 index 00000000..a8c426cd --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/ctts.js @@ -0,0 +1,19 @@ +import Box from '../box' + +Box.ctts = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.entryCount) + data.entry.forEach(item => { + stream.writeUint32(item.count) + stream.writeUint32(item.offset) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/dref.js b/packages/xgplayer-mp4/src/write/box/dref.js new file mode 100644 index 00000000..9e18e882 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/dref.js @@ -0,0 +1,25 @@ +import Box from '../box' + +Box.dref = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.entryCount) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + let self = this + data.subBox.forEach(item => { + let box = new Box(item, self.output) + self.subBox.push(box) + box.writeBody() + }) + let writeSize = stream.position + self.subBox.forEach(item => { + writeSize += item.stream.position + 8 + }) + if (writeSize !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/elst.js b/packages/xgplayer-mp4/src/write/box/elst.js new file mode 100644 index 00000000..60c32cc6 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/elst.js @@ -0,0 +1,27 @@ +import Box from '../box' + +Box.elst = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.entries.length) + let version = data.version + data.entries.forEach(item => { + if (version === 1) { + stream.writeUint64(item.segment_duration) + stream.writeUint64(item.media_time) + } else { + stream.writeUint32(item.segment_duration) + stream.writeInt32(item.media_time) + } + stream.writeInt16(item.media_rate_integer) + stream.writeInt16(item.media_rate_fraction) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/esds.js b/packages/xgplayer-mp4/src/write/box/esds.js new file mode 100644 index 00000000..75487cc8 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/esds.js @@ -0,0 +1,11 @@ +import Box from '../box' + +Box.esds = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + Box.MP4ESDescrTag(data.subBox[0], output) + this.outputSize = data.size - 8 + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/ftyp.js b/packages/xgplayer-mp4/src/write/box/ftyp.js new file mode 100644 index 00000000..f19fb28a --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/ftyp.js @@ -0,0 +1,17 @@ +import Box from '../box' + +Box.ftyp = function (data, output) { + let stream = this.stream + stream.writeStr(data.major_brand) + stream.writeUint32(data.minor_version) + data.compatible_brands.forEach(item => { + stream.writeStr(item) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw `${data.type} box incomplete` + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/hdlr.js b/packages/xgplayer-mp4/src/write/box/hdlr.js new file mode 100644 index 00000000..b9c20760 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/hdlr.js @@ -0,0 +1,15 @@ +import Box from '../box' +Box.hdlr = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.fill(4) + stream.writeStr(data.handleType) + stream.fill(12) + stream.writeStr(data.name) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/iods.js b/packages/xgplayer-mp4/src/write/box/iods.js new file mode 100644 index 00000000..8e26dd50 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/iods.js @@ -0,0 +1,14 @@ +import Box from '../box' +Box.iods = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + data.content.forEach(item => { + stream.writeUint8(item) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/mdat.js b/packages/xgplayer-mp4/src/write/box/mdat.js new file mode 100644 index 00000000..48f27da8 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/mdat.js @@ -0,0 +1,5 @@ +import Box from '../box' +Box.mdat = function (data, output) { + output.write(new Uint8Array(new Uint8Array(data.data))) + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/mdhd.js b/packages/xgplayer-mp4/src/write/box/mdhd.js new file mode 100644 index 00000000..6cb0dffe --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/mdhd.js @@ -0,0 +1,27 @@ +import Box from '../box' +Box.mdhd = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + let version = data.version + if (version === 1) { + stream.writeUint64(data.create) + stream.writeUint64(data.modify) + stream.writeUint32(data.timescale) + stream.writeUint64(data.duration) + } else { + stream.writeUint32(data.create) + stream.writeUint32(data.modify) + stream.writeUint32(data.timescale) + stream.writeUint32(data.duration) + } + stream.writeUint16(data.language) + stream.writeUint16() + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/mehd.js b/packages/xgplayer-mp4/src/write/box/mehd.js new file mode 100644 index 00000000..7370c007 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/mehd.js @@ -0,0 +1,12 @@ +import Box from '../box' +Box.mehd = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.duration) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/mfhd.js b/packages/xgplayer-mp4/src/write/box/mfhd.js new file mode 100644 index 00000000..6b255f18 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/mfhd.js @@ -0,0 +1,12 @@ +import Box from '../box' +Box.mfhd = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.sequence) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/mfro.js b/packages/xgplayer-mp4/src/write/box/mfro.js new file mode 100644 index 00000000..b99c72a3 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/mfro.js @@ -0,0 +1,14 @@ +import Box from '../box' +Box.mfro = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.dsize) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/mp4a.js b/packages/xgplayer-mp4/src/write/box/mp4a.js new file mode 100644 index 00000000..ce4d6d83 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/mp4a.js @@ -0,0 +1,26 @@ +import Box from '../box' +Box.mp4a = function (data, output) { + let stream = this.stream + let self = this + stream.fill(6) + stream.writeUint16(data.dataReferenceIndex) + stream.fill(8) + stream.writeUint16(data.channelCount) + stream.writeUint16(data.sampleSize) + stream.fill(4) + stream.writeUint32(data.sampleRate) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + let outputSize = stream.position + data.subBox.forEach(item => { + let box = new Box(item, self.output) + self.subBox.push(box) + box.writeBody() + outputSize += box.outputSize + 8 + }) + if (outputSize !== data.size - 8) { + throw new Error(`${data.type} box incomplete,outputSize=${outputSize},size=${data.size}`) + } else { + this.outputSize = outputSize + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/mvhd.js b/packages/xgplayer-mp4/src/write/box/mvhd.js new file mode 100644 index 00000000..0f0fba17 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/mvhd.js @@ -0,0 +1,34 @@ +import Box from '../box' +Box.mvhd = function (data, output) { + let stream = this.stream + + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.create) + stream.writeUint32(data.modify) + stream.writeUint32(data.timeScale) + stream.writeUint32(data.duration) + + let rate = data.rate.split('.') + let volume = data.volume.split('.') + stream.writeUint16(rate[0]) + stream.writeUint16(rate[1]) + stream.writeUint8(volume[0]) + stream.writeUint8(volume[1]) + stream.fill(10) + data.matrix.forEach(item => { + let matrix + matrix = item.split('.') + stream.writeUint16(matrix[0]) + stream.writeUint16(matrix[1]) + }) + stream.fill(24) + stream.writeUint32(data.nextTrackID) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/pasp.js b/packages/xgplayer-mp4/src/write/box/pasp.js new file mode 100644 index 00000000..d4970239 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/pasp.js @@ -0,0 +1,10 @@ +import Box from '../box' +Box.pasp = function (data, output) { + let stream = this.stream + stream.position = data.content.byteLength + output.write(new Uint8Array(data.content)) + if (data.content.byteLength !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/smhd.js b/packages/xgplayer-mp4/src/write/box/smhd.js new file mode 100644 index 00000000..f552931a --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/smhd.js @@ -0,0 +1,17 @@ +import Box from '../box' +Box.smhd = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + let balance = data.balance.split('.') + stream.writeUint8(balance[0]) + stream.writeUint8(balance[1]) + stream.fill(2) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/stco.js b/packages/xgplayer-mp4/src/write/box/stco.js new file mode 100644 index 00000000..a09d01e1 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/stco.js @@ -0,0 +1,17 @@ +import Box from '../box' +Box.stco = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.count) + data.entries.forEach(item => { + stream.writeUint32(item) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/stsc.js b/packages/xgplayer-mp4/src/write/box/stsc.js new file mode 100644 index 00000000..44527e49 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/stsc.js @@ -0,0 +1,19 @@ +import Box from '../box' +Box.stsc = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.count) + data.entries.forEach(item => { + stream.writeUint32(item.first_chunk) + stream.writeUint32(item.samples_per_chunk) + stream.writeUint32(item.sample_desc_index) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/stsd.js b/packages/xgplayer-mp4/src/write/box/stsd.js new file mode 100644 index 00000000..8cde59df --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/stsd.js @@ -0,0 +1,23 @@ +import Box from '../box' +Box.stsd = function (data, output) { + let stream = this.stream + let self = this + let outputSize = 0 + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.entryCount) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + outputSize = stream.position + data.subBox.forEach(item => { + let box = new Box(item, self.output) + self.subBox.push(box) + box.writeBody() + outputSize += box.outputSize + 8 + }) + if (outputSize !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = outputSize + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/stss.js b/packages/xgplayer-mp4/src/write/box/stss.js new file mode 100644 index 00000000..4e999e4e --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/stss.js @@ -0,0 +1,17 @@ +import Box from '../box' +Box.stss = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.count) + data.entries.forEach(item => { + stream.writeUint32(item) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/stsz.js b/packages/xgplayer-mp4/src/write/box/stsz.js new file mode 100644 index 00000000..ede3d037 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/stsz.js @@ -0,0 +1,18 @@ +import Box from '../box' +Box.stsz = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.sampleSize) + stream.writeUint32(data.count) + data.entries.forEach(item => { + stream.writeUint32(item) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/stts.js b/packages/xgplayer-mp4/src/write/box/stts.js new file mode 100644 index 00000000..386baa55 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/stts.js @@ -0,0 +1,18 @@ +import Box from '../box' +Box.stts = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.count) + data.entry.forEach(item => { + stream.writeUint32(item.sampleCount) + stream.writeUint32(item.sampleDuration) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/tfdt.js b/packages/xgplayer-mp4/src/write/box/tfdt.js new file mode 100644 index 00000000..2ce2740b --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/tfdt.js @@ -0,0 +1,16 @@ +import Box from '../box' +Box.tfdt = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + if (data.version === 0) { + stream.writeUint32(data.decodeTime) + } else { + stream.writeUint64(data.decodeTime) + } + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/tfhd.js b/packages/xgplayer-mp4/src/write/box/tfhd.js new file mode 100644 index 00000000..cbc0da93 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/tfhd.js @@ -0,0 +1,18 @@ +import Box from '../box' +Box.tfhd = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.trackID) + if (data.sampleDuration) { + stream.writeUint32(data.sampleDuration) + } + if (data.sampleFlag) { + stream.writeUint32(data.sampleFlag) + } + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/tfra.js b/packages/xgplayer-mp4/src/write/box/tfra.js new file mode 100644 index 00000000..3d10a47c --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/tfra.js @@ -0,0 +1,29 @@ +import Box from '../box' +Box.tfra = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.trackID) + stream.writeUint32(data.trafTurnSampleNumber) + stream.writeUint32(data.entries.length) + let version = data.version + data.entries.forEach(item => { + if (version === 1) { + stream.writeUint64(item.time) + stream.writeUint64(item.moofOffset) + } else { + stream.writeUint32(item.time) + stream.writeUint32(item.moofOffset) + } + stream.writeUint8(1) + stream.writeUint8(1) + stream.writeUint8(1) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/tkhd.js b/packages/xgplayer-mp4/src/write/box/tkhd.js new file mode 100644 index 00000000..a93ee880 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/tkhd.js @@ -0,0 +1,44 @@ +import Box from '../box' +Box.tkhd = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + if (data.version === 1) { + stream.writeUint64(data.create) + stream.writeUint64(data.modify) + stream.writeUint32(data.trackID) + stream.writeUint32(data.reserverd) + stream.writeUint64(data.duration) + } else { + stream.writeUint32(data.create) + stream.writeUint32(data.modify) + stream.writeUint32(data.trackID) + stream.writeUint32(data.reserverd) + stream.writeUint32(data.duration) + } + stream.fill(8) + stream.writeInt16(data.layer) + stream.writeInt16(data.alternate_group) + stream.writeInt16(data.volume << 8) + stream.fill(2) + + data.matrix.forEach(item => { + let matrix = item.split('.') + stream.writeUint16(matrix[0]) + stream.writeUint16(matrix[1]) + }) + + let width = data.width.split('.') + let height = data.height.split('.') + stream.writeUint16(width[0]) + stream.writeUint16(width[1]) + stream.writeUint16(height[0]) + stream.writeUint16(height[1]) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/trex.js b/packages/xgplayer-mp4/src/write/box/trex.js new file mode 100644 index 00000000..aff05251 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/trex.js @@ -0,0 +1,16 @@ +import Box from '../box' +Box.trex = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.trackID) + stream.writeUint32(data.index) + stream.writeUint32(data.duration) + stream.writeUint32(data.dsize) + stream.writeUint32(data.flags) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/trun.js b/packages/xgplayer-mp4/src/write/box/trun.js new file mode 100644 index 00000000..23b2b8e3 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/trun.js @@ -0,0 +1,40 @@ +import Box from '../box' +Box.trun = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + stream.writeUint24(data.flag) + stream.writeUint32(data.sampleCount) + stream.writeInt32(data.dataOffset) + if (data.firstSampleFlags) { + stream.writeUint32(data.firstSampleFlags) + if (data.sampleDuration) { + data.samples.forEach(item => { + stream.writeUint32(item.size) + stream.writeUint32(item.offsetTime) + }) + } else { + data.samples.forEach(item => { + stream.writeUint32(item.duration) + stream.writeUint32(item.size) + stream.writeUint32(item.offsetTime) + }) + } + } else { + if (data.sampleDuration) { + data.samples.forEach(item => { + stream.writeUint32(item.size) + }) + } else { + data.samples.forEach(item => { + stream.writeUint32(item.duration) + stream.writeUint32(item.size) + }) + } + } + + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/udta.js b/packages/xgplayer-mp4/src/write/box/udta.js new file mode 100644 index 00000000..685b42c5 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/udta.js @@ -0,0 +1,5 @@ +import Box from '../box' +Box.udta = function (data, output) { + output.write(new Uint8Array(new Uint8Array(data.data))) + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/url.js b/packages/xgplayer-mp4/src/write/box/url.js new file mode 100644 index 00000000..1cd3d7d5 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/url.js @@ -0,0 +1,16 @@ +import Box from '../box' +Box['url '] = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + data.flag.forEach(item => { + stream.writeUint8(item) + }) + data.location.forEach(item => { + stream.writeUint8(item) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/vmhd.js b/packages/xgplayer-mp4/src/write/box/vmhd.js new file mode 100644 index 00000000..1294a8dc --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/vmhd.js @@ -0,0 +1,19 @@ +import Box from '../box' +Box.vmhd = function (data, output) { + let stream = this.stream + stream.writeUint8(data.version) + data.flag.forEach(item => { + stream.writeUint8(item) + }) + stream.writeUint16(data.graphicsmode) + data.opcolor.forEach(item => { + stream.writeUint16(item) + }) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/box/wide.js b/packages/xgplayer-mp4/src/write/box/wide.js new file mode 100644 index 00000000..49fb90ed --- /dev/null +++ b/packages/xgplayer-mp4/src/write/box/wide.js @@ -0,0 +1,12 @@ +import Box from '../box' +Box.wide = function (data, output) { + let stream = this.stream + stream.fill(data.size - 8) + output.write(new Uint8Array(stream.buffer.slice(0, stream.position))) + if (stream.position !== data.size - 8) { + throw new Error(`${data.type} box incomplete`) + } else { + this.outputSize = stream.position + } + delete this.data +} diff --git a/packages/xgplayer-mp4/src/write/buffer.js b/packages/xgplayer-mp4/src/write/buffer.js new file mode 100644 index 00000000..996a5aa5 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/buffer.js @@ -0,0 +1,12 @@ +import Concat from 'concat-typed-array' + +class Buffer { + constructor () { + this.buffer = new Uint8Array(0) + } + write (buffer) { + this.buffer = Concat(Uint8Array, this.buffer, buffer) + } +} + +export default Buffer diff --git a/packages/xgplayer-mp4/src/write/index.js b/packages/xgplayer-mp4/src/write/index.js new file mode 100644 index 00000000..57437d8e --- /dev/null +++ b/packages/xgplayer-mp4/src/write/index.js @@ -0,0 +1,33 @@ +import Box from './box' +import Buffer from './buffer' + +// 引入整个目录 +var context = require.context('./box', true, /\.js$/) +context.keys().forEach(function (key) { + context(key) +}) + +class Write { + writeMeta (boxes) { + let out = new Buffer() + boxes.forEach(item => { + let box = new Box(item, out) + box.writeBody() + }) + return out.buffer + } + + writeFragment (...args) { + let out = new Buffer() + args.forEach(item => { + if (!item) { + return false + } + let box = new Box(item, out) + box.writeBody() + }) + return out.buffer + } +} + +export default Write diff --git a/packages/xgplayer-mp4/src/write/stream.js b/packages/xgplayer-mp4/src/write/stream.js new file mode 100644 index 00000000..0046fcc9 --- /dev/null +++ b/packages/xgplayer-mp4/src/write/stream.js @@ -0,0 +1,99 @@ +class Stream { + constructor (buffer) { + this.buffer = buffer + this.dataview = new DataView(buffer) + this.dataview.position = 0 + } + + fill (count) { + for (let i = 0; i < count; i++) { + this.writeUint8(0) + } + } + + set position (value) { + this.dataview.position = value + } + + get position () { + return this.dataview.position || 0 + } + + static writeByte (buffer, value, size, sign) { + switch (size) { + case 1: + if (sign) { + buffer.setInt8(buffer.position, value) + } else { + buffer.setUint8(buffer.position, value) + } + break + case 2: + if (sign) { + buffer.setInt16(buffer.position, value) + } else { + buffer.setUint16(buffer.position, value) + } + break + case 3: + if (sign) { + for (let i = 0; i < 3; i++) { + buffer.setInt8(buffer.position + i, value >> (16 - i * 8) & 0xff) + } + } else { + for (let i = 0; i < 3; i++) { + buffer.setUint8(buffer.position + i, value >> (16 - i * 8) & 0xff) + } + } + break + case 4: + if (sign) { + buffer.setInt32(buffer.position, value) + } else { + buffer.setUint32(buffer.position, value) + } + break + default: + throw new Error(`not support ${size} write`) + } + buffer.position += size + } + + writeUint8 (value) { + Stream.writeByte(this.dataview, value, 1) + } + writeInt8 (value) { + Stream.writeByte(this.dataview, value, 1, true) + } + writeUint16 (value) { + Stream.writeByte(this.dataview, value, 2) + } + writeInt16 (value) { + Stream.writeByte(this.dataview, value, 2, true) + } + writeUint24 (value) { + Stream.writeByte(this.dataview, value, 3) + } + writeInt24 (value) { + Stream.writeByte(this.dataview, value, 3, true) + } + writeUint32 (value) { + Stream.writeByte(this.dataview, value, 4) + } + writeInt32 (value) { + Stream.writeByte(this.dataview, value, 4, true) + } + writeUint64 (value) { + Stream.writeByte(this.dataview, (value & 0xFFFFFFFF00000000) >> 32, 4) + Stream.writeByte(this.dataview, (value & 0x00000000FFFFFFFF), 4) + } + writeStr (value) { + value = value.toString() + let length = value.length + for (let i = 0; i < length; i++) { + this.writeUint8(value.charCodeAt(i)) + } + } +} + +export default Stream diff --git a/packages/xgplayer-mp4/webpack.config.js b/packages/xgplayer-mp4/webpack.config.js new file mode 100644 index 00000000..b564d4fc --- /dev/null +++ b/packages/xgplayer-mp4/webpack.config.js @@ -0,0 +1,75 @@ +const polyfill = [] + +const umd = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/dist`, + filename: 'index.js', + library: 'xgplayer-mp4', + libraryTarget: 'umd' + }, + mode: 'production', + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader' + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true + } + }, + 'postcss-loader', + 'sass-loader' + ] + }] + }, + externals: { + 'xgplayer': 'xgplayer' + }, + optimization: { + minimize: true + } +} + +const client = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/browser`, + filename: 'xgplayer-mp4.js' + }, + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader' + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true + } + }, + 'postcss-loader', + 'sass-loader' + ] + }] + }, + externals: { + 'xgplayer': 'Player' + }, + mode: 'production', + optimization: { + minimize: true + } +} + +module.exports = [umd, client] diff --git a/packages/xgplayer-shaka/browser/xgplayer-shaka.js b/packages/xgplayer-shaka/browser/xgplayer-shaka.js new file mode 100644 index 00000000..0ffff0b5 --- /dev/null +++ b/packages/xgplayer-shaka/browser/xgplayer-shaka.js @@ -0,0 +1 @@ +window.ShakaJsPlayer=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}([function(t,e,n){"use strict";var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,n){"use strict";(function(i){var r,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(function(){var o={};(function(t){var e,n="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},r=void 0!==t&&t===this?this:void 0!==i&&null!=i?i:this;function o(){o=function(){},r.Symbol||(r.Symbol=s)}var s=function(){var t=0;return function(e){return"jscomp_symbol_"+(e||"")+t++}}();function u(){o();var t=r.Symbol.iterator;t||(t=r.Symbol.iterator=r.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&n(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return c(this)}}),u=function(){}}function c(t){var e=0;return function(t){return u(),(t={next:t})[r.Symbol.iterator]=function(){return this},t}(function(){return ethis.a?t:Math.min(k(this.b),k(this.c))},t.console&&t.console.log.bind&&(N=console.warn.bind(console)),S("shaka.util.Error",M),M.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},M.Severity={RECOVERABLE:1,CRITICAL:2},M.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9},M.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013};var C=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function D(t){var e;t instanceof D?(_(this,t.ha),this.Ga=t.Ga,this.ka=t.ka,O(this,t.Ra),this.aa=t.aa,L(this,X(t.a)),this.Aa=t.Aa):t&&(e=String(t).match(C))?(_(this,e[1]||"",!0),this.Ga=U(e[2]||""),this.ka=U(e[3]||"",!0),O(this,e[4]),this.aa=U(e[5]||"",!0),L(this,e[6]||"",!0),this.Aa=U(e[7]||"")):this.a=new G(null)}function _(t,e,n){t.ha=n?U(e,!0):e,t.ha&&(t.ha=t.ha.replace(/:$/,""))}function O(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.Ra=e}else t.Ra=null}function L(t,e,n){e instanceof G?t.a=e:(n||(e=j(e,K)),t.a=new G(e))}function U(t,e){return t?e?decodeURI(t):decodeURIComponent(t):""}function j(t,e,n){return"string"==typeof t?(t=encodeURI(t).replace(e,B),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function B(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}(e=D.prototype).ha="",e.Ga="",e.ka="",e.Ra=null,e.aa="",e.Aa="",e.toString=function(){var t=[],e=this.ha;if(e&&t.push(j(e,F,!0),":"),e=this.ka){t.push("//");var n=this.Ga;n&&t.push(j(n,F,!0),"@"),t.push(encodeURIComponent(e).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(e=this.Ra)&&t.push(":",String(e))}return(e=this.aa)&&(this.ka&&"/"!=e.charAt(0)&&t.push("/"),t.push(j(e,"/"==e.charAt(0)?H:V,!0))),(e=this.a.toString())&&t.push("?",e),(e=this.Aa)&&t.push("#",j(e,q)),t.join("")},e.resolve=function(t){var e=new D(this);"data"===e.ha&&(e=new D);var n=!!t.ha;n?_(e,t.ha):n=!!t.Ga,n?e.Ga=t.Ga:n=!!t.ka,n?e.ka=t.ka:n=null!=t.Ra;var i=t.aa;if(n)O(e,t.Ra);else if(n=!!t.aa){if("/"!=i.charAt(0))if(this.ka&&!this.aa)i="/"+i;else{var r=e.aa.lastIndexOf("/");-1!=r&&(i=e.aa.substr(0,r+1)+i)}if(".."==i||"."==i)i="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var a=[],o=0;o=e.i){if(!e.c)return Promise.reject();e.a=1,e.b=e.f}var n=new z;return e.a?(t.setTimeout(n.resolve,e.b*(1+(2*Math.random()-1)*e.h)),e.b*=e.g):n.resolve(),e.a++,n}function W(t,e){this.promise=t,this.b=e,this.a=!1}function J(t){return new W(Promise.reject(t),function(){return Promise.resolve()})}function Q(){var t=Promise.reject(new M(2,7,7001));return t.catch(function(){}),new W(t,function(){return Promise.resolve()})}function Z(t){return new W(Promise.resolve(t),function(){return Promise.resolve()})}function tt(t){return new W(t,function(){return t.catch(function(){})})}function et(t){return new W(Promise.all(t.map(function(t){return t.promise})),function(){return Promise.all(t.map(function(t){return t.abort()}))})}function nt(t,e,n){try{var i=t(e);return i&&i.promise&&i.abort?(n.resolve(i.promise),function(){return i.abort()}):(n.resolve(i),function(){return Promise.resolve(i).then(function(){}).catch(function(){})})}catch(t){return n.reject(t),function(){return Promise.resolve()}}}function it(t,e){for(var n=[],i=0;i=i.priority)&&(ft[t]={priority:n,me:e})}function pt(t,e){return{uris:t,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:e}}function mt(t){return t.then=function(e,n){return N("The network request interface has changed! Please update your application to the new interface, which allows operations to be aborted. Support for the old API will be removed in v2.5."),t.promise.then(e,n)},t.catch=function(e){return N("The network request interface has changed! Please update your application to the new interface, which allows operations to be aborted. Support for the old API will be removed in v2.5."),t.promise.catch(e)},t}function vt(){this.a={}}function yt(){this.a=new vt}function gt(t,e,n,i){t.a&&(e=new Tt(e,n,i),t.a.push(n,e))}function bt(t,e,n,i){gt(t,e,n,function(t){this.na(e,n),i(t)}.bind(t))}function wt(t){if(t.a){var e,n=t.a,i=[];for(e in n.a)i.push.apply(i,n.a[e]);for(n=0;n=t[e]}.bind(null,e);if(0==e[0]&&0==e[2])return Lt(t,!1);if(0==e[1]&&0==e[3])return Lt(t,!0);if(n(0)&&n(1)&&n(2)&&n(3))return Ot(t);throw new M(2,2,2003)}function jt(t){t=encodeURIComponent(t),t=unescape(t);for(var e=new Uint8Array(t.length),n=0;nt.end(0)-t.start(0)?null:t.length?t.end(t.length-1):null}function ne(t,e){return!(!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0))&&(e>=t.start(0)&&e<=t.end(t.length-1))}function ie(t,e){if(!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0))return 0;for(var n=0,i=t.length-1;0<=i&&t.end(i)>e;--i)n+=t.end(i)-Math.max(t.start(i),e);return n}function re(t){if(!t)return[];for(var e=[],n=0;ni||n&&1e3>i)&&!this.a[e].oa&&(this.a.splice(e,1),t.close().catch(function(){})),function(t){t.cancel(),t.a=setTimeout(t.b,500)}(this.H)}},e.oe=function(){!Rt(this.A)&&function(t,e){return Object.keys(t).every(function(n){return e(n,t[n])})}(this.A,function(t,e){return"expired"==e})&&this.h(new M(2,6,6014)),this.o.zb(this.A)},e.Td=function(){for(var t=0;t>4).toString(16),r+=(15&o).toString(16),n=n.replace(i[0],r)}return n}function Ae(t){this.f=null,this.c=t,this.i=this.g=0,this.h=1/0,this.b=this.a=null}ge.scrollMode={NONE:we,UP:"up"},Te.prototype.destroy=function(){return this.a.dispose(),this.a=null,Promise.resolve()},Te.prototype.h=function(t){for(var e=0;en.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function Ne(t,e){try{return t.b[e].buffered}catch(t){return null}}function Re(t,e,n,i,r){return"text"==e?function(t,e,n,i){return Promise.resolve().then(function(){if(this.f&&this.c)if(null==n||null==i)this.f.parseInit(new Uint8Array(e));else{var t={periodStart:this.g,segmentStart:this.g+n,segmentEnd:this.g+i};t=this.f.parseMedia(new Uint8Array(e),t).filter(function(t){return t.startTime>=this.i&&t.startTime=Le&&n==e.split("-")[0]||t>=Ue&&n.split("-")[0]==e.split("-")[0]}S("shaka.text.TextEngine.registerParser",function(t,e){xe[t]=e}),S("shaka.text.TextEngine.unregisterParser",function(t){delete xe[t]}),Ae.prototype.destroy=function(){return this.c=this.f=null,Promise.resolve()},Ae.prototype.Ee=function(t){this.c=t},Ae.prototype.setDisplayer=Ae.prototype.Ee,Ae.prototype.Mb=function(t){try{return this.f.parseMedia(new Uint8Array(t),{periodStart:0,segmentStart:null,segmentEnd:0})[0].startTime}catch(t){throw new M(2,2,2009,t)}},Ae.prototype.remove=function(t,e){return Promise.resolve().then(function(){!this.c||!this.c.remove(t,e)||null==this.a||e<=this.a||t>=this.b||(t<=this.a&&e>=this.b?this.a=this.b=null:t<=this.a&&ethis.a&&e>=this.b&&(this.b=t))}.bind(this))},Ae.prototype.kc=function(t){this.c.append(t)},Ae.prototype.appendCues=Ae.prototype.kc,(e=Ie.prototype).destroy=function(){this.m=!0;var t,e=[];for(t in this.c){var n=this.c[t],i=n[0];for(this.c[t]=n.slice(0,1),i&&e.push(i.p.catch(At)),i=1;ie&&(e+=.001),this.b[t].timestampOffset=e,this.Pa(t)},e.De=function(t,e,n){this.b[t].appendWindowStart=0,this.b[t].appendWindowEnd=n,this.b[t].appendWindowStart=e,this.Pa(t)},e.Qe=function(t){this.c[t][0].p.reject(new M(2,3,3014,this.f.error?this.f.error.code:0))},e.Pa=function(t){var e=this.c[t][0];e&&(e.p.resolve(),_e(this,t))};var Le=1,Ue=2;function je(t){t=t.toLowerCase().split("-");var e=Be[t[0]];return e&&(t[0]=e),t.join("-")}var Be={aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bih:"bh",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};function Fe(t,e,n){var i=t.video;return!(i&&(i.widthe.maxWidth||i.width>n.width||i.heighte.maxHeight||i.height>n.height||i.width*i.heighte.maxPixels)||t.bandwidthe.maxBandwidth)}function Ve(t,e,n){var i=!1;return t.variants.forEach(function(t){var r=t.allowedByApplication;t.allowedByApplication=Fe(t,e,n),r!=t.allowedByApplication&&(i=!0)}),i}function He(t,e,n,i){i.variants=i.variants.filter(function(i){return!(t&&t.M&&!function(t,e){var n=t.keySystem();return 0==e.drmInfos.length||e.drmInfos.some(function(t){return t.keySystem==n})}(t,i))&&(Ke(i.audio,t,e)&&Ke(i.video,t,n))}),i.textStreams=i.textStreams.filter(function(t){return!!xe[Dt(t.mimeType,t.codecs)]})}function Ke(t,e,n){if(!t)return!0;var i=null;e&&e.M&&(i=e.u),e=Dt(t.mimeType,t.codecs);var r,a=Dt(t.mimeType,t.codecs),o=t.mimeType;for(r in _t){var s=t[r],u=_t[r];s&&(o+="; "+u+'="'+s+'"')}return!(!(xe[a]||MediaSource.isTypeSupported(o)||Ee(a,t.type))||i&&t.encrypted&&0>i.indexOf(e)||n&&(t.mimeType!=n.mimeType||t.codecs.split(".")[0]!=n.codecs.split(".")[0]))}function qe(t){var e=t.audio,n=t.video,i=e?e.codecs:null,r=n?n.codecs:null,a=[];r&&a.push(r),i&&a.push(i);var o=[];n&&o.push(n.mimeType),e&&o.push(e.mimeType),o=o[0]||null;var s=[];e&&s.push(e.kind),n&&s.push(n.kind),s=s[0]||null;var u=[];return e&&u.push.apply(u,e.roles),n&&u.push.apply(u,n.roles),u=it(u),t={id:t.id,active:!1,type:"variant",bandwidth:t.bandwidth,language:t.language,label:null,kind:s,width:null,height:null,frameRate:null,mimeType:o,codecs:a.join(", "),audioCodec:i,videoCodec:r,primary:t.primary,roles:u,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null},n&&(t.videoId=n.id,t.width=n.width||null,t.height=n.height||null,t.frameRate=n.frameRate||null,t.videoBandwidth=n.bandwidth||null),e&&(t.audioId=e.id,t.channelsCount=e.channelsCount,t.audioBandwidth=e.bandwidth||null,t.label=e.label),t}function Ge(t){return{id:t.id,active:!1,type:"text",bandwidth:0,language:t.language,label:t.label,kind:t.kind||null,width:null,height:null,frameRate:null,mimeType:t.mimeType,codecs:t.codecs||null,audioCodec:null,videoCodec:null,primary:t.primary,roles:t.roles,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null}}function Xe(t){var e=[],n=Je(t.variants);return t=t.textStreams,n.forEach(function(t){e.push(qe(t))}),t.forEach(function(t){e.push(Ge(t))}),e}function ze(t,e,n){return Je(t.variants).map(function(t){var i=qe(t);return t.video&&t.audio?i.active=n==t.video.id&&e==t.audio.id:t.video?i.active=n==t.video.id:t.audio&&(i.active=e==t.audio.id),i})}function Ye(t,e){return t.textStreams.map(function(t){var n=Ge(t);return n.active=e==t.id,n})}function $e(t,e){for(var n=0;n=t.periods[n].startTime)return n;return 0}function on(t,e){for(var n=0;n=r.bandwidth/this.a.bandwidthDowngradeTarget&&e<=a&&(n=r)}return this.f=Date.now(),n},sn.prototype.chooseVariant=sn.prototype.chooseVariant,sn.prototype.enable=function(){this.c=!0},sn.prototype.enable=sn.prototype.enable,sn.prototype.disable=function(){this.c=!1},sn.prototype.disable=sn.prototype.disable,sn.prototype.segmentDownloaded=function(t,e){var n=this.b;if(!(16e3>e)){var i=8e3*e/t,r=t/1e3;n.a+=e,I(n.b,r,i),I(n.c,r,i)}if(null!=this.f&&this.c)t:{if(this.i){if(Date.now()-this.f<1e3*this.a.switchInterval)break t}else{if(!(128e3<=this.b.a))break t;this.i=!0}n=this.chooseVariant(),this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate),this.h(n)}},sn.prototype.segmentDownloaded=sn.prototype.segmentDownloaded,sn.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)},sn.prototype.getBandwidthEstimate=sn.prototype.getBandwidthEstimate,sn.prototype.setVariants=function(t){this.g=t},sn.prototype.setVariants=sn.prototype.setVariants,sn.prototype.configure=function(t){this.a=t},sn.prototype.configure=sn.prototype.configure;var un="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),cn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),hn=["loop","playbackRate"],ln=["pause","play"],fn="adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading".split(" "),dn={drmInfo:20,getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getManifestUri:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,usingEmbeddedTextTrack:2,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1},pn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},mn=[["getConfiguration","configure"]],vn=[["isTextTrackVisible","setTextTrackVisibility"]],yn="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),gn=["attach","detach","load","unload"];function bn(t){return JSON.stringify(t,function(t,e){if("function"!=typeof e){if(e instanceof Event||e instanceof Et){var n,i={};for(n in e){var r=e[n];r&&"object"==(void 0===r?"undefined":a(r))?"detail"==n&&(i[n]=r):n in Event||(i[n]=r)}return i}if(e instanceof TimeRanges)for(i={__type__:"TimeRanges",length:e.length,start:[],end:[]},n=0;ne?"-Infinity":"Infinity":e;return i}})}function wn(t){return JSON.parse(t,function(t,e){return"NaN"==e?NaN:"-Infinity"==e?-1/0:"Infinity"==e?1/0:e&&"object"==(void 0===e?"undefined":a(e))&&"TimeRanges"==e.__type__?function(t){return{length:t.length,start:function(e){return t.start[e]},end:function(e){return t.end[e]}}}(e):e})}function Tn(t,e,n,i,r,a){this.K=t,this.g=e,this.M=n,this.j=!1,this.A=i,this.H=r,this.u=a,this.b=this.h=!1,this.v="",this.i=null,this.l=this.Ac.bind(this),this.m=this.Pd.bind(this),this.a={video:{},player:{}},this.o=0,this.c={},this.f=null}var En=!1,Sn=null;function An(t){var e=Sn;e.removeUpdateListener(t.l),e.removeMessageListener("urn:x-cast:com.google.shaka.v2",t.m)}function xn(t){for(var e in t.c){var n=t.c[e];delete t.c[e],n.reject(new M(1,7,7e3))}}function In(t){t=bn(t),Sn.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},R)}function kn(){this.Db=new vt,this.lb=this}function Pn(t,e,n){kn.call(this),this.c=t,this.b=e,this.i=this.g=this.f=this.j=this.h=null,this.a=new Tn(n,this.Le.bind(this),this.Me.bind(this),this.Ne.bind(this),this.Oe.bind(this),this.rc.bind(this)),function(t){for(var e in t.a.init(),t.i=new yt,un.forEach(function(t){gt(this.i,this.c,t,this.$e.bind(this))}.bind(t)),fn.forEach(function(t){gt(this.i,this.b,t,this.le.bind(this))}.bind(t)),t.h={},t.c)Object.defineProperty(t.h,e,{configurable:!1,enumerable:!0,get:t.Ze.bind(t,e),set:t.af.bind(t,e)});for(var n in t.j={},t.b)Object.defineProperty(t.j,n,{configurable:!1,enumerable:!0,get:t.ke.bind(t,n)});t.f=new kn,t.f.lb=t.h,t.g=new kn,t.g.lb=t.j}(this)}function Nn(e,n,i,r){kn.call(this),this.a=e,this.b=n,this.c=new yt,this.u={video:e,player:n},this.v=i||function(){},this.A=r||function(t){return t},this.o=!1,this.h=!0,this.g=0,this.m=!1,this.j=!0,this.l=this.i=this.f=null,function(e){var n=cast.receiver.CastReceiverManager.getInstance();n.onSenderConnected=e.Fc.bind(e),n.onSenderDisconnected=e.Fc.bind(e),n.onSystemVolumeChanged=e.kd.bind(e),e.i=n.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.i.onMessage=e.Kd.bind(e),e.f=n.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.f.onMessage=e.Zd.bind(e),n.start(),un.forEach(function(t){gt(this.c,this.a,t,this.Jc.bind(this,"video"))}.bind(e)),fn.forEach(function(t){gt(this.c,this.b,t,this.Jc.bind(this,"player"))}.bind(e)),cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.b.bc(3840,2160):e.b.bc(1920,1080),gt(e.c,e.a,"loadeddata",function(){this.m=!0}.bind(e)),gt(e.c,e.b,"loading",function(){this.h=!1,Rn(this)}.bind(e)),gt(e.c,e.a,"playing",function(){this.h=!1,Rn(this)}.bind(e)),gt(e.c,e.a,"pause",function(){Rn(this)}.bind(e)),gt(e.c,e.b,"unloading",function(){this.h=!0,Rn(this)}.bind(e)),gt(e.c,e.a,"ended",function(){t.setTimeout(function(){this.a&&this.a.ended&&(this.h=!0,Rn(this))}.bind(this),5e3)}.bind(e))}(this)}function Rn(t){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new Et("caststatuschanged")),Mn(this)||_n(this,0))}.bind(t))}function Mn(t){return!(!t.j||!t.a.duration&&!t.b.P())&&(Cn(t),t.j=!1,!0)}function Cn(t){_n(t,0,{contentId:t.b.Kb(),streamType:t.b.P()?"LIVE":"BUFFERED",duration:t.a.duration,contentType:""})}function Dn(t,e,n,i){t.o&&(t=bn(e),i?n.getCastChannel(i).send(t):n.broadcast(t))}function _n(t,e,n){var i=t.a.playbackRate,r=On;i={mediaSessionId:0,playbackRate:i,playerState:r=t.h?r.IDLE:t.b.vc()?r.Xc:t.a.paused?r.Zc:r.$c,currentTime:t.a.currentTime,supportedMediaCommands:15,volume:{level:t.a.volume,muted:t.a.muted}},n&&(i.media=n),Dn(t,{requestId:e,type:"MEDIA_STATUS",status:[i]},t.i)}(e=Tn.prototype).destroy=function(){return xn(this),Sn&&An(this),this.H=this.A=this.g=null,this.b=this.h=!1,this.m=this.l=this.f=this.c=this.a=this.i=null,Promise.resolve()},e.Z=function(){return this.b},e.Yb=function(){return this.v},e.init=function(){if(t.chrome&&chrome.cast&&chrome.cast.isAvailable){delete t.__onGCastApiAvailable,this.h=!0,this.g();var e=new chrome.cast.SessionRequest(this.K);e=new chrome.cast.ApiConfig(e,this.Bc.bind(this),this.Wd.bind(this),"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),En&&setTimeout(this.g.bind(this),20),(e=Sn)&&e.status!=chrome.cast.SessionStatus.STOPPED?this.Bc(e):Sn=null}else t.__onGCastApiAvailable=function(t){t&&this.init()}.bind(this)},e.ac=function(t){this.i=t,this.b&&In({type:"appData",appData:this.i})},e.cast=function(t){return this.h?En?this.b?Promise.reject(new M(1,8,8002)):(this.f=new z,chrome.cast.requestSession(this.Vb.bind(this,t),this.zc.bind(this)),this.f):Promise.reject(new M(1,8,8001)):Promise.reject(new M(1,8,8e3))},e.vb=function(){this.b&&(xn(this),Sn&&(An(this),Sn.stop(function(){},function(){}),Sn=null))},e.get=function(t,e){if("video"==t){if(0<=ln.indexOf(e))return this.Lc.bind(this,t,e)}else if("player"==t){if(pn[e]&&!this.get("player","isLive")())return function(){};if(0<=yn.indexOf(e))return this.Lc.bind(this,t,e);if(0<=gn.indexOf(e))return this.se.bind(this,t,e);if(dn[e])return this.Ic.bind(this,t,e)}return this.Ic(t,e)},e.set=function(t,e,n){this.a[t][e]=n,In({type:"set",targetName:t,property:e,value:n})},e.Vb=function(t,e){Sn=e,e.addUpdateListener(this.l),e.addMessageListener("urn:x-cast:com.google.shaka.v2",this.m),this.Ac(),In({type:"init",initState:t,appData:this.i}),this.f.resolve()},e.zc=function(t){var e=8003;switch(t.code){case"cancel":e=8004;break;case"timeout":e=8005;break;case"receiver_unavailable":e=8006}this.f.reject(new M(2,8,e,t))},e.Ic=function(t,e){return this.a[t][e]},e.Lc=function(t,e){In({type:"call",targetName:t,methodName:e,args:Array.prototype.slice.call(arguments,2)})},e.se=function(t,e){var n=Array.prototype.slice.call(arguments,2),i=new z,r=this.o.toString();return this.o++,this.c[r]=i,In({type:"asyncCall",targetName:t,methodName:e,args:n,id:r}),i},e.Bc=function(t){var e=this.u();this.f=new z,this.j=!0,this.Vb(e,t)},e.Wd=function(t){En="available"==t,this.g()},e.Ac=function(){var t=!!Sn&&"connected"==Sn.status;if(this.b&&!t){for(var e in this.H(),this.a)this.a[e]={};xn(this)}this.v=(this.b=t)?Sn.receiver.friendlyName:"",this.g()},e.Pd=function(t,e){var n=wn(e);switch(n.type){case"event":var i=n.event;this.A(n.targetName,new Et(i.type,i));break;case"update":for(var r in i=n.update)for(var a in n=this.a[r]||{},i[r])n[a]=i[r][a];this.j&&(this.M(),this.j=!1);break;case"asyncComplete":if(r=n.id,n=n.error,a=this.c[r],delete this.c[r],a)if(n){for(i in r=new M(n.severity,n.category,n.code),n)r[i]=n[i];a.reject(r)}else a.resolve()}},kn.prototype.addEventListener=function(t,e){this.Db.push(t,e)},kn.prototype.removeEventListener=function(t,e){this.Db.remove(t,e)},kn.prototype.dispatchEvent=function(t){for(var e=this.Db.get(t.type)||[],n=0;n(f=f||0))if(l+1=f)break;f=Math.ceil((f-d)/p)-1}else{if(1/0==u)break;if(d/r>=u)break;f=Math.ceil((u*r-d)/p)-1}0>24&255,t>>16&255,t>>8&255,255&t)}function pi(t,e,n,i){var r,a=(new ui).Y("sidx",function(t){r=function(t,e,n,i){var r=[];i.s.F(4);var a=i.s.C();if(0==a)throw new M(2,3,3005);if(0==i.version)var o=i.s.C(),s=i.s.C();else o=i.s.Sa(),s=i.s.Sa();i.s.F(2);var u=i.s.eb();for(t=t+i.size+s,s=0;s>>31;c&=2147483647;var l=i.s.C();if(i.s.F(4),1==h)throw new M(2,3,3006);r.push(new ii(r.length,o/a-e,(o+l)/a-e,function(){return n},t,t+c-1)),o+=l,t+=c}return i.ra.stop(),r}(e,i,n,t)});if(t&&a.parse(t),r)return r;throw new M(2,3,3004)}function mi(t){this.a=t}function vi(t,e){for(;t.a.length&&t.a[t.a.length-1].startTime>=e;)t.a.pop();for(;t.a.length&&0>=t.a[0].endTime;)t.a.shift();if(0!=t.a.length){var n=t.a[0];n.startTime=e&&!(n&1<<8-e);e++);if(8t||n&&t>=n?null:Math.floor(t/i)},getSegmentReference:function(t){var e=t*i,h=e+i;return n&&(h=Math.min(h,n)),0>h||n&&e>=n?null:new ii(t,e,h,function(){var n=Wn(o,u,t+r,s,e*a);return kt(c,[n])},0,null)}}}(t,a)):(i=e=null,t.ba.id&&t.w.id&&(e=n[i=t.ba.id+","+t.w.id]),o=function(t,e){for(var n=[],i=0;ithis.G.byteLength&&si();var e=new Uint8Array(this.G.buffer,this.G.byteOffset+this.a,t);return this.a+=t,new Uint8Array(e)},ri.prototype.readBytes=ri.prototype.Ea,ri.prototype.F=function(t){this.a+t>this.G.byteLength&&si(),this.a+=t},ri.prototype.skip=ri.prototype.F,ri.prototype.Oc=function(t){this.at||t>this.G.byteLength)&&si(),this.a=t},ri.prototype.seek=ri.prototype.seek,ri.prototype.Xb=function(){for(var t=this.a;this.ga()&&0!=this.G.getUint8(this.a);)this.a+=1;return t=new Uint8Array(this.G.buffer,this.G.byteOffset+t,this.a-t),this.a+=1,Ot(t)},ri.prototype.readTerminatedString=ri.prototype.Xb,S("shaka.util.Mp4Parser",ui),ui.prototype.D=function(t,e){var n=fi(t);return this.c[n]=0,this.b[n]=e,this},ui.prototype.box=ui.prototype.D,ui.prototype.Y=function(t,e){var n=fi(t);return this.c[n]=1,this.b[n]=e,this},ui.prototype.fullBox=ui.prototype.Y,ui.prototype.stop=function(){this.a=!0},ui.prototype.stop=ui.prototype.stop,ui.prototype.parse=function(t,e){var n=new Uint8Array(t);for(n=new ri(new DataView(n.buffer,n.byteOffset,n.byteLength),0),this.a=!1;n.ga()&&!this.a;)this.Ab(0,n,e)},ui.prototype.parse=ui.prototype.parse,ui.prototype.Ab=function(t,e,n){var i=e.W(),r=e.C(),a=e.C();switch(r){case 0:r=e.G.byteLength-i;break;case 1:r=e.Sa()}var o=this.b[a];if(o){var s=null,u=null;1==this.c[a]&&(s=(u=e.C())>>>24,u&=16777215),a=i+r,n&&a>e.G.byteLength&&(a=e.G.byteLength),e=0<(a-=e.W())?e.Ea(a):new Uint8Array(0),o({ra:this,Hc:n||!1,version:s,flags:u,s:e=new ri(new DataView(e.buffer,e.byteOffset,e.byteLength),0),size:r,start:i+t})}else e.F(i+r-e.W())},ui.prototype.parseNext=ui.prototype.Ab,ui.children=ci,ui.sampleDescription=hi,ui.allData=li,ui.typeToString=di,S("shaka.media.SegmentIndex",mi),mi.prototype.destroy=function(){return this.a=null,Promise.resolve()},mi.prototype.destroy=mi.prototype.destroy,mi.prototype.find=function(t){for(var e=this.a.length-1;0<=e;--e){var n=this.a[e];if(t>=n.startTime&&t(t-=this.a[0].position)||t>=this.a.length?null:this.a[t]},mi.prototype.get=mi.prototype.get,mi.prototype.offset=function(t){for(var e=0;ea.startTime?0==n&&e.push(a):(.1t)return void this.a.splice(0,e);this.a=[]},mi.prototype.evict=mi.prototype.Hb,yi.prototype.ga=function(){return this.a.ga()},Ti.prototype.parse=function(t,e,n,i){var r;if(440786851!=gi(e=new yi(new DataView(e))).id)throw new M(2,3,3008);var a=gi(e);if(408125543!=a.id)throw new M(2,3,3009);for(e=a.a.byteOffset,a=new yi(a.a),r=null;a.ga();){var o=gi(a);if(357149030==o.id){r=o;break}}if(!r)throw new M(2,3,3010);for(a=new yi(r.a),r=1e6,o=null;a.ga();){var s=gi(a);if(2807729==s.id)r=wi(s);else if(17545==s.id)if(4==(o=s).a.byteLength)o=o.a.getFloat32(0);else{if(8!=o.a.byteLength)throw new M(2,3,3003);o=o.a.getFloat64(0)}}if(null==o)throw new M(2,3,3011);if(r=o*(a=r/1e9),475249515!=(t=gi(new yi(new DataView(t)))).id)throw new M(2,3,3007);return function(t,e,n,i,r,a){function o(){return r}var s=[];t=new yi(t.a);for(var u=null,c=null;t.ga();){var h=gi(t);if(187==h.id){var l=Ei(h);l&&(h=n*l.Xe,l=e+l.re,null!=u&&s.push(new ii(s.length,u-a,h-a,o,c,l-1)),u=h,c=l)}}return null!=u&&s.push(new ii(s.length,u-a,i-a,o,c,null)),s}(t,e,a,r,n,i)};var Ri={},Mi={};function Ci(t,e,n,i){var r=i;return r||1<(i=new D(t).aa.split("/").pop().split(".")).length&&(i=i.pop().toLowerCase(),r=Mi[i]),r?Promise.resolve(r):((n=pt([t],n)).method="HEAD",e.request(0,n).promise.then(function(e){return(e=e.headers["content-type"])&&(e=e.toLowerCase()),(r=Ri[e])?r:Promise.reject(new M(2,4,4e3,t))},function(t){return t.severity=2,Promise.reject(t)}))}function Di(t,e){this.f=t,this.l=e,this.c=this.b=1/0,this.a=1,this.j=this.h=0,this.i=!0,this.g=0}function _i(){this.a=this.b=null,this.h=[],this.c=null,this.j=[],this.i=1,this.l={},this.m=0,this.o=new x(5),this.g=null,this.f=new ct}function Oi(t){var e=Date.now(),n=t.a.networkingEngine.request(0,pt(t.h,t.b.retryParameters));return ht(t.f,n),n.promise.then(function(e){if(t.a)return function(t,e,n){if(!(e=ti(e,"MPD")))throw new M(2,4,4001,n);return e=ei(e,t.b.retryParameters,t.b.dash.xlinkFailGracefully,n,t.a.networkingEngine),ht(t.f,e),e.promise.then(function(e){return function(t,e,n){n=[n];var i=Un(e,"Location").map(Bn).filter(xt);0e.m||(e.g=t.setTimeout(e.Pe.bind(e),1e3*Math.max(3,e.m-n,k(e.o))))}function Fi(t,e,n){e=e||{contentType:"",mimeType:"",codecs:"",containsEmsgBoxes:!1,frameRate:void 0,Tb:null},n=n||e.ea;var i=Un(t,"BaseURL").map(Bn),r=t.getAttribute("contentType")||e.contentType,a=t.getAttribute("mimeType")||e.mimeType,o=t.getAttribute("codecs")||e.codecs,s=Fn(t,"frameRate",zn)||e.frameRate,u=!!Un(t,"InbandEventStream").length,c=Un(t,"AudioChannelConfiguration");return c=function(t){for(var e=0;e>=1;return t}}}return null}(c)||e.Tb,r||(r=Hi(a,o)),{ea:kt(n,i),fb:Ln(t,"SegmentBase")||e.fb,ta:Ln(t,"SegmentList")||e.ta,hb:Ln(t,"SegmentTemplate")||e.hb,width:Fn(t,"width",Xn)||e.width,height:Fn(t,"height",Xn)||e.height,contentType:r,mimeType:a,codecs:o,frameRate:s,containsEmsgBoxes:u||e.containsEmsgBoxes,id:t.getAttribute("id"),Tb:c}}function Vi(t,e,n,i){return(e=pt(e=kt(e,[n]),t.b.retryParameters)).method=i,e=t.a.networkingEngine.request(0,e),ht(t.f,e),e.promise.then(function(t){if("HEAD"==i){if(!t.headers||!t.headers.date)return 0;t=t.headers.date}else t=Ot(t.data);return t=Date.parse(t),isNaN(t)?0:t-Date.now()})}function Hi(t,e){return xe[Dt(t,e)]?"text":t.split("/")[0]}function Ki(t,e,n,i){this.uri=t,this.type=e,this.a=n,this.segments=i||null}function qi(t,e,n,i){this.id=t,this.name=e,this.a=n,this.value=i||null}function Gi(t,e){this.name=t,this.value=e}function Xi(t,e,n){return n=n||null,(t=t.getAttribute(e))?t.value:n}function zi(t,e){return t.filter(function(t){return t.name==e})}function Yi(t,e){var n=zi(t,e);return n.length?n[0]:null}function $i(t,e,n){return t.filter(function(t){var i=t.getAttribute("TYPE");return t=t.getAttribute("GROUP-ID"),i.value==e&&t.value==n})}function Wi(t,e){return kt([t],[e])[0]}function Ji(t){this.b=t,this.a=0}function Qi(t){Zi(t,/[ \t]+/gm)}function Zi(t,e){e.lastIndex=t.a;var n=e.exec(t.b);return n=null==n?null:{position:n.index,length:n[0].length,we:n},t.a==t.b.length||null==n||n.position!=t.a?null:(t.a+=n.length,n.we)}function tr(t){return t.a==t.b.length?null:(t=Zi(t,/[^ \t\n]*/gm))?t[0]:null}function er(t,e,n){var i=(e=(e=Ot(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(i[0]))throw new M(2,4,4015);e=0;for(var r=1;r>4)&&2!=i||e(),3==i&&(i=t.ca(),t.F(i)),1==t.C()>>8)return t.F(3),0!=(n=t.ca()>>6)&&1!=n||e(),0==t.ca()&&e(),n=t.ca(),i=t.eb(),t=t.eb(),(1073741824*((14&n)>>1)+((65534&i)<<14|(65534&t)>>1))/9e4;t.seek(n+188),71!=(i=t.ca())&&(t.seek(n+192),i=t.ca()),71!=i&&(t.seek(n+204),i=t.ca()),71!=i&&e(),t.Oc(1)}}(t[0].data);if("application/mp4"==r||0==r.indexOf("text/")){t=t[0].data;var e=Dt(r,a);if(xe[e]){var n=new Ae(null);n.f=new xe[e],t=n.Mb(t)}else t=0;return t}throw new M(2,4,4030)}.bind(t))}(t,e.uri,c,u,i,r).then(function(t){s.split("/").pop();for(var i=0;in.length||"data"!=n[0])throw new M(2,1,1004,e);if(2>(n=n.slice(1).join(":").split(",")).length)throw new M(2,1,1004,e);var i=n[0];n=t.decodeURIComponent(n.slice(1).join(","));var r=null;if(1<(i=i.split(";")).length&&(r=i[1]),"base64"==r)e=Kt(n).buffer;else{if(r)throw new M(2,1,1005,e);e=jt(n)}return{data:e,contentType:i[0]}},dt("data",or),S("shaka.hls.HlsParser",sr),(e=sr.prototype).configure=function(t){this.h=t},e.start=function(t,e){return this.c=e,this.l=t,wr(this,t).then(function(e){return function(t,e,n){if(0!=(e=er(t.u,e,n)).type)throw new M(2,4,4022);return function(t,e){var n=e.a,i=zi(e.a,"EXT-X-MEDIA").filter(function(t){return"SUBTITLES"==gr(t,"TYPE")}.bind(t)).map(function(t){return function(t,e){return gr(e,"TYPE"),lr(t,e,[]).then(function(t){return t.stream})}(this,t)}.bind(t));return Promise.all(i).then(function(t){var i=zi(n,"EXT-X-STREAM-INF").map(function(t){return function(t,e,n){var i=Xi(e,"CODECS","avc1.42E01E,mp4a.40.2").split(","),r=e.getAttribute("RESOLUTION"),a=null,o=null,s=Xi(e,"FRAME-RATE"),u=Number(gr(e,"BANDWIDTH"));if(r){var c=r.value.split("x");a=c[0],o=c[1]}n=zi(n.a,"EXT-X-MEDIA");var h=Xi(e,"AUDIO"),l=Xi(e,"VIDEO");if(h?n=$i(n,"AUDIO",h):l&&(n=$i(n,"VIDEO",l)),c=yr("text",i)){var f=Xi(e,"SUBTITLES");f&&((f=$i(n,"SUBTITLES",f)).length&&(t.v[f[0].id].stream.codecs=c)),i.splice(i.indexOf(c),1)}n=n.map(function(t){return lr(this,t,i)}.bind(t));var d=[],p=[];return Promise.all(n).then(function(t){if(h?d=t:l&&(p=t),t=!1,d.length||p.length)if(d.length)if(gr(e,"URI")==d[0].$b){var n="audio";t=!0}else n="video";else n="audio";else 1==i.length?(n=yr("video",i),n=r||s||n?"video":"audio"):(n="video",i=[i.join(",")]);return t?Promise.resolve():function(t,e,n,i){var r=gr(e,"URI");return r=Wi(t.l,r),t.a[r]?Promise.resolve(t.a[r]):fr(t,r,n,i,"und",!1,null,null).then(function(t){return this.a[r]?this.a[r]:this.a[r]=t}.bind(t))}(this,e,i,n)}.bind(t)).then(function(t){return t&&("audio"==t.stream.type?d=[t]:p=[t]),p&&cr(p),d&&cr(d),function(t,e,n,i,r,a,o){n.forEach(function(t){(t=t.stream)&&(t.width=Number(r)||void 0,t.height=Number(a)||void 0,t.frameRate=Number(o)||void 0)}.bind(t)),e.length||(e=[null]),n.length||(n=[null]);for(var s=[],u=0;u(n=this.a[s]).Sb&&(n.stream.presentationTimeOffset=-e,n.gb.offset(e))}else for(var u in this.b.ja(r),this.a)(s=this.a[u]).stream.presentationTimeOffset=e,s.gb.offset(-e),vi(s.gb,r);this.m={presentationTimeline:this.b,periods:[t],offlineSessionIds:[],minBufferTime:0}}.bind(t))}(this,e.data,t).then(function(){return Sr(this,this.i),this.m}.bind(this))}.bind(this))},e.stop=function(){return this.h=this.c=null,this.v={},this.H={},this.m=null,this.o.destroy()},e.update=function(){if(this.f!=kr.pa){var t,e=[];for(t in this.a)e.push(ur(this,this.a[t],t));return Promise.all(e)}},e.onExpirationUpdated=function(){};var Tr={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Er={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};function Sr(e,n){null!=e.i&&null!=n&&(e.j=t.setTimeout(e.M.bind(e),1e3*n))}function Ar(e,n){e.f=n,e.b&&e.b.Bb(e.f==kr.pa),e.f==kr.pa&&null!=e.j&&(t.clearTimeout(e.j),e.j=null,e.i=null)}sr.prototype.M=function(){this.c&&(this.j=null,this.update().then(function(){Sr(this,this.i)}.bind(this)).catch(function(t){this.c&&(t.severity=1,this.c.onError(t),Sr(this,0))}.bind(this)))};var xr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(t){var e=gr(t,"METHOD");return"SAMPLE-AES-CENC"!=e&&"SAMPLE-AES-CTR"!=e?null:(e=gr(t,"URI"),e=or.parse(e),e=Pt("com.widevine.alpha",[{initDataType:"cenc",initData:e=new Uint8Array(e.data)}]),(t=Xi(t,"KEYID"))&&(e.keyIds=[t.substr(2).toLowerCase()]),e)}},Ir="VOD",kr={pa:Ir,Yc:"EVENT",ic:"LIVE"};function Pr(t,e,n,i){this.a=t,this.u=e,this.o=n,this.v=i,this.h=new yt,this.b=null,this.g=!1,this.m=t.readyState,this.c=!1,this.j=this.A=-1,this.f=this.i=!1,e=this.l.bind(this),gt(this.h,t,"waiting",e),this.b=new Ft(e),Vt(this.b,.25)}function Nr(t,e,n){this.a=t,this.i=e,this.h=n,this.c=new yt,this.f=1,this.g=!1,this.b=null,0e?0:e,!t.g&&0>e&&(t.b=new Ft(function(){t.a.currentTime+=e/4}),Vt(t.b,.25))}function Dr(t,e,n,i,r,a){this.c=t,this.b=e,this.h=n,this.i=r,this.f=null,this.g=new Pr(t,e,n,a),e=this.Xd.bind(this),n=this.b.presentationTimeline,null==i?i=1/0>n.S()?n.Ka():n.la():0>i&&(i=n.la()+i),i=Or(this,Ur(this,i)),this.a=new Nr(t,e,i),this.f=new Ft(this.Ud.bind(this)),Vt(this.f,.25)}function _r(t){var e=Rr(t.a);return 0=n?n-t.h.durationBackoff:e}function Lr(t,e){var n=ne.bind(null,t.c.buffered),i=Math.max(t.b.minBufferTime||0,t.h.rebufferingGoal),r=t.b.presentationTimeline,a=r.Ka(),o=r.la(),s=r.S();3>o-a&&(a=o-3);var u=r.Ya(i),c=r.Ya(5);return i=r.Ya(i+5),e>=s?Or(t,e):e>o?o:e=u||n(e)?e:i}function Ur(t,e){var n=t.b.presentationTimeline.Ka();return e(n=t.b.presentationTimeline.la())?n:e}function jr(t,e,n,i,r,a,o){this.a=t,this.v=e,this.g=n,this.u=i,this.l=r,this.h=a,this.A=o,this.c=[],this.j=new yt,this.b=!1,this.i=-1,this.f=null,Fr(this)}function Br(t){var e=st(t);return e.eventElement=t.eventElement,e}function Fr(e){Vr(e),e.f=t.setTimeout(e.H.bind(e),250)}function Vr(e){e.f&&(t.clearTimeout(e.f),e.f=null)}function Hr(t,e){this.a=e,this.b=t,this.h=null,this.j=1,this.m=Promise.resolve(),this.g=[],this.i={},this.c={},this.o=!1,this.A=null,this.v=this.f=this.l=!1,this.u=0}function Kr(t){var e=_r(t.a.Qa);return t.b.periods[an(t.b,e)]}function qr(t){var e=t.c.video||t.c.audio;return e?t.b.periods[e.Ca]:null}function Gr(t){return zr(t,"audio")}function Xr(t){return zr(t,"video")}function zr(t,e){var n=t.c[e];return n?n.sa||n.stream:null}function Yr(t,e,n){Me(t.a.J,"text"),t.u++,t.v=!1;var i=t.u;return t.a.J.init({text:e},!1).then(function(){return ia(t,[e])}).then(function(){if(!t.f&&n&&t.u==i&&!t.c.text&&!t.v){var r=_r(t.a.Qa);t.c.text=ea(e,an(t.b,r)),ca(t,t.c.text,0)}})}function $r(t){t.v=!0,t.c.text&&(ha(t.c.text),delete t.c.text)}function Wr(t,e){var n=t.c.video;if(n){var i=n.stream;if(i)if(e){var r=i.trickModeVideo;r&&!n.sa&&(Qr(t,r,!1),n.sa=i)}else(i=n.sa)&&(n.sa=null,Qr(t,i,!0))}}function Jr(t,e,n){e.video&&Qr(t,e.video,n),e.audio&&Qr(t,e.audio,n)}function Qr(t,e,n){var i=t.c[e.type];if(!i&&"text"==e.type&&t.h.ignoreTextStreamFailures)Yr(t,e,!0);else if(i){var r=on(t.b,e);n&&r!=i.Ca?Zr(t):(i.sa&&(e.trickModeVideo?(i.sa=e,e=e.trickModeVideo):i.sa=null),(r=t.g[r])&&r.Ta&&(r=t.i[e.id])&&r.Ta&&i.stream!=e&&("text"==e.type&&ke(t.a.J,Dt(e.mimeType,e.codecs)),i.stream=e,i.xb=!0,n&&(i.za?i.Cb=!0:i.Da?(i.va=!0,i.Cb=!0):(ha(i),ua(t,i,!0)))))}}function Zr(t){for(var e in t.c){var n=t.c[e];n.za||n.va||(n.Da?n.va=!0:null==Pe(t.a.J,e)?null==n.ua&&ca(t,n,0):(ha(n),ua(t,n,!1)))}}function ta(t,e,n){var i=_r(t.a.Qa),r=an(t.b,i),a={},o=[];return e.variant&&e.variant.audio&&(a.audio=e.variant.audio,o.push(e.variant.audio)),e.variant&&e.variant.video&&(a.video=e.variant.video,o.push(e.variant.video)),e.text&&(a.text=e.text,o.push(e.text)),t.a.J.init(a,t.h.forceTransmuxTS).then(function(){if(!t.f){var e=t.b.presentationTimeline.S();return 1/0>e?t.a.J.ja(e):t.a.J.ja(Math.pow(2,32)),ia(t,o)}}).then(function(){if(!t.f)for(var e in a){var i=a[e];t.c[e]||(t.c[e]=ea(i,r,n),ca(t,t.c[e],0))}})}function ea(t,e,n){return{stream:t,type:t.type,Ma:null,ma:null,sa:null,xb:!0,Ca:e,endOfStream:!1,Da:!1,ua:null,va:!1,Cb:!1,za:!1,Zb:!1,$a:!1,Mc:n||0}}function na(t,e){var n=t.g[e];if(n)return n.promise;n={promise:new z,Ta:!1},t.g[e]=n;var i=t.b.periods[e].variants.map(function(t){var e=[];return t.audio&&e.push(t.audio),t.video&&e.push(t.video),t.video&&t.video.trickModeVideo&&e.push(t.video.trickModeVideo),e}).reduce(St,[]).filter(It);return i.push.apply(i,t.b.periods[e].textStreams),t.m=t.m.then(function(){if(!this.f)return ia(this,i)}.bind(t)).then(function(){this.f||(this.g[e].promise.resolve(),this.g[e].Ta=!0)}.bind(t)).catch(function(t){this.f||(this.g[e].promise.catch(function(){}),this.g[e].promise.reject(),delete this.g[e],this.a.onError(t))}.bind(t)),n.promise}function ia(t,e){e.map(function(t){return t.id}).filter(It);for(var n=[],i=0;ii?null:e):null}function oa(t){return!t.Da&&null==t.ua&&!t.va&&!t.za}function sa(t,e){var n=pt(e.c(),t.h.retryParameters);if(0!=e.b||null!=e.a){var i="bytes="+e.b+"-";null!=e.a&&(i+=e.a),n.headers.Range=i}return t.a.Oa.request(1,n).promise.then(function(t){return t.data})}function ua(t,e,n){e.va=!1,e.Cb=!1,e.za=!0,Me(t.a.J,e.type).then(function(){if(!this.f&&n)return this.a.J.flush(e.type)}.bind(t)).then(function(){this.f||(e.Ma=null,e.ma=null,e.za=!1,e.endOfStream=!1,ca(this,e,0))}.bind(t))}function ca(e,n,i){n.ua=t.setTimeout(e.Re.bind(e,n),1e3*i)}function ha(e){null!=e.ua&&(t.clearTimeout(e.ua),e.ua=null)}function la(t,e){$(t.A).then(function(){this.f||(this.a.onError(e),e.handled||this.h.failureCallback(e))}.bind(t))}function fa(t,e,n,i,r,a){if(200<=n&&299>=n&&202!=n)return r&&(i=r),{uri:i,data:e,headers:t,fromCache:!!t["x-shaka-from-cache"]};r=null;try{r=Ut(e)}catch(t){}throw new M(401==n||403==n?2:1,1,1001,i,n,r,t,a)}function da(t,e,n){var i=new da.b;Ct(e.headers,function(t,e){i.append(t,e)});var r,a=new da.a,o={body:e.body||void 0,headers:i,method:e.method,signal:a.signal,credentials:e.allowCrossSiteCredentials?"include":void 0},s=!1,u=!1;return e.retryParameters.timeout&&(r=setTimeout(function(){u=!0,a.abort()},e.retryParameters.timeout)),new W(o=(e=da.c)(t,o).then(function(e){return clearTimeout(r),e.arrayBuffer().then(function(i){var r={};return e.headers.forEach(function(t,e){r[e.trim()]=t}),fa(r,i,e.status,t,e.url,n)})}).catch(function(e){return clearTimeout(r),s?Promise.reject(new M(1,1,7001,t,n)):u?Promise.reject(new M(1,1,1003,t,n)):null==e.severity?Promise.reject(new M(1,1,1002,t,e,n)):Promise.reject(e)}),function(){return s=!0,a.abort(),Promise.resolve()})}function pa(t,e,n){var i=new pa.f;return new W(new Promise(function(r,a){for(var o in i.open(e.method,t,!0),i.responseType="arraybuffer",i.timeout=e.retryParameters.timeout,i.withCredentials=e.allowCrossSiteCredentials,i.onabort=function(){a(new M(1,1,7001,t,n))},i.onload=function(e){var i=(e=e.target).getAllResponseHeaders().trim().split("\r\n").reduce(function(t,e){var n=e.split(": ");return t[n[0].toLowerCase()]=n.slice(1).join(": "),t},{});try{var o=fa(i,e.response,e.status,t,e.responseURL,n);r(o)}catch(t){a(t)}},i.onerror=function(e){a(new M(1,1,1002,t,e,n))},i.ontimeout=function(){a(new M(1,1,1003,t,n))},e.headers)i.setRequestHeader(o.toLowerCase(),e.headers[o]);i.send(e.body)}),function(){return i.abort(),Promise.resolve()})}function ma(t){this.a={},this.c=Promise.resolve(),this.h=!1,this.i=t,this.f=this.b=this.g=0}function va(t,e,n,i,r){t.a[e]=t.a[e]||[],t.a[e].push({request:n,nc:i,Hd:r})}function ya(t,e){var n=Mt(t.a);t.a={},n.forEach(function(e){e.forEach(function(e){t.b+=e.nc})});var i=Promise.resolve().then(function(){return ga(t),Promise.all(n.map(function(n){return function(t,e,n){var i=Promise.resolve();return n.forEach(function(n){i=i.then(function(){return ga(t),function(t,e,n){return Promise.resolve().then(function(){return ga(t),e.request(1,n.request).promise}).then(function(e){return ga(t),t.g+=n.nc,t.f+=e.data.byteLength,t.i(t.b?t.g/t.b:0,t.f),n.Hd(e.data)})}(t,e,n)})}),i}(t,e,n)}))});return t.c=t.c.then(function(){return i}),i}function ga(t){if(t.h)throw new M(2,9,7001)}function ba(t,e){var n=this;this.c=t,this.b=t.objectStore(e),this.a=new z,t.onabort=function(t){t.preventDefault(),n.a.reject()},t.onerror=function(t){t.preventDefault(),n.a.reject()},t.oncomplete=function(){n.a.resolve()}}function wa(t){this.b=t,this.a=[]}function Ta(t,e){return Ea(t,e,"readwrite")}function Ea(t,e,n){var i=new ba(n=t.b.transaction([e],n),e);return t.a.push(i),i.promise().then(function(){at(t.a,i)},function(){at(t.a,i)}),i}function Sa(){this.a={}}function Aa(t,e){Ct(t.a,function(t,n){Ct(n.getCells(),function(n,i){e({$:t,O:n},i)})})}function xa(t,e,n){if(!(t=t.a[e]))throw new M(2,9,9013,"Could not find mechanism with name "+e);if(!(e=t.getCells()[n]))throw new M(2,9,9013,"Could not find cell with name "+n);return e}function Ia(){return Mt(ka).some(function(t){return!!(t=t())&&(t.destroy(),!0)})}Mi.m3u8=sr,Ri["application/x-mpegurl"]=sr,Ri["application/vnd.apple.mpegurl"]=sr,Pr.prototype.destroy=function(){var t=this.h.destroy();return this.v=this.u=this.a=this.h=null,null!=this.b&&(this.b.cancel(),this.b=null),t},Pr.prototype.cb=function(){this.f=!0,this.l()},Pr.prototype.l=function(){if(0!=this.a.readyState){if(this.a.seeking){if(!this.g)return}else this.g=!1;if(!this.a.paused){this.a.readyState!=this.m&&(this.c=!1,this.m=this.a.readyState);var t=this.o.smallGapLimit,e=this.a.currentTime,n=this.a.buffered;t:{if(n&&n.length&&!(1==n.length&&1e-6>n.end(0)-n.start(0))){var i=.1;/(Edge\/|Trident\/|Tizen)/.test(navigator.userAgent)&&(i=.5);for(var r=0;re&&(0==r||n.end(r-1)-e<=i)){i=r;break t}}i=null}if(null==i){if(n=this.a.currentTime,e=this.a.buffered,3>this.a.readyState&&0=e.start(i)&&n=a)){t=(a=r-e)<=t;var o=!1;.001>a||(t||this.c||(this.c=!0,(e=new Et("largegap",{currentTime:e,gapSize:a})).cancelable=!0,this.v(e),this.o.jumpLargeGaps&&!e.defaultPrevented&&(o=!0)),!t&&!o)||(0!=i&&n.end(i-1),this.a.currentTime=r)}}}}},(e=Nr.prototype).destroy=function(){var t=this.c.destroy();return this.c=null,null!=this.b&&(this.b.cancel(),this.b=null),this.i=this.a=null,t},e.Xa=function(){return this.f},e.Vd=function(){var t=this.g||0>this.f?0:this.f;this.a.playbackRate&&this.a.playbackRate!=t&&Cr(this,this.a.playbackRate)},e.Dc=function(){.001>Math.abs(this.a.currentTime-this.h)?this.Ec():(bt(this.c,this.a,"seeking",this.Ec.bind(this)),this.a.currentTime=0==this.a.currentTime?this.h:this.a.currentTime)},e.Ec=function(){var t=this;gt(this.c,this.a,"seeking",function(){return t.i()})},(e=Dr.prototype).destroy=function(){var t=Promise.all([this.a.destroy(),this.g.destroy()]);return this.g=this.a=null,null!=this.f&&(this.f.cancel(),this.f=null),this.i=this.h=this.b=this.c=null,t},e.Xa=function(){return this.a.Xa()},e.cb=function(){this.g.cb()},e.Ud=function(){if(0!=this.c.readyState&&!this.c.paused){var t=this.c.currentTime,e=this.b.presentationTimeline,n=e.Ka();3>(e=e.la())-n&&(n=e-3),tthis.a.currentTime?1:e.info.endTime=i,n=!(n=this.v).g||"ended"==n.g.readyState,e=e||this.a.ended||n,this.b?(n=Math.max(this.g.minBufferTime||0,this.u.rebufferingGoal),(e||t>=n)&&0!=this.b&&(this.b=!1,this.l(!1))):!e&&.5>t&&1!=this.b&&(this.b=!0,this.l(!0)),this.c.forEach(this.m.bind(this,!1))},(e=Hr.prototype).destroy=function(){for(var t in this.c)ha(this.c[t]);return this.h=this.c=this.i=this.g=this.m=this.b=this.a=null,this.f=!0,Promise.resolve()},e.configure=function(t){this.h=t,this.A=new Y({maxAttempts:Math.max(t.retryParameters.maxAttempts,2),baseDelay:t.retryParameters.baseDelay,backoffFactor:t.retryParameters.backoffFactor,fuzzFactor:t.retryParameters.fuzzFactor,timeout:0},!0)},e.init=function(){var t=_r(this.a.Qa);return(t=this.a.yc(this.b.periods[an(this.b,t)])).variant||t.text?ta(this,t).then(function(){!this.f&&this.a&&this.a.Ld&&this.a.Ld()}.bind(this)):Promise.reject(new M(2,5,5005))},e.Re=function(t){if(!this.f&&!t.Da&&null!=t.ua&&!t.za)if(t.ua=null,t.va)ua(this,t,t.Cb);else{try{var e=function(t,e){var n=_r(t.a.Qa),i=ra(t,e,n),r=on(t.b,e.stream),a=an(t.b,i),o=function(t,e,n){return"text"==e?null==(t=t.a).b||t.b=t.b.presentationTimeline.S())return e.endOfStream=!0,null;if(e.endOfStream=!1,e.Ca=a,a!=r)return null;if(o>=s)return.5;if(a=function(t,e){return"text"==e?t.a.b:ee(Ne(t,e))}(t.a.J,e.type),!(a=function(t,e,n,i,r){if(e.ma&&e.stream==e.Ma)return aa(t,e,r,e.ma.position+1);if(null==(n=e.ma?e.stream.findSegmentPosition(Math.max(0,t.b.periods[on(t.b,e.Ma)].startTime+e.ma.endTime-t.b.periods[r].startTime)):e.stream.findSegmentPosition(Math.max(0,(i||n)-t.b.periods[r].startTime))))return null;var a=null;return null==i&&(a=aa(t,e,r,Math.max(0,n-1))),a||aa(t,e,r,n)}(t,e,n,a,r)))return 1;var u=1/0;return Mt(t.c).forEach(function(e){u=Math.min(u,ra(t,e,n))}),i>=u+t.b.presentationTimeline.a?1:(e.Mc=0,function(t,e,n,i,r){var a=t.b.periods[i],o=e.stream,s=t.b.presentationTimeline.S(),u=t.b.periods[i+1];i=function(t,e,n,i,r){return e.xb?(n=function(t,e,n,i,r){return"text"==e?(t.a.g=n,(t=t.a).i=i,t.h=r,Promise.resolve()):Promise.all([Ce(t,e,t.bd.bind(t,e)),Ce(t,e,t.Ge.bind(t,e,n)),Ce(t,e,t.De.bind(t,e,i,r))])}(t.a.J,e.type,t.b.periods[n].startTime-e.stream.presentationTimeOffset,i,r),e.stream.initSegmentReference?(t=sa(t,e.stream.initSegmentReference).then(function(t){if(!this.f)return Re(this.a.J,e.type,t,null,null)}.bind(t)).catch(function(t){return e.xb=!0,Promise.reject(t)}),Promise.all([n,t])):n):Promise.resolve()}(t,e,i,Math.max(0,a.startTime-.1),u?u.startTime:s),e.Da=!0,e.xb=!1,s=sa(t,r),Promise.all([i,s]).then(function(t){if(!this.f&&!this.l)return function(t,e,n,i,r,a,o){return r.containsEmsgBoxes&&(new ui).Y("emsg",t.he.bind(t,i,a)).parse(o),function(t,e,n){var i=Math.max(t.h.bufferBehind,t.b.presentationTimeline.a),r=Pe(t.a.J,e.type);return null==r?Promise.resolve():0>=(n=n-r-i)?Promise.resolve():t.a.J.remove(e.type,r,r+n).then(function(){}.bind(t))}(t,e,n).then(function(){if(!this.f)return Re(this.a.J,e.type,o,a.startTime,a.endTime)}.bind(t)).then(function(){if(!this.f)return e.Ma=r,e.ma=a,Promise.resolve()}.bind(t))}(this,e,n,a,o,r,t[1])}.bind(t)).then(function(){this.f||this.l||(e.Da=!1,e.Zb=!1,e.va||this.a.cb(),ca(this,e,0),function(t,e){if(!t.o&&(t.o=Mt(t.c).every(function(t){return"text"==t.type||!t.va&&!t.za&&t.ma}),t.o)){var n=on(t.b,e);for(t.g[n]||na(t,n).then(function(){this.f||this.a.xc()}.bind(t)).catch(At),n=0;n=t.endTime)return null;var n=new VTTCue(t.startTime,t.endTime,t.payload);n.lineAlign=t.lineAlign,n.positionAlign=t.positionAlign,n.size=t.size;try{n.align=t.textAlign}catch(t){}if("center"==t.textAlign&&"center"!=n.align&&(n.align="middle"),2==t.writingDirection?n.vertical="lr":3==t.writingDirection&&(n.vertical="rl"),1==t.lineInterpretation&&(n.snapToLines=!1),null!=t.line&&(n.line=t.line),null!=t.position&&(n.position=t.position),t.region.id.length){var i=e.filter(function(e){return e.id==t.region.id});i.length&&(n.region=i[0])}return n}function to(t,e){var n=new VTTRegion,i=t.b.offsetWidth,r=t.b.offsetHeight;return n.id=e.id,n.regionAnchorX=e.regionAnchorX,n.regionAnchorY=e.regionAnchorY,n.scroll=e.scroll,2==e.heightUnits&&(n.lines=e.height),n.width=0==e.widthUnits?100*e.width/i:e.width,0==e.viewportAnchorUnits?(n.viewportAnchorX=100*e.viewportAnchorX/i,n.viewportAnchorY=100*e.viewportAnchorY/r):(n.viewportAnchorX=e.viewportAnchorX,n.viewportAnchorY=e.viewportAnchorY),n}function eo(t,e){for(var n=t.c,i=[],r=0;re,u&&c)return v(r,a.updateManifestExpiration(n.key(),e),0);r.X(0)}})})}).catch(function(){})},Ri["application/x-offline-manifest"]=Wa,S("shaka.offline.OfflineScheme",Ja),Ja.a=function(t){return Z(t={uri:t,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}})},Ja.b=function(t,e){var n=new Sa;return tt(ut([n],function(){return f(function t(){var i,r;return T(t,function(t){switch(t.B){case 1:return v(t,n.init(),2);case 2:return v(t,xa(n,e.$(),e.O()),3);case 3:return v(t,t.L.getSegments([e.key()]),4);case 4:return i=t.L,r=i[0],t.return({uri:e,data:r.data,headers:{}})}})})}))},dt("offline",Ja),S("shaka.text.SimpleTextDisplayer",Qa),Qa.prototype.remove=function(t,e){return!!this.a&&(eo(this,function(n){return!(n.startTime>=e||n.endTime<=t)}),!0)},Qa.prototype.remove=Qa.prototype.remove,Qa.prototype.append=function(e){var n=[];if(t.VTTRegion){var i=e.map(function(t){return t.region});i=i.filter(It);for(var r=0;r=t.height});return u.length&&(u.sort(function(t,e){return e.height-t.height}),o=u.filter(function(t){return t.height==u[0].height})),o.sort(function(t,e){return t.bandwidth-e.bandwidth}),o.length&&n.push(o[Math.floor(o.length/2)]),n.push.apply(n,e.filter(function(t){return"text"==t.type})),n}(t.a.getConfiguration().preferredAudioLanguage,e)},progressCallback:function(t,e){if(t||e)return null},usePersistentLicense:!0}}function xo(t,e,n){n.forEach(function(n){return Io(t,e,n)})}function Io(t,e,n){var i=null;if(t.c){var r=t.c.filter(function(t){return"variant"==t.type})[0];r&&(i=$e(n,r))}var a=r=null;i&&(i.audio&&(r=i.audio),i.video&&(a=i.video)),He(e,r,a,n),Ve(n,t.a.getConfiguration().restrictions,{width:1/0,height:1/0})}function ko(t){if(!t.a)throw new M(2,9,7001)}function Po(){if(!Ia())throw new M(2,9,9e3)}function No(t,e){var n=t.a.getConfiguration().streaming.retryParameters;return n=pt(e.c(),n),0==e.b&&null==e.a||(n.headers.Range="bytes="+e.b+"-"+(null==e.a?"":e.a)),n}no.registerSupportPlugin=function(t,e){io[t]=e},no.isBrowserSupported=function(){return!!(t.Promise&&t.Uint8Array&&Array.prototype.forEach&&t.MediaSource&&MediaSource.isTypeSupported&&t.MediaKeys&&t.navigator&&t.navigator.requestMediaKeySystemAccess&&t.MediaKeySystemAccess&&t.MediaKeySystemAccess.prototype.getConfiguration)},no.probeSupport=function(){return function(){var t=[],e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],n=[{videoCapabilities:e,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:e}],i={};return"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").forEach(function(e){var r=navigator.requestMediaKeySystemAccess(e,n).then(function(t){var n=t.getConfiguration().sessionTypes;return n=!!n&&0<=n.indexOf("persistent-license"),0<=navigator.userAgent.indexOf("Tizen 3")&&(n=!1),i[e]={persistentState:n},t.createMediaKeys()}).catch(function(){i[e]=null});t.push(r)}),Promise.all(t).then(function(){return i})}().then(function(t){var e=function(){var t,e={};for(t in Ri)e[t]=!0;for(var n in Mi)e[n]=!0;return["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"].forEach(function(t){e[t]=!!Ri[t]}),["mpd","m3u8","ism"].forEach(function(t){e[t]=!!Mi[t]}),e}(),n=function(){var t={};return'video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="av1",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").forEach(function(e){t[e]=!!xe[e]||MediaSource.isTypeSupported(e)||Ee(e);var n=e.split(";")[0];t[n]=t[n]||t[e]}),t}();for(var i in t={manifest:e,media:n,drm:t},io)t[i]=io[i]();return t})},no.prototype.sb=function(t,e){var n=this;return f(function i(){return T(i,function(i){switch(i.B){case 1:if(void 0===e&&(e=!0),!n.f){i.X(2);break}return v(i,n.detach(),2);case 2:if(n.f=t,gt(n.o,n.f,"error",n.be.bind(n)),e)return n.i=new Ie(n.f),v(i,n.i.j,0);i.X(0)}})})},no.prototype.attach=no.prototype.sb,no.prototype.detach=function(){var t=this;return f(function e(){return T(e,function(e){switch(e.B){case 1:return t.f?v(e,t.jb(!1),2):e.return();case 2:t.o.na(t.f,"error"),t.f=null,e.B=0}})})},no.prototype.detach=no.prototype.detach,no.prototype.load=function(t,e,n){var i=this;return f(function r(){var a,o,s,u,c,h,l,d,p,m,g;return T(r,function(r){switch(r.B){case 1:if(!i.f)throw new M(2,7,7002);return o=new z,s=function(){return a=new M(2,7,7e3),o},i.dispatchEvent(new Et("loading")),u=Date.now(),r.qa=2,c=i.jb(),i.Ia=s,v(r,c,4);case 4:if(i.j=lo(),gt(i.o,i.f,"playing",i.kb.bind(i)),gt(i.o,i.f,"pause",i.kb.bind(i)),gt(i.o,i.f,"ended",i.kb.bind(i)),h=i.c.abrFactory,i.h=new h,i.h.configure(i.c.abr),i.v=new i.c.textDisplayFactory,i.v.setTextVisibility(i.Wa),a)throw a;return l=i,v(r,function(t,e,n){return f(function i(){var r,a;return T(i,function(i){switch(i.B){case 1:return v(i,Ci(e,t.u,t.c.manifest.retryParameters,n),2);case 2:return r=i.L,t.m=new r,t.m.configure(t.c.manifest),a={networkingEngine:t.u,filterNewPeriod:t.ub.bind(t),filterAllPeriods:t.dc.bind(t),onTimelineRegionAdded:t.ae.bind(t),onEvent:t.ib.bind(t),onError:t.Ua.bind(t)},i.return(t.m.start(e,a))}})})}(i,t,n),5);case 5:if(l.b=r.L,i.Eb=t,a)throw a;return function(t){if(t.b.periods.some(function(t){return t.variants.some(function(t){return t.video&&t.audio})})&&t.b.periods.forEach(function(t){t.variants=t.variants.filter(function(t){return t.video&&t.audio})}),0==t.b.periods.length)throw new M(2,4,4014)}(i),i.l=new Yt({Oa:i.u,onError:i.Ua.bind(i),zb:i.Md.bind(i),onExpirationUpdated:i.Jd.bind(i),onEvent:i.ib.bind(i)}),i.l.configure(i.c.drm),v(r,i.l.init(i.b,!1),6);case 6:if(a)throw a;return i.dc(i.b.periods),i.mb=Date.now()/1e3,i.M=i.c.preferredAudioLanguage,i.wa=i.c.preferredTextLanguage,i.fa=i.c.preferredAudioChannelCount,function(t){var e=t.b.presentationTimeline.S(),n=t.c.playRangeEnd,i=t.c.playRangeStart;0(a=n.indexOf(".",a)));)0!=a&&"\\"==n[a-1]||(r[o=n.substring(o,a).replace(/\\\./g,".")]={},r=r[o],o=a+1),a+=1;r[n.substring(o).replace(/\\\./g,".")]=e,t=i}return n=ot(this.c,t,ho(this),co(),""),ro(this),n},no.prototype.configure=no.prototype.configure,no.prototype.getConfiguration=function(){var t=ho(this);return ot(t,this.c,ho(this),co(),""),t},no.prototype.getConfiguration=no.prototype.getConfiguration,no.prototype.ve=function(){this.c=ho(this),ro(this)},no.prototype.resetConfiguration=no.prototype.ve,no.prototype.rd=function(){return this.f},no.prototype.getMediaElement=no.prototype.rd,no.prototype.sc=function(){return this.u},no.prototype.getNetworkingEngine=no.prototype.sc,no.prototype.Kb=function(){return this.Eb},no.prototype.getManifestUri=no.prototype.Kb,no.prototype.P=function(){return!!this.b&&this.b.presentationTimeline.P()},no.prototype.isLive=no.prototype.P,no.prototype.Ba=function(){return!!this.b&&this.b.presentationTimeline.Ba()},no.prototype.isInProgress=no.prototype.Ba,no.prototype.Cd=function(){if(!this.b||!this.b.periods.length)return!1;var t=this.b.periods[0].variants;return!!t.length&&!t[0].video},no.prototype.isAudioOnly=no.prototype.Cd,no.prototype.xe=function(){var t=0,e=0;return this.b&&(t=(e=this.b.presentationTimeline).Ka(),e=e.la()),{start:t,end:e}},no.prototype.seekRange=no.prototype.xe,no.prototype.keySystem=function(){return this.l?this.l.keySystem():""},no.prototype.keySystem=no.prototype.keySystem,no.prototype.drmInfo=function(){return this.l?this.l.b:null},no.prototype.drmInfo=no.prototype.drmInfo,no.prototype.wb=function(){return this.l?this.l.wb():1/0},no.prototype.getExpiration=no.prototype.wb,no.prototype.vc=function(){return this.qb},no.prototype.isBuffering=no.prototype.vc,no.prototype.jb=function(t){var e=this;return f(function n(){return T(n,function(n){switch(n.B){case 1:return e.xa?n.return():(void 0===t&&(t=!0),e.dispatchEvent(new Et("unloading")),v(n,function(t){if(!t.Ia)return Promise.resolve();var e=Promise.resolve();return t.m&&(e=t.m.stop(),t.m=null),Promise.all([e,t.Ia()])}(e),2));case 2:return e.rb||(e.rb=function(t){t.o&&(t.o.na(t.f,"loadeddata"),t.o.na(t.f,"playing"),t.o.na(t.f,"pause"),t.o.na(t.f,"ended"));var e=Promise.all([t.h?t.h.stop():null,t.i?t.i.destroy():null,t.l?t.l.destroy():null,t.g?t.g.destroy():null,t.A?t.A.destroy():null,t.a?t.a.destroy():null,t.m?t.m.stop():null,t.v?t.v.destroy():null]);return t.ya=!0,t.l=null,t.i=null,t.g=null,t.A=null,t.a=null,t.m=null,t.v=null,t.b=null,t.Eb=null,t.pb=[],t.K={},t.j=lo(),e}(e).then(function(){e.Uc(!1),e.rb=null})),v(n,e.rb,3);case 3:if(t)return e.i=new Ie(e.f),v(n,e.i.j,0);n.X(0)}})})},no.prototype.unload=no.prototype.jb,no.prototype.Xa=function(){return this.g?this.g.Xa():0},no.prototype.getPlaybackRate=no.prototype.Xa,no.prototype.Te=function(t){this.g&&Cr(this.g.a,t),this.a&&Wr(this.a,1!=t)},no.prototype.trickPlay=no.prototype.Te,no.prototype.fd=function(){this.g&&Cr(this.g.a,1),this.a&&Wr(this.a,!1)},no.prototype.cancelTrickPlay=no.prototype.fd,no.prototype.zd=function(){if(!this.b||!this.g)return[];var t=an(this.b,_r(this.g)),e=this.K[t]||{};return ze(this.b.periods[t],e.audio,e.video)},no.prototype.getVariantTracks=no.prototype.zd,no.prototype.yd=function(){if(!this.b||!this.g)return[];var t=an(this.b,_r(this.g)),e=this.K[t]||{};if(!e.text){var n=tn(this.b.periods[t].textStreams,this.wa,this.Va);n.length&&(e.text=n[0].id)}return Ye(this.b.periods[t],e.text).filter(function(t){return 0>this.nb.indexOf(t.id)}.bind(this))},no.prototype.getTextTracks=no.prototype.yd,no.prototype.Be=function(t){if(this.a){var e=Kr(this.a);t:{for(var n=0;n=t.a&&ee&&(e+=Math.pow(2,32)),e=e.toString(16)),this.Ua(new M(2,3,3016,t,e,this.f.error.message))}}},e.Md=function(t){var e=["output-restricted","internal-error"],n=Kr(this.a),i=!1,r=Object.keys(t),a=1==r.length&&"00"==r[0];r.length&&n.variants.forEach(function(n){var r=[];n.audio&&r.push(n.audio),n.video&&r.push(n.video),r.forEach(function(r){var o=n.allowedByKeySystem;r.keyId&&(r=t[a?"00":r.keyId],n.allowedByKeySystem=!!r&&0>e.indexOf(r)),o!=n.allowedByKeySystem&&(i=!0)})}),(r=rn(Gr(this.a),Xr(this.a),n.variants))&&!r.allowedByKeySystem&&vo(this,n),i&&(go(this),n=Qe(n.variants,this.M,this.Ha,this.fa),this.h.setVariants(n))},e.Jd=function(t,e){this.m&&this.m.onExpirationUpdated&&this.m.onExpirationUpdated(t,e),this.dispatchEvent(new Et("expirationupdated"))},S("shaka.offline.Storage",Eo),Eo.support=So,Eo.prototype.destroy=function(){return this.a=this.b=null,Promise.resolve()},Eo.prototype.destroy=Eo.prototype.destroy,Eo.prototype.configure=function(t){ot(this.b,t,Ao(this),{},"")},Eo.prototype.configure=Eo.prototype.configure,Eo.prototype.store=function(t,e,n){var i=this;return f(function r(){var a,o,s,u;return T(r,function(r){switch(r.B){case 1:return Po(),i.g?r.return(Promise.reject(new M(2,9,9006))):(i.g=!0,a=e||{},o=null,v(r,function(t,e,n,i){function r(){}var a,o,s,u=t.a.u,c=t.a.getConfiguration();return Ci(e,u,c.manifest.retryParameters,i).then(function(t){var i=this;ko(this),(o=new Yt({Oa:u,onError:n,zb:r,onExpirationUpdated:function(){},onEvent:function(){}})).configure(c.drm);var a={networkingEngine:u,filterAllPeriods:function(t){xo(i,o,t)},filterNewPeriod:function(t){Io(i,o,t)},onTimelineRegionAdded:function(){},onEvent:function(){},onError:n};return(s=new t).configure(c.manifest),s.start(e,a)}.bind(t)).then(function(t){return ko(this),a=t,o.init(a,this.b.usePersistentLicense)}.bind(t)).then(function(){return ko(this),function(t){var e=t.periods.map(function(t){return t.variants}).reduce(St,[]).map(function(t){var e=[];return t.audio&&e.push(t.audio),t.video&&e.push(t.video),e}).reduce(St,[]).filter(It);return t=t.periods.map(function(t){return t.textStreams}).reduce(St,[]),e.push.apply(e,t),Promise.all(e.map(function(t){return t.createSegmentIndex()}))}(a)}.bind(t)).then(function(){return ko(this),Wt(o)}.bind(t)).then(function(){return ko(this),s.stop()}.bind(t)).then(function(){return ko(this),{manifest:a,Gb:o}}.bind(t)).catch(function(t){if(s)return s.stop().then(function(){throw t});throw t})}(i,t,function(t){o=o||t},n),2));case 2:if(s=r.L,!(!s.manifest.presentationTimeline.P()&&!s.manifest.presentationTimeline.Ba()))throw new M(2,9,9005,t);if(ko(i),o)throw o;return u=new Sa,r.return(ut([u,s.Gb],function(){return f(function e(){var n,r,c,h,l,f,d;return T(e,function(e){switch(e.B){case 1:return function(t){t.qa=0,t.c=2}(e),v(e,u.init(),4);case 4:return ko(i),xo(i,s.Gb,s.manifest.periods),v(e,function(t){var e=null;if(Ct(t.a,function(t,n){Ct(n.getCells(),function(n,i){i.hasFixedKeySpace()||e||(e={path:{$:t,O:n},O:i})})}),e)return e;throw new M(2,9,9013,"Could not find a cell that supports add-operations")}(u),5);case 5:return n=e.L,ko(i),e.qa=6,v(e,function(t,e,n,i,r,a){var o,s=function(t,e,n){var i=null==e.expiration?1/0:e.expiration;return{offlineUri:null,originalManifestUri:t,duration:e.presentationTimeline.S(),size:0,expiration:i,tracks:e=Xe(e.periods[0]),appMetadata:n}}(r,i,a),u=new ma(function(e,n){s.size=n,t.b.progressCallback(s,e)});return ut([u],function(){return o=function(t,e,n,i,r,a,o){var s=new function(){this.a={}},u=r.periods.map(function(a){return function(t,e,n,i,r,a,o){var s=ze(o,null,null),u=Ye(o,null);s=t.b.trackSelectionCallback(s.concat(u)),null==t.c&&(t.c=s,xo(t,r,a.periods)),function(t){t.some(function(e){return t.some(function(t){return e!=t&&e.type==t.type&&e.kind==t.kind&&e.language==t.language})})}(s),a.periods.forEach(function(t){t.variants.forEach(function(t){var e=t.audio,n=t.video;if(e&&!n&&(i.a[e.id]=e.bandwidth||t.bandwidth),!e&&n&&(i.a[n.id]=n.bandwidth||t.bandwidth),e&&n){var r=e.bandwidth||393216,a=n.bandwidth||t.bandwidth-r;0>=a&&(a=t.bandwidth),i.a[e.id]=r,i.a[n.id]=a}}),t.textStreams.forEach(function(t){i.a[t.id]=52})});var c={};s.forEach(function(t){"variant"==t.type&&null!=t.audioId&&(c[t.audioId]=!0),"variant"==t.type&&null!=t.videoId&&(c[t.videoId]=!0),"text"==t.type&&(c[t.id]=!0)});var h={};return function(t){var e={};return t.periods.forEach(function(t){t.textStreams.forEach(function(t){e[t.id]=t}),t.variants.forEach(function(t){t.audio&&(e[t.audio.id]=t.audio),t.video&&(e[t.video.id]=t.video)})}),Mt(e)}(a).filter(function(t){return!!c[t.id]}).forEach(function(r){h[r.id]=function(t,e,n,i,r,a){var o={id:a.id,primary:a.primary,presentationTimeOffset:a.presentationTimeOffset||0,contentType:a.type,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,kind:a.kind,language:a.language,label:a.label,width:a.width||null,height:a.height||null,initSegmentKey:null,encrypted:a.encrypted,keyId:a.keyId,segments:[],variantIds:[]};r=r.presentationTimeline.Za();var s=a.id;return function(t,e,n){for(var i=null==(e=t.findSegmentPosition(e))?null:t.getSegmentReference(e);i;)n(i),i=t.getSegmentReference(++e)}(a,r,function(r){va(e,s,No(t,r),function(t,e,n){return n=n.endTime-n.startTime,To(t,e)*n}(i,a.id,r),function(e){return n.addSegments([{data:e}]).then(function(e){t.f.push(e[0]),o.segments.push({startTime:r.startTime,endTime:r.endTime,dataKey:e[0]})})})}),(r=a.initSegmentReference)&&va(e,s,No(t,r),.5*To(i,a.id),function(e){return n.addSegments([{data:e}]).then(function(e){t.f.push(e[0]),o.initSegmentKey=e[0]})}),o}(t,e,n,i,a,r)}),s.forEach(function(t){"variant"==t.type&&null!=t.audioId&&h[t.audioId].variantIds.push(t.id),"variant"==t.type&&null!=t.videoId&&h[t.videoId].variantIds.push(t.id)}),{startTime:o.startTime,streams:Mt(h)}}(t,e,n,s,i,r,a)}),c=i.b,h=function(t){return t.a.map(function(t){return t.ia.sessionId})}(i);if(c&&t.b.usePersistentLicense){if(!h.length)throw new M(2,9,9007,a);c.initData=[]}return{originalManifestUri:a,duration:r.presentationTimeline.S(),size:0,expiration:i.wb(),periods:u,sessionIds:t.b.usePersistentLicense?h:[],drmInfo:c,appMetadata:o}}(t,u,e,n,i,r,a),ya(u,t.a.u)}).then(function(){return o.size=s.size,o})}(i,n.O,s.Gb,s.manifest,t,a||{}),8);case 8:return r=e.L,ko(i),v(e,n.O.addManifests([r]),9);case 9:return c=e.L,ko(i),h=new Ka("manifest",n.path.$,n.path.O,c[0]),e.return(wo(h,r));case 6:return l=y(e),f=i.f,d=function(){},v(e,n.O.removeSegments(f,d),10);case 10:throw o||l;case 2:(function(t){t.h=[t.a],t.qa=0,t.c=0})(e),i.g=!1,i.c=null,i.f=[],function(t){var e=t.h.splice(0)[0];(e=t.a=t.a||e)?e.wc?t.B=t.qa||t.c:null!=e.X&&t.c=n.a.length)){for(var i=[],r=0;rnavigator.userAgent.indexOf("Trident/")||HTMLInputElement.prototype.addEventListener==Oo||(Ro=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Oo)}),Do(function(){}),Do(function(){if(t.MediaSource)if(t.cast&&cast.__platform__&&cast.__platform__.canDisplayType)!function(){var t=MediaSource.isTypeSupported,e=/^dv(?:he|av)\./;MediaSource.isTypeSupported=function(n){for(var i=n.split(/ *; */),r=i[0],a={},o=1;ot.textDecoration.indexOf("underline")&&t.textDecoration.push("underline");break;case"noUnderline":0<=t.textDecoration.indexOf("underline")&&at(t.textDecoration,"underline");break;case"lineThrough":0>t.textDecoration.indexOf("lineThrough")&&t.textDecoration.push("lineThrough");break;case"noLineThrough":0<=t.textDecoration.indexOf("lineThrough")&&at(t.textDecoration,"lineThrough");break;case"overline":0>t.textDecoration.indexOf("overline")&&t.textDecoration.push("overline");break;case"noOverline":0<=t.textDecoration.indexOf("overline")&&at(t.textDecoration,"overline")}}function Ms(t,e,n,i){return(t=Ds(t,n,i))?t:Cs(e,n,i)}function Cs(t,e,n){for(var i=Ps(t),r=0;rn.length)return null;var i=null,r=t;for(t=null;r&&!(t=r.getAttribute(e))&&(r=r.parentNode)instanceof Element;);if(e=t)for(t=0;tc[0].indexOf("--\x3e")&&(u=c[0],c.splice(0,1));var f=Fs(h=new Ji(c[0])),d=Zi(h,/[ \t]+--\x3e[ \t]+/g),p=Fs(h);if(null==f||null==d||null==p)throw new M(2,2,2001);for(c=new ae(f+l,p+l,c.slice(1).join("\n").trim()),Qi(h),l=tr(h);l;)Bs(c,l,o),Qi(h),l=tr(h);null!=u&&(c.id=u),o=c}o&&r.push(o)}return r},xe["text/vtt"]=js,xe['text/vtt; codecs="vtt"']=js,Vs.prototype.parseInit=function(t){var e=!1;if((new ui).D("moov",ci).D("trak",ci).D("mdia",ci).Y("mdhd",function(t){0==t.version?(t.s.F(4),t.s.F(4),this.a=t.s.C(),t.s.F(4)):(t.s.F(8),t.s.F(8),this.a=t.s.C(),t.s.F(8)),t.s.F(4)}.bind(this)).D("minf",ci).D("stbl",ci).Y("stsd",hi).D("wvtt",function(){e=!0}).parse(t),!this.a)throw new M(2,2,2008);if(!e)throw new M(2,2,2008)},Vs.prototype.parseMedia=function(t,e){var n=this;if(!this.a)throw new M(2,2,2008);var i,r=0,a=[],o=[],s=!1,u=!1,c=!1,h=null;if((new ui).D("moof",ci).D("traf",ci).Y("tfdt",function(t){s=!0,r=0==t.version?t.s.C():t.s.Sa()}).Y("tfhd",function(t){var e=t.flags;(t=t.s).F(4),1&e&&t.F(8),2&e&&t.F(4),h=8&e?t.C():null}).Y("trun",function(t){u=!0;var e=t.version,n=t.flags,i=(t=t.s).C();1&n&&t.F(4),4&n&&t.F(4);for(var r=[],o=0;o1){this.util.addClass(this.player.root,"xgplayer-is-definition");var i=["
    "];this.content.forEach(function(t){i.push("
  • "+t.textContent+"
  • ")}),this.content.some(function(t){return!!t.selected&&(i.push('

'+t.textContent+"

"),!0)});var r=n.querySelector(".xgplayer-definition");r?r.innerHTML='清晰度'+i.join(""):(e.innerHTML='清晰度'+i.join(""),n.appendChild(e))}["touchstart","click"].forEach(function(n){e.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation();var i=n.target||n.srcElement;if(i&&"li"===i.tagName.toLocaleLowerCase()){Array.prototype.forEach.call(i.parentNode.childNodes,function(e){t.util.removeClass(e,"definition")}),t.util.addClass(i,"definition"),i.parentNode.nextSibling.textContent=i.textContent;t.player_.configure({abr:{enabled:!1}}),t.content.some(function(e,n){return i.innerHTML.indexOf(e.textContent)>-1&&(t.player_.selectVariantTrack(t.content[n].track,!0),!0)})}else!i||"p"!==i.tagName.toLocaleLowerCase()&&"em"!==i.tagName.toLocaleLowerCase()||(t.util.addClass(e,"xgplayer-definition-active"),e.focus())},!1)}),e.addEventListener("blur",function(n){n.preventDefault(),n.stopPropagation(),t.util.removeClass(e,"xgplayer-definition-active")}),this.player.once("destroy",function(){e=null}),this.player.start=function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.player.config.url;var e=t.player.root;e.insertBefore(t.player.video,e.firstChild),t.util.removeClass(e,"none"),t.player.userTimer=setTimeout(function(){t.player.emit("blur")},t.player.config.inactive),setTimeout(function(){t.player.emit("complete")},1),t.player.reset=function(){}}}}}]),e}();s.isSupported=a.default.Player.isBrowserSupported(),e.default=s,t.exports=e.default},function(t,e,n){t.exports=n(3)}]); \ No newline at end of file diff --git a/packages/xgplayer-shaka/dist/index.js b/packages/xgplayer-shaka/dist/index.js new file mode 100644 index 00000000..66097f36 --- /dev/null +++ b/packages/xgplayer-shaka/dist/index.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("xgplayer")):"function"==typeof define&&define.amd?define(["xgplayer"],e):"object"==typeof exports?exports["xgplayer-shaka"]=e(require("xgplayer")):t["xgplayer-shaka"]=e(t.xgplayer)}(window,function(t){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}([function(t,e,n){"use strict";var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,n){"use strict";(function(i){var r,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(function(){var o={};(function(t){var e,n="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},r=void 0!==t&&t===this?this:void 0!==i&&null!=i?i:this;function o(){o=function(){},r.Symbol||(r.Symbol=s)}var s=function(){var t=0;return function(e){return"jscomp_symbol_"+(e||"")+t++}}();function u(){o();var t=r.Symbol.iterator;t||(t=r.Symbol.iterator=r.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&n(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return c(this)}}),u=function(){}}function c(t){var e=0;return function(t){return u(),(t={next:t})[r.Symbol.iterator]=function(){return this},t}(function(){return ethis.a?t:Math.min(k(this.b),k(this.c))},t.console&&t.console.log.bind&&(N=console.warn.bind(console)),S("shaka.util.Error",M),M.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},M.Severity={RECOVERABLE:1,CRITICAL:2},M.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9},M.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013};var C=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function D(t){var e;t instanceof D?(_(this,t.ha),this.Ga=t.Ga,this.ka=t.ka,O(this,t.Ra),this.aa=t.aa,L(this,X(t.a)),this.Aa=t.Aa):t&&(e=String(t).match(C))?(_(this,e[1]||"",!0),this.Ga=U(e[2]||""),this.ka=U(e[3]||"",!0),O(this,e[4]),this.aa=U(e[5]||"",!0),L(this,e[6]||"",!0),this.Aa=U(e[7]||"")):this.a=new G(null)}function _(t,e,n){t.ha=n?U(e,!0):e,t.ha&&(t.ha=t.ha.replace(/:$/,""))}function O(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.Ra=e}else t.Ra=null}function L(t,e,n){e instanceof G?t.a=e:(n||(e=j(e,K)),t.a=new G(e))}function U(t,e){return t?e?decodeURI(t):decodeURIComponent(t):""}function j(t,e,n){return"string"==typeof t?(t=encodeURI(t).replace(e,B),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function B(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}(e=D.prototype).ha="",e.Ga="",e.ka="",e.Ra=null,e.aa="",e.Aa="",e.toString=function(){var t=[],e=this.ha;if(e&&t.push(j(e,F,!0),":"),e=this.ka){t.push("//");var n=this.Ga;n&&t.push(j(n,F,!0),"@"),t.push(encodeURIComponent(e).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(e=this.Ra)&&t.push(":",String(e))}return(e=this.aa)&&(this.ka&&"/"!=e.charAt(0)&&t.push("/"),t.push(j(e,"/"==e.charAt(0)?H:V,!0))),(e=this.a.toString())&&t.push("?",e),(e=this.Aa)&&t.push("#",j(e,q)),t.join("")},e.resolve=function(t){var e=new D(this);"data"===e.ha&&(e=new D);var n=!!t.ha;n?_(e,t.ha):n=!!t.Ga,n?e.Ga=t.Ga:n=!!t.ka,n?e.ka=t.ka:n=null!=t.Ra;var i=t.aa;if(n)O(e,t.Ra);else if(n=!!t.aa){if("/"!=i.charAt(0))if(this.ka&&!this.aa)i="/"+i;else{var r=e.aa.lastIndexOf("/");-1!=r&&(i=e.aa.substr(0,r+1)+i)}if(".."==i||"."==i)i="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var a=[],o=0;o=e.i){if(!e.c)return Promise.reject();e.a=1,e.b=e.f}var n=new z;return e.a?(t.setTimeout(n.resolve,e.b*(1+(2*Math.random()-1)*e.h)),e.b*=e.g):n.resolve(),e.a++,n}function W(t,e){this.promise=t,this.b=e,this.a=!1}function J(t){return new W(Promise.reject(t),function(){return Promise.resolve()})}function Q(){var t=Promise.reject(new M(2,7,7001));return t.catch(function(){}),new W(t,function(){return Promise.resolve()})}function Z(t){return new W(Promise.resolve(t),function(){return Promise.resolve()})}function tt(t){return new W(t,function(){return t.catch(function(){})})}function et(t){return new W(Promise.all(t.map(function(t){return t.promise})),function(){return Promise.all(t.map(function(t){return t.abort()}))})}function nt(t,e,n){try{var i=t(e);return i&&i.promise&&i.abort?(n.resolve(i.promise),function(){return i.abort()}):(n.resolve(i),function(){return Promise.resolve(i).then(function(){}).catch(function(){})})}catch(t){return n.reject(t),function(){return Promise.resolve()}}}function it(t,e){for(var n=[],i=0;i=i.priority)&&(ft[t]={priority:n,me:e})}function pt(t,e){return{uris:t,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:e}}function mt(t){return t.then=function(e,n){return N("The network request interface has changed! Please update your application to the new interface, which allows operations to be aborted. Support for the old API will be removed in v2.5."),t.promise.then(e,n)},t.catch=function(e){return N("The network request interface has changed! Please update your application to the new interface, which allows operations to be aborted. Support for the old API will be removed in v2.5."),t.promise.catch(e)},t}function vt(){this.a={}}function yt(){this.a=new vt}function gt(t,e,n,i){t.a&&(e=new Tt(e,n,i),t.a.push(n,e))}function bt(t,e,n,i){gt(t,e,n,function(t){this.na(e,n),i(t)}.bind(t))}function wt(t){if(t.a){var e,n=t.a,i=[];for(e in n.a)i.push.apply(i,n.a[e]);for(n=0;n=t[e]}.bind(null,e);if(0==e[0]&&0==e[2])return Lt(t,!1);if(0==e[1]&&0==e[3])return Lt(t,!0);if(n(0)&&n(1)&&n(2)&&n(3))return Ot(t);throw new M(2,2,2003)}function jt(t){t=encodeURIComponent(t),t=unescape(t);for(var e=new Uint8Array(t.length),n=0;nt.end(0)-t.start(0)?null:t.length?t.end(t.length-1):null}function ne(t,e){return!(!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0))&&(e>=t.start(0)&&e<=t.end(t.length-1))}function ie(t,e){if(!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0))return 0;for(var n=0,i=t.length-1;0<=i&&t.end(i)>e;--i)n+=t.end(i)-Math.max(t.start(i),e);return n}function re(t){if(!t)return[];for(var e=[],n=0;ni||n&&1e3>i)&&!this.a[e].oa&&(this.a.splice(e,1),t.close().catch(function(){})),function(t){t.cancel(),t.a=setTimeout(t.b,500)}(this.H)}},e.oe=function(){!Rt(this.A)&&function(t,e){return Object.keys(t).every(function(n){return e(n,t[n])})}(this.A,function(t,e){return"expired"==e})&&this.h(new M(2,6,6014)),this.o.zb(this.A)},e.Td=function(){for(var t=0;t>4).toString(16),r+=(15&o).toString(16),n=n.replace(i[0],r)}return n}function Ae(t){this.f=null,this.c=t,this.i=this.g=0,this.h=1/0,this.b=this.a=null}ge.scrollMode={NONE:we,UP:"up"},Te.prototype.destroy=function(){return this.a.dispose(),this.a=null,Promise.resolve()},Te.prototype.h=function(t){for(var e=0;en.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function Ne(t,e){try{return t.b[e].buffered}catch(t){return null}}function Re(t,e,n,i,r){return"text"==e?function(t,e,n,i){return Promise.resolve().then(function(){if(this.f&&this.c)if(null==n||null==i)this.f.parseInit(new Uint8Array(e));else{var t={periodStart:this.g,segmentStart:this.g+n,segmentEnd:this.g+i};t=this.f.parseMedia(new Uint8Array(e),t).filter(function(t){return t.startTime>=this.i&&t.startTime=Le&&n==e.split("-")[0]||t>=Ue&&n.split("-")[0]==e.split("-")[0]}S("shaka.text.TextEngine.registerParser",function(t,e){xe[t]=e}),S("shaka.text.TextEngine.unregisterParser",function(t){delete xe[t]}),Ae.prototype.destroy=function(){return this.c=this.f=null,Promise.resolve()},Ae.prototype.Ee=function(t){this.c=t},Ae.prototype.setDisplayer=Ae.prototype.Ee,Ae.prototype.Mb=function(t){try{return this.f.parseMedia(new Uint8Array(t),{periodStart:0,segmentStart:null,segmentEnd:0})[0].startTime}catch(t){throw new M(2,2,2009,t)}},Ae.prototype.remove=function(t,e){return Promise.resolve().then(function(){!this.c||!this.c.remove(t,e)||null==this.a||e<=this.a||t>=this.b||(t<=this.a&&e>=this.b?this.a=this.b=null:t<=this.a&&ethis.a&&e>=this.b&&(this.b=t))}.bind(this))},Ae.prototype.kc=function(t){this.c.append(t)},Ae.prototype.appendCues=Ae.prototype.kc,(e=Ie.prototype).destroy=function(){this.m=!0;var t,e=[];for(t in this.c){var n=this.c[t],i=n[0];for(this.c[t]=n.slice(0,1),i&&e.push(i.p.catch(At)),i=1;ie&&(e+=.001),this.b[t].timestampOffset=e,this.Pa(t)},e.De=function(t,e,n){this.b[t].appendWindowStart=0,this.b[t].appendWindowEnd=n,this.b[t].appendWindowStart=e,this.Pa(t)},e.Qe=function(t){this.c[t][0].p.reject(new M(2,3,3014,this.f.error?this.f.error.code:0))},e.Pa=function(t){var e=this.c[t][0];e&&(e.p.resolve(),_e(this,t))};var Le=1,Ue=2;function je(t){t=t.toLowerCase().split("-");var e=Be[t[0]];return e&&(t[0]=e),t.join("-")}var Be={aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bih:"bh",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};function Fe(t,e,n){var i=t.video;return!(i&&(i.widthe.maxWidth||i.width>n.width||i.heighte.maxHeight||i.height>n.height||i.width*i.heighte.maxPixels)||t.bandwidthe.maxBandwidth)}function Ve(t,e,n){var i=!1;return t.variants.forEach(function(t){var r=t.allowedByApplication;t.allowedByApplication=Fe(t,e,n),r!=t.allowedByApplication&&(i=!0)}),i}function He(t,e,n,i){i.variants=i.variants.filter(function(i){return!(t&&t.M&&!function(t,e){var n=t.keySystem();return 0==e.drmInfos.length||e.drmInfos.some(function(t){return t.keySystem==n})}(t,i))&&(Ke(i.audio,t,e)&&Ke(i.video,t,n))}),i.textStreams=i.textStreams.filter(function(t){return!!xe[Dt(t.mimeType,t.codecs)]})}function Ke(t,e,n){if(!t)return!0;var i=null;e&&e.M&&(i=e.u),e=Dt(t.mimeType,t.codecs);var r,a=Dt(t.mimeType,t.codecs),o=t.mimeType;for(r in _t){var s=t[r],u=_t[r];s&&(o+="; "+u+'="'+s+'"')}return!(!(xe[a]||MediaSource.isTypeSupported(o)||Ee(a,t.type))||i&&t.encrypted&&0>i.indexOf(e)||n&&(t.mimeType!=n.mimeType||t.codecs.split(".")[0]!=n.codecs.split(".")[0]))}function qe(t){var e=t.audio,n=t.video,i=e?e.codecs:null,r=n?n.codecs:null,a=[];r&&a.push(r),i&&a.push(i);var o=[];n&&o.push(n.mimeType),e&&o.push(e.mimeType),o=o[0]||null;var s=[];e&&s.push(e.kind),n&&s.push(n.kind),s=s[0]||null;var u=[];return e&&u.push.apply(u,e.roles),n&&u.push.apply(u,n.roles),u=it(u),t={id:t.id,active:!1,type:"variant",bandwidth:t.bandwidth,language:t.language,label:null,kind:s,width:null,height:null,frameRate:null,mimeType:o,codecs:a.join(", "),audioCodec:i,videoCodec:r,primary:t.primary,roles:u,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null},n&&(t.videoId=n.id,t.width=n.width||null,t.height=n.height||null,t.frameRate=n.frameRate||null,t.videoBandwidth=n.bandwidth||null),e&&(t.audioId=e.id,t.channelsCount=e.channelsCount,t.audioBandwidth=e.bandwidth||null,t.label=e.label),t}function Ge(t){return{id:t.id,active:!1,type:"text",bandwidth:0,language:t.language,label:t.label,kind:t.kind||null,width:null,height:null,frameRate:null,mimeType:t.mimeType,codecs:t.codecs||null,audioCodec:null,videoCodec:null,primary:t.primary,roles:t.roles,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null}}function Xe(t){var e=[],n=Je(t.variants);return t=t.textStreams,n.forEach(function(t){e.push(qe(t))}),t.forEach(function(t){e.push(Ge(t))}),e}function ze(t,e,n){return Je(t.variants).map(function(t){var i=qe(t);return t.video&&t.audio?i.active=n==t.video.id&&e==t.audio.id:t.video?i.active=n==t.video.id:t.audio&&(i.active=e==t.audio.id),i})}function Ye(t,e){return t.textStreams.map(function(t){var n=Ge(t);return n.active=e==t.id,n})}function $e(t,e){for(var n=0;n=t.periods[n].startTime)return n;return 0}function on(t,e){for(var n=0;n=r.bandwidth/this.a.bandwidthDowngradeTarget&&e<=a&&(n=r)}return this.f=Date.now(),n},sn.prototype.chooseVariant=sn.prototype.chooseVariant,sn.prototype.enable=function(){this.c=!0},sn.prototype.enable=sn.prototype.enable,sn.prototype.disable=function(){this.c=!1},sn.prototype.disable=sn.prototype.disable,sn.prototype.segmentDownloaded=function(t,e){var n=this.b;if(!(16e3>e)){var i=8e3*e/t,r=t/1e3;n.a+=e,I(n.b,r,i),I(n.c,r,i)}if(null!=this.f&&this.c)t:{if(this.i){if(Date.now()-this.f<1e3*this.a.switchInterval)break t}else{if(!(128e3<=this.b.a))break t;this.i=!0}n=this.chooseVariant(),this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate),this.h(n)}},sn.prototype.segmentDownloaded=sn.prototype.segmentDownloaded,sn.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)},sn.prototype.getBandwidthEstimate=sn.prototype.getBandwidthEstimate,sn.prototype.setVariants=function(t){this.g=t},sn.prototype.setVariants=sn.prototype.setVariants,sn.prototype.configure=function(t){this.a=t},sn.prototype.configure=sn.prototype.configure;var un="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),cn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),hn=["loop","playbackRate"],ln=["pause","play"],fn="adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading".split(" "),dn={drmInfo:20,getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getManifestUri:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,usingEmbeddedTextTrack:2,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1},pn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},mn=[["getConfiguration","configure"]],vn=[["isTextTrackVisible","setTextTrackVisibility"]],yn="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),gn=["attach","detach","load","unload"];function bn(t){return JSON.stringify(t,function(t,e){if("function"!=typeof e){if(e instanceof Event||e instanceof Et){var n,i={};for(n in e){var r=e[n];r&&"object"==(void 0===r?"undefined":a(r))?"detail"==n&&(i[n]=r):n in Event||(i[n]=r)}return i}if(e instanceof TimeRanges)for(i={__type__:"TimeRanges",length:e.length,start:[],end:[]},n=0;ne?"-Infinity":"Infinity":e;return i}})}function wn(t){return JSON.parse(t,function(t,e){return"NaN"==e?NaN:"-Infinity"==e?-1/0:"Infinity"==e?1/0:e&&"object"==(void 0===e?"undefined":a(e))&&"TimeRanges"==e.__type__?function(t){return{length:t.length,start:function(e){return t.start[e]},end:function(e){return t.end[e]}}}(e):e})}function Tn(t,e,n,i,r,a){this.K=t,this.g=e,this.M=n,this.j=!1,this.A=i,this.H=r,this.u=a,this.b=this.h=!1,this.v="",this.i=null,this.l=this.Ac.bind(this),this.m=this.Pd.bind(this),this.a={video:{},player:{}},this.o=0,this.c={},this.f=null}var En=!1,Sn=null;function An(t){var e=Sn;e.removeUpdateListener(t.l),e.removeMessageListener("urn:x-cast:com.google.shaka.v2",t.m)}function xn(t){for(var e in t.c){var n=t.c[e];delete t.c[e],n.reject(new M(1,7,7e3))}}function In(t){t=bn(t),Sn.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},R)}function kn(){this.Db=new vt,this.lb=this}function Pn(t,e,n){kn.call(this),this.c=t,this.b=e,this.i=this.g=this.f=this.j=this.h=null,this.a=new Tn(n,this.Le.bind(this),this.Me.bind(this),this.Ne.bind(this),this.Oe.bind(this),this.rc.bind(this)),function(t){for(var e in t.a.init(),t.i=new yt,un.forEach(function(t){gt(this.i,this.c,t,this.$e.bind(this))}.bind(t)),fn.forEach(function(t){gt(this.i,this.b,t,this.le.bind(this))}.bind(t)),t.h={},t.c)Object.defineProperty(t.h,e,{configurable:!1,enumerable:!0,get:t.Ze.bind(t,e),set:t.af.bind(t,e)});for(var n in t.j={},t.b)Object.defineProperty(t.j,n,{configurable:!1,enumerable:!0,get:t.ke.bind(t,n)});t.f=new kn,t.f.lb=t.h,t.g=new kn,t.g.lb=t.j}(this)}function Nn(e,n,i,r){kn.call(this),this.a=e,this.b=n,this.c=new yt,this.u={video:e,player:n},this.v=i||function(){},this.A=r||function(t){return t},this.o=!1,this.h=!0,this.g=0,this.m=!1,this.j=!0,this.l=this.i=this.f=null,function(e){var n=cast.receiver.CastReceiverManager.getInstance();n.onSenderConnected=e.Fc.bind(e),n.onSenderDisconnected=e.Fc.bind(e),n.onSystemVolumeChanged=e.kd.bind(e),e.i=n.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.i.onMessage=e.Kd.bind(e),e.f=n.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.f.onMessage=e.Zd.bind(e),n.start(),un.forEach(function(t){gt(this.c,this.a,t,this.Jc.bind(this,"video"))}.bind(e)),fn.forEach(function(t){gt(this.c,this.b,t,this.Jc.bind(this,"player"))}.bind(e)),cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.b.bc(3840,2160):e.b.bc(1920,1080),gt(e.c,e.a,"loadeddata",function(){this.m=!0}.bind(e)),gt(e.c,e.b,"loading",function(){this.h=!1,Rn(this)}.bind(e)),gt(e.c,e.a,"playing",function(){this.h=!1,Rn(this)}.bind(e)),gt(e.c,e.a,"pause",function(){Rn(this)}.bind(e)),gt(e.c,e.b,"unloading",function(){this.h=!0,Rn(this)}.bind(e)),gt(e.c,e.a,"ended",function(){t.setTimeout(function(){this.a&&this.a.ended&&(this.h=!0,Rn(this))}.bind(this),5e3)}.bind(e))}(this)}function Rn(t){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new Et("caststatuschanged")),Mn(this)||_n(this,0))}.bind(t))}function Mn(t){return!(!t.j||!t.a.duration&&!t.b.P())&&(Cn(t),t.j=!1,!0)}function Cn(t){_n(t,0,{contentId:t.b.Kb(),streamType:t.b.P()?"LIVE":"BUFFERED",duration:t.a.duration,contentType:""})}function Dn(t,e,n,i){t.o&&(t=bn(e),i?n.getCastChannel(i).send(t):n.broadcast(t))}function _n(t,e,n){var i=t.a.playbackRate,r=On;i={mediaSessionId:0,playbackRate:i,playerState:r=t.h?r.IDLE:t.b.vc()?r.Xc:t.a.paused?r.Zc:r.$c,currentTime:t.a.currentTime,supportedMediaCommands:15,volume:{level:t.a.volume,muted:t.a.muted}},n&&(i.media=n),Dn(t,{requestId:e,type:"MEDIA_STATUS",status:[i]},t.i)}(e=Tn.prototype).destroy=function(){return xn(this),Sn&&An(this),this.H=this.A=this.g=null,this.b=this.h=!1,this.m=this.l=this.f=this.c=this.a=this.i=null,Promise.resolve()},e.Z=function(){return this.b},e.Yb=function(){return this.v},e.init=function(){if(t.chrome&&chrome.cast&&chrome.cast.isAvailable){delete t.__onGCastApiAvailable,this.h=!0,this.g();var e=new chrome.cast.SessionRequest(this.K);e=new chrome.cast.ApiConfig(e,this.Bc.bind(this),this.Wd.bind(this),"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),En&&setTimeout(this.g.bind(this),20),(e=Sn)&&e.status!=chrome.cast.SessionStatus.STOPPED?this.Bc(e):Sn=null}else t.__onGCastApiAvailable=function(t){t&&this.init()}.bind(this)},e.ac=function(t){this.i=t,this.b&&In({type:"appData",appData:this.i})},e.cast=function(t){return this.h?En?this.b?Promise.reject(new M(1,8,8002)):(this.f=new z,chrome.cast.requestSession(this.Vb.bind(this,t),this.zc.bind(this)),this.f):Promise.reject(new M(1,8,8001)):Promise.reject(new M(1,8,8e3))},e.vb=function(){this.b&&(xn(this),Sn&&(An(this),Sn.stop(function(){},function(){}),Sn=null))},e.get=function(t,e){if("video"==t){if(0<=ln.indexOf(e))return this.Lc.bind(this,t,e)}else if("player"==t){if(pn[e]&&!this.get("player","isLive")())return function(){};if(0<=yn.indexOf(e))return this.Lc.bind(this,t,e);if(0<=gn.indexOf(e))return this.se.bind(this,t,e);if(dn[e])return this.Ic.bind(this,t,e)}return this.Ic(t,e)},e.set=function(t,e,n){this.a[t][e]=n,In({type:"set",targetName:t,property:e,value:n})},e.Vb=function(t,e){Sn=e,e.addUpdateListener(this.l),e.addMessageListener("urn:x-cast:com.google.shaka.v2",this.m),this.Ac(),In({type:"init",initState:t,appData:this.i}),this.f.resolve()},e.zc=function(t){var e=8003;switch(t.code){case"cancel":e=8004;break;case"timeout":e=8005;break;case"receiver_unavailable":e=8006}this.f.reject(new M(2,8,e,t))},e.Ic=function(t,e){return this.a[t][e]},e.Lc=function(t,e){In({type:"call",targetName:t,methodName:e,args:Array.prototype.slice.call(arguments,2)})},e.se=function(t,e){var n=Array.prototype.slice.call(arguments,2),i=new z,r=this.o.toString();return this.o++,this.c[r]=i,In({type:"asyncCall",targetName:t,methodName:e,args:n,id:r}),i},e.Bc=function(t){var e=this.u();this.f=new z,this.j=!0,this.Vb(e,t)},e.Wd=function(t){En="available"==t,this.g()},e.Ac=function(){var t=!!Sn&&"connected"==Sn.status;if(this.b&&!t){for(var e in this.H(),this.a)this.a[e]={};xn(this)}this.v=(this.b=t)?Sn.receiver.friendlyName:"",this.g()},e.Pd=function(t,e){var n=wn(e);switch(n.type){case"event":var i=n.event;this.A(n.targetName,new Et(i.type,i));break;case"update":for(var r in i=n.update)for(var a in n=this.a[r]||{},i[r])n[a]=i[r][a];this.j&&(this.M(),this.j=!1);break;case"asyncComplete":if(r=n.id,n=n.error,a=this.c[r],delete this.c[r],a)if(n){for(i in r=new M(n.severity,n.category,n.code),n)r[i]=n[i];a.reject(r)}else a.resolve()}},kn.prototype.addEventListener=function(t,e){this.Db.push(t,e)},kn.prototype.removeEventListener=function(t,e){this.Db.remove(t,e)},kn.prototype.dispatchEvent=function(t){for(var e=this.Db.get(t.type)||[],n=0;n(f=f||0))if(l+1=f)break;f=Math.ceil((f-d)/p)-1}else{if(1/0==u)break;if(d/r>=u)break;f=Math.ceil((u*r-d)/p)-1}0>24&255,t>>16&255,t>>8&255,255&t)}function pi(t,e,n,i){var r,a=(new ui).Y("sidx",function(t){r=function(t,e,n,i){var r=[];i.s.F(4);var a=i.s.C();if(0==a)throw new M(2,3,3005);if(0==i.version)var o=i.s.C(),s=i.s.C();else o=i.s.Sa(),s=i.s.Sa();i.s.F(2);var u=i.s.eb();for(t=t+i.size+s,s=0;s>>31;c&=2147483647;var l=i.s.C();if(i.s.F(4),1==h)throw new M(2,3,3006);r.push(new ii(r.length,o/a-e,(o+l)/a-e,function(){return n},t,t+c-1)),o+=l,t+=c}return i.ra.stop(),r}(e,i,n,t)});if(t&&a.parse(t),r)return r;throw new M(2,3,3004)}function mi(t){this.a=t}function vi(t,e){for(;t.a.length&&t.a[t.a.length-1].startTime>=e;)t.a.pop();for(;t.a.length&&0>=t.a[0].endTime;)t.a.shift();if(0!=t.a.length){var n=t.a[0];n.startTime=e&&!(n&1<<8-e);e++);if(8t||n&&t>=n?null:Math.floor(t/i)},getSegmentReference:function(t){var e=t*i,h=e+i;return n&&(h=Math.min(h,n)),0>h||n&&e>=n?null:new ii(t,e,h,function(){var n=Wn(o,u,t+r,s,e*a);return kt(c,[n])},0,null)}}}(t,a)):(i=e=null,t.ba.id&&t.w.id&&(e=n[i=t.ba.id+","+t.w.id]),o=function(t,e){for(var n=[],i=0;ithis.G.byteLength&&si();var e=new Uint8Array(this.G.buffer,this.G.byteOffset+this.a,t);return this.a+=t,new Uint8Array(e)},ri.prototype.readBytes=ri.prototype.Ea,ri.prototype.F=function(t){this.a+t>this.G.byteLength&&si(),this.a+=t},ri.prototype.skip=ri.prototype.F,ri.prototype.Oc=function(t){this.at||t>this.G.byteLength)&&si(),this.a=t},ri.prototype.seek=ri.prototype.seek,ri.prototype.Xb=function(){for(var t=this.a;this.ga()&&0!=this.G.getUint8(this.a);)this.a+=1;return t=new Uint8Array(this.G.buffer,this.G.byteOffset+t,this.a-t),this.a+=1,Ot(t)},ri.prototype.readTerminatedString=ri.prototype.Xb,S("shaka.util.Mp4Parser",ui),ui.prototype.D=function(t,e){var n=fi(t);return this.c[n]=0,this.b[n]=e,this},ui.prototype.box=ui.prototype.D,ui.prototype.Y=function(t,e){var n=fi(t);return this.c[n]=1,this.b[n]=e,this},ui.prototype.fullBox=ui.prototype.Y,ui.prototype.stop=function(){this.a=!0},ui.prototype.stop=ui.prototype.stop,ui.prototype.parse=function(t,e){var n=new Uint8Array(t);for(n=new ri(new DataView(n.buffer,n.byteOffset,n.byteLength),0),this.a=!1;n.ga()&&!this.a;)this.Ab(0,n,e)},ui.prototype.parse=ui.prototype.parse,ui.prototype.Ab=function(t,e,n){var i=e.W(),r=e.C(),a=e.C();switch(r){case 0:r=e.G.byteLength-i;break;case 1:r=e.Sa()}var o=this.b[a];if(o){var s=null,u=null;1==this.c[a]&&(s=(u=e.C())>>>24,u&=16777215),a=i+r,n&&a>e.G.byteLength&&(a=e.G.byteLength),e=0<(a-=e.W())?e.Ea(a):new Uint8Array(0),o({ra:this,Hc:n||!1,version:s,flags:u,s:e=new ri(new DataView(e.buffer,e.byteOffset,e.byteLength),0),size:r,start:i+t})}else e.F(i+r-e.W())},ui.prototype.parseNext=ui.prototype.Ab,ui.children=ci,ui.sampleDescription=hi,ui.allData=li,ui.typeToString=di,S("shaka.media.SegmentIndex",mi),mi.prototype.destroy=function(){return this.a=null,Promise.resolve()},mi.prototype.destroy=mi.prototype.destroy,mi.prototype.find=function(t){for(var e=this.a.length-1;0<=e;--e){var n=this.a[e];if(t>=n.startTime&&t(t-=this.a[0].position)||t>=this.a.length?null:this.a[t]},mi.prototype.get=mi.prototype.get,mi.prototype.offset=function(t){for(var e=0;ea.startTime?0==n&&e.push(a):(.1t)return void this.a.splice(0,e);this.a=[]},mi.prototype.evict=mi.prototype.Hb,yi.prototype.ga=function(){return this.a.ga()},Ti.prototype.parse=function(t,e,n,i){var r;if(440786851!=gi(e=new yi(new DataView(e))).id)throw new M(2,3,3008);var a=gi(e);if(408125543!=a.id)throw new M(2,3,3009);for(e=a.a.byteOffset,a=new yi(a.a),r=null;a.ga();){var o=gi(a);if(357149030==o.id){r=o;break}}if(!r)throw new M(2,3,3010);for(a=new yi(r.a),r=1e6,o=null;a.ga();){var s=gi(a);if(2807729==s.id)r=wi(s);else if(17545==s.id)if(4==(o=s).a.byteLength)o=o.a.getFloat32(0);else{if(8!=o.a.byteLength)throw new M(2,3,3003);o=o.a.getFloat64(0)}}if(null==o)throw new M(2,3,3011);if(r=o*(a=r/1e9),475249515!=(t=gi(new yi(new DataView(t)))).id)throw new M(2,3,3007);return function(t,e,n,i,r,a){function o(){return r}var s=[];t=new yi(t.a);for(var u=null,c=null;t.ga();){var h=gi(t);if(187==h.id){var l=Ei(h);l&&(h=n*l.Xe,l=e+l.re,null!=u&&s.push(new ii(s.length,u-a,h-a,o,c,l-1)),u=h,c=l)}}return null!=u&&s.push(new ii(s.length,u-a,i-a,o,c,null)),s}(t,e,a,r,n,i)};var Ri={},Mi={};function Ci(t,e,n,i){var r=i;return r||1<(i=new D(t).aa.split("/").pop().split(".")).length&&(i=i.pop().toLowerCase(),r=Mi[i]),r?Promise.resolve(r):((n=pt([t],n)).method="HEAD",e.request(0,n).promise.then(function(e){return(e=e.headers["content-type"])&&(e=e.toLowerCase()),(r=Ri[e])?r:Promise.reject(new M(2,4,4e3,t))},function(t){return t.severity=2,Promise.reject(t)}))}function Di(t,e){this.f=t,this.l=e,this.c=this.b=1/0,this.a=1,this.j=this.h=0,this.i=!0,this.g=0}function _i(){this.a=this.b=null,this.h=[],this.c=null,this.j=[],this.i=1,this.l={},this.m=0,this.o=new x(5),this.g=null,this.f=new ct}function Oi(t){var e=Date.now(),n=t.a.networkingEngine.request(0,pt(t.h,t.b.retryParameters));return ht(t.f,n),n.promise.then(function(e){if(t.a)return function(t,e,n){if(!(e=ti(e,"MPD")))throw new M(2,4,4001,n);return e=ei(e,t.b.retryParameters,t.b.dash.xlinkFailGracefully,n,t.a.networkingEngine),ht(t.f,e),e.promise.then(function(e){return function(t,e,n){n=[n];var i=Un(e,"Location").map(Bn).filter(xt);0e.m||(e.g=t.setTimeout(e.Pe.bind(e),1e3*Math.max(3,e.m-n,k(e.o))))}function Fi(t,e,n){e=e||{contentType:"",mimeType:"",codecs:"",containsEmsgBoxes:!1,frameRate:void 0,Tb:null},n=n||e.ea;var i=Un(t,"BaseURL").map(Bn),r=t.getAttribute("contentType")||e.contentType,a=t.getAttribute("mimeType")||e.mimeType,o=t.getAttribute("codecs")||e.codecs,s=Fn(t,"frameRate",zn)||e.frameRate,u=!!Un(t,"InbandEventStream").length,c=Un(t,"AudioChannelConfiguration");return c=function(t){for(var e=0;e>=1;return t}}}return null}(c)||e.Tb,r||(r=Hi(a,o)),{ea:kt(n,i),fb:Ln(t,"SegmentBase")||e.fb,ta:Ln(t,"SegmentList")||e.ta,hb:Ln(t,"SegmentTemplate")||e.hb,width:Fn(t,"width",Xn)||e.width,height:Fn(t,"height",Xn)||e.height,contentType:r,mimeType:a,codecs:o,frameRate:s,containsEmsgBoxes:u||e.containsEmsgBoxes,id:t.getAttribute("id"),Tb:c}}function Vi(t,e,n,i){return(e=pt(e=kt(e,[n]),t.b.retryParameters)).method=i,e=t.a.networkingEngine.request(0,e),ht(t.f,e),e.promise.then(function(t){if("HEAD"==i){if(!t.headers||!t.headers.date)return 0;t=t.headers.date}else t=Ot(t.data);return t=Date.parse(t),isNaN(t)?0:t-Date.now()})}function Hi(t,e){return xe[Dt(t,e)]?"text":t.split("/")[0]}function Ki(t,e,n,i){this.uri=t,this.type=e,this.a=n,this.segments=i||null}function qi(t,e,n,i){this.id=t,this.name=e,this.a=n,this.value=i||null}function Gi(t,e){this.name=t,this.value=e}function Xi(t,e,n){return n=n||null,(t=t.getAttribute(e))?t.value:n}function zi(t,e){return t.filter(function(t){return t.name==e})}function Yi(t,e){var n=zi(t,e);return n.length?n[0]:null}function $i(t,e,n){return t.filter(function(t){var i=t.getAttribute("TYPE");return t=t.getAttribute("GROUP-ID"),i.value==e&&t.value==n})}function Wi(t,e){return kt([t],[e])[0]}function Ji(t){this.b=t,this.a=0}function Qi(t){Zi(t,/[ \t]+/gm)}function Zi(t,e){e.lastIndex=t.a;var n=e.exec(t.b);return n=null==n?null:{position:n.index,length:n[0].length,we:n},t.a==t.b.length||null==n||n.position!=t.a?null:(t.a+=n.length,n.we)}function tr(t){return t.a==t.b.length?null:(t=Zi(t,/[^ \t\n]*/gm))?t[0]:null}function er(t,e,n){var i=(e=(e=Ot(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(i[0]))throw new M(2,4,4015);e=0;for(var r=1;r>4)&&2!=i||e(),3==i&&(i=t.ca(),t.F(i)),1==t.C()>>8)return t.F(3),0!=(n=t.ca()>>6)&&1!=n||e(),0==t.ca()&&e(),n=t.ca(),i=t.eb(),t=t.eb(),(1073741824*((14&n)>>1)+((65534&i)<<14|(65534&t)>>1))/9e4;t.seek(n+188),71!=(i=t.ca())&&(t.seek(n+192),i=t.ca()),71!=i&&(t.seek(n+204),i=t.ca()),71!=i&&e(),t.Oc(1)}}(t[0].data);if("application/mp4"==r||0==r.indexOf("text/")){t=t[0].data;var e=Dt(r,a);if(xe[e]){var n=new Ae(null);n.f=new xe[e],t=n.Mb(t)}else t=0;return t}throw new M(2,4,4030)}.bind(t))}(t,e.uri,c,u,i,r).then(function(t){s.split("/").pop();for(var i=0;in.length||"data"!=n[0])throw new M(2,1,1004,e);if(2>(n=n.slice(1).join(":").split(",")).length)throw new M(2,1,1004,e);var i=n[0];n=t.decodeURIComponent(n.slice(1).join(","));var r=null;if(1<(i=i.split(";")).length&&(r=i[1]),"base64"==r)e=Kt(n).buffer;else{if(r)throw new M(2,1,1005,e);e=jt(n)}return{data:e,contentType:i[0]}},dt("data",or),S("shaka.hls.HlsParser",sr),(e=sr.prototype).configure=function(t){this.h=t},e.start=function(t,e){return this.c=e,this.l=t,wr(this,t).then(function(e){return function(t,e,n){if(0!=(e=er(t.u,e,n)).type)throw new M(2,4,4022);return function(t,e){var n=e.a,i=zi(e.a,"EXT-X-MEDIA").filter(function(t){return"SUBTITLES"==gr(t,"TYPE")}.bind(t)).map(function(t){return function(t,e){return gr(e,"TYPE"),lr(t,e,[]).then(function(t){return t.stream})}(this,t)}.bind(t));return Promise.all(i).then(function(t){var i=zi(n,"EXT-X-STREAM-INF").map(function(t){return function(t,e,n){var i=Xi(e,"CODECS","avc1.42E01E,mp4a.40.2").split(","),r=e.getAttribute("RESOLUTION"),a=null,o=null,s=Xi(e,"FRAME-RATE"),u=Number(gr(e,"BANDWIDTH"));if(r){var c=r.value.split("x");a=c[0],o=c[1]}n=zi(n.a,"EXT-X-MEDIA");var h=Xi(e,"AUDIO"),l=Xi(e,"VIDEO");if(h?n=$i(n,"AUDIO",h):l&&(n=$i(n,"VIDEO",l)),c=yr("text",i)){var f=Xi(e,"SUBTITLES");f&&((f=$i(n,"SUBTITLES",f)).length&&(t.v[f[0].id].stream.codecs=c)),i.splice(i.indexOf(c),1)}n=n.map(function(t){return lr(this,t,i)}.bind(t));var d=[],p=[];return Promise.all(n).then(function(t){if(h?d=t:l&&(p=t),t=!1,d.length||p.length)if(d.length)if(gr(e,"URI")==d[0].$b){var n="audio";t=!0}else n="video";else n="audio";else 1==i.length?(n=yr("video",i),n=r||s||n?"video":"audio"):(n="video",i=[i.join(",")]);return t?Promise.resolve():function(t,e,n,i){var r=gr(e,"URI");return r=Wi(t.l,r),t.a[r]?Promise.resolve(t.a[r]):fr(t,r,n,i,"und",!1,null,null).then(function(t){return this.a[r]?this.a[r]:this.a[r]=t}.bind(t))}(this,e,i,n)}.bind(t)).then(function(t){return t&&("audio"==t.stream.type?d=[t]:p=[t]),p&&cr(p),d&&cr(d),function(t,e,n,i,r,a,o){n.forEach(function(t){(t=t.stream)&&(t.width=Number(r)||void 0,t.height=Number(a)||void 0,t.frameRate=Number(o)||void 0)}.bind(t)),e.length||(e=[null]),n.length||(n=[null]);for(var s=[],u=0;u(n=this.a[s]).Sb&&(n.stream.presentationTimeOffset=-e,n.gb.offset(e))}else for(var u in this.b.ja(r),this.a)(s=this.a[u]).stream.presentationTimeOffset=e,s.gb.offset(-e),vi(s.gb,r);this.m={presentationTimeline:this.b,periods:[t],offlineSessionIds:[],minBufferTime:0}}.bind(t))}(this,e.data,t).then(function(){return Sr(this,this.i),this.m}.bind(this))}.bind(this))},e.stop=function(){return this.h=this.c=null,this.v={},this.H={},this.m=null,this.o.destroy()},e.update=function(){if(this.f!=kr.pa){var t,e=[];for(t in this.a)e.push(ur(this,this.a[t],t));return Promise.all(e)}},e.onExpirationUpdated=function(){};var Tr={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Er={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};function Sr(e,n){null!=e.i&&null!=n&&(e.j=t.setTimeout(e.M.bind(e),1e3*n))}function Ar(e,n){e.f=n,e.b&&e.b.Bb(e.f==kr.pa),e.f==kr.pa&&null!=e.j&&(t.clearTimeout(e.j),e.j=null,e.i=null)}sr.prototype.M=function(){this.c&&(this.j=null,this.update().then(function(){Sr(this,this.i)}.bind(this)).catch(function(t){this.c&&(t.severity=1,this.c.onError(t),Sr(this,0))}.bind(this)))};var xr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(t){var e=gr(t,"METHOD");return"SAMPLE-AES-CENC"!=e&&"SAMPLE-AES-CTR"!=e?null:(e=gr(t,"URI"),e=or.parse(e),e=Pt("com.widevine.alpha",[{initDataType:"cenc",initData:e=new Uint8Array(e.data)}]),(t=Xi(t,"KEYID"))&&(e.keyIds=[t.substr(2).toLowerCase()]),e)}},Ir="VOD",kr={pa:Ir,Yc:"EVENT",ic:"LIVE"};function Pr(t,e,n,i){this.a=t,this.u=e,this.o=n,this.v=i,this.h=new yt,this.b=null,this.g=!1,this.m=t.readyState,this.c=!1,this.j=this.A=-1,this.f=this.i=!1,e=this.l.bind(this),gt(this.h,t,"waiting",e),this.b=new Ft(e),Vt(this.b,.25)}function Nr(t,e,n){this.a=t,this.i=e,this.h=n,this.c=new yt,this.f=1,this.g=!1,this.b=null,0e?0:e,!t.g&&0>e&&(t.b=new Ft(function(){t.a.currentTime+=e/4}),Vt(t.b,.25))}function Dr(t,e,n,i,r,a){this.c=t,this.b=e,this.h=n,this.i=r,this.f=null,this.g=new Pr(t,e,n,a),e=this.Xd.bind(this),n=this.b.presentationTimeline,null==i?i=1/0>n.S()?n.Ka():n.la():0>i&&(i=n.la()+i),i=Or(this,Ur(this,i)),this.a=new Nr(t,e,i),this.f=new Ft(this.Ud.bind(this)),Vt(this.f,.25)}function _r(t){var e=Rr(t.a);return 0=n?n-t.h.durationBackoff:e}function Lr(t,e){var n=ne.bind(null,t.c.buffered),i=Math.max(t.b.minBufferTime||0,t.h.rebufferingGoal),r=t.b.presentationTimeline,a=r.Ka(),o=r.la(),s=r.S();3>o-a&&(a=o-3);var u=r.Ya(i),c=r.Ya(5);return i=r.Ya(i+5),e>=s?Or(t,e):e>o?o:e=u||n(e)?e:i}function Ur(t,e){var n=t.b.presentationTimeline.Ka();return e(n=t.b.presentationTimeline.la())?n:e}function jr(t,e,n,i,r,a,o){this.a=t,this.v=e,this.g=n,this.u=i,this.l=r,this.h=a,this.A=o,this.c=[],this.j=new yt,this.b=!1,this.i=-1,this.f=null,Fr(this)}function Br(t){var e=st(t);return e.eventElement=t.eventElement,e}function Fr(e){Vr(e),e.f=t.setTimeout(e.H.bind(e),250)}function Vr(e){e.f&&(t.clearTimeout(e.f),e.f=null)}function Hr(t,e){this.a=e,this.b=t,this.h=null,this.j=1,this.m=Promise.resolve(),this.g=[],this.i={},this.c={},this.o=!1,this.A=null,this.v=this.f=this.l=!1,this.u=0}function Kr(t){var e=_r(t.a.Qa);return t.b.periods[an(t.b,e)]}function qr(t){var e=t.c.video||t.c.audio;return e?t.b.periods[e.Ca]:null}function Gr(t){return zr(t,"audio")}function Xr(t){return zr(t,"video")}function zr(t,e){var n=t.c[e];return n?n.sa||n.stream:null}function Yr(t,e,n){Me(t.a.J,"text"),t.u++,t.v=!1;var i=t.u;return t.a.J.init({text:e},!1).then(function(){return ia(t,[e])}).then(function(){if(!t.f&&n&&t.u==i&&!t.c.text&&!t.v){var r=_r(t.a.Qa);t.c.text=ea(e,an(t.b,r)),ca(t,t.c.text,0)}})}function $r(t){t.v=!0,t.c.text&&(ha(t.c.text),delete t.c.text)}function Wr(t,e){var n=t.c.video;if(n){var i=n.stream;if(i)if(e){var r=i.trickModeVideo;r&&!n.sa&&(Qr(t,r,!1),n.sa=i)}else(i=n.sa)&&(n.sa=null,Qr(t,i,!0))}}function Jr(t,e,n){e.video&&Qr(t,e.video,n),e.audio&&Qr(t,e.audio,n)}function Qr(t,e,n){var i=t.c[e.type];if(!i&&"text"==e.type&&t.h.ignoreTextStreamFailures)Yr(t,e,!0);else if(i){var r=on(t.b,e);n&&r!=i.Ca?Zr(t):(i.sa&&(e.trickModeVideo?(i.sa=e,e=e.trickModeVideo):i.sa=null),(r=t.g[r])&&r.Ta&&(r=t.i[e.id])&&r.Ta&&i.stream!=e&&("text"==e.type&&ke(t.a.J,Dt(e.mimeType,e.codecs)),i.stream=e,i.xb=!0,n&&(i.za?i.Cb=!0:i.Da?(i.va=!0,i.Cb=!0):(ha(i),ua(t,i,!0)))))}}function Zr(t){for(var e in t.c){var n=t.c[e];n.za||n.va||(n.Da?n.va=!0:null==Pe(t.a.J,e)?null==n.ua&&ca(t,n,0):(ha(n),ua(t,n,!1)))}}function ta(t,e,n){var i=_r(t.a.Qa),r=an(t.b,i),a={},o=[];return e.variant&&e.variant.audio&&(a.audio=e.variant.audio,o.push(e.variant.audio)),e.variant&&e.variant.video&&(a.video=e.variant.video,o.push(e.variant.video)),e.text&&(a.text=e.text,o.push(e.text)),t.a.J.init(a,t.h.forceTransmuxTS).then(function(){if(!t.f){var e=t.b.presentationTimeline.S();return 1/0>e?t.a.J.ja(e):t.a.J.ja(Math.pow(2,32)),ia(t,o)}}).then(function(){if(!t.f)for(var e in a){var i=a[e];t.c[e]||(t.c[e]=ea(i,r,n),ca(t,t.c[e],0))}})}function ea(t,e,n){return{stream:t,type:t.type,Ma:null,ma:null,sa:null,xb:!0,Ca:e,endOfStream:!1,Da:!1,ua:null,va:!1,Cb:!1,za:!1,Zb:!1,$a:!1,Mc:n||0}}function na(t,e){var n=t.g[e];if(n)return n.promise;n={promise:new z,Ta:!1},t.g[e]=n;var i=t.b.periods[e].variants.map(function(t){var e=[];return t.audio&&e.push(t.audio),t.video&&e.push(t.video),t.video&&t.video.trickModeVideo&&e.push(t.video.trickModeVideo),e}).reduce(St,[]).filter(It);return i.push.apply(i,t.b.periods[e].textStreams),t.m=t.m.then(function(){if(!this.f)return ia(this,i)}.bind(t)).then(function(){this.f||(this.g[e].promise.resolve(),this.g[e].Ta=!0)}.bind(t)).catch(function(t){this.f||(this.g[e].promise.catch(function(){}),this.g[e].promise.reject(),delete this.g[e],this.a.onError(t))}.bind(t)),n.promise}function ia(t,e){e.map(function(t){return t.id}).filter(It);for(var n=[],i=0;ii?null:e):null}function oa(t){return!t.Da&&null==t.ua&&!t.va&&!t.za}function sa(t,e){var n=pt(e.c(),t.h.retryParameters);if(0!=e.b||null!=e.a){var i="bytes="+e.b+"-";null!=e.a&&(i+=e.a),n.headers.Range=i}return t.a.Oa.request(1,n).promise.then(function(t){return t.data})}function ua(t,e,n){e.va=!1,e.Cb=!1,e.za=!0,Me(t.a.J,e.type).then(function(){if(!this.f&&n)return this.a.J.flush(e.type)}.bind(t)).then(function(){this.f||(e.Ma=null,e.ma=null,e.za=!1,e.endOfStream=!1,ca(this,e,0))}.bind(t))}function ca(e,n,i){n.ua=t.setTimeout(e.Re.bind(e,n),1e3*i)}function ha(e){null!=e.ua&&(t.clearTimeout(e.ua),e.ua=null)}function la(t,e){$(t.A).then(function(){this.f||(this.a.onError(e),e.handled||this.h.failureCallback(e))}.bind(t))}function fa(t,e,n,i,r,a){if(200<=n&&299>=n&&202!=n)return r&&(i=r),{uri:i,data:e,headers:t,fromCache:!!t["x-shaka-from-cache"]};r=null;try{r=Ut(e)}catch(t){}throw new M(401==n||403==n?2:1,1,1001,i,n,r,t,a)}function da(t,e,n){var i=new da.b;Ct(e.headers,function(t,e){i.append(t,e)});var r,a=new da.a,o={body:e.body||void 0,headers:i,method:e.method,signal:a.signal,credentials:e.allowCrossSiteCredentials?"include":void 0},s=!1,u=!1;return e.retryParameters.timeout&&(r=setTimeout(function(){u=!0,a.abort()},e.retryParameters.timeout)),new W(o=(e=da.c)(t,o).then(function(e){return clearTimeout(r),e.arrayBuffer().then(function(i){var r={};return e.headers.forEach(function(t,e){r[e.trim()]=t}),fa(r,i,e.status,t,e.url,n)})}).catch(function(e){return clearTimeout(r),s?Promise.reject(new M(1,1,7001,t,n)):u?Promise.reject(new M(1,1,1003,t,n)):null==e.severity?Promise.reject(new M(1,1,1002,t,e,n)):Promise.reject(e)}),function(){return s=!0,a.abort(),Promise.resolve()})}function pa(t,e,n){var i=new pa.f;return new W(new Promise(function(r,a){for(var o in i.open(e.method,t,!0),i.responseType="arraybuffer",i.timeout=e.retryParameters.timeout,i.withCredentials=e.allowCrossSiteCredentials,i.onabort=function(){a(new M(1,1,7001,t,n))},i.onload=function(e){var i=(e=e.target).getAllResponseHeaders().trim().split("\r\n").reduce(function(t,e){var n=e.split(": ");return t[n[0].toLowerCase()]=n.slice(1).join(": "),t},{});try{var o=fa(i,e.response,e.status,t,e.responseURL,n);r(o)}catch(t){a(t)}},i.onerror=function(e){a(new M(1,1,1002,t,e,n))},i.ontimeout=function(){a(new M(1,1,1003,t,n))},e.headers)i.setRequestHeader(o.toLowerCase(),e.headers[o]);i.send(e.body)}),function(){return i.abort(),Promise.resolve()})}function ma(t){this.a={},this.c=Promise.resolve(),this.h=!1,this.i=t,this.f=this.b=this.g=0}function va(t,e,n,i,r){t.a[e]=t.a[e]||[],t.a[e].push({request:n,nc:i,Hd:r})}function ya(t,e){var n=Mt(t.a);t.a={},n.forEach(function(e){e.forEach(function(e){t.b+=e.nc})});var i=Promise.resolve().then(function(){return ga(t),Promise.all(n.map(function(n){return function(t,e,n){var i=Promise.resolve();return n.forEach(function(n){i=i.then(function(){return ga(t),function(t,e,n){return Promise.resolve().then(function(){return ga(t),e.request(1,n.request).promise}).then(function(e){return ga(t),t.g+=n.nc,t.f+=e.data.byteLength,t.i(t.b?t.g/t.b:0,t.f),n.Hd(e.data)})}(t,e,n)})}),i}(t,e,n)}))});return t.c=t.c.then(function(){return i}),i}function ga(t){if(t.h)throw new M(2,9,7001)}function ba(t,e){var n=this;this.c=t,this.b=t.objectStore(e),this.a=new z,t.onabort=function(t){t.preventDefault(),n.a.reject()},t.onerror=function(t){t.preventDefault(),n.a.reject()},t.oncomplete=function(){n.a.resolve()}}function wa(t){this.b=t,this.a=[]}function Ta(t,e){return Ea(t,e,"readwrite")}function Ea(t,e,n){var i=new ba(n=t.b.transaction([e],n),e);return t.a.push(i),i.promise().then(function(){at(t.a,i)},function(){at(t.a,i)}),i}function Sa(){this.a={}}function Aa(t,e){Ct(t.a,function(t,n){Ct(n.getCells(),function(n,i){e({$:t,O:n},i)})})}function xa(t,e,n){if(!(t=t.a[e]))throw new M(2,9,9013,"Could not find mechanism with name "+e);if(!(e=t.getCells()[n]))throw new M(2,9,9013,"Could not find cell with name "+n);return e}function Ia(){return Mt(ka).some(function(t){return!!(t=t())&&(t.destroy(),!0)})}Mi.m3u8=sr,Ri["application/x-mpegurl"]=sr,Ri["application/vnd.apple.mpegurl"]=sr,Pr.prototype.destroy=function(){var t=this.h.destroy();return this.v=this.u=this.a=this.h=null,null!=this.b&&(this.b.cancel(),this.b=null),t},Pr.prototype.cb=function(){this.f=!0,this.l()},Pr.prototype.l=function(){if(0!=this.a.readyState){if(this.a.seeking){if(!this.g)return}else this.g=!1;if(!this.a.paused){this.a.readyState!=this.m&&(this.c=!1,this.m=this.a.readyState);var t=this.o.smallGapLimit,e=this.a.currentTime,n=this.a.buffered;t:{if(n&&n.length&&!(1==n.length&&1e-6>n.end(0)-n.start(0))){var i=.1;/(Edge\/|Trident\/|Tizen)/.test(navigator.userAgent)&&(i=.5);for(var r=0;re&&(0==r||n.end(r-1)-e<=i)){i=r;break t}}i=null}if(null==i){if(n=this.a.currentTime,e=this.a.buffered,3>this.a.readyState&&0=e.start(i)&&n=a)){t=(a=r-e)<=t;var o=!1;.001>a||(t||this.c||(this.c=!0,(e=new Et("largegap",{currentTime:e,gapSize:a})).cancelable=!0,this.v(e),this.o.jumpLargeGaps&&!e.defaultPrevented&&(o=!0)),!t&&!o)||(0!=i&&n.end(i-1),this.a.currentTime=r)}}}}},(e=Nr.prototype).destroy=function(){var t=this.c.destroy();return this.c=null,null!=this.b&&(this.b.cancel(),this.b=null),this.i=this.a=null,t},e.Xa=function(){return this.f},e.Vd=function(){var t=this.g||0>this.f?0:this.f;this.a.playbackRate&&this.a.playbackRate!=t&&Cr(this,this.a.playbackRate)},e.Dc=function(){.001>Math.abs(this.a.currentTime-this.h)?this.Ec():(bt(this.c,this.a,"seeking",this.Ec.bind(this)),this.a.currentTime=0==this.a.currentTime?this.h:this.a.currentTime)},e.Ec=function(){var t=this;gt(this.c,this.a,"seeking",function(){return t.i()})},(e=Dr.prototype).destroy=function(){var t=Promise.all([this.a.destroy(),this.g.destroy()]);return this.g=this.a=null,null!=this.f&&(this.f.cancel(),this.f=null),this.i=this.h=this.b=this.c=null,t},e.Xa=function(){return this.a.Xa()},e.cb=function(){this.g.cb()},e.Ud=function(){if(0!=this.c.readyState&&!this.c.paused){var t=this.c.currentTime,e=this.b.presentationTimeline,n=e.Ka();3>(e=e.la())-n&&(n=e-3),tthis.a.currentTime?1:e.info.endTime=i,n=!(n=this.v).g||"ended"==n.g.readyState,e=e||this.a.ended||n,this.b?(n=Math.max(this.g.minBufferTime||0,this.u.rebufferingGoal),(e||t>=n)&&0!=this.b&&(this.b=!1,this.l(!1))):!e&&.5>t&&1!=this.b&&(this.b=!0,this.l(!0)),this.c.forEach(this.m.bind(this,!1))},(e=Hr.prototype).destroy=function(){for(var t in this.c)ha(this.c[t]);return this.h=this.c=this.i=this.g=this.m=this.b=this.a=null,this.f=!0,Promise.resolve()},e.configure=function(t){this.h=t,this.A=new Y({maxAttempts:Math.max(t.retryParameters.maxAttempts,2),baseDelay:t.retryParameters.baseDelay,backoffFactor:t.retryParameters.backoffFactor,fuzzFactor:t.retryParameters.fuzzFactor,timeout:0},!0)},e.init=function(){var t=_r(this.a.Qa);return(t=this.a.yc(this.b.periods[an(this.b,t)])).variant||t.text?ta(this,t).then(function(){!this.f&&this.a&&this.a.Ld&&this.a.Ld()}.bind(this)):Promise.reject(new M(2,5,5005))},e.Re=function(t){if(!this.f&&!t.Da&&null!=t.ua&&!t.za)if(t.ua=null,t.va)ua(this,t,t.Cb);else{try{var e=function(t,e){var n=_r(t.a.Qa),i=ra(t,e,n),r=on(t.b,e.stream),a=an(t.b,i),o=function(t,e,n){return"text"==e?null==(t=t.a).b||t.b=t.b.presentationTimeline.S())return e.endOfStream=!0,null;if(e.endOfStream=!1,e.Ca=a,a!=r)return null;if(o>=s)return.5;if(a=function(t,e){return"text"==e?t.a.b:ee(Ne(t,e))}(t.a.J,e.type),!(a=function(t,e,n,i,r){if(e.ma&&e.stream==e.Ma)return aa(t,e,r,e.ma.position+1);if(null==(n=e.ma?e.stream.findSegmentPosition(Math.max(0,t.b.periods[on(t.b,e.Ma)].startTime+e.ma.endTime-t.b.periods[r].startTime)):e.stream.findSegmentPosition(Math.max(0,(i||n)-t.b.periods[r].startTime))))return null;var a=null;return null==i&&(a=aa(t,e,r,Math.max(0,n-1))),a||aa(t,e,r,n)}(t,e,n,a,r)))return 1;var u=1/0;return Mt(t.c).forEach(function(e){u=Math.min(u,ra(t,e,n))}),i>=u+t.b.presentationTimeline.a?1:(e.Mc=0,function(t,e,n,i,r){var a=t.b.periods[i],o=e.stream,s=t.b.presentationTimeline.S(),u=t.b.periods[i+1];i=function(t,e,n,i,r){return e.xb?(n=function(t,e,n,i,r){return"text"==e?(t.a.g=n,(t=t.a).i=i,t.h=r,Promise.resolve()):Promise.all([Ce(t,e,t.bd.bind(t,e)),Ce(t,e,t.Ge.bind(t,e,n)),Ce(t,e,t.De.bind(t,e,i,r))])}(t.a.J,e.type,t.b.periods[n].startTime-e.stream.presentationTimeOffset,i,r),e.stream.initSegmentReference?(t=sa(t,e.stream.initSegmentReference).then(function(t){if(!this.f)return Re(this.a.J,e.type,t,null,null)}.bind(t)).catch(function(t){return e.xb=!0,Promise.reject(t)}),Promise.all([n,t])):n):Promise.resolve()}(t,e,i,Math.max(0,a.startTime-.1),u?u.startTime:s),e.Da=!0,e.xb=!1,s=sa(t,r),Promise.all([i,s]).then(function(t){if(!this.f&&!this.l)return function(t,e,n,i,r,a,o){return r.containsEmsgBoxes&&(new ui).Y("emsg",t.he.bind(t,i,a)).parse(o),function(t,e,n){var i=Math.max(t.h.bufferBehind,t.b.presentationTimeline.a),r=Pe(t.a.J,e.type);return null==r?Promise.resolve():0>=(n=n-r-i)?Promise.resolve():t.a.J.remove(e.type,r,r+n).then(function(){}.bind(t))}(t,e,n).then(function(){if(!this.f)return Re(this.a.J,e.type,o,a.startTime,a.endTime)}.bind(t)).then(function(){if(!this.f)return e.Ma=r,e.ma=a,Promise.resolve()}.bind(t))}(this,e,n,a,o,r,t[1])}.bind(t)).then(function(){this.f||this.l||(e.Da=!1,e.Zb=!1,e.va||this.a.cb(),ca(this,e,0),function(t,e){if(!t.o&&(t.o=Mt(t.c).every(function(t){return"text"==t.type||!t.va&&!t.za&&t.ma}),t.o)){var n=on(t.b,e);for(t.g[n]||na(t,n).then(function(){this.f||this.a.xc()}.bind(t)).catch(At),n=0;n=t.endTime)return null;var n=new VTTCue(t.startTime,t.endTime,t.payload);n.lineAlign=t.lineAlign,n.positionAlign=t.positionAlign,n.size=t.size;try{n.align=t.textAlign}catch(t){}if("center"==t.textAlign&&"center"!=n.align&&(n.align="middle"),2==t.writingDirection?n.vertical="lr":3==t.writingDirection&&(n.vertical="rl"),1==t.lineInterpretation&&(n.snapToLines=!1),null!=t.line&&(n.line=t.line),null!=t.position&&(n.position=t.position),t.region.id.length){var i=e.filter(function(e){return e.id==t.region.id});i.length&&(n.region=i[0])}return n}function to(t,e){var n=new VTTRegion,i=t.b.offsetWidth,r=t.b.offsetHeight;return n.id=e.id,n.regionAnchorX=e.regionAnchorX,n.regionAnchorY=e.regionAnchorY,n.scroll=e.scroll,2==e.heightUnits&&(n.lines=e.height),n.width=0==e.widthUnits?100*e.width/i:e.width,0==e.viewportAnchorUnits?(n.viewportAnchorX=100*e.viewportAnchorX/i,n.viewportAnchorY=100*e.viewportAnchorY/r):(n.viewportAnchorX=e.viewportAnchorX,n.viewportAnchorY=e.viewportAnchorY),n}function eo(t,e){for(var n=t.c,i=[],r=0;re,u&&c)return v(r,a.updateManifestExpiration(n.key(),e),0);r.X(0)}})})}).catch(function(){})},Ri["application/x-offline-manifest"]=Wa,S("shaka.offline.OfflineScheme",Ja),Ja.a=function(t){return Z(t={uri:t,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}})},Ja.b=function(t,e){var n=new Sa;return tt(ut([n],function(){return f(function t(){var i,r;return T(t,function(t){switch(t.B){case 1:return v(t,n.init(),2);case 2:return v(t,xa(n,e.$(),e.O()),3);case 3:return v(t,t.L.getSegments([e.key()]),4);case 4:return i=t.L,r=i[0],t.return({uri:e,data:r.data,headers:{}})}})})}))},dt("offline",Ja),S("shaka.text.SimpleTextDisplayer",Qa),Qa.prototype.remove=function(t,e){return!!this.a&&(eo(this,function(n){return!(n.startTime>=e||n.endTime<=t)}),!0)},Qa.prototype.remove=Qa.prototype.remove,Qa.prototype.append=function(e){var n=[];if(t.VTTRegion){var i=e.map(function(t){return t.region});i=i.filter(It);for(var r=0;r=t.height});return u.length&&(u.sort(function(t,e){return e.height-t.height}),o=u.filter(function(t){return t.height==u[0].height})),o.sort(function(t,e){return t.bandwidth-e.bandwidth}),o.length&&n.push(o[Math.floor(o.length/2)]),n.push.apply(n,e.filter(function(t){return"text"==t.type})),n}(t.a.getConfiguration().preferredAudioLanguage,e)},progressCallback:function(t,e){if(t||e)return null},usePersistentLicense:!0}}function xo(t,e,n){n.forEach(function(n){return Io(t,e,n)})}function Io(t,e,n){var i=null;if(t.c){var r=t.c.filter(function(t){return"variant"==t.type})[0];r&&(i=$e(n,r))}var a=r=null;i&&(i.audio&&(r=i.audio),i.video&&(a=i.video)),He(e,r,a,n),Ve(n,t.a.getConfiguration().restrictions,{width:1/0,height:1/0})}function ko(t){if(!t.a)throw new M(2,9,7001)}function Po(){if(!Ia())throw new M(2,9,9e3)}function No(t,e){var n=t.a.getConfiguration().streaming.retryParameters;return n=pt(e.c(),n),0==e.b&&null==e.a||(n.headers.Range="bytes="+e.b+"-"+(null==e.a?"":e.a)),n}no.registerSupportPlugin=function(t,e){io[t]=e},no.isBrowserSupported=function(){return!!(t.Promise&&t.Uint8Array&&Array.prototype.forEach&&t.MediaSource&&MediaSource.isTypeSupported&&t.MediaKeys&&t.navigator&&t.navigator.requestMediaKeySystemAccess&&t.MediaKeySystemAccess&&t.MediaKeySystemAccess.prototype.getConfiguration)},no.probeSupport=function(){return function(){var t=[],e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],n=[{videoCapabilities:e,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:e}],i={};return"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").forEach(function(e){var r=navigator.requestMediaKeySystemAccess(e,n).then(function(t){var n=t.getConfiguration().sessionTypes;return n=!!n&&0<=n.indexOf("persistent-license"),0<=navigator.userAgent.indexOf("Tizen 3")&&(n=!1),i[e]={persistentState:n},t.createMediaKeys()}).catch(function(){i[e]=null});t.push(r)}),Promise.all(t).then(function(){return i})}().then(function(t){var e=function(){var t,e={};for(t in Ri)e[t]=!0;for(var n in Mi)e[n]=!0;return["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"].forEach(function(t){e[t]=!!Ri[t]}),["mpd","m3u8","ism"].forEach(function(t){e[t]=!!Mi[t]}),e}(),n=function(){var t={};return'video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="av1",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").forEach(function(e){t[e]=!!xe[e]||MediaSource.isTypeSupported(e)||Ee(e);var n=e.split(";")[0];t[n]=t[n]||t[e]}),t}();for(var i in t={manifest:e,media:n,drm:t},io)t[i]=io[i]();return t})},no.prototype.sb=function(t,e){var n=this;return f(function i(){return T(i,function(i){switch(i.B){case 1:if(void 0===e&&(e=!0),!n.f){i.X(2);break}return v(i,n.detach(),2);case 2:if(n.f=t,gt(n.o,n.f,"error",n.be.bind(n)),e)return n.i=new Ie(n.f),v(i,n.i.j,0);i.X(0)}})})},no.prototype.attach=no.prototype.sb,no.prototype.detach=function(){var t=this;return f(function e(){return T(e,function(e){switch(e.B){case 1:return t.f?v(e,t.jb(!1),2):e.return();case 2:t.o.na(t.f,"error"),t.f=null,e.B=0}})})},no.prototype.detach=no.prototype.detach,no.prototype.load=function(t,e,n){var i=this;return f(function r(){var a,o,s,u,c,h,l,d,p,m,g;return T(r,function(r){switch(r.B){case 1:if(!i.f)throw new M(2,7,7002);return o=new z,s=function(){return a=new M(2,7,7e3),o},i.dispatchEvent(new Et("loading")),u=Date.now(),r.qa=2,c=i.jb(),i.Ia=s,v(r,c,4);case 4:if(i.j=lo(),gt(i.o,i.f,"playing",i.kb.bind(i)),gt(i.o,i.f,"pause",i.kb.bind(i)),gt(i.o,i.f,"ended",i.kb.bind(i)),h=i.c.abrFactory,i.h=new h,i.h.configure(i.c.abr),i.v=new i.c.textDisplayFactory,i.v.setTextVisibility(i.Wa),a)throw a;return l=i,v(r,function(t,e,n){return f(function i(){var r,a;return T(i,function(i){switch(i.B){case 1:return v(i,Ci(e,t.u,t.c.manifest.retryParameters,n),2);case 2:return r=i.L,t.m=new r,t.m.configure(t.c.manifest),a={networkingEngine:t.u,filterNewPeriod:t.ub.bind(t),filterAllPeriods:t.dc.bind(t),onTimelineRegionAdded:t.ae.bind(t),onEvent:t.ib.bind(t),onError:t.Ua.bind(t)},i.return(t.m.start(e,a))}})})}(i,t,n),5);case 5:if(l.b=r.L,i.Eb=t,a)throw a;return function(t){if(t.b.periods.some(function(t){return t.variants.some(function(t){return t.video&&t.audio})})&&t.b.periods.forEach(function(t){t.variants=t.variants.filter(function(t){return t.video&&t.audio})}),0==t.b.periods.length)throw new M(2,4,4014)}(i),i.l=new Yt({Oa:i.u,onError:i.Ua.bind(i),zb:i.Md.bind(i),onExpirationUpdated:i.Jd.bind(i),onEvent:i.ib.bind(i)}),i.l.configure(i.c.drm),v(r,i.l.init(i.b,!1),6);case 6:if(a)throw a;return i.dc(i.b.periods),i.mb=Date.now()/1e3,i.M=i.c.preferredAudioLanguage,i.wa=i.c.preferredTextLanguage,i.fa=i.c.preferredAudioChannelCount,function(t){var e=t.b.presentationTimeline.S(),n=t.c.playRangeEnd,i=t.c.playRangeStart;0(a=n.indexOf(".",a)));)0!=a&&"\\"==n[a-1]||(r[o=n.substring(o,a).replace(/\\\./g,".")]={},r=r[o],o=a+1),a+=1;r[n.substring(o).replace(/\\\./g,".")]=e,t=i}return n=ot(this.c,t,ho(this),co(),""),ro(this),n},no.prototype.configure=no.prototype.configure,no.prototype.getConfiguration=function(){var t=ho(this);return ot(t,this.c,ho(this),co(),""),t},no.prototype.getConfiguration=no.prototype.getConfiguration,no.prototype.ve=function(){this.c=ho(this),ro(this)},no.prototype.resetConfiguration=no.prototype.ve,no.prototype.rd=function(){return this.f},no.prototype.getMediaElement=no.prototype.rd,no.prototype.sc=function(){return this.u},no.prototype.getNetworkingEngine=no.prototype.sc,no.prototype.Kb=function(){return this.Eb},no.prototype.getManifestUri=no.prototype.Kb,no.prototype.P=function(){return!!this.b&&this.b.presentationTimeline.P()},no.prototype.isLive=no.prototype.P,no.prototype.Ba=function(){return!!this.b&&this.b.presentationTimeline.Ba()},no.prototype.isInProgress=no.prototype.Ba,no.prototype.Cd=function(){if(!this.b||!this.b.periods.length)return!1;var t=this.b.periods[0].variants;return!!t.length&&!t[0].video},no.prototype.isAudioOnly=no.prototype.Cd,no.prototype.xe=function(){var t=0,e=0;return this.b&&(t=(e=this.b.presentationTimeline).Ka(),e=e.la()),{start:t,end:e}},no.prototype.seekRange=no.prototype.xe,no.prototype.keySystem=function(){return this.l?this.l.keySystem():""},no.prototype.keySystem=no.prototype.keySystem,no.prototype.drmInfo=function(){return this.l?this.l.b:null},no.prototype.drmInfo=no.prototype.drmInfo,no.prototype.wb=function(){return this.l?this.l.wb():1/0},no.prototype.getExpiration=no.prototype.wb,no.prototype.vc=function(){return this.qb},no.prototype.isBuffering=no.prototype.vc,no.prototype.jb=function(t){var e=this;return f(function n(){return T(n,function(n){switch(n.B){case 1:return e.xa?n.return():(void 0===t&&(t=!0),e.dispatchEvent(new Et("unloading")),v(n,function(t){if(!t.Ia)return Promise.resolve();var e=Promise.resolve();return t.m&&(e=t.m.stop(),t.m=null),Promise.all([e,t.Ia()])}(e),2));case 2:return e.rb||(e.rb=function(t){t.o&&(t.o.na(t.f,"loadeddata"),t.o.na(t.f,"playing"),t.o.na(t.f,"pause"),t.o.na(t.f,"ended"));var e=Promise.all([t.h?t.h.stop():null,t.i?t.i.destroy():null,t.l?t.l.destroy():null,t.g?t.g.destroy():null,t.A?t.A.destroy():null,t.a?t.a.destroy():null,t.m?t.m.stop():null,t.v?t.v.destroy():null]);return t.ya=!0,t.l=null,t.i=null,t.g=null,t.A=null,t.a=null,t.m=null,t.v=null,t.b=null,t.Eb=null,t.pb=[],t.K={},t.j=lo(),e}(e).then(function(){e.Uc(!1),e.rb=null})),v(n,e.rb,3);case 3:if(t)return e.i=new Ie(e.f),v(n,e.i.j,0);n.X(0)}})})},no.prototype.unload=no.prototype.jb,no.prototype.Xa=function(){return this.g?this.g.Xa():0},no.prototype.getPlaybackRate=no.prototype.Xa,no.prototype.Te=function(t){this.g&&Cr(this.g.a,t),this.a&&Wr(this.a,1!=t)},no.prototype.trickPlay=no.prototype.Te,no.prototype.fd=function(){this.g&&Cr(this.g.a,1),this.a&&Wr(this.a,!1)},no.prototype.cancelTrickPlay=no.prototype.fd,no.prototype.zd=function(){if(!this.b||!this.g)return[];var t=an(this.b,_r(this.g)),e=this.K[t]||{};return ze(this.b.periods[t],e.audio,e.video)},no.prototype.getVariantTracks=no.prototype.zd,no.prototype.yd=function(){if(!this.b||!this.g)return[];var t=an(this.b,_r(this.g)),e=this.K[t]||{};if(!e.text){var n=tn(this.b.periods[t].textStreams,this.wa,this.Va);n.length&&(e.text=n[0].id)}return Ye(this.b.periods[t],e.text).filter(function(t){return 0>this.nb.indexOf(t.id)}.bind(this))},no.prototype.getTextTracks=no.prototype.yd,no.prototype.Be=function(t){if(this.a){var e=Kr(this.a);t:{for(var n=0;n=t.a&&ee&&(e+=Math.pow(2,32)),e=e.toString(16)),this.Ua(new M(2,3,3016,t,e,this.f.error.message))}}},e.Md=function(t){var e=["output-restricted","internal-error"],n=Kr(this.a),i=!1,r=Object.keys(t),a=1==r.length&&"00"==r[0];r.length&&n.variants.forEach(function(n){var r=[];n.audio&&r.push(n.audio),n.video&&r.push(n.video),r.forEach(function(r){var o=n.allowedByKeySystem;r.keyId&&(r=t[a?"00":r.keyId],n.allowedByKeySystem=!!r&&0>e.indexOf(r)),o!=n.allowedByKeySystem&&(i=!0)})}),(r=rn(Gr(this.a),Xr(this.a),n.variants))&&!r.allowedByKeySystem&&vo(this,n),i&&(go(this),n=Qe(n.variants,this.M,this.Ha,this.fa),this.h.setVariants(n))},e.Jd=function(t,e){this.m&&this.m.onExpirationUpdated&&this.m.onExpirationUpdated(t,e),this.dispatchEvent(new Et("expirationupdated"))},S("shaka.offline.Storage",Eo),Eo.support=So,Eo.prototype.destroy=function(){return this.a=this.b=null,Promise.resolve()},Eo.prototype.destroy=Eo.prototype.destroy,Eo.prototype.configure=function(t){ot(this.b,t,Ao(this),{},"")},Eo.prototype.configure=Eo.prototype.configure,Eo.prototype.store=function(t,e,n){var i=this;return f(function r(){var a,o,s,u;return T(r,function(r){switch(r.B){case 1:return Po(),i.g?r.return(Promise.reject(new M(2,9,9006))):(i.g=!0,a=e||{},o=null,v(r,function(t,e,n,i){function r(){}var a,o,s,u=t.a.u,c=t.a.getConfiguration();return Ci(e,u,c.manifest.retryParameters,i).then(function(t){var i=this;ko(this),(o=new Yt({Oa:u,onError:n,zb:r,onExpirationUpdated:function(){},onEvent:function(){}})).configure(c.drm);var a={networkingEngine:u,filterAllPeriods:function(t){xo(i,o,t)},filterNewPeriod:function(t){Io(i,o,t)},onTimelineRegionAdded:function(){},onEvent:function(){},onError:n};return(s=new t).configure(c.manifest),s.start(e,a)}.bind(t)).then(function(t){return ko(this),a=t,o.init(a,this.b.usePersistentLicense)}.bind(t)).then(function(){return ko(this),function(t){var e=t.periods.map(function(t){return t.variants}).reduce(St,[]).map(function(t){var e=[];return t.audio&&e.push(t.audio),t.video&&e.push(t.video),e}).reduce(St,[]).filter(It);return t=t.periods.map(function(t){return t.textStreams}).reduce(St,[]),e.push.apply(e,t),Promise.all(e.map(function(t){return t.createSegmentIndex()}))}(a)}.bind(t)).then(function(){return ko(this),Wt(o)}.bind(t)).then(function(){return ko(this),s.stop()}.bind(t)).then(function(){return ko(this),{manifest:a,Gb:o}}.bind(t)).catch(function(t){if(s)return s.stop().then(function(){throw t});throw t})}(i,t,function(t){o=o||t},n),2));case 2:if(s=r.L,!(!s.manifest.presentationTimeline.P()&&!s.manifest.presentationTimeline.Ba()))throw new M(2,9,9005,t);if(ko(i),o)throw o;return u=new Sa,r.return(ut([u,s.Gb],function(){return f(function e(){var n,r,c,h,l,f,d;return T(e,function(e){switch(e.B){case 1:return function(t){t.qa=0,t.c=2}(e),v(e,u.init(),4);case 4:return ko(i),xo(i,s.Gb,s.manifest.periods),v(e,function(t){var e=null;if(Ct(t.a,function(t,n){Ct(n.getCells(),function(n,i){i.hasFixedKeySpace()||e||(e={path:{$:t,O:n},O:i})})}),e)return e;throw new M(2,9,9013,"Could not find a cell that supports add-operations")}(u),5);case 5:return n=e.L,ko(i),e.qa=6,v(e,function(t,e,n,i,r,a){var o,s=function(t,e,n){var i=null==e.expiration?1/0:e.expiration;return{offlineUri:null,originalManifestUri:t,duration:e.presentationTimeline.S(),size:0,expiration:i,tracks:e=Xe(e.periods[0]),appMetadata:n}}(r,i,a),u=new ma(function(e,n){s.size=n,t.b.progressCallback(s,e)});return ut([u],function(){return o=function(t,e,n,i,r,a,o){var s=new function(){this.a={}},u=r.periods.map(function(a){return function(t,e,n,i,r,a,o){var s=ze(o,null,null),u=Ye(o,null);s=t.b.trackSelectionCallback(s.concat(u)),null==t.c&&(t.c=s,xo(t,r,a.periods)),function(t){t.some(function(e){return t.some(function(t){return e!=t&&e.type==t.type&&e.kind==t.kind&&e.language==t.language})})}(s),a.periods.forEach(function(t){t.variants.forEach(function(t){var e=t.audio,n=t.video;if(e&&!n&&(i.a[e.id]=e.bandwidth||t.bandwidth),!e&&n&&(i.a[n.id]=n.bandwidth||t.bandwidth),e&&n){var r=e.bandwidth||393216,a=n.bandwidth||t.bandwidth-r;0>=a&&(a=t.bandwidth),i.a[e.id]=r,i.a[n.id]=a}}),t.textStreams.forEach(function(t){i.a[t.id]=52})});var c={};s.forEach(function(t){"variant"==t.type&&null!=t.audioId&&(c[t.audioId]=!0),"variant"==t.type&&null!=t.videoId&&(c[t.videoId]=!0),"text"==t.type&&(c[t.id]=!0)});var h={};return function(t){var e={};return t.periods.forEach(function(t){t.textStreams.forEach(function(t){e[t.id]=t}),t.variants.forEach(function(t){t.audio&&(e[t.audio.id]=t.audio),t.video&&(e[t.video.id]=t.video)})}),Mt(e)}(a).filter(function(t){return!!c[t.id]}).forEach(function(r){h[r.id]=function(t,e,n,i,r,a){var o={id:a.id,primary:a.primary,presentationTimeOffset:a.presentationTimeOffset||0,contentType:a.type,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,kind:a.kind,language:a.language,label:a.label,width:a.width||null,height:a.height||null,initSegmentKey:null,encrypted:a.encrypted,keyId:a.keyId,segments:[],variantIds:[]};r=r.presentationTimeline.Za();var s=a.id;return function(t,e,n){for(var i=null==(e=t.findSegmentPosition(e))?null:t.getSegmentReference(e);i;)n(i),i=t.getSegmentReference(++e)}(a,r,function(r){va(e,s,No(t,r),function(t,e,n){return n=n.endTime-n.startTime,To(t,e)*n}(i,a.id,r),function(e){return n.addSegments([{data:e}]).then(function(e){t.f.push(e[0]),o.segments.push({startTime:r.startTime,endTime:r.endTime,dataKey:e[0]})})})}),(r=a.initSegmentReference)&&va(e,s,No(t,r),.5*To(i,a.id),function(e){return n.addSegments([{data:e}]).then(function(e){t.f.push(e[0]),o.initSegmentKey=e[0]})}),o}(t,e,n,i,a,r)}),s.forEach(function(t){"variant"==t.type&&null!=t.audioId&&h[t.audioId].variantIds.push(t.id),"variant"==t.type&&null!=t.videoId&&h[t.videoId].variantIds.push(t.id)}),{startTime:o.startTime,streams:Mt(h)}}(t,e,n,s,i,r,a)}),c=i.b,h=function(t){return t.a.map(function(t){return t.ia.sessionId})}(i);if(c&&t.b.usePersistentLicense){if(!h.length)throw new M(2,9,9007,a);c.initData=[]}return{originalManifestUri:a,duration:r.presentationTimeline.S(),size:0,expiration:i.wb(),periods:u,sessionIds:t.b.usePersistentLicense?h:[],drmInfo:c,appMetadata:o}}(t,u,e,n,i,r,a),ya(u,t.a.u)}).then(function(){return o.size=s.size,o})}(i,n.O,s.Gb,s.manifest,t,a||{}),8);case 8:return r=e.L,ko(i),v(e,n.O.addManifests([r]),9);case 9:return c=e.L,ko(i),h=new Ka("manifest",n.path.$,n.path.O,c[0]),e.return(wo(h,r));case 6:return l=y(e),f=i.f,d=function(){},v(e,n.O.removeSegments(f,d),10);case 10:throw o||l;case 2:(function(t){t.h=[t.a],t.qa=0,t.c=0})(e),i.g=!1,i.c=null,i.f=[],function(t){var e=t.h.splice(0)[0];(e=t.a=t.a||e)?e.wc?t.B=t.qa||t.c:null!=e.X&&t.c=n.a.length)){for(var i=[],r=0;rnavigator.userAgent.indexOf("Trident/")||HTMLInputElement.prototype.addEventListener==Oo||(Ro=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Oo)}),Do(function(){}),Do(function(){if(t.MediaSource)if(t.cast&&cast.__platform__&&cast.__platform__.canDisplayType)!function(){var t=MediaSource.isTypeSupported,e=/^dv(?:he|av)\./;MediaSource.isTypeSupported=function(n){for(var i=n.split(/ *; */),r=i[0],a={},o=1;ot.textDecoration.indexOf("underline")&&t.textDecoration.push("underline");break;case"noUnderline":0<=t.textDecoration.indexOf("underline")&&at(t.textDecoration,"underline");break;case"lineThrough":0>t.textDecoration.indexOf("lineThrough")&&t.textDecoration.push("lineThrough");break;case"noLineThrough":0<=t.textDecoration.indexOf("lineThrough")&&at(t.textDecoration,"lineThrough");break;case"overline":0>t.textDecoration.indexOf("overline")&&t.textDecoration.push("overline");break;case"noOverline":0<=t.textDecoration.indexOf("overline")&&at(t.textDecoration,"overline")}}function Ms(t,e,n,i){return(t=Ds(t,n,i))?t:Cs(e,n,i)}function Cs(t,e,n){for(var i=Ps(t),r=0;rn.length)return null;var i=null,r=t;for(t=null;r&&!(t=r.getAttribute(e))&&(r=r.parentNode)instanceof Element;);if(e=t)for(t=0;tc[0].indexOf("--\x3e")&&(u=c[0],c.splice(0,1));var f=Fs(h=new Ji(c[0])),d=Zi(h,/[ \t]+--\x3e[ \t]+/g),p=Fs(h);if(null==f||null==d||null==p)throw new M(2,2,2001);for(c=new ae(f+l,p+l,c.slice(1).join("\n").trim()),Qi(h),l=tr(h);l;)Bs(c,l,o),Qi(h),l=tr(h);null!=u&&(c.id=u),o=c}o&&r.push(o)}return r},xe["text/vtt"]=js,xe['text/vtt; codecs="vtt"']=js,Vs.prototype.parseInit=function(t){var e=!1;if((new ui).D("moov",ci).D("trak",ci).D("mdia",ci).Y("mdhd",function(t){0==t.version?(t.s.F(4),t.s.F(4),this.a=t.s.C(),t.s.F(4)):(t.s.F(8),t.s.F(8),this.a=t.s.C(),t.s.F(8)),t.s.F(4)}.bind(this)).D("minf",ci).D("stbl",ci).Y("stsd",hi).D("wvtt",function(){e=!0}).parse(t),!this.a)throw new M(2,2,2008);if(!e)throw new M(2,2,2008)},Vs.prototype.parseMedia=function(t,e){var n=this;if(!this.a)throw new M(2,2,2008);var i,r=0,a=[],o=[],s=!1,u=!1,c=!1,h=null;if((new ui).D("moof",ci).D("traf",ci).Y("tfdt",function(t){s=!0,r=0==t.version?t.s.C():t.s.Sa()}).Y("tfhd",function(t){var e=t.flags;(t=t.s).F(4),1&e&&t.F(8),2&e&&t.F(4),h=8&e?t.C():null}).Y("trun",function(t){u=!0;var e=t.version,n=t.flags,i=(t=t.s).C();1&n&&t.F(4),4&n&&t.F(4);for(var r=[],o=0;o1){this.util.addClass(this.player.root,"xgplayer-is-definition");var i=["
    "];this.content.forEach(function(t){i.push("
  • "+t.textContent+"
  • ")}),this.content.some(function(t){return!!t.selected&&(i.push('

'+t.textContent+"

"),!0)});var r=n.querySelector(".xgplayer-definition");r?r.innerHTML='清晰度'+i.join(""):(e.innerHTML='清晰度'+i.join(""),n.appendChild(e))}["touchstart","click"].forEach(function(n){e.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation();var i=n.target||n.srcElement;if(i&&"li"===i.tagName.toLocaleLowerCase()){Array.prototype.forEach.call(i.parentNode.childNodes,function(e){t.util.removeClass(e,"definition")}),t.util.addClass(i,"definition"),i.parentNode.nextSibling.textContent=i.textContent;t.player_.configure({abr:{enabled:!1}}),t.content.some(function(e,n){return i.innerHTML.indexOf(e.textContent)>-1&&(t.player_.selectVariantTrack(t.content[n].track,!0),!0)})}else!i||"p"!==i.tagName.toLocaleLowerCase()&&"em"!==i.tagName.toLocaleLowerCase()||(t.util.addClass(e,"xgplayer-definition-active"),e.focus())},!1)}),e.addEventListener("blur",function(n){n.preventDefault(),n.stopPropagation(),t.util.removeClass(e,"xgplayer-definition-active")}),this.player.once("destroy",function(){e=null}),this.player.start=function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.player.config.url;var e=t.player.root;e.insertBefore(t.player.video,e.firstChild),t.util.removeClass(e,"none"),t.player.userTimer=setTimeout(function(){t.player.emit("blur")},t.player.config.inactive),setTimeout(function(){t.player.emit("complete")},1),t.player.reset=function(){}}}}}]),e}();s.isSupported=a.default.Player.isBrowserSupported(),e.default=s,t.exports=e.default},function(t,e,n){t.exports=n(3)}])}); \ No newline at end of file diff --git a/packages/xgplayer-shaka/package-lock.json b/packages/xgplayer-shaka/package-lock.json new file mode 100644 index 00000000..ef37bce8 --- /dev/null +++ b/packages/xgplayer-shaka/package-lock.json @@ -0,0 +1,3344 @@ +{ + "name": "byted-player-shaka", + "version": "0.1.2-0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "ajv": { + "version": "6.5.0", + "resolved": "http://npm.byted.org/ajv/-/ajv-6.5.0.tgz", + "integrity": "sha1-TIr/34CIfY8TLJxSq4otxNC3skw=", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0", + "uri-js": "^4.2.1" + } + }, + "ajv-keywords": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "anymatch": { + "version": "1.3.2", + "resolved": "http://npm.byted.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha1-VT3Lj5HjyImEXf26NMd3IbkLnXo=", + "dev": true, + "optional": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "http://npm.byted.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "optional": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", + "dev": true, + "optional": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true, + "optional": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true, + "optional": true + }, + "autoprefixer": { + "version": "7.2.6", + "resolved": "http://npm.byted.org/autoprefixer/-/autoprefixer-7.2.6.tgz", + "integrity": "sha1-JWZy+G98c12oScTwfQCKuwVgZ9w=", + "dev": true, + "requires": { + "browserslist": "^2.11.3", + "caniuse-lite": "^1.0.30000805", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^6.0.17", + "postcss-value-parser": "^3.2.3" + }, + "dependencies": { + "browserslist": { + "version": "2.11.3", + "resolved": "http://npm.byted.org/browserslist/-/browserslist-2.11.3.tgz", + "integrity": "sha1-/jYWeu0bvN5IJ+v+cTR6LMcLmbI=", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000792", + "electron-to-chromium": "^1.3.30" + } + } + } + }, + "babel-cli": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-cli/-/babel-cli-6.26.0.tgz", + "integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-polyfill": "^6.26.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "chokidar": "^1.6.1", + "commander": "^2.11.0", + "convert-source-map": "^1.5.0", + "fs-readdir-recursive": "^1.0.0", + "glob": "^7.1.2", + "lodash": "^4.17.4", + "output-file-sync": "^1.1.2", + "path-is-absolute": "^1.0.1", + "slash": "^1.0.0", + "source-map": "^0.5.6", + "v8flags": "^2.1.1" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "http://npm.byted.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha1-suLwnjQtDwyI4vAuBneUEl51wgc=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "http://npm.byted.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha1-GERAjTuPDTWkBOp6wYDwh6YBvZA=", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + } + }, + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", + "dev": true, + "requires": { + "babel-helper-explode-assignable-expression": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true, + "requires": { + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-loader": { + "version": "7.1.4", + "resolved": "http://npm.byted.org/babel-loader/-/babel-loader-7.1.4.tgz", + "integrity": "sha1-40Y5OL1ObVXRwXTFSF1AahiO0BU=", + "dev": true, + "requires": { + "find-cache-dir": "^1.0.0", + "loader-utils": "^1.0.2", + "mkdirp": "^0.5.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-add-module-exports": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-0.2.1.tgz", + "integrity": "sha1-mumh9KjcZ/DN7E9K7aHkOl/2XiU=" + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "http://npm.byted.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", + "dev": true + }, + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "http://npm.byted.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", + "dev": true + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", + "dev": true + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "^6.24.1", + "babel-plugin-syntax-async-functions": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "lodash": "^4.17.4" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "dev": true, + "requires": { + "babel-helper-define-map": "^6.24.1", + "babel-helper-function-name": "^6.24.1", + "babel-helper-optimise-call-expression": "^6.24.1", + "babel-helper-replace-supers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, + "requires": { + "babel-helper-function-name": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.2", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", + "integrity": "sha1-WKeThjqefKhwvcWogRF/+sJ9tvM=", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "^6.24.1", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-types": "^6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "dev": true, + "requires": { + "babel-helper-replace-supers": "^6.24.1", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true, + "requires": { + "babel-helper-call-delegate": "^6.24.1", + "babel-helper-get-function-arity": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1", + "babel-traverse": "^6.24.1", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true, + "requires": { + "babel-helper-regex": "^6.24.1", + "babel-runtime": "^6.22.0", + "regexpu-core": "^2.0.0" + } + }, + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "dev": true, + "requires": { + "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", + "babel-plugin-syntax-exponentiation-operator": "^6.8.0", + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "dev": true, + "requires": { + "regenerator-transform": "^0.10.0" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0", + "babel-types": "^6.24.1" + } + }, + "babel-polyfill": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "regenerator-runtime": "^0.10.5" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "http://npm.byted.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true + } + } + }, + "babel-preset-env": { + "version": "1.7.0", + "resolved": "http://npm.byted.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz", + "integrity": "sha1-3qefpOvriDzTXasH4mDBycBN93o=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-syntax-trailing-function-commas": "^6.22.0", + "babel-plugin-transform-async-to-generator": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.23.0", + "babel-plugin-transform-es2015-classes": "^6.23.0", + "babel-plugin-transform-es2015-computed-properties": "^6.22.0", + "babel-plugin-transform-es2015-destructuring": "^6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0", + "babel-plugin-transform-es2015-for-of": "^6.23.0", + "babel-plugin-transform-es2015-function-name": "^6.22.0", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.22.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0", + "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0", + "babel-plugin-transform-es2015-modules-umd": "^6.23.0", + "babel-plugin-transform-es2015-object-super": "^6.22.0", + "babel-plugin-transform-es2015-parameters": "^6.23.0", + "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.22.0", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.22.0", + "babel-plugin-transform-exponentiation-operator": "^6.22.0", + "babel-plugin-transform-regenerator": "^6.22.0", + "browserslist": "^3.2.6", + "invariant": "^2.2.2", + "semver": "^5.3.0" + } + }, + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "http://npm.byted.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "^6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", + "babel-plugin-transform-es2015-block-scoping": "^6.24.1", + "babel-plugin-transform-es2015-classes": "^6.24.1", + "babel-plugin-transform-es2015-computed-properties": "^6.24.1", + "babel-plugin-transform-es2015-destructuring": "^6.22.0", + "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", + "babel-plugin-transform-es2015-for-of": "^6.22.0", + "babel-plugin-transform-es2015-function-name": "^6.24.1", + "babel-plugin-transform-es2015-literals": "^6.22.0", + "babel-plugin-transform-es2015-modules-amd": "^6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", + "babel-plugin-transform-es2015-modules-umd": "^6.24.1", + "babel-plugin-transform-es2015-object-super": "^6.24.1", + "babel-plugin-transform-es2015-parameters": "^6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", + "babel-plugin-transform-es2015-template-literals": "^6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", + "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", + "babel-plugin-transform-regenerator": "^6.24.1" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "http://npm.byted.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "http://npm.byted.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha1-ry87iPpvXB5MY00aD46sT1WzleM=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "big.js": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha1-pfwpi4G54Nyi5FiCR4S2XFK6WI4=", + "dev": true + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "http://npm.byted.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "http://npm.byted.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "http://npm.byted.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "optional": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "browserslist": { + "version": "3.2.8", + "resolved": "http://npm.byted.org/browserslist/-/browserslist-3.2.8.tgz", + "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000844", + "electron-to-chromium": "^1.3.47" + } + }, + "caniuse-api": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/caniuse-api/-/caniuse-api-2.0.0.tgz", + "integrity": "sha1-sd21pZZrFvSNxJmERNS7xsfZ2DQ=", + "dev": true, + "requires": { + "browserslist": "^2.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + }, + "dependencies": { + "browserslist": { + "version": "2.11.3", + "resolved": "http://npm.byted.org/browserslist/-/browserslist-2.11.3.tgz", + "integrity": "sha1-/jYWeu0bvN5IJ+v+cTR6LMcLmbI=", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000792", + "electron-to-chromium": "^1.3.30" + } + } + } + }, + "caniuse-lite": { + "version": "1.0.30000849", + "resolved": "http://npm.byted.org/caniuse-lite/-/caniuse-lite-1.0.30000849.tgz", + "integrity": "sha1-fhqkjm1YkX3NcKq/fnozUUolj5E=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "http://npm.byted.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "optional": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "clone": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "color": { + "version": "0.11.4", + "resolved": "http://npm.byted.org/color/-/color-0.11.4.tgz", + "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", + "dev": true, + "requires": { + "clone": "^1.0.2", + "color-convert": "^1.3.0", + "color-string": "^0.3.0" + } + }, + "color-convert": { + "version": "1.9.1", + "resolved": "http://npm.byted.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha1-wSYRB66y8pTr/+ye2eytUppgl+0=", + "dev": true, + "requires": { + "color-name": "^1.1.1" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "color-string": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/color-string/-/color-string-0.3.0.tgz", + "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", + "dev": true, + "requires": { + "color-name": "^1.0.0" + } + }, + "commander": { + "version": "2.15.1", + "resolved": "http://npm.byted.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha1-30boZ9D8Kuxmo0ZitAapzK//Ww8=", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "http://npm.byted.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "http://npm.byted.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "core-js": { + "version": "2.5.7", + "resolved": "http://npm.byted.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha1-+XJgj/DOrWi4QaFqky0LGDeRgU4=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true, + "optional": true + }, + "cosmiconfig": { + "version": "2.2.2", + "resolved": "http://npm.byted.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz", + "integrity": "sha1-YXPOvVb6wELB9DkO33r2wHx8uJI=", + "dev": true, + "requires": { + "is-directory": "^0.3.1", + "js-yaml": "^3.4.3", + "minimist": "^1.2.0", + "object-assign": "^4.1.0", + "os-homedir": "^1.0.1", + "parse-json": "^2.2.0", + "require-from-string": "^1.1.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "css-color-function": { + "version": "1.3.3", + "resolved": "http://npm.byted.org/css-color-function/-/css-color-function-1.3.3.tgz", + "integrity": "sha1-jtJMLAIFBzM5+voAS8jBQfzLKC4=", + "dev": true, + "requires": { + "balanced-match": "0.1.0", + "color": "^0.11.0", + "debug": "^3.1.0", + "rgb": "~0.1.0" + }, + "dependencies": { + "balanced-match": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/balanced-match/-/balanced-match-0.1.0.tgz", + "integrity": "sha1-tQS9BYabOSWd0MXvw12EMXbczEo=", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "css-unit-converter": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/css-unit-converter/-/css-unit-converter-1.1.1.tgz", + "integrity": "sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "http://npm.byted.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "electron-to-chromium": { + "version": "1.3.48", + "resolved": "http://npm.byted.org/electron-to-chromium/-/electron-to-chromium-1.3.48.tgz", + "integrity": "sha1-07DYWTgUBE4JLs4hCPw6ya6kuQA=", + "dev": true + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "error-ex": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha1-RJnt3NERDgshi6zy+n9/WfVcqAQ=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "optional": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "http://npm.byted.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "optional": true, + "requires": { + "fill-range": "^2.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "http://npm.byted.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true, + "optional": true + }, + "fill-range": { + "version": "2.2.4", + "resolved": "http://npm.byted.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha1-6x53OrsFbc2N8r/favWbizqTZWU=", + "dev": true, + "optional": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "flatten": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/flatten/-/flatten-1.0.2.tgz", + "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true, + "optional": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "optional": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha1-4y/AMKLM7kSmtTcTCNpUvgs5fSc=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.4", + "resolved": "http://npm.byted.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha1-9B3LGvJYKvNpLaNvxVy9jhBBxCY=", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, + "glob": { + "version": "7.1.2", + "resolved": "http://npm.byted.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "optional": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "http://npm.byted.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=", + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "http://npm.byted.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "http://npm.byted.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "http://npm.byted.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "is-arrayish": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/is-arrayish/-/is-arrayish-0.3.1.tgz", + "integrity": "sha1-wt/DhquqDD4zxI2z/ocFnmkGXv0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "optional": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "http://npm.byted.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-directory": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true, + "optional": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "http://npm.byted.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "optional": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "optional": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true, + "optional": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isnumeric": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/isnumeric/-/isnumeric-0.2.0.tgz", + "integrity": "sha1-ojR7o2DeGeM9D/1ZD933dVy/LmQ=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "optional": true, + "requires": { + "isarray": "1.0.0" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "http://npm.byted.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha1-6u1lbsg0TxD1J8a/obbiJE3hZ9E=", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsesc": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "http://npm.byted.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "http://npm.byted.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha1-G3eTz3JZ6jj7NmHU04syYK+K5Oc=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "http://npm.byted.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "lodash.template": { + "version": "4.4.0", + "resolved": "http://npm.byted.org/lodash.template/-/lodash.template-4.4.0.tgz", + "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", + "dev": true, + "requires": { + "lodash._reinterpolate": "~3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", + "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", + "dev": true, + "requires": { + "lodash._reinterpolate": "~3.0.0" + } + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "http://npm.byted.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "^3.0.0" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "math-expression-evaluator": { + "version": "1.2.17", + "resolved": "http://npm.byted.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", + "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=", + "dev": true + }, + "math-random": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "dev": true, + "optional": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "http://npm.byted.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "optional": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "http://npm.byted.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "http://npm.byted.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://npm.byted.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "nan": { + "version": "2.10.0", + "resolved": "http://npm.byted.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha1-ltDNYQ69WNS03pzAxoKM2pnHVI8=", + "dev": true, + "optional": true + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "http://npm.byted.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "http://npm.byted.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "http://npm.byted.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object.omit": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "optional": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onecolor": { + "version": "3.0.5", + "resolved": "http://npm.byted.org/onecolor/-/onecolor-3.0.5.tgz", + "integrity": "sha1-Nu/zIgE3nv3xGA+0ReUajiQl+fY=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "output-file-sync": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/output-file-sync/-/output-file-sync-1.1.2.tgz", + "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.4", + "mkdirp": "^0.5.1", + "object-assign": "^4.1.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha1-uGvV8MJWkJEcdZD8v8IBDVSzzLg=", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "http://npm.byted.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "optional": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pixrem": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/pixrem/-/pixrem-4.0.1.tgz", + "integrity": "sha1-LaSh3m7EQjxfw3lOkwuB1EkOxoY=", + "dev": true, + "requires": { + "browserslist": "^2.0.0", + "postcss": "^6.0.0", + "reduce-css-calc": "^1.2.7" + }, + "dependencies": { + "browserslist": { + "version": "2.11.3", + "resolved": "http://npm.byted.org/browserslist/-/browserslist-2.11.3.tgz", + "integrity": "sha1-/jYWeu0bvN5IJ+v+cTR6LMcLmbI=", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000792", + "electron-to-chromium": "^1.3.30" + } + } + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "pleeease-filters": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/pleeease-filters/-/pleeease-filters-4.0.0.tgz", + "integrity": "sha1-ZjKy+wVkjSdY2GU4T7zteeHMrsc=", + "dev": true, + "requires": { + "onecolor": "^3.0.4", + "postcss": "^6.0.1" + } + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-apply": { + "version": "0.8.0", + "resolved": "http://npm.byted.org/postcss-apply/-/postcss-apply-0.8.0.tgz", + "integrity": "sha1-FOVEu7XLbxweBIhXll15rgZrE0M=", + "dev": true, + "requires": { + "babel-runtime": "^6.23.0", + "balanced-match": "^0.4.2", + "postcss": "^6.0.0" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "http://npm.byted.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "postcss-attribute-case-insensitive": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-2.0.0.tgz", + "integrity": "sha1-lNxCLI+QmX8WvTOjZUu77AhJY7Q=", + "dev": true, + "requires": { + "postcss": "^6.0.0", + "postcss-selector-parser": "^2.2.3" + } + }, + "postcss-calc": { + "version": "6.0.1", + "resolved": "http://npm.byted.org/postcss-calc/-/postcss-calc-6.0.1.tgz", + "integrity": "sha1-PSQXG79udinUIqQ26/5t2VEfQzA=", + "dev": true, + "requires": { + "css-unit-converter": "^1.1.1", + "postcss": "^6.0.0", + "postcss-selector-parser": "^2.2.2", + "reduce-css-calc": "^2.0.0" + }, + "dependencies": { + "reduce-css-calc": { + "version": "2.1.4", + "resolved": "http://npm.byted.org/reduce-css-calc/-/reduce-css-calc-2.1.4.tgz", + "integrity": "sha1-wg6c2oRFrXPU/0vqlgxvg1N5Fwg=", + "dev": true, + "requires": { + "css-unit-converter": "^1.1.1", + "postcss-value-parser": "^3.3.0" + } + } + } + }, + "postcss-color-function": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/postcss-color-function/-/postcss-color-function-4.0.1.tgz", + "integrity": "sha1-QCs/LOvD9pR+YY+2vjZU++zvZEQ=", + "dev": true, + "requires": { + "css-color-function": "~1.3.3", + "postcss": "^6.0.1", + "postcss-message-helpers": "^2.0.0", + "postcss-value-parser": "^3.3.0" + } + }, + "postcss-color-gray": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/postcss-color-gray/-/postcss-color-gray-4.1.0.tgz", + "integrity": "sha1-5Vge1X6qgm+2UsoRseK3sTap+d8=", + "dev": true, + "requires": { + "color": "^2.0.1", + "postcss": "^6.0.14", + "postcss-message-helpers": "^2.0.0", + "reduce-function-call": "^1.0.2" + }, + "dependencies": { + "color": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/color/-/color-2.0.1.tgz", + "integrity": "sha1-5O14o8RgPQiR66VDCwS4YxT0yDk=", + "dev": true, + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, + "color-string": { + "version": "1.5.2", + "resolved": "http://npm.byted.org/color-string/-/color-string-1.5.2.tgz", + "integrity": "sha1-JuRYFLw8mny9Z1FkikFDRRSnc6k=", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + } + } + }, + "postcss-color-hex-alpha": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/postcss-color-hex-alpha/-/postcss-color-hex-alpha-3.0.0.tgz", + "integrity": "sha1-HlPmyKyyN5Vej9CLfs2xuLgwn5U=", + "dev": true, + "requires": { + "color": "^1.0.3", + "postcss": "^6.0.1", + "postcss-message-helpers": "^2.0.0" + }, + "dependencies": { + "color": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/color/-/color-1.0.3.tgz", + "integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=", + "dev": true, + "requires": { + "color-convert": "^1.8.2", + "color-string": "^1.4.0" + } + }, + "color-string": { + "version": "1.5.2", + "resolved": "http://npm.byted.org/color-string/-/color-string-1.5.2.tgz", + "integrity": "sha1-JuRYFLw8mny9Z1FkikFDRRSnc6k=", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + } + } + }, + "postcss-color-hsl": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/postcss-color-hsl/-/postcss-color-hsl-2.0.0.tgz", + "integrity": "sha1-EnA2ZvoxBDDj8wpFTawThjF9WEQ=", + "dev": true, + "requires": { + "postcss": "^6.0.1", + "postcss-value-parser": "^3.3.0", + "units-css": "^0.4.0" + } + }, + "postcss-color-hwb": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/postcss-color-hwb/-/postcss-color-hwb-3.0.0.tgz", + "integrity": "sha1-NAKxnvTYSXVAwftQcr6YY8qVVx4=", + "dev": true, + "requires": { + "color": "^1.0.3", + "postcss": "^6.0.1", + "postcss-message-helpers": "^2.0.0", + "reduce-function-call": "^1.0.2" + }, + "dependencies": { + "color": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/color/-/color-1.0.3.tgz", + "integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=", + "dev": true, + "requires": { + "color-convert": "^1.8.2", + "color-string": "^1.4.0" + } + }, + "color-string": { + "version": "1.5.2", + "resolved": "http://npm.byted.org/color-string/-/color-string-1.5.2.tgz", + "integrity": "sha1-JuRYFLw8mny9Z1FkikFDRRSnc6k=", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + } + } + }, + "postcss-color-rebeccapurple": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-3.1.0.tgz", + "integrity": "sha1-zhJp7MLQ2L+SqrRL2ITmMxJMM+w=", + "dev": true, + "requires": { + "postcss": "^6.0.22", + "postcss-values-parser": "^1.5.0" + } + }, + "postcss-color-rgb": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/postcss-color-rgb/-/postcss-color-rgb-2.0.0.tgz", + "integrity": "sha1-FFOcinExSUtILg3RzCZf9lFLUmM=", + "dev": true, + "requires": { + "postcss": "^6.0.1", + "postcss-value-parser": "^3.3.0" + } + }, + "postcss-color-rgba-fallback": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/postcss-color-rgba-fallback/-/postcss-color-rgba-fallback-3.0.0.tgz", + "integrity": "sha1-N9XJNToHoJJwkSqCYGu0Kg1wLAQ=", + "dev": true, + "requires": { + "postcss": "^6.0.6", + "postcss-value-parser": "^3.3.0", + "rgb-hex": "^2.1.0" + } + }, + "postcss-cssnext": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/postcss-cssnext/-/postcss-cssnext-3.1.0.tgz", + "integrity": "sha1-kn3Ck0GpOCVM3jjqYKkjud/t6tk=", + "dev": true, + "requires": { + "autoprefixer": "^7.1.1", + "caniuse-api": "^2.0.0", + "chalk": "^2.0.1", + "pixrem": "^4.0.0", + "pleeease-filters": "^4.0.0", + "postcss": "^6.0.5", + "postcss-apply": "^0.8.0", + "postcss-attribute-case-insensitive": "^2.0.0", + "postcss-calc": "^6.0.0", + "postcss-color-function": "^4.0.0", + "postcss-color-gray": "^4.0.0", + "postcss-color-hex-alpha": "^3.0.0", + "postcss-color-hsl": "^2.0.0", + "postcss-color-hwb": "^3.0.0", + "postcss-color-rebeccapurple": "^3.0.0", + "postcss-color-rgb": "^2.0.0", + "postcss-color-rgba-fallback": "^3.0.0", + "postcss-custom-media": "^6.0.0", + "postcss-custom-properties": "^6.1.0", + "postcss-custom-selectors": "^4.0.1", + "postcss-font-family-system-ui": "^3.0.0", + "postcss-font-variant": "^3.0.0", + "postcss-image-set-polyfill": "^0.3.5", + "postcss-initial": "^2.0.0", + "postcss-media-minmax": "^3.0.0", + "postcss-nesting": "^4.0.1", + "postcss-pseudo-class-any-link": "^4.0.0", + "postcss-pseudoelements": "^5.0.0", + "postcss-replace-overflow-wrap": "^2.0.0", + "postcss-selector-matches": "^3.0.1", + "postcss-selector-not": "^3.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-custom-media": { + "version": "6.0.0", + "resolved": "http://npm.byted.org/postcss-custom-media/-/postcss-custom-media-6.0.0.tgz", + "integrity": "sha1-vlMnhBEOyylQRPtTlaGABushpzc=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + } + }, + "postcss-custom-properties": { + "version": "6.3.1", + "resolved": "http://npm.byted.org/postcss-custom-properties/-/postcss-custom-properties-6.3.1.tgz", + "integrity": "sha1-XFKr3jE9fsk2jEq/Z9J6ZWy6izk=", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "postcss": "^6.0.18" + } + }, + "postcss-custom-selectors": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/postcss-custom-selectors/-/postcss-custom-selectors-4.0.1.tgz", + "integrity": "sha1-eBOC+UxS5yfvXKR3bqKt9JphE4I=", + "dev": true, + "requires": { + "postcss": "^6.0.1", + "postcss-selector-matches": "^3.0.0" + } + }, + "postcss-font-family-system-ui": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/postcss-font-family-system-ui/-/postcss-font-family-system-ui-3.0.0.tgz", + "integrity": "sha1-Z1/nqeApZp8F+Nui5EwiJe3oBiM=", + "dev": true, + "requires": { + "postcss": "^6.0" + } + }, + "postcss-font-variant": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/postcss-font-variant/-/postcss-font-variant-3.0.0.tgz", + "integrity": "sha1-CMzIj2BQuoLtjvLMdsDGprQfGD4=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + } + }, + "postcss-image-set-polyfill": { + "version": "0.3.5", + "resolved": "http://npm.byted.org/postcss-image-set-polyfill/-/postcss-image-set-polyfill-0.3.5.tgz", + "integrity": "sha1-Dxk0E3AM8fgr05Bm7wFtZaShgYE=", + "dev": true, + "requires": { + "postcss": "^6.0.1", + "postcss-media-query-parser": "^0.2.3" + } + }, + "postcss-initial": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/postcss-initial/-/postcss-initial-2.0.0.tgz", + "integrity": "sha1-cnFfczbgu3k1HZnuZcSiU6hEG6Q=", + "dev": true, + "requires": { + "lodash.template": "^4.2.4", + "postcss": "^6.0.1" + } + }, + "postcss-load-config": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", + "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", + "dev": true, + "requires": { + "cosmiconfig": "^2.1.0", + "object-assign": "^4.1.0", + "postcss-load-options": "^1.2.0", + "postcss-load-plugins": "^2.3.0" + } + }, + "postcss-load-options": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", + "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", + "dev": true, + "requires": { + "cosmiconfig": "^2.1.0", + "object-assign": "^4.1.0" + } + }, + "postcss-load-plugins": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", + "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", + "dev": true, + "requires": { + "cosmiconfig": "^2.1.1", + "object-assign": "^4.1.0" + } + }, + "postcss-loader": { + "version": "2.1.5", + "resolved": "http://npm.byted.org/postcss-loader/-/postcss-loader-2.1.5.tgz", + "integrity": "sha1-PGM27mQcj5UTgXJTOuRhqDWV54g=", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "postcss": "^6.0.0", + "postcss-load-config": "^1.2.0", + "schema-utils": "^0.4.0" + } + }, + "postcss-media-minmax": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/postcss-media-minmax/-/postcss-media-minmax-3.0.0.tgz", + "integrity": "sha1-Z1JWA3pD70C8Twdgv9BtTcadSNI=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + } + }, + "postcss-media-query-parser": { + "version": "0.2.3", + "resolved": "http://npm.byted.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", + "integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=", + "dev": true + }, + "postcss-message-helpers": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", + "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=", + "dev": true + }, + "postcss-nesting": { + "version": "4.2.1", + "resolved": "http://npm.byted.org/postcss-nesting/-/postcss-nesting-4.2.1.tgz", + "integrity": "sha1-BIO84ziz8IKM7ZD/UwspuYsAMA0=", + "dev": true, + "requires": { + "postcss": "^6.0.11" + } + }, + "postcss-pseudo-class-any-link": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-4.0.0.tgz", + "integrity": "sha1-kVKgYT00UHIFE+iJKFS65C0O5o4=", + "dev": true, + "requires": { + "postcss": "^6.0.1", + "postcss-selector-parser": "^2.2.3" + } + }, + "postcss-pseudoelements": { + "version": "5.0.0", + "resolved": "http://npm.byted.org/postcss-pseudoelements/-/postcss-pseudoelements-5.0.0.tgz", + "integrity": "sha1-7vGU6NUkZFylIKlJ6V5RjoEkAss=", + "dev": true, + "requires": { + "postcss": "^6.0.0" + } + }, + "postcss-replace-overflow-wrap": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-2.0.0.tgz", + "integrity": "sha1-eU22+qVPjbEAhUOSqTr0V2i04ls=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + } + }, + "postcss-selector-matches": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/postcss-selector-matches/-/postcss-selector-matches-3.0.1.tgz", + "integrity": "sha1-5WNAEeE5UIgYYbvdWMLQER/8lqs=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2", + "postcss": "^6.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "http://npm.byted.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "postcss-selector-not": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/postcss-selector-not/-/postcss-selector-not-3.0.1.tgz", + "integrity": "sha1-Lk2y8JZTNsAefOx9tsYN/3ZzNdk=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2", + "postcss": "^6.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "http://npm.byted.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "postcss-selector-parser": { + "version": "2.2.3", + "resolved": "http://npm.byted.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", + "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", + "dev": true, + "requires": { + "flatten": "^1.0.2", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-value-parser": { + "version": "3.3.0", + "resolved": "http://npm.byted.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", + "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", + "dev": true + }, + "postcss-values-parser": { + "version": "1.5.0", + "resolved": "http://npm.byted.org/postcss-values-parser/-/postcss-values-parser-1.5.0.tgz", + "integrity": "sha1-XZ+mPivLAXnOSPMjUwN2XrifMEc=", + "dev": true, + "requires": { + "flatten": "^1.0.2", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "preserve": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true, + "optional": true + }, + "private": { + "version": "0.1.8", + "resolved": "http://npm.byted.org/private/-/private-0.1.8.tgz", + "integrity": "sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=", + "dev": true, + "optional": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", + "dev": true + }, + "randomatic": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/randomatic/-/randomatic-3.0.0.tgz", + "integrity": "sha1-01SQAw6091eN4pLObfsEqRoSiSM=", + "dev": true, + "optional": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=", + "dev": true, + "optional": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://npm.byted.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "optional": true, + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + } + }, + "reduce-css-calc": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2", + "math-expression-evaluator": "^1.2.14", + "reduce-function-call": "^1.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "http://npm.byted.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "reduce-function-call": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz", + "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "http://npm.byted.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", + "dev": true + } + } + }, + "regenerate": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha1-SoVuxLVuQHfFV1icroXnpMiGmhE=", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "http://npm.byted.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=", + "dev": true + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "http://npm.byted.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha1-HkmWg3Ix2ot/PPQRTXG1aRoGgN0=", + "dev": true, + "requires": { + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "http://npm.byted.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha1-db3FiioUls7EihKDW8VMjVYjNt0=", + "dev": true, + "optional": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "http://npm.byted.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "http://npm.byted.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true, + "optional": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "require-from-string": { + "version": "1.2.1", + "resolved": "http://npm.byted.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", + "dev": true + }, + "rgb": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/rgb/-/rgb-0.1.0.tgz", + "integrity": "sha1-vieykej+/+rBvZlylyG/pA/AN7U=", + "dev": true + }, + "rgb-hex": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/rgb-hex/-/rgb-hex-2.1.0.tgz", + "integrity": "sha1-x3PF/iJoolV42SU5qCp6XOU77aY=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "http://npm.byted.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", + "dev": true + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "http://npm.byted.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha1-IYNvBgiqwXt4+ePiTa/xSlyhOj4=", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + }, + "semver": { + "version": "5.5.0", + "resolved": "http://npm.byted.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha1-3Eu8emyp2Rbe5dQ1FvAJK1j3uKs=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true, + "optional": true + }, + "shaka-player": { + "version": "2.4.0", + "resolved": "http://npm.byted.org/shaka-player/-/shaka-player-2.4.0.tgz", + "integrity": "sha1-s9xPS9TwFuxiCwxfY3957EAbolA=" + }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "http://npm.byted.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dev": true, + "requires": { + "is-arrayish": "^0.3.1" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "http://npm.byted.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha1-Aoam3ovkJkEzhZTpfM6nXwosWF8=", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "uniq": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "units-css": { + "version": "0.4.0", + "resolved": "http://npm.byted.org/units-css/-/units-css-0.4.0.tgz", + "integrity": "sha1-1iKGU6UZg9fBb/KPi53Dsf/tOgc=", + "dev": true, + "requires": { + "isnumeric": "^0.2.0", + "viewport-dimensions": "^0.2.0" + } + }, + "uri-js": { + "version": "4.2.2", + "resolved": "http://npm.byted.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "user-home": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true, + "optional": true + }, + "v8flags": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true, + "requires": { + "user-home": "^1.1.1" + } + }, + "viewport-dimensions": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/viewport-dimensions/-/viewport-dimensions-0.2.0.tgz", + "integrity": "sha1-3nQHR9tTh/0XJfUXXpG6x2r982w=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + } +} diff --git a/packages/xgplayer-shaka/package.json b/packages/xgplayer-shaka/package.json new file mode 100644 index 00000000..3cb6db34 --- /dev/null +++ b/packages/xgplayer-shaka/package.json @@ -0,0 +1,46 @@ +{ + "name": "byted-player-shaka", + "version": "1.0.2", + "description": "byted-player plugin for shaka-player", + "main": "./dist/index.js", + "scripts": { + "prepare": "npm run build", + "build": "webpack --progress --display-chunks -p", + "watch": "webpack --progress --display-chunks -p --watch" + }, + "babel": { + "presets": [ + "es2015" + ], + "plugins": [ + "add-module-exports" + ] + }, + "keywords": [ + "mpeg-dash", + "shaka-player", + "player", + "video" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/bytedance/xgplayer.git" + }, + "author": "zhangxin.frontend@bytedance.com", + "license": "MIT", + "dependencies": { + "babel-plugin-add-module-exports": "^0.2.1", + "shaka-player": "^2.4.0" + }, + "peerDependency": { + "xgplayer": "^0.1.0" + }, + "devDependencies": { + "babel-cli": "^6.26.0", + "babel-loader": "^7.1.4", + "babel-preset-env": "^1.6.1", + "babel-preset-es2015": "^6.24.1", + "postcss-cssnext": "^3.1.0", + "postcss-loader": "^2.1.5" + } +} diff --git a/packages/xgplayer-shaka/src/index.js b/packages/xgplayer-shaka/src/index.js new file mode 100644 index 00000000..03565612 --- /dev/null +++ b/packages/xgplayer-shaka/src/index.js @@ -0,0 +1,221 @@ +import Player from 'xgplayer' +import Shaka from 'shaka-player' + +class ShakaJsPlayer extends Player { + constructor (options) { + super(options) + let self = this + this.shakaOpts = options.shakaOpts || {} + this.util = Player.util + this.player = this + this.url = this.player.config.url + this.sniffer = Player.sniffer + this.player_ = null + this.content = [] + + Shaka.polyfill.installAll() + + if (Shaka.Player.isBrowserSupported()) { + this.video_ = this.player.video + this.video_.autoplay = false + this.player_ = new Shaka.Player(this.video_) + + this.player_.addEventListener('error', function (event) { + console.error('Error code', event.detail.code, 'object', event.detail) // eslint-disable-line no-console + }) + + if (this.shakaOpts) { + this.player_.configure(this.shakaOpts) + } + + this.player_.getNetworkingEngine().registerRequestFilter(function (type, request) { + // Only add headers to license requests: + if (type === Shaka.net.NetworkingEngine.RequestType.LICENSE) { + // This is the specific header name and value the server wants: + request.headers['CWIP-Auth-Header'] = 'VGhpc0lzQVRlc3QK' + } + }) + + // this.player_.addEventListener( + // 'trackschanged', self.onTracksChanged_); + this.player_.addEventListener( + 'adaptation', self.onAdaptation_) + + let config = {abr: {enabled: false}} + this.player_.configure(config) + + this.once('complete', () => { + this.player_.load(this.url).then(function () { + console.log('The video has now been loaded!') // eslint-disable-line no-console + self.onTracksChanged_() + }).catch(function (event) { + console.error('Error code', event.detail.code, 'object', event.detail) // eslint-disable-line no-console + }) // eslint-disable-line no-console); + }) + + if (this.player_.isLive()) { + this.util.addClass(this.player.root, 'xgplayer-is-live') + let live = this.util.createDom('xg-live', '正在直播', {}, 'xgplayer-live') + this.player.controls.appendChild(live) + } + } else { + console.error('Browser not supported!') // eslint-disable-line no-console + } + } + + onTracksChanged_ () { + this.updateVariantTracks_() + } + + onAdaptation_ () { + let self = this + // console.log('onAdaptation_') + let tracks = this.player_.getVariantTracks() + + tracks.forEach(function (track) { + if (!track.active) { + return + } + + for (let i = 0; i < self.content.length; ++i) { + let option = self.content[i] + if (option.value === track.id) { + option.selected = true + } else { + option.selected = false + } + } + }) + } + + updateVariantTracks_ () { + let tracks = this.player_.getVariantTracks() + tracks.sort(function (t1, t2) { + return t1.bandwidth - t2.bandwidth + }) + this.updateTrackOptions_(tracks) + } + + updateTrackOptions_ (tracks) { + // console.log(tracks); // eslint-disable-line no-console + let self = this + let formatters = { + variant: function (track) { + let trackInfo = '' + if (track.width && track.height) { + trackInfo += track.height + 'P' + } + // trackInfo += track.bandwidth + ' bits/s'; + return trackInfo + } + } + this.content = [] + tracks.forEach(function (track) { + let option = {} + option.textContent = formatters[track.type](track) + option.track = track + option.value = track.id + option.selected = track.active + self.content.push(option) + }) + this.updateDefinition() + } + + updateDefinition () { + let self = this + let ul = this.util.createDom('xg-definition', '', {tabindex: 3}, 'xgplayer-definition') + let root = this.player.controls + if (this.sniffer.device === 'mobile') { + return + } + // let availableBitrates = _player.getBitrateInfoListFor('video') || []; + + if (this.content instanceof Array && this.content.length > 1) { + // this.content.forEach(function (element, index) { + // content.push(isNaN(index) ? 'Auto' : element.height + 'P'); + // }); + this.util.addClass(this.player.root, 'xgplayer-is-definition') + + let tmp = ['
    '] + + // tmp.push('
  • Auto
  • '); + this.content.forEach(item => { + tmp.push(`
  • ${item.textContent}
  • `) + }) + this.content.some(item => { + if (item.selected) { + tmp.push(`

${item.textContent}

`) + return true + } + return false + }) + let urlInRoot = root.querySelector('.xgplayer-definition') + if (urlInRoot) { + urlInRoot.innerHTML = '清晰度' + tmp.join('') + } else { + ul.innerHTML = '清晰度' + tmp.join('') + root.appendChild(ul) + } + } + + ['touchstart', 'click'].forEach(item => { + ul.addEventListener(item, function (ev) { + ev.preventDefault() + ev.stopPropagation() + let li = ev.target || ev.srcElement + if (li && li.tagName.toLocaleLowerCase() === 'li') { + Array.prototype.forEach.call(li.parentNode.childNodes, item => { + self.util.removeClass(item, 'definition') + }) + self.util.addClass(li, 'definition') + li.parentNode.nextSibling.textContent = li.textContent + + let config = {abr: {enabled: false}} + self.player_.configure(config) + // console.log(li.innerHTML); + self.content.some((item, index) => { + if (li.innerHTML.indexOf(item.textContent) > -1) { + self.player_.selectVariantTrack(self.content[index].track, true) + return true + } + return false + }) + + // let enableAdaptation = this.player_.getConfiguration().abr.enabled; + // document.getElementById('enableAdaptation').checked = enableAdaptation; + } else if (li && (li.tagName.toLocaleLowerCase() === 'p' || li.tagName.toLocaleLowerCase() === 'em')) { + self.util.addClass(ul, 'xgplayer-definition-active') + ul.focus() + } + }, false) + }) + ul.addEventListener('blur', (e) => { + e.preventDefault() + e.stopPropagation() + self.util.removeClass(ul, 'xgplayer-definition-active') + }) + + this.player.once('destroy', () => { + ul = null + }) + this.player.start = (url = self.player.config.url) => { + let root = self.player.root + root.insertBefore(self.player.video, root.firstChild) + self.util.removeClass(root, 'none') + self.player.userTimer = setTimeout(function () { + self.player.emit('blur') + }, self.player.config.inactive) + setTimeout(() => { + self.player.emit('complete') + }, 1) + + self.player.reset = () => { + // _player.reset(); + } + } + } +} + +ShakaJsPlayer.isSupported = Shaka.Player.isBrowserSupported() + +export default ShakaJsPlayer diff --git a/packages/xgplayer-shaka/webpack.config.js b/packages/xgplayer-shaka/webpack.config.js new file mode 100644 index 00000000..e03bc7ad --- /dev/null +++ b/packages/xgplayer-shaka/webpack.config.js @@ -0,0 +1,77 @@ +const polyfill = [] + +const umd = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/dist`, + filename: 'index.js', + library: 'xgplayer-shaka', + libraryTarget: 'umd' + }, + mode: 'production', + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader' + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true + } + }, + 'postcss-loader', + 'sass-loader' + ] + }] + }, + externals: { + 'xgplayer': 'xgplayer' + }, + optimization: { + minimize: true + } +} + +const client = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/browser`, + filename: 'xgplayer-shaka.js', + library: 'ShakaJsPlayer', + libraryTarget: 'window' + }, + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader' + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true + } + }, + 'postcss-loader', + 'sass-loader' + ] + }] + }, + externals: { + 'xgplayer': 'Player' + }, + mode: 'production', + optimization: { + minimize: true + } +} + +module.exports = [umd, client] diff --git a/packages/xgplayer/.DS_Store b/packages/xgplayer/.DS_Store new file mode 100644 index 00000000..61753350 Binary files /dev/null and b/packages/xgplayer/.DS_Store differ diff --git a/packages/xgplayer/README.md b/packages/xgplayer/README.md new file mode 100644 index 00000000..a7bb26c2 --- /dev/null +++ b/packages/xgplayer/README.md @@ -0,0 +1,96 @@ +
+ +
+ + + +### Introduction + +xgplayer is a web video player library. it has designed a separate, detachable UI component based on the principle that everything is componentized. More importantly, it is not only flexible in the UI layer, but also bold in its functionality: it gets rid of video loading, buffering, and format support for video dependence. Especially on mp4 +it can be staged loading for that does not support streaming mp4. This means seamless switching with clarity, load control, and video savings. It also integrates on-demand and live support for FLV, HLS, and dash. [Document](http://h5player.bytedance.com/) + +### Start + +1. Install + + ``` + $ npm install xgplayer + ``` + +2. Usage + + Step 1: + + ```html +
+ ``` + Step 2: + + ```js + import Player from 'xgplayer' + + let player=new Player({ + id:'vs', + url:'http://s2.pstatp.com/cdn/expire-1-M/byted-player-videos/1.0.0/xgplayer-demo.mp4' + }) + ``` + + This is the easiest way to configure the player,then it runs with video. For more advanced content, see the plug-in section or documentation. [more config](http://h5player.bytedance.com/config.html) + + + + +### Plugins + +xgplayer provides more plugins, plugins are divided into two categories: one is self-starting, and another inherits the player's core class named xgplayer. In principle, the officially provided plug-ins are self-starting and the packaged third-party libraries are inherited. Some feature plug-ins themselves can provide a downgrade scenario that suggests a self-start approach, or an inheritance approach if not. The player supports custom plugins for more content viewing [plugins](http://h5player.bytedance.com/) + +The following is how to use a self-starting plug-in: + +```js +import Player from 'xgplayer' +import 'xgplyaer-mp4' + +let player=new Player({ + id:'video', + url:'//abc.com/test.mp4' +}) +``` + +xgplayer-mp4plugin is self-starting, It loads mp4 video itself, parses mp4 format, implements custom loading, buffering, seamless switching, and so on. it will automatically downgrade devices that do not support [MSE](https://www.w3.org/TR/media-source/). [details](http://h5player.bytedance.com/plugins/#xgplayer-mp4) + + + +### Mobile Support + +xgplayer supports mobile terminal, but android device brand and system are numerous, there are much compatibility problems, the player provides whitelist mechanism to ensure the perfect operation in mobile terminal. [whitelist](http://h5player.bytedance.com/config/#%E7%99%BD%E5%90%8D%E5%8D%95) + + + +### Dev + +``` +$ git clone git@github.com:bytedance/xgplayer.git +$ cd xgplayer +$ npm install +$ npm run dev +``` + +please visit [http://localhost:9090/examples/index.html](http://localhost:9090/examples/index.html) + +### License + +[MIT](http://opensource.org/licenses/MIT) + diff --git a/packages/xgplayer/browser/xgplayer.js b/packages/xgplayer/browser/xgplayer.js new file mode 100644 index 00000000..0e01822b --- /dev/null +++ b/packages/xgplayer/browser/xgplayer.js @@ -0,0 +1 @@ +window.Player=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=47)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.config.url,n=this.root,r=this;"String"===a.default.typeOf(t)?this.video.src=t:t.forEach(function(t){e.video.appendChild(a.default.createDom("source","",{src:""+t.src,type:""+(t.type||"")}))}),n.insertBefore(this.video,n.firstChild),r.userTimer=setTimeout(function(){r.emit("blur")},r.config.inactive),setTimeout(function(){e.emit("complete")},1)}},{key:"reload",value:function(){this.video.load(),this.once("loadeddata",function(){this.play()})}},{key:"destroy",value:function(){var e=this;this.paused?(this.emit("destroy"),this.root.parentNode.removeChild(this.root)):(this.pause(),this.once("pause",function(){e.emit("destroy"),e.root.parentNode.removeChild(e.root)}))}},{key:"replay",value:function(){var e=this._replay;a.default.removeClass(this.root,"xgplayer-ended"),e&&e instanceof Function?e():(this.currentTime=0,this.play())}},{key:"onFocus",value:function(){var e=this;a.default.removeClass(this.root,"xgplayer-inactive"),e.userTimer&&clearTimeout(e.userTimer),e.userTimer=setTimeout(function(){e.emit("blur")},e.config.inactive)}},{key:"onBlur",value:function(){this.paused||this.ended||a.default.addClass(this.root,"xgplayer-inactive")}},{key:"onPlay",value:function(){a.default.addClass(this.root,"xgplayer-playing"),a.default.removeClass(this.root,"xgplayer-pause")}},{key:"onPause",value:function(){a.default.addClass(this.root,"xgplayer-pause"),this.userTimer&&clearTimeout(this.userTimer),this.emit("focus")}},{key:"onEnded",value:function(){a.default.addClass(this.root,"xgplayer-ended"),a.default.removeClass(this.root,"xgplayer-playing")}},{key:"onSeeking",value:function(){}},{key:"onSeeked",value:function(){this.waitTimer&&clearTimeout(this.waitTimer),a.default.removeClass(this.root,"xgplayer-isloading")}},{key:"onWaiting",value:function(){var e=this;e.waitTimer&&clearTimeout(e.waitTimer),e.waitTimer=setTimeout(function(){a.default.addClass(e.root,"xgplayer-isloading")},500)}},{key:"onPlaying",value:function(){this.waitTimer&&clearTimeout(this.waitTimer),a.default.removeClass(this.root,"xgplayer-isloading xgplayer-nostart xgplayer-pause xgplayer-ended xgplayer-is-error xgplayer-replay"),a.default.addClass(this.root,"xgplayer-playing")}}],[{key:"install",value:function(e,n){t.plugins||(t.plugins={}),t.plugins[e]=n}}]),t}();p.util=a.default,p.sniffer=i.default,p.Errors=l.default,t.default=p,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.from=t.from,this.to=t.to,this.easing=t.easing||function(e){return e*e},this.duration=t.duration||150,this.curPath="",this.progress=t.progress,this.state=0}return r(e,[{key:"animate",value:function(){var e=this,t=new Date,n=e.duration,r=null,o=e.path2shapes(e.from),a=e.path2shapes(e.to),i=e._preprocessing(o,a);e.state=1;!function o(){var l=new Date-t;if(l>=n||2===e.state)return r=a,e.progress(r,1),window.cancelAnimationFrame(e.tickId),void(e.state=0);var s=e.easing(l/n);r=e._lerp(i[0],i[1],s),e.progress(r,s),e.tickId=window.requestAnimationFrame(o)}()}},{key:"toSVGString",value:function(e){return e.map(function(e){return e.forEach(function(e,t){t?e.splice(0,2,"C"):(e.splice(2,0,"C"),e.unshift("M"))}),e.map(function(e){return e.join(" ")}).join("")}).join("")}},{key:"start",value:function(){self.animate()}},{key:"stop",value:function(){0!==this.state&&(this.state=2),window.cancelAnimationFrame(self.tickId),this.state=0}},{key:"reverse",value:function(){0!==this.state&&this.stop();var e=this.from;this.from=this.to,this.to=e,this.animate()}},{key:"reset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.from;0!==this.state&&this.stop(),this.from=t,this.to=e,this.animate()}}]),e}();for(var i in o.default)o.default[i]instanceof Function&&!a.prototype[i]&&(a.prototype[i]=o.default[i]);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=n(36)();e.exports=function(e){return e!==r&&null!==e}},function(e){e.exports={name:"xgplayer",version:"1.0.2",description:"video player",main:"./dist/index.js",scripts:{prepare:"npm run build",build:"webpack --progress --display-chunks -p",watch:"webpack --progress --display-chunks -p --watch"},keywords:["video","player"],babel:{presets:["es2015"],plugins:["add-module-exports","babel-plugin-bulk-import"]},author:"yinguohui@bytedance.com",license:"MIT",dependencies:{"babel-plugin-add-module-exports":"^0.2.1","event-emitter":"^0.3.5",pasition:"^1.0.1"},browserslist:["> 5%","IE 9","iOS 7","Firefox > 20"],devDependencies:{"babel-loader":"^7.1.4","babel-plugin-bulk-import":"^1.0.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-es2015":"^6.24.1","core-js":"^2.5.4","css-loader":"^0.28.11","json-loader":"^0.5.7","node-sass":"^4.8.3","postcss-cssnext":"^3.1.0","postcss-loader":"^2.1.5","sass-loader":"^6.0.7","style-loader":"^0.20.3",sugarss:"^1.0.1",webpack:"^4.8.1","webpack-cli":"^2.1.3",zlib:"^1.0.5"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);var o={network:{code:1,msg:"视频下载错误",remark:"只要视频下载错误就使用此类型,无论是video本身的超时还是xhr的分段请求超时或者资源不存在"},mse:{code:2,msg:"流追加错误",remark:"追加流的时候如果类型不对、无法被正确解码则会触发此类错误"},parse:{code:3,msg:"解析错误",remark:"mp4、hls、flv我们都是使用js进行格式解析,如果解析失败则会触发此类错误"},format:{code:4,msg:"格式错误",remark:"如果浏览器不支持的格式导致播放错误"},decoder:{code:5,msg:"解码错误",remark:"浏览器解码异常会抛出此类型错误"},runtime:{code:6,msg:"语法错误",remark:"播放器语法错误"},timeout:{code:7,msg:"播放超时",remark:"播放过程中无法正常请求下一个分段导致播放中断"},other:{code:8,msg:"其他错误",remark:"不可知的错误或被忽略的错误类型"}};t.default=function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:"",handle:"",msg:"",version:""},i=(arguments.length>3&&void 0!==arguments[3]&&arguments[3],arguments.length>4&&void 0!==arguments[4]?arguments[4]:[]);!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var l={};return l.pv=r.version,l.errt=t,l.v=n,l.uid=/tt_webid=(\d+)/gi.test(document.cookie)?RegExp.$1:"",l.dm=document.domain,l.sv=1,l.pt=0,l.at=0,l.lt=0,l.bft=0,l.br=0,l.lc=0,l.vu=i,l.vd=0,l.vs=0,l.ps=0,l.rs=0,l.errt=t,l.errd=a,l.ex=(o[t]||{}).msg,l},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={createDom:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(e);return o.className=r,o.innerHTML=t,Object.keys(n).forEach(function(t){var r=t,a=n[t];"video"===e||"audio"===e?a&&o.setAttribute(r,a):o.setAttribute(r,a)}),o},hasClass:function(e,t){return e.classList?Array.prototype.some.call(e.classList,function(e){return e===t}):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},addClass:function(e,t){e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach(function(t){t&&e.classList.add(t)}):r.hasClass(e,t)||(e.className+=" "+t)},removeClass:function(e,t){e.classList?t.split(/\s+/g).forEach(function(t){e.classList.remove(t)}):r.hasClass(e,t)&&t.split(/\s+/g).forEach(function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")})},toggleClass:function(e,t){t.split(/\s+/g).forEach(function(t){r.hasClass(e,t)?r.removeClass(e,t):r.addClass(e,t)})},findDom:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1];return e.querySelector(t)},padStart:function(e,t,n){for(var r=String(n),o=t>>0,a=Math.ceil(o/r.length),i=[],l=String(e);a--;)i.push(r);return i.join("").substring(0,o-l.length)+l},format:function(e){if(window.isNaN(e))return"";var t=r.padStart(Math.floor(e/3600),2,0),n=r.padStart(Math.floor((e-3600*t)/60),2,0),o=r.padStart(Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,o]:[t,n,o]).join(":")},event:function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},typeOf:function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},deepCopy:function(e,t){if("Object"===r.typeOf(t)&&"Object"===r.typeOf(e))return Object.keys(t).forEach(function(n){"Object"!==r.typeOf(t[n])||t[n]instanceof Node?e[n]=t[n]:e[n]?r.deepCopy(e[n],t[n]):e[n]=t[n]}),e},getBgImage:function(e){var t=document.createElement("a"),n=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;return t.href=n.replace(/url\("|"\)/g,""),t.href}};t.default=r,e.exports=t.default},function(e,t,n){"use strict";e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var o,a=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?e:(o=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:r+a.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(e,t,n){var r={},o=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),a=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e){return document.querySelector(e)}.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),i=null,l=0,s=[],u=n(6);function c(e,t){for(var n=0;n=0&&s.splice(t,1)}function g(e){var t=document.createElement("style");return e.attrs.type="text/css",h(t,e.attrs),f(e,t),t}function h(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function y(e,t){var n,r,o,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var s=l++;n=i||(i=g(t)),r=m.bind(null,n,s,!1),o=m.bind(null,n,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",h(t,e.attrs),f(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||a)&&(r=u(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(i),l&&URL.revokeObjectURL(l)}.bind(null,n,t),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return c(n,t),function(e){for(var o=[],a=0;a*,.xgplayer-nostart .xgplayer-controls{display:none}.xgplayer-is-live .xgplayer-controls .xgplayer-fullscreen,.xgplayer-is-live .xgplayer-controls .xgplayer-live,.xgplayer-is-live .xgplayer-controls .xgplayer-placeholder,.xgplayer-is-live .xgplayer-controls .xgplayer-play,.xgplayer-is-live .xgplayer-controls .xgplayer-volume{display:block}.xgplayer-progress{display:block;position:absolute;height:20px;line-height:20px;left:0;right:0;outline:none;top:-10px;z-index:15}.xgplayer-progress-outer{background:hsla(0,0%,100%,.3);display:block;height:3px;line-height:3px;margin-top:8.5px;width:100%;position:relative}.xgplayer-progress-cache,.xgplayer-progress-played{display:block;height:100%;line-height:1;position:absolute;left:0;top:0}.xgplayer-progress-cache{width:0;background:hsla(0,0%,100%,.5)}.xgplayer-progress-played{display:block;width:0;background-image:linear-gradient(-90deg,#fa1f41,#e31106);border-radius:0 1.5px 1.5px 0}.xgplayer-progress-played:after{content:" ";display:none;position:absolute;right:-4px;top:-4px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 0 2px 0 rgba(0,0,0,.26)}.xgplayer-progress-point{position:absolute}.xgplayer-progress-point.xgplayer-tips{margin-left:0;top:-25px;display:none}.xgplayer-progress:focus .xgplayer-progress-outer,.xgplayer-progress:hover .xgplayer-progress-outer{height:6px;margin-top:7px}.xgplayer-progress:focus .xgplayer-progress-played:after,.xgplayer-progress:hover .xgplayer-progress-played:after{display:block}.xgplayer-play{position:relative;-webkit-order:0;-moz-box-ordinal-group:1;order:0;display:block}.xgplayer-play .xgplayer-icon{margin-top:3px}.xgplayer-play:hover .xgplayer-tips{display:block}.xgplayer-time{-webkit-order:2;-moz-box-ordinal-group:3;order:2;font-family:ArialMT;font-size:13px;color:#fff;line-height:40px;display:inline-block}.xgplayer-time span:after{content:"/";display:inline-block;padding:0 3px}.xgplayer-time em{color:hsla(0,0%,100%,.5)}.xgplayer-tips{background:rgba(0,0,0,.54);border-radius:1px;display:none;position:absolute;font-family:PingFangSC-Regular;font-size:11px;color:#fff;padding:2px 4px;text-align:center;top:-30px;left:50%;margin-left:-16px;width:auto;white-space:nowrap}.xgplayer-volume{outline:none;-webkit-order:4;-moz-box-ordinal-group:5;order:4;display:inline-block;position:relative}.xgplayer-volume .xgplayer-icon{margin-top:8px}.xgplayer-slider{height:88px;background:rgba(0,0,0,.54);border-radius:1px;bottom:50px;outline:none}.xgplayer-slider,.xgplayer-slider:after{display:block;position:absolute;width:28px;left:0}.xgplayer-slider:after{content:" ";height:15px;bottom:-15px;z-index:20}.xgplayer-bar,.xgplayer-drag{display:block;position:absolute;bottom:6px;left:12px;background:hsla(0,0%,100%,.3);border-radius:100px;width:4px;height:76px;outline:none}.xgplayer-drag{bottom:0;left:0;background:#fa1f41;max-height:76px}.xgplayer-drag:after{content:" ";display:inline-block;width:8px;height:8px;background:#fff;box-shadow:0 0 5px 0 rgba(0,0,0,.26);position:absolute;border-radius:50%;left:-2px;top:-6px}.xgplayer-placeholder{-webkit-flex:1;-moz-box-flex:1;flex:1;-webkit-order:3;-moz-box-ordinal-group:4;order:3;display:block}.xgplayer-start{border-radius:50%;display:inline-block;width:70px;height:70px;background:hsla(0,0%,100%,.3);overflow:hidden;text-align:center;line-height:70px;vertical-align:middle;position:absolute;left:50%;top:50%;z-index:1000;margin:-55px auto auto -35px}.xgplayer-inactive .xgplayer-start,.xgplayer-nostart .xgplayer-start{margin:-35px auto auto -35px}.xgplayer-start svg{fill:hsla(0,0%,100%,.7);margin:14px}.xgplayer-start.xgplayer-start-interact{-webkit-animation:playPause .4s ease-out forwards;animation:playPause .4s ease-out forwards}.xgplayer-start:hover{background:hsla(0,0%,100%,.5)}.xgplayer-start:hover svg{fill:hsla(0,0%,100%,.6)}.xgplayer-definition{-webkit-order:5;-moz-box-ordinal-group:6;order:5;width:60px;position:relative;outline:none;display:none;cursor:pointer}.xgplayer-definition .xgplayer-tips{margin-left:-20px}.xgplayer-definition.xgplayer-definition-active ul,.xgplayer-definition:hover .xgplayer-tips{display:block}.xgplayer-definition.xgplayer-definition-active .xgplayer-tips{display:none}.xgplayer-definition ul{display:none;list-style:none;width:78px;background:rgba(0,0,0,.54);border-radius:1px;position:absolute;bottom:50px;left:0;text-align:center;white-space:nowrap;margin-left:-10px;z-index:26}.xgplayer-definition ul li{opacity:.7;font-family:PingFangSC-Regular;font-size:11px;color:hsla(0,0%,100%,.8);padding:6px 13px}.xgplayer-definition ul li.definition{color:#fff;opacity:1}.xgplayer-definition ul:after{content:" ";display:inline-block;height:30px;width:100%;position:absolute;bottom:-20px;left:0}.xgplayer-definition .name{text-align:center;font-family:PingFangSC-Regular;font-size:13px;line-height:40px;color:hsla(0,0%,100%,.8)}.xgplayer-definition .name em{padding:1px 10px;background:rgba(0,0,0,.38);border-radius:10px}.xgplayer-is-definition .xgplayer-definition{display:block}.xgplayer-fullscreen{-webkit-order:10;-moz-box-ordinal-group:11;order:10;position:relative;display:inline-block}.xgplayer-fullscreen .xgplayer-icon{margin:4px -4px 0 0}.xgplayer-fullscreen:hover .xgplayer-tips{display:block}.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-tips{left:-30%}.xgplayer.xgplayer-fullscreen-active{position:fixed!important;left:0!important;top:0!important;width:100%!important;height:100%!important;z-index:99999!important}.xgplayer-loading{display:none;width:100px;height:100px;overflow:hidden;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7);position:absolute;left:50%;top:50%;margin:-70px auto auto -50px}.xgplayer-loading svg{border-radius:50%;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-animation:loadingRotate 1s linear infinite;animation:loadingRotate 1s linear infinite}.xgplayer-loading svg path{stroke:#ddd;stroke-dasharray:236;-webkit-animation:loadingDashOffset 2s linear infinite;animation:loadingDashOffset 2s linear infinite;animation-direction:alternate-reverse;fill:none;stroke-width:12px}.xgplayer-nostart .xgplayer-loading{display:none}.xgplayer-isloading .xgplayer-loading{display:block}.xgplayer-replay{position:absolute;left:0;top:0;width:100%;height:100%;z-index:500;display:none;-webkit-justify-content:center;-moz-box-pack:center;justify-content:center;-webkit-align-items:center;-moz-box-align:center;align-items:center;background:rgba(0,0,0,.54);-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;flex-direction:column}.xgplayer-replay svg{background:rgba(0,0,0,.58);border-radius:100%;cursor:pointer}.xgplayer-replay svg path{-webkit-transform:translate(20px,21px);-ms-transform:translate(20px,21px);transform:translate(20px,21px);fill:#ddd}.xgplayer-replay svg:hover{background:rgba(0,0,0,.38)}.xgplayer-replay svg:hover path{fill:#fff}.xgplayer-replay .xgplayer-replay-txt{display:inline-block;font-family:PingFangSC-Regular;font-size:14px;color:#fff;line-height:34px;cursor:pointer}.xgplayer.xgplayer-ended .xgplayer-controls{display:none}.xgplayer.xgplayer-ended .xgplayer-replay{display:-webkit-flex;display:-moz-box;display:flex}.xgplayer-enter{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background:url("http://s2.pstatp.com/cdn/expire-1-M/byted-player-images/1.0.0/xg-bg.svg") no-repeat 50%/cover;z-index:1100}.xgplayer-enter .xgplayer-enter-logo{display:block;position:absolute;left:50%;top:50%;width:130px;height:38px;margin:-19px auto auto -69px;background:url("//s2.pstatp.com/cdn/expire-1-M/byted-player-images/1.0.0/xg-logo.svg") no-repeat 50%/cover}.xgplayer-enter .xgplayer-enter-tips{display:none;position:absolute;left:50%;top:50%;width:120px;height:1px;background:linear-gradient(90deg,#000,red,red,red,#000);margin:32px auto auto -62px}.xgplayer-enter .xgplayer-enter-tips:before{content:" ";display:block;width:5px;height:1px;border-radius:50%;position:absolute;left:0;top:0;-webkit-animation:enterTips 1.6s linear infinite;animation:enterTips 1.6s linear infinite;background:#fff}.xgplayer-is-enter .xgplayer-enter{display:block}.xgplayer-poster{position:absolute;left:0;top:0;width:100%;height:100%;z-index:100;background-size:cover}.xgplayer-live{display:block;font-size:12px;color:#fff;line-height:40px;-webkit-order:1;-moz-box-ordinal-group:2;order:1}.xgplayer .xgplayer-none{display:none}.xgplayer-error{background:#000;display:none;position:absolute;left:0;top:0;width:100%;height:100%;z-index:1200;font-family:PingFangSC-Regular;font-size:14px;color:#fff;text-align:center;line-height:100%;-webkit-justify-content:center;-moz-box-pack:center;justify-content:center;-webkit-align-items:center;-moz-box-align:center;align-items:center}.xgplayer-error .xgplayer-error-refresh{color:#fa1f41;padding:0 3px;cursor:pointer}.xgplayer-is-error .xgplayer-error{display:-webkit-flex;display:-moz-box;display:flex}.xgplayer-mobile.xgplayer-ended .xgplayer-start,.xgplayer-mobile.xgplayer-inactive .xgplayer-start{display:none}.xgplayer-mobile .xgplayer-start{width:60px;height:60px;line-height:60px;display:none;margin:-50px auto auto -30px}.xgplayer-mobile .xgplayer-start svg{margin:10px}.xgplayer-mobile.xgplayer-nostart .xgplayer-start{margin:-30px auto auto -30px;display:block}.xgplayer-mobile .xgplayer-loading{-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}.xgplayer-mobile.xgplayer-mobile-npassed .xgplayer-controls,.xgplayer-mobile.xgplayer-mobile-npassed .xgplayer-poster,.xgplayer-mobile.xgplayer-mobile-npassed .xgplayer-start{display:none}',""])},function(e,t,n){var r=n(9);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(7)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("definition",function(){var e=this,t=r.default.util,n=r.default.sniffer,o=t.createDom("xg-definition","",{tabindex:3},"xgplayer-definition"),a=e.controls;"mobile"!==n.device&&(e.on("resourceReady",function(n){n&&n instanceof Array&&n.length>1&&(t.addClass(e.root,"xgplayer-is-definition"),e.on("canplay",function(){var t=["
    "],r=e.config.url,i=document.createElement("a");e.switchURL?["mp4","hls","flv"].every(function(t){return!e[t]||(i.href=e[t].url,r=i.href,!1)}):r=e.currentSrc||e.src,n.forEach(function(e){i.href=e.url,t.push("
  • "+e.name+"
  • ")});var l=n.filter(function(e){return i.href=e.url,i.href===r});t.push('

'+(l[0]||{cname:""}).cname+"

");var s=a.querySelector(".xgplayer-definition");s?s.innerHTML='清晰度'+t.join(""):(o.innerHTML='清晰度'+t.join(""),a.appendChild(o))}))}),["touchstart","click"].forEach(function(n){o.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation();var r=n.target||n.srcElement,a=document.createElement("a");if(r&&"li"===r.tagName.toLocaleLowerCase()){if(Array.prototype.forEach.call(r.parentNode.childNodes,function(e){t.removeClass(e,"definition")}),t.addClass(r,"definition"),r.parentNode.nextSibling.innerHTML=""+r.getAttribute("cname")+"",a.href=r.getAttribute("url"),e.switchURL){var i=document.createElement("a");["mp4","hls","flv"].every(function(t){return!e[t]||(i=e[t].url,!1)}),i.href===a.href||e.ended||e.switchURL(a.href)}else if(a.href!==e.currentSrc){var l=e.currentTime,s=e.paused;e.ended||(e.src=a.href,e.once("canplay",function(){e.currentTime=l,s||e.play()}))}e.emit("definitionchange",a.href)}else!r||"p"!==r.tagName.toLocaleLowerCase()&&"em"!==r.tagName.toLocaleLowerCase()||(t.addClass(o,"xgplayer-definition-active"),o.focus())},!1)}),o.addEventListener("blur",function(e){e.preventDefault(),e.stopPropagation(),t.removeClass(o,"xgplayer-definition-active")}),e.once("destroy",function(){o=null}))})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("error",function(){var e=this,t=r.default.util,n=t.createDom("xg-error",',请刷新试试 ',{},"xgplayer-error");e.root.appendChild(n);var o=n.querySelector(".xgplayer-error-text"),a=n.querySelector(".xgplayer-error-refresh");e.on("error",function(){o.textContent=e.lang[e.video.error.message]||e.lang.ERROR,t.addClass(e.root,"xgplayer-is-error")}),["touchstart","click"].forEach(function(t){a.addEventListener(t,function(t){e.reload()})}),e.once("destroy",function(){a=null,n=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("__flex__",function(){var e=r.default.util.createDom("xg-placeholder","",{},"xgplayer-placeholder");this.controls.appendChild(e)})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("fullscreen",function(){var e=r.default.util,t="M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z",n="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z",o=e.createDom("xg-fullscreen",'\n \n ',{},"xgplayer-fullscreen"),a=this.controls,i=this.root,l=e.createDom("xg-tips","全屏",{},"xgplayer-tips"),s=o.querySelector("path");o.appendChild(l);a.appendChild(o),["click","touchstart"].forEach(function(r){o.addEventListener(r,function(r){r.preventDefault(),r.stopPropagation(),e.hasClass(i,"xgplayer-fullscreen-active")||e.hasClass(i,"xgplayer-is-fullscreen")?function(t){var r=document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled;s.setAttribute("d",n),l.textContent="全屏",r?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():e.removeClass(t,"xgplayer-fullscreen-active")}(i):function(n){var r=document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled;s.setAttribute("d",t),l.textContent="退出全屏",r?n.requestFullscreen?n.requestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullScreen?n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):n.msRequestFullscreen?n.msRequestFullscreen():e.addClass(n,"xgplayer-fullscreen-active"):e.addClass(n,"xgplayer-fullscreen-active")}(i)})});var u=function(r){var o=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;o&&o===i?(e.addClass(i,"xgplayer-is-fullscreen"),s.setAttribute("d",t),l.textContent="退出全屏"):(e.removeClass(i,"xgplayer-is-fullscreen"),s.setAttribute("d",n),l.textContent="全屏")};["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach(function(e){document.addEventListener(e,u)}),this.once("destroy",function(){["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach(function(e){document.removeEventListener(e,u)}),o=null})})},function(e,t,n){"use strict";(function(e){return e&&e.__esModule?e:{default:e}})(n(0)).default.install("i18n",function(){var e=this,t={},n=e.constructor.util;t.en={HAVE_NOTHING:"There is no information on whether audio/video is ready",HAVE_METADATA:"audio/video metadata is ready ",HAVE_CURRENT_DATA:"Data about the current play location is available, but there is not enough data to play the next frame/millisecond",HAVE_FUTURE_DATA:"Current and at least one frame of data is available",HAVE_ENOUGH_DATA:"The available data is sufficient to start playing",NETWORK_EMPTY:"Audio/video has not been initialized",NETWORK_IDLE:"Audio/video is active and has been selected for resources, but no network is used",NETWORK_LOADING:"The browser is downloading the data",NETWORK_NO_SOURCE:"No audio/video source was found",MEDIA_ERR_ABORTED:"The fetch process is aborted by the user",MEDIA_ERR_NETWORK:"An error occurred while downloading",MEDIA_ERR_DECODE:"An error occurred while decoding",MEDIA_ERR_SRC_NOT_SUPPORTED:"Audio/video is not supported",REPLAY:"Replay",ERROR:"network is offline"},t["zh-cn"]={HAVE_NOTHING:"没有关于音频/视频是否就绪的信息",HAVE_METADATA:"音频/视频的元数据已就绪",HAVE_CURRENT_DATA:"关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒",HAVE_FUTURE_DATA:"当前及至少下一帧的数据是可用的",HAVE_ENOUGH_DATA:"可用数据足以开始播放",NETWORK_EMPTY:"音频/视频尚未初始化",NETWORK_IDLE:"音频/视频是活动的且已选取资源,但并未使用网络",NETWORK_LOADING:"浏览器正在下载数据",NETWORK_NO_SOURCE:"未找到音频/视频来源",MEDIA_ERR_ABORTED:"取回过程被用户中止",MEDIA_ERR_NETWORK:"当下载时发生错误",MEDIA_ERR_DECODE:"当解码时发生错误",MEDIA_ERR_SRC_NOT_SUPPORTED:"不支持的音频/视频格式",REPLAY:"重播",ERROR:"网络连接似乎出现了问题"},Object.defineProperty(e,"lang",{get:function(){return t[e.config.lang]||t.en},set:function(e){"Object"===n.typeOf(e)&&Object.keys(e).forEach(function(n){t[n]=e[n]})}})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("loading",function(){var e=r.default.util.createDom("xg-loading",'\n \n \n \n ',{},"xgplayer-loading");this.root.appendChild(e),this.once("destroy",function(){e=null})})},function(e,t,n){"use strict";var r=a(n(0)),o=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.install("mobile",function(){var e=this,t=r.default.util,n=e.root;e.config.autoplay=!1;var a=function(e){var t=r.default.util;return e.some(function(e){return"Function"===t.typeOf(e)?e.call(navigator.userAgent):"RegExp"===t.typeOf(e)?e.test(navigator.userAgent):"String"===t.typeOf(e)&&navigator.userAgent.indexOf(e)>-1})}(e.config.whitelist);e.mobilePass=a;var i="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z",l="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z",s=t.createDom("xg-start",'\n \n \n ',{},"xgplayer-start"),u=t.createDom("xg-enter",'',{},"xgplayer-enter"),c=u.querySelector(".xgplayer-enter-logo");n.appendChild(s),n.appendChild(u);var p=s.querySelector("path"),f=new Image,d=new o.default({from:l,to:i,progress:function(e,t){p.setAttribute("d",d.toSVGString(e))}});u.querySelector(".xgplayer-enter-tips").style.display="block",e.start(),a?(f.src=t.getBgImage(c),e.video.addEventListener("touchstart",function(t){t.preventDefault(),e.emit("focus")},!1),s.addEventListener("touchstart",function(r){r.preventDefault(),t.hasClass(n,"xgplayer-nostart")?(t.removeClass(n,"xgplayer-nostart"),t.addClass(n,"xgplayer-is-enter"),e.on("canplay",function(){t.removeClass(n,"xgplayer-is-enter")}),e.once("playing",function(){t.removeClass(n,"xgplayer-is-enter")}),e.play()):e.paused?e.play():e.pause()}),e.on("play",function(){d.reset(l,i)}),e.on("pause",function(){d.reset(i,l)})):(t.addClass(n,"xgplayer-mobile-npassed"),e.once("ready",function(){e.video.controls=e.config.controls,e.video.controlsList=e.config.controlsList.join(" "),e.config.poster&&(e.video.poster=e.config.poster)})),e.config.debug&&function(e){var t={};Object.assign(t,{host:"127.0.0.1",port:9090},e);var n=document.createElement("script"),r=document.createElement("h4");r.style.cssText="position:fixed;bottom:0;padding:10px;width:100%;background-color:#fff;text-align:center",r.textContent="weinre --boundHost "+t.host+" --httpPort "+t.port+"\r\n 启动服务后,刷新页面",n.anonymous=!0,n.async=!0,n.src="http://"+t.host+":"+t.port+"/target/target-script-min.js#anonymous",n.onload=function(){r.parentNode.removeChild(r)},document.body.appendChild(n),document.body.appendChild(r)}(e.config.debug)})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("pc",function(){var e=this,t=r.default.util,n=e.controls,o=e.root,a=0,i=void 0,l="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z",s="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z",u=t.createDom("xg-start",'\n \n \n ',{},"xgplayer-start"),c=t.createDom("xg-enter",'',{},"xgplayer-enter"),p=c.querySelector(".xgplayer-enter-logo");o.appendChild(u),o.appendChild(c);var f=u.querySelector("path"),d=new Image;d.onload=function(){c.querySelector(".xgplayer-enter-tips").style.display="block"},d.src=t.getBgImage(p),["click","touchstart"].forEach(function(n){u.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation(),e.config.url&&(t.hasClass(o,"xgplayer-nostart")?(t.removeClass(o,"xgplayer-nostart"),t.addClass(o,"xgplayer-is-enter"),o.querySelector("video")||e.start(),e.on("canplay",function(){t.removeClass(o,"xgplayer-is-enter")}),e.once("playing",function(){t.removeClass(o,"xgplayer-is-enter")}),e.play(),setTimeout(function(){e.play()},10)):e.paused&&(t.removeClass(o,"xgplayer-nostart xgplayer-isloading"),setTimeout(function(){e.play()},10)))})}),u.addEventListener("animationend",function(e){e.preventDefault(),t.removeClass(u,"xgplayer-start-interact"),u.style.display="none"}),e.on("play",function(){f.setAttribute("d",l),u.style.display="inline-block",t.addClass(u,"xgplayer-start-interact")}),e.on("pause",function(){f.setAttribute("d",s),u.style.display="inline-block",t.addClass(u,"xgplayer-start-interact")}),e.video.addEventListener("click",function(n){n.preventDefault(),n.stopPropagation(),document.activeElement===e.video?(a++,i&&clearTimeout(i),1===a?i=setTimeout(function(){if(t.hasClass(e.root,"xgplayer-nostart"))return!1;e.ended||(e.paused?e.play():e.pause()),a=0},200):a=0):e.video.focus()},!1),e.video.addEventListener("dblclick",function(t){if(t.preventDefault(),t.stopPropagation(),document.activeElement===e.video){var r=n.querySelector(".xgplayer-fullscreen");if(r){var o=void 0;document.createEvent?(o=document.createEvent("Event")).initEvent("click",!0,!0):o=new Event("click"),r.dispatchEvent(o)}}else e.video.focus()},!1),o.addEventListener("mouseenter",function(t){e.emit("focus",e)},!1),o.addEventListener("mouseleave",function(t){e.emit("blur",e)},!1),n.addEventListener("mouseenter",function(t){e.userTimer&&clearTimeout(e.userTimer)},!1),n.addEventListener("mouseleave",function(t){e.emit("focus",e)},!1)})},function(e,t,n){"use strict";var r=a(n(0)),o=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.install("play",function(){var e=this,t=e.controls,n=r.default.util,a=e.config.iconScale||.0320625,i="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z",l="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z",s=n.createDom("xg-play",'\n \n '),u=n.createDom("xg-tips","播放",{},"xgplayer-tips"),c=s.querySelector("path");s.appendChild(u);var p=new o.default({progress:function(e,t){c.setAttribute("d",p.toSVGString(e))},from:l,to:i});s.className="xgplayer-play",t.appendChild(s),["click","touchstart"].forEach(function(t){s.addEventListener(t,function(t){t.preventDefault(),t.stopPropagation(),e.ended||(e.paused?e.play():e.pause())},!1)}),e.on("play",function(){u.textContent="暂停",p.to!==l&&p.reset(l,i)}),e.on("pause",function(){u.textContent="播放",p.to!==i&&p.reset(i,l)}),e.once("destroy",function(){s=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("playbackRate",function(){var e=this,t=r.default.util,n=[];if(!e.config.playbackRate)return!1;e.config.playbackRate.sort(function(e,t){return t-e}),e.config.playbackRate.forEach(function(e){n.push("
  • "+e+"x
  • ")});var o=t.createDom("xg-playback","

    1x

      "+n.join("")+"
    ",{},"xgplayer-playback");e.controls.appendChild(o),["touchstart","click"].forEach(function(n){o.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation();var r=n.target||n.srcElement;r&&"li"===r.tagName.toLocaleLowerCase()&&(Array.prototype.forEach.call(r.parentNode.childNodes,function(e){t.removeClass(e,"active")}),t.addClass(r,"active"),o.querySelector("p").textContent=r.textContent,e.video.playbackRate=1*r.textContent.replace(/x$/g,""))},!1)}),e.once("destroy",function(){o=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("poster",function(){var e=r.default.util.createDom("xg-poster","",{},"xgplayer-poster"),t=this.root;this.config.poster&&(e.style.backgroundImage="url("+this.config.poster+")",t.appendChild(e)),this.on("play",function(){e.style.display="none"}),this.once("destroy",function(){e=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("progress",function(){var e=this,t=r.default.util,n=t.createDom("xg-progress",'',{tabindex:1},"xgplayer-progress"),o=e.controls,a=void 0;o.appendChild(n);var i=n.querySelector(".xgplayer-progress-played"),l=n.querySelector(".xgplayer-progress-cache"),s=n.querySelector(".xgplayer-progress-point");["touchstart","mousedown"].forEach(function(r){n.addEventListener(r,function(r){if(r.preventDefault(),r.stopPropagation(),t.event(r),r._target===s||e.ended)return!1;n.focus(),a=n.getBoundingClientRect().width;var o=i.getBoundingClientRect().left,l=!1,u=function(n){n.preventDefault(),n.stopPropagation(),t.event(n),l=!0;var r=n.clientX-o,s=r/a*e.duration;i.style.width=100*r/a+"%",e.currentTime=Number(s).toFixed(1)},c=function r(s){if(s.preventDefault(),s.stopPropagation(),t.event(s),window.removeEventListener("mousemove",u),window.removeEventListener("touchmove",u),window.removeEventListener("mouseup",r),window.removeEventListener("touchend",r),n.blur(),!l){var c=s.clientX-o,p=c/a*e.duration;i.style.width=100*c/a+"%",e.currentTime=Number(p).toFixed(1)}l=!1};return window.addEventListener("mousemove",u),window.addEventListener("touchmove",u),window.addEventListener("mouseup",c),window.addEventListener("touchend",c),!1})}),n.addEventListener("mouseenter",function(r){if(e.ended)return!1;var o=n.getBoundingClientRect().left,a=n.getBoundingClientRect().width,i=function(n){var r=(n.clientX-o)/a*e.duration;s.textContent=t.format(r),s.style.left=n.clientX-o-15+"px",s.style.display="block"},l=function(e){i(e)};n.addEventListener("mousemove",l,!1),n.addEventListener("mouseleave",function e(t){n.removeEventListener("mousemove",l,!1),n.removeEventListener("mouseleave",e,!1),i(t),s.style.display="none"},!1),i(r)},!1),e.on("timeupdate",function(){a||(a=n.getBoundingClientRect().width),i.style.width=100*e.currentTime/e.duration+"%"}),["cacheupdate","ended","timeupdate"].forEach(function(t){e.on(t,function(){var t=e.buffered;if(t&&t.length>0){var n=t.end(t.length-1);l.style.width=n/e.duration*100+"%"}})}),e.once("destroy",function(){n=null,i=null,s=null,l=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("replay",function(){var e=this,t=r.default.util,n=t.createDom("xg-replay",'\n \n \n \n 重播\n ',{},"xgplayer-replay"),o=e.root,a=n.querySelector(".xgplayer-replay-svg");o.appendChild(n),e.on("ended",function(){n.querySelector(".xgplayer-replay-txt").textContent=e.lang.REPLAY,e.config.loop||t.addClass(o,"replay")}),a.addEventListener("click",function(n){n.preventDefault(),t.removeClass(o,"replay"),e.replay()}),e.once("destroy",function(){a=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("time",function(){var e=this,t=r.default.util,n=t.format,o=t.createDom("xg-time",""+(e.currentTime||n(0))+""+(e.duration||n(0))+"",{},"xgplayer-time");e.controls.appendChild(o);var a=function(){o.innerHTML=""+n(e.currentTime||0)+""+n(e.duration)};e.on("durationchange",a),e.on("timeupdate",a),e.once("destroy",function(){e.off("durationchange",a),e.off("timeupdate",a),o=null})})},function(e,t,n){"use strict";!function(){for(var e=0,t=["webkit","moz"],n=0;n1&&(a=1),a<-1&&(a=-1),o*Math.acos(a)},a=function(a){var i=a.px,l=a.py,s=a.cx,u=a.cy,c=a.rx,p=a.ry,f=a.xAxisRotation,d=void 0===f?0:f,g=a.largeArcFlag,h=void 0===g?0:g,y=a.sweepFlag,v=void 0===y?0:y,m=[];if(0===c||0===p)return[];var x=Math.sin(d*t/360),b=Math.cos(d*t/360),w=b*(i-s)/2+x*(l-u)/2,k=-x*(i-s)/2+b*(l-u)/2;if(0===w&&0===k)return[];c=Math.abs(c),p=Math.abs(p);var E=Math.pow(w,2)/Math.pow(c,2)+Math.pow(k,2)/Math.pow(p,2);E>1&&(c*=Math.sqrt(E),p*=Math.sqrt(E));var _=function(e,n,r,a,i,l,s,u,c,p,f,d){var g=Math.pow(i,2),h=Math.pow(l,2),y=Math.pow(f,2),v=Math.pow(d,2),m=g*h-g*v-h*y;m<0&&(m=0),m/=g*v+h*y;var x=(m=Math.sqrt(m)*(s===u?-1:1))*i/l*d,b=m*-l/i*f,w=p*x-c*b+(e+r)/2,k=c*x+p*b+(n+a)/2,E=(f-x)/i,_=(d-b)/l,C=(-f-x)/i,M=(-d-b)/l,T=o(1,0,E,_),O=o(E,_,C,M);return 0===u&&O>0&&(O-=t),1===u&&O<0&&(O+=t),[w,k,T,O]}(i,l,s,u,c,p,h,v,x,b,w,k),C=e(_,4),M=C[0],T=C[1],O=C[2],R=C[3],S=Math.max(Math.ceil(Math.abs(R)/(t/4)),1);R/=S;for(var A=0;Ae-1&&(a-=e),r[a]=o}t.push(r)}return t}(e.length),r=[];n.forEach(function(n){var o=0,a=0;n.forEach(function(n){o+=function(e,t){var n=e[0],r=e[2],o=e[4],a=e[6],i=e[1],l=e[3],s=e[5],u=e[7],c=t[0],p=t[2],f=t[4],d=t[6],g=t[1],h=t[3],y=t[5],v=t[7];return Math.sqrt(Math.pow(c-n,2)+Math.pow(g-i,2))+Math.sqrt(Math.pow(p-r,2)+Math.pow(h-l,2))+Math.sqrt(Math.pow(f-o,2)+Math.pow(y-s,2))+Math.sqrt(Math.pow(d-a,2)+Math.pow(v-u,2))}(e[n],t[a++])}),r.push({index:n,distance:o})}),r.sort(function(e,t){return e.distance-t.distance});var o=[];return r[0].index.forEach(function(t){o.push(e[t])}),o}function p(e,t){var n=function(e){for(var t=[],n=0;n2&&(t.push([n].concat(r.splice(0,2))),o="l",n="m"==n?"l":"L");;){if(r.length==i[o])return r.unshift(n),t.push(r);if(r.lengtho-1&&(r-=o)},f._splitCurves=function(e,t){for(var n=0,r=0;n=e.length-1&&(r=0)}},f._upShapes=function(e,t){for(var n=function(t){var n=e[e.length-1],r=[];n.forEach(function(e){r.push(e.slice(0))}),e.push(r)},r=0;rr?f._subShapes(o,a,n-r):nr?n=p)return i(c=n,1),a(c),void cancelAnimationFrame(u);var l=s(t/p);c=f._lerp(r[0],r[1],l),i(c,l),u=requestAnimationFrame(e)}()},f})},function(e,t,n){"use strict";var r=a(n(0)),o=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.install("volume",function(){var e=this,t=r.default.util,n=e.config.volume,a={muted:"M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z",small:"M795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z",large:"M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"},i=function(e){return 0===e?"muted":e<.5?"small":"large"},l=a[i(n)],s=a[i(n)],u=t.createDom("xg-volume",'\n \n \n \n \n \n \n \n \n \n ',{},"xgplayer-volume"),c=e.controls;c.appendChild(u);var p=void 0,f=u.querySelector(".xgplayer-slider"),d=u.querySelector(".xgplayer-bar"),g=u.querySelector(".xgplayer-drag"),h=u.querySelector(".xgplayer-icon");g.style.height=100*e.config.volume+"%";var y=c.querySelectorAll("path")[1],v=new o.default({progress:function(e,t){var n=v.toSVGString(e);y.setAttribute("d",n),l=n},from:l,to:a.large}),m=null;f.volume=e.config.volume,["touchstart","mousedown"].forEach(function(n){d.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation(),f.focus(),t.event(n),p=d.getBoundingClientRect().height,n.clientX;var r=n.clientY,o=g.getBoundingClientRect().height,a=!1,i=function(n){n.preventDefault(),n.stopPropagation(),t.event(n),a=!0;var i=o-n.clientY+r,l=i/p;g.style.height=i+"px",e.volume=Math.max(Math.min(l,1),.01)},l=function n(r){if(r.preventDefault(),r.stopPropagation(),t.event(r),window.removeEventListener("mousemove",i),window.removeEventListener("touchmove",i),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),m||(m=d.getBoundingClientRect()),!a){var o=m.height-(r.clientY-m.top),l=o/m.height;g.style.height=o+"px",l<=0&&(e.volume>0?g.volume=e.video.volume:l=g.volume),e.volume=Math.max(Math.min(l,1),.01)}f.volume=e.volume,a=!1};return window.addEventListener("mousemove",i),window.addEventListener("touchmove",i),window.addEventListener("mouseup",l),window.addEventListener("touchend",l),!1})}),["touchstart","mousedown"].forEach(function(n){h.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation(),t.hasClass(f,"xgplayer-none")?(t.removeClass(f,"xgplayer-none"),f.focus()):0===e.volume?e.volume=f.volume:e.volume=0})}),f.addEventListener("blur",function(e){e.preventDefault(),e.stopPropagation(),t.addClass(f,"xgplayer-none")});var x=null;e.on("volumechange",function(){x&&clearTimeout(x),x=setTimeout(function(){v.reset(a[i(e.volume)],l),l=a[i[e.volume]],p||(p=d.getBoundingClientRect().height||76),g.style.height=e.volume*p+"px"},50)}),e.once("canplay",function(){e.volume=e.config.volume}),e.once("destroy",function(){u=null,g=null})})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={get device(){var e=r.os;return e.isPc?"pc":e.isTablet?"tablet":"mobile"},get browser(){var e=navigator.userAgent.toLowerCase(),t={ie:/rv:([\d.]+)\) like gecko/,firfox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return[].concat(Object.keys(t).filter(function(n){return t[n].test(e)}))[0]},get os(){var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),o=/(?:Firefox)/.test(e),a=/(?:iPad|PlayBook)/.test(e)||r&&!/(?:Mobile)/.test(e)||o&&/(?:Tablet)/.test(e),i=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:i,isAndroid:r,isPc:!i&&!r&&!n,isSymbian:n,isWindowsPhone:t,isFireFox:o}}};t.default=r,e.exports=t.default},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";var r=String.prototype.indexOf;e.exports=function(e){return r.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";var r="razdwatrzy";e.exports=function(){return"function"==typeof r.contains&&(!0===r.contains("dwa")&&!1===r.contains("foo"))}},function(e,t,n){"use strict";e.exports=n(31)()?String.prototype.contains:n(30)},function(e,t,n){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";var r=n(2),o=Array.prototype.forEach,a=Object.create;e.exports=function(e){var t=a(null);return o.call(arguments,function(e){r(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)}),t}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=n(2),o=Object.keys;e.exports=function(e){return o(r(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";e.exports=n(38)()?Object.keys:n(37)},function(e,t,n){"use strict";var r=n(39),o=n(35),a=Math.max;e.exports=function(e,t){var n,i,l,s=a(arguments.length,2);for(e=Object(o(e)),l=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},i=1;i0&&void 0!==arguments[0]?arguments[0]:this.config.url,n=this.root,r=this;"String"===a.default.typeOf(t)?this.video.src=t:t.forEach(function(t){e.video.appendChild(a.default.createDom("source","",{src:""+t.src,type:""+(t.type||"")}))}),n.insertBefore(this.video,n.firstChild),r.userTimer=setTimeout(function(){r.emit("blur")},r.config.inactive),setTimeout(function(){e.emit("complete")},1)}},{key:"reload",value:function(){this.video.load(),this.once("loadeddata",function(){this.play()})}},{key:"destroy",value:function(){var e=this;this.paused?(this.emit("destroy"),this.root.parentNode.removeChild(this.root)):(this.pause(),this.once("pause",function(){e.emit("destroy"),e.root.parentNode.removeChild(e.root)}))}},{key:"replay",value:function(){var e=this._replay;a.default.removeClass(this.root,"xgplayer-ended"),e&&e instanceof Function?e():(this.currentTime=0,this.play())}},{key:"onFocus",value:function(){var e=this;a.default.removeClass(this.root,"xgplayer-inactive"),e.userTimer&&clearTimeout(e.userTimer),e.userTimer=setTimeout(function(){e.emit("blur")},e.config.inactive)}},{key:"onBlur",value:function(){this.paused||this.ended||a.default.addClass(this.root,"xgplayer-inactive")}},{key:"onPlay",value:function(){a.default.addClass(this.root,"xgplayer-playing"),a.default.removeClass(this.root,"xgplayer-pause")}},{key:"onPause",value:function(){a.default.addClass(this.root,"xgplayer-pause"),this.userTimer&&clearTimeout(this.userTimer),this.emit("focus")}},{key:"onEnded",value:function(){a.default.addClass(this.root,"xgplayer-ended"),a.default.removeClass(this.root,"xgplayer-playing")}},{key:"onSeeking",value:function(){}},{key:"onSeeked",value:function(){this.waitTimer&&clearTimeout(this.waitTimer),a.default.removeClass(this.root,"xgplayer-isloading")}},{key:"onWaiting",value:function(){var e=this;e.waitTimer&&clearTimeout(e.waitTimer),e.waitTimer=setTimeout(function(){a.default.addClass(e.root,"xgplayer-isloading")},500)}},{key:"onPlaying",value:function(){this.waitTimer&&clearTimeout(this.waitTimer),a.default.removeClass(this.root,"xgplayer-isloading xgplayer-nostart xgplayer-pause xgplayer-ended xgplayer-is-error xgplayer-replay"),a.default.addClass(this.root,"xgplayer-playing")}}],[{key:"install",value:function(e,n){t.plugins||(t.plugins={}),t.plugins[e]=n}}]),t}();p.util=a.default,p.sniffer=i.default,p.Errors=l.default,t.default=p,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.from=t.from,this.to=t.to,this.easing=t.easing||function(e){return e*e},this.duration=t.duration||150,this.curPath="",this.progress=t.progress,this.state=0}return r(e,[{key:"animate",value:function(){var e=this,t=new Date,n=e.duration,r=null,o=e.path2shapes(e.from),a=e.path2shapes(e.to),i=e._preprocessing(o,a);e.state=1;!function o(){var l=new Date-t;if(l>=n||2===e.state)return r=a,e.progress(r,1),window.cancelAnimationFrame(e.tickId),void(e.state=0);var s=e.easing(l/n);r=e._lerp(i[0],i[1],s),e.progress(r,s),e.tickId=window.requestAnimationFrame(o)}()}},{key:"toSVGString",value:function(e){return e.map(function(e){return e.forEach(function(e,t){t?e.splice(0,2,"C"):(e.splice(2,0,"C"),e.unshift("M"))}),e.map(function(e){return e.join(" ")}).join("")}).join("")}},{key:"start",value:function(){self.animate()}},{key:"stop",value:function(){0!==this.state&&(this.state=2),window.cancelAnimationFrame(self.tickId),this.state=0}},{key:"reverse",value:function(){0!==this.state&&this.stop();var e=this.from;this.from=this.to,this.to=e,this.animate()}},{key:"reset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.from;0!==this.state&&this.stop(),this.from=t,this.to=e,this.animate()}}]),e}();for(var i in o.default)o.default[i]instanceof Function&&!a.prototype[i]&&(a.prototype[i]=o.default[i]);t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=n(36)();e.exports=function(e){return e!==r&&null!==e}},function(e){e.exports={name:"xgplayer",version:"1.0.2",description:"video player",main:"./dist/index.js",scripts:{prepare:"npm run build",build:"webpack --progress --display-chunks -p",watch:"webpack --progress --display-chunks -p --watch"},keywords:["video","player"],babel:{presets:["es2015"],plugins:["add-module-exports","babel-plugin-bulk-import"]},author:"yinguohui@bytedance.com",license:"MIT",dependencies:{"babel-plugin-add-module-exports":"^0.2.1","event-emitter":"^0.3.5",pasition:"^1.0.1"},browserslist:["> 5%","IE 9","iOS 7","Firefox > 20"],devDependencies:{"babel-loader":"^7.1.4","babel-plugin-bulk-import":"^1.0.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-es2015":"^6.24.1","core-js":"^2.5.4","css-loader":"^0.28.11","json-loader":"^0.5.7","node-sass":"^4.8.3","postcss-cssnext":"^3.1.0","postcss-loader":"^2.1.5","sass-loader":"^6.0.7","style-loader":"^0.20.3",sugarss:"^1.0.1",webpack:"^4.8.1","webpack-cli":"^2.1.3",zlib:"^1.0.5"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3);var o={network:{code:1,msg:"视频下载错误",remark:"只要视频下载错误就使用此类型,无论是video本身的超时还是xhr的分段请求超时或者资源不存在"},mse:{code:2,msg:"流追加错误",remark:"追加流的时候如果类型不对、无法被正确解码则会触发此类错误"},parse:{code:3,msg:"解析错误",remark:"mp4、hls、flv我们都是使用js进行格式解析,如果解析失败则会触发此类错误"},format:{code:4,msg:"格式错误",remark:"如果浏览器不支持的格式导致播放错误"},decoder:{code:5,msg:"解码错误",remark:"浏览器解码异常会抛出此类型错误"},runtime:{code:6,msg:"语法错误",remark:"播放器语法错误"},timeout:{code:7,msg:"播放超时",remark:"播放过程中无法正常请求下一个分段导致播放中断"},other:{code:8,msg:"其他错误",remark:"不可知的错误或被忽略的错误类型"}};t.default=function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:"",handle:"",msg:"",version:""},i=(arguments.length>3&&void 0!==arguments[3]&&arguments[3],arguments.length>4&&void 0!==arguments[4]?arguments[4]:[]);!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var l={};return l.pv=r.version,l.errt=t,l.v=n,l.uid=/tt_webid=(\d+)/gi.test(document.cookie)?RegExp.$1:"",l.dm=document.domain,l.sv=1,l.pt=0,l.at=0,l.lt=0,l.bft=0,l.br=0,l.lc=0,l.vu=i,l.vd=0,l.vs=0,l.ps=0,l.rs=0,l.errt=t,l.errd=a,l.ex=(o[t]||{}).msg,l},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={createDom:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(e);return o.className=r,o.innerHTML=t,Object.keys(n).forEach(function(t){var r=t,a=n[t];"video"===e||"audio"===e?a&&o.setAttribute(r,a):o.setAttribute(r,a)}),o},hasClass:function(e,t){return e.classList?Array.prototype.some.call(e.classList,function(e){return e===t}):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},addClass:function(e,t){e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach(function(t){t&&e.classList.add(t)}):r.hasClass(e,t)||(e.className+=" "+t)},removeClass:function(e,t){e.classList?t.split(/\s+/g).forEach(function(t){e.classList.remove(t)}):r.hasClass(e,t)&&t.split(/\s+/g).forEach(function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")})},toggleClass:function(e,t){t.split(/\s+/g).forEach(function(t){r.hasClass(e,t)?r.removeClass(e,t):r.addClass(e,t)})},findDom:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1];return e.querySelector(t)},padStart:function(e,t,n){for(var r=String(n),o=t>>0,a=Math.ceil(o/r.length),i=[],l=String(e);a--;)i.push(r);return i.join("").substring(0,o-l.length)+l},format:function(e){if(window.isNaN(e))return"";var t=r.padStart(Math.floor(e/3600),2,0),n=r.padStart(Math.floor((e-3600*t)/60),2,0),o=r.padStart(Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,o]:[t,n,o]).join(":")},event:function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},typeOf:function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},deepCopy:function(e,t){if("Object"===r.typeOf(t)&&"Object"===r.typeOf(e))return Object.keys(t).forEach(function(n){"Object"!==r.typeOf(t[n])||t[n]instanceof Node?e[n]=t[n]:e[n]?r.deepCopy(e[n],t[n]):e[n]=t[n]}),e},getBgImage:function(e){var t=document.createElement("a"),n=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;return t.href=n.replace(/url\("|"\)/g,""),t.href}};t.default=r,e.exports=t.default},function(e,t,n){"use strict";e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var o,a=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?e:(o=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:r+a.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(e,t,n){var r={},o=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),a=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e){return document.querySelector(e)}.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),i=null,l=0,s=[],u=n(6);function c(e,t){for(var n=0;n=0&&s.splice(t,1)}function g(e){var t=document.createElement("style");return e.attrs.type="text/css",h(t,e.attrs),f(e,t),t}function h(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function y(e,t){var n,r,o,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var s=l++;n=i||(i=g(t)),r=m.bind(null,n,s,!1),o=m.bind(null,n,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",h(t,e.attrs),f(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||a)&&(r=u(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(i),l&&URL.revokeObjectURL(l)}.bind(null,n,t),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return c(n,t),function(e){for(var o=[],a=0;a*,.xgplayer-nostart .xgplayer-controls{display:none}.xgplayer-is-live .xgplayer-controls .xgplayer-fullscreen,.xgplayer-is-live .xgplayer-controls .xgplayer-live,.xgplayer-is-live .xgplayer-controls .xgplayer-placeholder,.xgplayer-is-live .xgplayer-controls .xgplayer-play,.xgplayer-is-live .xgplayer-controls .xgplayer-volume{display:block}.xgplayer-progress{display:block;position:absolute;height:20px;line-height:20px;left:0;right:0;outline:none;top:-10px;z-index:15}.xgplayer-progress-outer{background:hsla(0,0%,100%,.3);display:block;height:3px;line-height:3px;margin-top:8.5px;width:100%;position:relative}.xgplayer-progress-cache,.xgplayer-progress-played{display:block;height:100%;line-height:1;position:absolute;left:0;top:0}.xgplayer-progress-cache{width:0;background:hsla(0,0%,100%,.5)}.xgplayer-progress-played{display:block;width:0;background-image:linear-gradient(-90deg,#fa1f41,#e31106);border-radius:0 1.5px 1.5px 0}.xgplayer-progress-played:after{content:" ";display:none;position:absolute;right:-4px;top:-4px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 0 2px 0 rgba(0,0,0,.26)}.xgplayer-progress-point{position:absolute}.xgplayer-progress-point.xgplayer-tips{margin-left:0;top:-25px;display:none}.xgplayer-progress:focus .xgplayer-progress-outer,.xgplayer-progress:hover .xgplayer-progress-outer{height:6px;margin-top:7px}.xgplayer-progress:focus .xgplayer-progress-played:after,.xgplayer-progress:hover .xgplayer-progress-played:after{display:block}.xgplayer-play{position:relative;-webkit-order:0;-moz-box-ordinal-group:1;order:0;display:block}.xgplayer-play .xgplayer-icon{margin-top:3px}.xgplayer-play:hover .xgplayer-tips{display:block}.xgplayer-time{-webkit-order:2;-moz-box-ordinal-group:3;order:2;font-family:ArialMT;font-size:13px;color:#fff;line-height:40px;display:inline-block}.xgplayer-time span:after{content:"/";display:inline-block;padding:0 3px}.xgplayer-time em{color:hsla(0,0%,100%,.5)}.xgplayer-tips{background:rgba(0,0,0,.54);border-radius:1px;display:none;position:absolute;font-family:PingFangSC-Regular;font-size:11px;color:#fff;padding:2px 4px;text-align:center;top:-30px;left:50%;margin-left:-16px;width:auto;white-space:nowrap}.xgplayer-volume{outline:none;-webkit-order:4;-moz-box-ordinal-group:5;order:4;display:inline-block;position:relative}.xgplayer-volume .xgplayer-icon{margin-top:8px}.xgplayer-slider{height:88px;background:rgba(0,0,0,.54);border-radius:1px;bottom:50px;outline:none}.xgplayer-slider,.xgplayer-slider:after{display:block;position:absolute;width:28px;left:0}.xgplayer-slider:after{content:" ";height:15px;bottom:-15px;z-index:20}.xgplayer-bar,.xgplayer-drag{display:block;position:absolute;bottom:6px;left:12px;background:hsla(0,0%,100%,.3);border-radius:100px;width:4px;height:76px;outline:none}.xgplayer-drag{bottom:0;left:0;background:#fa1f41;max-height:76px}.xgplayer-drag:after{content:" ";display:inline-block;width:8px;height:8px;background:#fff;box-shadow:0 0 5px 0 rgba(0,0,0,.26);position:absolute;border-radius:50%;left:-2px;top:-6px}.xgplayer-placeholder{-webkit-flex:1;-moz-box-flex:1;flex:1;-webkit-order:3;-moz-box-ordinal-group:4;order:3;display:block}.xgplayer-start{border-radius:50%;display:inline-block;width:70px;height:70px;background:hsla(0,0%,100%,.3);overflow:hidden;text-align:center;line-height:70px;vertical-align:middle;position:absolute;left:50%;top:50%;z-index:1000;margin:-55px auto auto -35px}.xgplayer-inactive .xgplayer-start,.xgplayer-nostart .xgplayer-start{margin:-35px auto auto -35px}.xgplayer-start svg{fill:hsla(0,0%,100%,.7);margin:14px}.xgplayer-start.xgplayer-start-interact{-webkit-animation:playPause .4s ease-out forwards;animation:playPause .4s ease-out forwards}.xgplayer-start:hover{background:hsla(0,0%,100%,.5)}.xgplayer-start:hover svg{fill:hsla(0,0%,100%,.6)}.xgplayer-definition{-webkit-order:5;-moz-box-ordinal-group:6;order:5;width:60px;position:relative;outline:none;display:none;cursor:pointer}.xgplayer-definition .xgplayer-tips{margin-left:-20px}.xgplayer-definition.xgplayer-definition-active ul,.xgplayer-definition:hover .xgplayer-tips{display:block}.xgplayer-definition.xgplayer-definition-active .xgplayer-tips{display:none}.xgplayer-definition ul{display:none;list-style:none;width:78px;background:rgba(0,0,0,.54);border-radius:1px;position:absolute;bottom:50px;left:0;text-align:center;white-space:nowrap;margin-left:-10px;z-index:26}.xgplayer-definition ul li{opacity:.7;font-family:PingFangSC-Regular;font-size:11px;color:hsla(0,0%,100%,.8);padding:6px 13px}.xgplayer-definition ul li.definition{color:#fff;opacity:1}.xgplayer-definition ul:after{content:" ";display:inline-block;height:30px;width:100%;position:absolute;bottom:-20px;left:0}.xgplayer-definition .name{text-align:center;font-family:PingFangSC-Regular;font-size:13px;line-height:40px;color:hsla(0,0%,100%,.8)}.xgplayer-definition .name em{padding:1px 10px;background:rgba(0,0,0,.38);border-radius:10px}.xgplayer-is-definition .xgplayer-definition{display:block}.xgplayer-fullscreen{-webkit-order:10;-moz-box-ordinal-group:11;order:10;position:relative;display:inline-block}.xgplayer-fullscreen .xgplayer-icon{margin:4px -4px 0 0}.xgplayer-fullscreen:hover .xgplayer-tips{display:block}.xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-tips{left:-30%}.xgplayer.xgplayer-fullscreen-active{position:fixed!important;left:0!important;top:0!important;width:100%!important;height:100%!important;z-index:99999!important}.xgplayer-loading{display:none;width:100px;height:100px;overflow:hidden;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7);position:absolute;left:50%;top:50%;margin:-70px auto auto -50px}.xgplayer-loading svg{border-radius:50%;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-animation:loadingRotate 1s linear infinite;animation:loadingRotate 1s linear infinite}.xgplayer-loading svg path{stroke:#ddd;stroke-dasharray:236;-webkit-animation:loadingDashOffset 2s linear infinite;animation:loadingDashOffset 2s linear infinite;animation-direction:alternate-reverse;fill:none;stroke-width:12px}.xgplayer-nostart .xgplayer-loading{display:none}.xgplayer-isloading .xgplayer-loading{display:block}.xgplayer-replay{position:absolute;left:0;top:0;width:100%;height:100%;z-index:500;display:none;-webkit-justify-content:center;-moz-box-pack:center;justify-content:center;-webkit-align-items:center;-moz-box-align:center;align-items:center;background:rgba(0,0,0,.54);-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;flex-direction:column}.xgplayer-replay svg{background:rgba(0,0,0,.58);border-radius:100%;cursor:pointer}.xgplayer-replay svg path{-webkit-transform:translate(20px,21px);-ms-transform:translate(20px,21px);transform:translate(20px,21px);fill:#ddd}.xgplayer-replay svg:hover{background:rgba(0,0,0,.38)}.xgplayer-replay svg:hover path{fill:#fff}.xgplayer-replay .xgplayer-replay-txt{display:inline-block;font-family:PingFangSC-Regular;font-size:14px;color:#fff;line-height:34px;cursor:pointer}.xgplayer.xgplayer-ended .xgplayer-controls{display:none}.xgplayer.xgplayer-ended .xgplayer-replay{display:-webkit-flex;display:-moz-box;display:flex}.xgplayer-enter{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background:url("http://s2.pstatp.com/cdn/expire-1-M/byted-player-images/1.0.0/xg-bg.svg") no-repeat 50%/cover;z-index:1100}.xgplayer-enter .xgplayer-enter-logo{display:block;position:absolute;left:50%;top:50%;width:130px;height:38px;margin:-19px auto auto -69px;background:url("//s2.pstatp.com/cdn/expire-1-M/byted-player-images/1.0.0/xg-logo.svg") no-repeat 50%/cover}.xgplayer-enter .xgplayer-enter-tips{display:none;position:absolute;left:50%;top:50%;width:120px;height:1px;background:linear-gradient(90deg,#000,red,red,red,#000);margin:32px auto auto -62px}.xgplayer-enter .xgplayer-enter-tips:before{content:" ";display:block;width:5px;height:1px;border-radius:50%;position:absolute;left:0;top:0;-webkit-animation:enterTips 1.6s linear infinite;animation:enterTips 1.6s linear infinite;background:#fff}.xgplayer-is-enter .xgplayer-enter{display:block}.xgplayer-poster{position:absolute;left:0;top:0;width:100%;height:100%;z-index:100;background-size:cover}.xgplayer-live{display:block;font-size:12px;color:#fff;line-height:40px;-webkit-order:1;-moz-box-ordinal-group:2;order:1}.xgplayer .xgplayer-none{display:none}.xgplayer-error{background:#000;display:none;position:absolute;left:0;top:0;width:100%;height:100%;z-index:1200;font-family:PingFangSC-Regular;font-size:14px;color:#fff;text-align:center;line-height:100%;-webkit-justify-content:center;-moz-box-pack:center;justify-content:center;-webkit-align-items:center;-moz-box-align:center;align-items:center}.xgplayer-error .xgplayer-error-refresh{color:#fa1f41;padding:0 3px;cursor:pointer}.xgplayer-is-error .xgplayer-error{display:-webkit-flex;display:-moz-box;display:flex}.xgplayer-mobile.xgplayer-ended .xgplayer-start,.xgplayer-mobile.xgplayer-inactive .xgplayer-start{display:none}.xgplayer-mobile .xgplayer-start{width:60px;height:60px;line-height:60px;display:none;margin:-50px auto auto -30px}.xgplayer-mobile .xgplayer-start svg{margin:10px}.xgplayer-mobile.xgplayer-nostart .xgplayer-start{margin:-30px auto auto -30px;display:block}.xgplayer-mobile .xgplayer-loading{-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}.xgplayer-mobile.xgplayer-mobile-npassed .xgplayer-controls,.xgplayer-mobile.xgplayer-mobile-npassed .xgplayer-poster,.xgplayer-mobile.xgplayer-mobile-npassed .xgplayer-start{display:none}',""])},function(e,t,n){var r=n(9);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(7)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("definition",function(){var e=this,t=r.default.util,n=r.default.sniffer,o=t.createDom("xg-definition","",{tabindex:3},"xgplayer-definition"),a=e.controls;"mobile"!==n.device&&(e.on("resourceReady",function(n){n&&n instanceof Array&&n.length>1&&(t.addClass(e.root,"xgplayer-is-definition"),e.on("canplay",function(){var t=["
      "],r=e.config.url,i=document.createElement("a");e.switchURL?["mp4","hls","flv"].every(function(t){return!e[t]||(i.href=e[t].url,r=i.href,!1)}):r=e.currentSrc||e.src,n.forEach(function(e){i.href=e.url,t.push("
    • "+e.name+"
    • ")});var l=n.filter(function(e){return i.href=e.url,i.href===r});t.push('

    '+(l[0]||{cname:""}).cname+"

    ");var s=a.querySelector(".xgplayer-definition");s?s.innerHTML='清晰度'+t.join(""):(o.innerHTML='清晰度'+t.join(""),a.appendChild(o))}))}),["touchstart","click"].forEach(function(n){o.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation();var r=n.target||n.srcElement,a=document.createElement("a");if(r&&"li"===r.tagName.toLocaleLowerCase()){if(Array.prototype.forEach.call(r.parentNode.childNodes,function(e){t.removeClass(e,"definition")}),t.addClass(r,"definition"),r.parentNode.nextSibling.innerHTML=""+r.getAttribute("cname")+"",a.href=r.getAttribute("url"),e.switchURL){var i=document.createElement("a");["mp4","hls","flv"].every(function(t){return!e[t]||(i=e[t].url,!1)}),i.href===a.href||e.ended||e.switchURL(a.href)}else if(a.href!==e.currentSrc){var l=e.currentTime,s=e.paused;e.ended||(e.src=a.href,e.once("canplay",function(){e.currentTime=l,s||e.play()}))}e.emit("definitionchange",a.href)}else!r||"p"!==r.tagName.toLocaleLowerCase()&&"em"!==r.tagName.toLocaleLowerCase()||(t.addClass(o,"xgplayer-definition-active"),o.focus())},!1)}),o.addEventListener("blur",function(e){e.preventDefault(),e.stopPropagation(),t.removeClass(o,"xgplayer-definition-active")}),e.once("destroy",function(){o=null}))})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("error",function(){var e=this,t=r.default.util,n=t.createDom("xg-error",',请刷新试试 ',{},"xgplayer-error");e.root.appendChild(n);var o=n.querySelector(".xgplayer-error-text"),a=n.querySelector(".xgplayer-error-refresh");e.on("error",function(){o.textContent=e.lang[e.video.error.message]||e.lang.ERROR,t.addClass(e.root,"xgplayer-is-error")}),["touchstart","click"].forEach(function(t){a.addEventListener(t,function(t){e.reload()})}),e.once("destroy",function(){a=null,n=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("__flex__",function(){var e=r.default.util.createDom("xg-placeholder","",{},"xgplayer-placeholder");this.controls.appendChild(e)})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("fullscreen",function(){var e=r.default.util,t="M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z",n="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z",o=e.createDom("xg-fullscreen",'\n \n ',{},"xgplayer-fullscreen"),a=this.controls,i=this.root,l=e.createDom("xg-tips","全屏",{},"xgplayer-tips"),s=o.querySelector("path");o.appendChild(l);a.appendChild(o),["click","touchstart"].forEach(function(r){o.addEventListener(r,function(r){r.preventDefault(),r.stopPropagation(),e.hasClass(i,"xgplayer-fullscreen-active")||e.hasClass(i,"xgplayer-is-fullscreen")?function(t){var r=document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled;s.setAttribute("d",n),l.textContent="全屏",r?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():e.removeClass(t,"xgplayer-fullscreen-active")}(i):function(n){var r=document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled;s.setAttribute("d",t),l.textContent="退出全屏",r?n.requestFullscreen?n.requestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullScreen?n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):n.msRequestFullscreen?n.msRequestFullscreen():e.addClass(n,"xgplayer-fullscreen-active"):e.addClass(n,"xgplayer-fullscreen-active")}(i)})});var u=function(r){var o=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;o&&o===i?(e.addClass(i,"xgplayer-is-fullscreen"),s.setAttribute("d",t),l.textContent="退出全屏"):(e.removeClass(i,"xgplayer-is-fullscreen"),s.setAttribute("d",n),l.textContent="全屏")};["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach(function(e){document.addEventListener(e,u)}),this.once("destroy",function(){["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach(function(e){document.removeEventListener(e,u)}),o=null})})},function(e,t,n){"use strict";(function(e){return e&&e.__esModule?e:{default:e}})(n(0)).default.install("i18n",function(){var e=this,t={},n=e.constructor.util;t.en={HAVE_NOTHING:"There is no information on whether audio/video is ready",HAVE_METADATA:"audio/video metadata is ready ",HAVE_CURRENT_DATA:"Data about the current play location is available, but there is not enough data to play the next frame/millisecond",HAVE_FUTURE_DATA:"Current and at least one frame of data is available",HAVE_ENOUGH_DATA:"The available data is sufficient to start playing",NETWORK_EMPTY:"Audio/video has not been initialized",NETWORK_IDLE:"Audio/video is active and has been selected for resources, but no network is used",NETWORK_LOADING:"The browser is downloading the data",NETWORK_NO_SOURCE:"No audio/video source was found",MEDIA_ERR_ABORTED:"The fetch process is aborted by the user",MEDIA_ERR_NETWORK:"An error occurred while downloading",MEDIA_ERR_DECODE:"An error occurred while decoding",MEDIA_ERR_SRC_NOT_SUPPORTED:"Audio/video is not supported",REPLAY:"Replay",ERROR:"network is offline"},t["zh-cn"]={HAVE_NOTHING:"没有关于音频/视频是否就绪的信息",HAVE_METADATA:"音频/视频的元数据已就绪",HAVE_CURRENT_DATA:"关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒",HAVE_FUTURE_DATA:"当前及至少下一帧的数据是可用的",HAVE_ENOUGH_DATA:"可用数据足以开始播放",NETWORK_EMPTY:"音频/视频尚未初始化",NETWORK_IDLE:"音频/视频是活动的且已选取资源,但并未使用网络",NETWORK_LOADING:"浏览器正在下载数据",NETWORK_NO_SOURCE:"未找到音频/视频来源",MEDIA_ERR_ABORTED:"取回过程被用户中止",MEDIA_ERR_NETWORK:"当下载时发生错误",MEDIA_ERR_DECODE:"当解码时发生错误",MEDIA_ERR_SRC_NOT_SUPPORTED:"不支持的音频/视频格式",REPLAY:"重播",ERROR:"网络连接似乎出现了问题"},Object.defineProperty(e,"lang",{get:function(){return t[e.config.lang]||t.en},set:function(e){"Object"===n.typeOf(e)&&Object.keys(e).forEach(function(n){t[n]=e[n]})}})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("loading",function(){var e=r.default.util.createDom("xg-loading",'\n \n \n \n ',{},"xgplayer-loading");this.root.appendChild(e),this.once("destroy",function(){e=null})})},function(e,t,n){"use strict";var r=a(n(0)),o=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.install("mobile",function(){var e=this,t=r.default.util,n=e.root;e.config.autoplay=!1;var a=function(e){var t=r.default.util;return e.some(function(e){return"Function"===t.typeOf(e)?e.call(navigator.userAgent):"RegExp"===t.typeOf(e)?e.test(navigator.userAgent):"String"===t.typeOf(e)&&navigator.userAgent.indexOf(e)>-1})}(e.config.whitelist);e.mobilePass=a;var i="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z",l="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z",s=t.createDom("xg-start",'\n \n \n ',{},"xgplayer-start"),u=t.createDom("xg-enter",'',{},"xgplayer-enter"),c=u.querySelector(".xgplayer-enter-logo");n.appendChild(s),n.appendChild(u);var p=s.querySelector("path"),f=new Image,d=new o.default({from:l,to:i,progress:function(e,t){p.setAttribute("d",d.toSVGString(e))}});u.querySelector(".xgplayer-enter-tips").style.display="block",e.start(),a?(f.src=t.getBgImage(c),e.video.addEventListener("touchstart",function(t){t.preventDefault(),e.emit("focus")},!1),s.addEventListener("touchstart",function(r){r.preventDefault(),t.hasClass(n,"xgplayer-nostart")?(t.removeClass(n,"xgplayer-nostart"),t.addClass(n,"xgplayer-is-enter"),e.on("canplay",function(){t.removeClass(n,"xgplayer-is-enter")}),e.once("playing",function(){t.removeClass(n,"xgplayer-is-enter")}),e.play()):e.paused?e.play():e.pause()}),e.on("play",function(){d.reset(l,i)}),e.on("pause",function(){d.reset(i,l)})):(t.addClass(n,"xgplayer-mobile-npassed"),e.once("ready",function(){e.video.controls=e.config.controls,e.video.controlsList=e.config.controlsList.join(" "),e.config.poster&&(e.video.poster=e.config.poster)})),e.config.debug&&function(e){var t={};Object.assign(t,{host:"127.0.0.1",port:9090},e);var n=document.createElement("script"),r=document.createElement("h4");r.style.cssText="position:fixed;bottom:0;padding:10px;width:100%;background-color:#fff;text-align:center",r.textContent="weinre --boundHost "+t.host+" --httpPort "+t.port+"\r\n 启动服务后,刷新页面",n.anonymous=!0,n.async=!0,n.src="http://"+t.host+":"+t.port+"/target/target-script-min.js#anonymous",n.onload=function(){r.parentNode.removeChild(r)},document.body.appendChild(n),document.body.appendChild(r)}(e.config.debug)})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("pc",function(){var e=this,t=r.default.util,n=e.controls,o=e.root,a=0,i=void 0,l="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z",s="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z",u=t.createDom("xg-start",'\n \n \n ',{},"xgplayer-start"),c=t.createDom("xg-enter",'',{},"xgplayer-enter"),p=c.querySelector(".xgplayer-enter-logo");o.appendChild(u),o.appendChild(c);var f=u.querySelector("path"),d=new Image;d.onload=function(){c.querySelector(".xgplayer-enter-tips").style.display="block"},d.src=t.getBgImage(p),["click","touchstart"].forEach(function(n){u.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation(),e.config.url&&(t.hasClass(o,"xgplayer-nostart")?(t.removeClass(o,"xgplayer-nostart"),t.addClass(o,"xgplayer-is-enter"),o.querySelector("video")||e.start(),e.on("canplay",function(){t.removeClass(o,"xgplayer-is-enter")}),e.once("playing",function(){t.removeClass(o,"xgplayer-is-enter")}),e.play(),setTimeout(function(){e.play()},10)):e.paused&&(t.removeClass(o,"xgplayer-nostart xgplayer-isloading"),setTimeout(function(){e.play()},10)))})}),u.addEventListener("animationend",function(e){e.preventDefault(),t.removeClass(u,"xgplayer-start-interact"),u.style.display="none"}),e.on("play",function(){f.setAttribute("d",l),u.style.display="inline-block",t.addClass(u,"xgplayer-start-interact")}),e.on("pause",function(){f.setAttribute("d",s),u.style.display="inline-block",t.addClass(u,"xgplayer-start-interact")}),e.video.addEventListener("click",function(n){n.preventDefault(),n.stopPropagation(),document.activeElement===e.video?(a++,i&&clearTimeout(i),1===a?i=setTimeout(function(){if(t.hasClass(e.root,"xgplayer-nostart"))return!1;e.ended||(e.paused?e.play():e.pause()),a=0},200):a=0):e.video.focus()},!1),e.video.addEventListener("dblclick",function(t){if(t.preventDefault(),t.stopPropagation(),document.activeElement===e.video){var r=n.querySelector(".xgplayer-fullscreen");if(r){var o=void 0;document.createEvent?(o=document.createEvent("Event")).initEvent("click",!0,!0):o=new Event("click"),r.dispatchEvent(o)}}else e.video.focus()},!1),o.addEventListener("mouseenter",function(t){e.emit("focus",e)},!1),o.addEventListener("mouseleave",function(t){e.emit("blur",e)},!1),n.addEventListener("mouseenter",function(t){e.userTimer&&clearTimeout(e.userTimer)},!1),n.addEventListener("mouseleave",function(t){e.emit("focus",e)},!1)})},function(e,t,n){"use strict";var r=a(n(0)),o=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.install("play",function(){var e=this,t=e.controls,n=r.default.util,a=e.config.iconScale||.0320625,i="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z",l="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z",s=n.createDom("xg-play",'\n \n '),u=n.createDom("xg-tips","播放",{},"xgplayer-tips"),c=s.querySelector("path");s.appendChild(u);var p=new o.default({progress:function(e,t){c.setAttribute("d",p.toSVGString(e))},from:l,to:i});s.className="xgplayer-play",t.appendChild(s),["click","touchstart"].forEach(function(t){s.addEventListener(t,function(t){t.preventDefault(),t.stopPropagation(),e.ended||(e.paused?e.play():e.pause())},!1)}),e.on("play",function(){u.textContent="暂停",p.to!==l&&p.reset(l,i)}),e.on("pause",function(){u.textContent="播放",p.to!==i&&p.reset(i,l)}),e.once("destroy",function(){s=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("playbackRate",function(){var e=this,t=r.default.util,n=[];if(!e.config.playbackRate)return!1;e.config.playbackRate.sort(function(e,t){return t-e}),e.config.playbackRate.forEach(function(e){n.push("
  • "+e+"x
  • ")});var o=t.createDom("xg-playback","

    1x

      "+n.join("")+"
    ",{},"xgplayer-playback");e.controls.appendChild(o),["touchstart","click"].forEach(function(n){o.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation();var r=n.target||n.srcElement;r&&"li"===r.tagName.toLocaleLowerCase()&&(Array.prototype.forEach.call(r.parentNode.childNodes,function(e){t.removeClass(e,"active")}),t.addClass(r,"active"),o.querySelector("p").textContent=r.textContent,e.video.playbackRate=1*r.textContent.replace(/x$/g,""))},!1)}),e.once("destroy",function(){o=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("poster",function(){var e=r.default.util.createDom("xg-poster","",{},"xgplayer-poster"),t=this.root;this.config.poster&&(e.style.backgroundImage="url("+this.config.poster+")",t.appendChild(e)),this.on("play",function(){e.style.display="none"}),this.once("destroy",function(){e=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("progress",function(){var e=this,t=r.default.util,n=t.createDom("xg-progress",'',{tabindex:1},"xgplayer-progress"),o=e.controls,a=void 0;o.appendChild(n);var i=n.querySelector(".xgplayer-progress-played"),l=n.querySelector(".xgplayer-progress-cache"),s=n.querySelector(".xgplayer-progress-point");["touchstart","mousedown"].forEach(function(r){n.addEventListener(r,function(r){if(r.preventDefault(),r.stopPropagation(),t.event(r),r._target===s||e.ended)return!1;n.focus(),a=n.getBoundingClientRect().width;var o=i.getBoundingClientRect().left,l=!1,u=function(n){n.preventDefault(),n.stopPropagation(),t.event(n),l=!0;var r=n.clientX-o,s=r/a*e.duration;i.style.width=100*r/a+"%",e.currentTime=Number(s).toFixed(1)},c=function r(s){if(s.preventDefault(),s.stopPropagation(),t.event(s),window.removeEventListener("mousemove",u),window.removeEventListener("touchmove",u),window.removeEventListener("mouseup",r),window.removeEventListener("touchend",r),n.blur(),!l){var c=s.clientX-o,p=c/a*e.duration;i.style.width=100*c/a+"%",e.currentTime=Number(p).toFixed(1)}l=!1};return window.addEventListener("mousemove",u),window.addEventListener("touchmove",u),window.addEventListener("mouseup",c),window.addEventListener("touchend",c),!1})}),n.addEventListener("mouseenter",function(r){if(e.ended)return!1;var o=n.getBoundingClientRect().left,a=n.getBoundingClientRect().width,i=function(n){var r=(n.clientX-o)/a*e.duration;s.textContent=t.format(r),s.style.left=n.clientX-o-15+"px",s.style.display="block"},l=function(e){i(e)};n.addEventListener("mousemove",l,!1),n.addEventListener("mouseleave",function e(t){n.removeEventListener("mousemove",l,!1),n.removeEventListener("mouseleave",e,!1),i(t),s.style.display="none"},!1),i(r)},!1),e.on("timeupdate",function(){a||(a=n.getBoundingClientRect().width),i.style.width=100*e.currentTime/e.duration+"%"}),["cacheupdate","ended","timeupdate"].forEach(function(t){e.on(t,function(){var t=e.buffered;if(t&&t.length>0){var n=t.end(t.length-1);l.style.width=n/e.duration*100+"%"}})}),e.once("destroy",function(){n=null,i=null,s=null,l=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("replay",function(){var e=this,t=r.default.util,n=t.createDom("xg-replay",'\n \n \n \n 重播\n ',{},"xgplayer-replay"),o=e.root,a=n.querySelector(".xgplayer-replay-svg");o.appendChild(n),e.on("ended",function(){n.querySelector(".xgplayer-replay-txt").textContent=e.lang.REPLAY,e.config.loop||t.addClass(o,"replay")}),a.addEventListener("click",function(n){n.preventDefault(),t.removeClass(o,"replay"),e.replay()}),e.once("destroy",function(){a=null})})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));r.default.install("time",function(){var e=this,t=r.default.util,n=t.format,o=t.createDom("xg-time",""+(e.currentTime||n(0))+""+(e.duration||n(0))+"",{},"xgplayer-time");e.controls.appendChild(o);var a=function(){o.innerHTML=""+n(e.currentTime||0)+""+n(e.duration)};e.on("durationchange",a),e.on("timeupdate",a),e.once("destroy",function(){e.off("durationchange",a),e.off("timeupdate",a),o=null})})},function(e,t,n){"use strict";!function(){for(var e=0,t=["webkit","moz"],n=0;n1&&(a=1),a<-1&&(a=-1),o*Math.acos(a)},a=function(a){var i=a.px,l=a.py,s=a.cx,u=a.cy,c=a.rx,p=a.ry,f=a.xAxisRotation,d=void 0===f?0:f,g=a.largeArcFlag,h=void 0===g?0:g,y=a.sweepFlag,v=void 0===y?0:y,m=[];if(0===c||0===p)return[];var x=Math.sin(d*t/360),b=Math.cos(d*t/360),w=b*(i-s)/2+x*(l-u)/2,k=-x*(i-s)/2+b*(l-u)/2;if(0===w&&0===k)return[];c=Math.abs(c),p=Math.abs(p);var E=Math.pow(w,2)/Math.pow(c,2)+Math.pow(k,2)/Math.pow(p,2);E>1&&(c*=Math.sqrt(E),p*=Math.sqrt(E));var _=function(e,n,r,a,i,l,s,u,c,p,f,d){var g=Math.pow(i,2),h=Math.pow(l,2),y=Math.pow(f,2),v=Math.pow(d,2),m=g*h-g*v-h*y;m<0&&(m=0),m/=g*v+h*y;var x=(m=Math.sqrt(m)*(s===u?-1:1))*i/l*d,b=m*-l/i*f,w=p*x-c*b+(e+r)/2,k=c*x+p*b+(n+a)/2,E=(f-x)/i,_=(d-b)/l,C=(-f-x)/i,M=(-d-b)/l,T=o(1,0,E,_),O=o(E,_,C,M);return 0===u&&O>0&&(O-=t),1===u&&O<0&&(O+=t),[w,k,T,O]}(i,l,s,u,c,p,h,v,x,b,w,k),C=e(_,4),M=C[0],T=C[1],O=C[2],R=C[3],S=Math.max(Math.ceil(Math.abs(R)/(t/4)),1);R/=S;for(var A=0;Ae-1&&(a-=e),r[a]=o}t.push(r)}return t}(e.length),r=[];n.forEach(function(n){var o=0,a=0;n.forEach(function(n){o+=function(e,t){var n=e[0],r=e[2],o=e[4],a=e[6],i=e[1],l=e[3],s=e[5],u=e[7],c=t[0],p=t[2],f=t[4],d=t[6],g=t[1],h=t[3],y=t[5],v=t[7];return Math.sqrt(Math.pow(c-n,2)+Math.pow(g-i,2))+Math.sqrt(Math.pow(p-r,2)+Math.pow(h-l,2))+Math.sqrt(Math.pow(f-o,2)+Math.pow(y-s,2))+Math.sqrt(Math.pow(d-a,2)+Math.pow(v-u,2))}(e[n],t[a++])}),r.push({index:n,distance:o})}),r.sort(function(e,t){return e.distance-t.distance});var o=[];return r[0].index.forEach(function(t){o.push(e[t])}),o}function p(e,t){var n=function(e){for(var t=[],n=0;n2&&(t.push([n].concat(r.splice(0,2))),o="l",n="m"==n?"l":"L");;){if(r.length==i[o])return r.unshift(n),t.push(r);if(r.lengtho-1&&(r-=o)},f._splitCurves=function(e,t){for(var n=0,r=0;n=e.length-1&&(r=0)}},f._upShapes=function(e,t){for(var n=function(t){var n=e[e.length-1],r=[];n.forEach(function(e){r.push(e.slice(0))}),e.push(r)},r=0;rr?f._subShapes(o,a,n-r):nr?n=p)return i(c=n,1),a(c),void cancelAnimationFrame(u);var l=s(t/p);c=f._lerp(r[0],r[1],l),i(c,l),u=requestAnimationFrame(e)}()},f})},function(e,t,n){"use strict";var r=a(n(0)),o=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}r.default.install("volume",function(){var e=this,t=r.default.util,n=e.config.volume,a={muted:"M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z",small:"M795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z",large:"M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"},i=function(e){return 0===e?"muted":e<.5?"small":"large"},l=a[i(n)],s=a[i(n)],u=t.createDom("xg-volume",'\n \n \n \n \n \n \n \n \n \n ',{},"xgplayer-volume"),c=e.controls;c.appendChild(u);var p=void 0,f=u.querySelector(".xgplayer-slider"),d=u.querySelector(".xgplayer-bar"),g=u.querySelector(".xgplayer-drag"),h=u.querySelector(".xgplayer-icon");g.style.height=100*e.config.volume+"%";var y=c.querySelectorAll("path")[1],v=new o.default({progress:function(e,t){var n=v.toSVGString(e);y.setAttribute("d",n),l=n},from:l,to:a.large}),m=null;f.volume=e.config.volume,["touchstart","mousedown"].forEach(function(n){d.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation(),f.focus(),t.event(n),p=d.getBoundingClientRect().height,n.clientX;var r=n.clientY,o=g.getBoundingClientRect().height,a=!1,i=function(n){n.preventDefault(),n.stopPropagation(),t.event(n),a=!0;var i=o-n.clientY+r,l=i/p;g.style.height=i+"px",e.volume=Math.max(Math.min(l,1),.01)},l=function n(r){if(r.preventDefault(),r.stopPropagation(),t.event(r),window.removeEventListener("mousemove",i),window.removeEventListener("touchmove",i),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),m||(m=d.getBoundingClientRect()),!a){var o=m.height-(r.clientY-m.top),l=o/m.height;g.style.height=o+"px",l<=0&&(e.volume>0?g.volume=e.video.volume:l=g.volume),e.volume=Math.max(Math.min(l,1),.01)}f.volume=e.volume,a=!1};return window.addEventListener("mousemove",i),window.addEventListener("touchmove",i),window.addEventListener("mouseup",l),window.addEventListener("touchend",l),!1})}),["touchstart","mousedown"].forEach(function(n){h.addEventListener(n,function(n){n.preventDefault(),n.stopPropagation(),t.hasClass(f,"xgplayer-none")?(t.removeClass(f,"xgplayer-none"),f.focus()):0===e.volume?e.volume=f.volume:e.volume=0})}),f.addEventListener("blur",function(e){e.preventDefault(),e.stopPropagation(),t.addClass(f,"xgplayer-none")});var x=null;e.on("volumechange",function(){x&&clearTimeout(x),x=setTimeout(function(){v.reset(a[i(e.volume)],l),l=a[i[e.volume]],p||(p=d.getBoundingClientRect().height||76),g.style.height=e.volume*p+"px"},50)}),e.once("canplay",function(){e.volume=e.config.volume}),e.once("destroy",function(){u=null,g=null})})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={get device(){var e=r.os;return e.isPc?"pc":e.isTablet?"tablet":"mobile"},get browser(){var e=navigator.userAgent.toLowerCase(),t={ie:/rv:([\d.]+)\) like gecko/,firfox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return[].concat(Object.keys(t).filter(function(n){return t[n].test(e)}))[0]},get os(){var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),o=/(?:Firefox)/.test(e),a=/(?:iPad|PlayBook)/.test(e)||r&&!/(?:Mobile)/.test(e)||o&&/(?:Tablet)/.test(e),i=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:i,isAndroid:r,isPc:!i&&!r&&!n,isSymbian:n,isWindowsPhone:t,isFireFox:o}}};t.default=r,e.exports=t.default},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";var r=String.prototype.indexOf;e.exports=function(e){return r.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";var r="razdwatrzy";e.exports=function(){return"function"==typeof r.contains&&(!0===r.contains("dwa")&&!1===r.contains("foo"))}},function(e,t,n){"use strict";e.exports=n(31)()?String.prototype.contains:n(30)},function(e,t,n){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";var r=n(2),o=Array.prototype.forEach,a=Object.create;e.exports=function(e){var t=a(null);return o.call(arguments,function(e){r(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)}),t}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=n(2),o=Object.keys;e.exports=function(e){return o(r(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";e.exports=n(38)()?Object.keys:n(37)},function(e,t,n){"use strict";var r=n(39),o=n(35),a=Math.max;e.exports=function(e,t){var n,i,l,s=a(arguments.length,2);for(e=Object(o(e)),l=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},i=1;i=0.5 0", + "rimraf": "2" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", + "dev": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "http://npm.byted.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "gaze": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/gaze/-/gaze-1.1.3.tgz", + "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", + "dev": true, + "requires": { + "globule": "^1.0.0" + } + }, + "generate-function": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", + "dev": true + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "dev": true, + "requires": { + "is-property": "^1.0.0" + } + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "http://npm.byted.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "http://npm.byted.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "gh-got": { + "version": "6.0.0", + "resolved": "http://npm.byted.org/gh-got/-/gh-got-6.0.0.tgz", + "integrity": "sha1-10NTAExuxGZkdSChC9RvcpnSaNA=", + "dev": true, + "requires": { + "got": "^7.0.0", + "is-plain-obj": "^1.1.0" + }, + "dependencies": { + "got": { + "version": "7.1.0", + "resolved": "http://npm.byted.org/got/-/got-7.1.0.tgz", + "integrity": "sha1-BUUP2ECU5rvqVvRRpDqcKJFmOFo=", + "dev": true, + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha1-ueEjgAvOu3rBOkeb4ZW1B7mNMPo=", + "dev": true + }, + "p-timeout": { + "version": "1.2.1", + "resolved": "http://npm.byted.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + } + } + }, + "github-username": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/github-username/-/github-username-4.1.0.tgz", + "integrity": "sha1-y+KABBiDIG2kISrp5LXxacML9Bc=", + "dev": true, + "requires": { + "gh-got": "^6.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "http://npm.byted.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-all": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/glob-all/-/glob-all-3.1.0.tgz", + "integrity": "sha1-iRPd+17hrHgSZWJBsD1SF8ZLAqs=", + "dev": true, + "requires": { + "glob": "^7.0.5", + "yargs": "~1.2.6" + }, + "dependencies": { + "minimist": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/minimist/-/minimist-0.1.0.tgz", + "integrity": "sha1-md9lelJXTCHJBXSX33QnkLK0wN4=", + "dev": true + }, + "yargs": { + "version": "1.2.6", + "resolved": "http://npm.byted.org/yargs/-/yargs-1.2.6.tgz", + "integrity": "sha1-nHtKgv1dWVsr8Xq23MQxNUMv40s=", + "dev": true, + "requires": { + "minimist": "^0.1.0" + } + } + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true + }, + "global-modules": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "http://npm.byted.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=", + "dev": true + }, + "globby": { + "version": "8.0.1", + "resolved": "http://npm.byted.org/globby/-/globby-8.0.1.tgz", + "integrity": "sha1-ta1IuKqAs1uBT8EoHsyFHx0rW1A=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "fast-glob": "^2.0.2", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" + } + }, + "globule": { + "version": "1.2.1", + "resolved": "http://npm.byted.org/globule/-/globule-1.2.1.tgz", + "integrity": "sha1-Xf+xsZHyLSB5epNptJ6rTpg5aW0=", + "dev": true, + "requires": { + "glob": "~7.1.1", + "lodash": "~4.17.10", + "minimatch": "~3.0.2" + } + }, + "got": { + "version": "8.3.1", + "resolved": "http://npm.byted.org/got/-/got-8.3.1.tgz", + "integrity": "sha1-CTMkQD1NlV9aFqeo05lV0FWuEO0=", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.7.0", + "cacheable-request": "^2.1.1", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "into-stream": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "mimic-response": "^1.0.0", + "p-cancelable": "^0.4.0", + "p-timeout": "^2.0.1", + "pify": "^3.0.0", + "safe-buffer": "^5.1.1", + "timed-out": "^4.0.1", + "url-parse-lax": "^3.0.0", + "url-to-options": "^1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "http://npm.byted.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "grouped-queue": { + "version": "0.3.3", + "resolved": "http://npm.byted.org/grouped-queue/-/grouped-queue-0.3.3.tgz", + "integrity": "sha1-wWfSpTGcWg4JZO9qJbfC34mWyFw=", + "dev": true, + "requires": { + "lodash": "^4.17.2" + } + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "dev": true, + "requires": { + "ajv": "^4.9.1", + "har-schema": "^1.0.5" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "requires": { + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" + } + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/has/-/has-1.0.3.tgz", + "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-color": { + "version": "0.1.7", + "resolved": "http://npm.byted.org/has-color/-/has-color-0.1.7.tgz", + "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "http://npm.byted.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha1-FAn5i8ACR9pF2mfO4KNvKC/yZFU=", + "dev": true + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha1-oEWrOD17SyASoAFIqwql8pAETU0=", + "dev": true, + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "http://npm.byted.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.4", + "resolved": "http://npm.byted.org/hash.js/-/hash.js-1.1.4.tgz", + "integrity": "sha1-i1Dh811RvQHl7Z7OTb41Scz6Cjw=", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "http://npm.byted.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "requires": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "http://npm.byted.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.6.0", + "resolved": "http://npm.byted.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha1-IyNbKasjDFdqqw1PE/wEawsDgiI=", + "dev": true + }, + "html-comment-regex": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz", + "integrity": "sha1-ZouTd26q5V696POtRkswekljYl4=", + "dev": true + }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "http://npm.byted.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha1-ObDhat2bYFvwqe89nar0hDtMrNI=", + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "requires": { + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "http://npm.byted.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha1-KXhx9jvlB63Pv8pxXQzQ7thOmmM=", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "icss-replace-symbols": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", + "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", + "dev": true + }, + "icss-utils": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/icss-utils/-/icss-utils-2.1.0.tgz", + "integrity": "sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "ieee754": { + "version": "1.1.12", + "resolved": "http://npm.byted.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha1-UL8k5bnIu5ivSWTJQc2wkY2ntgs=", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "ignore": { + "version": "3.3.10", + "resolved": "http://npm.byted.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha1-Cpf7h2mG6AgcYxFg+PnziRV/AEM=", + "dev": true + }, + "import-local": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha1-Xk/9wD9P5sAJxnKb6yljHC+CJ7w=", + "dev": true, + "requires": { + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "in-publish": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/in-publish/-/in-publish-2.0.0.tgz", + "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "http://npm.byted.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "http://npm.byted.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "http://npm.byted.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc=", + "dev": true + }, + "inquirer": { + "version": "5.2.0", + "resolved": "http://npm.byted.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha1-2zUMK3Paynf/EkOWLp8i8JloVyY=", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "into-stream": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/into-stream/-/into-stream-3.1.0.tgz", + "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", + "dev": true, + "requires": { + "from2": "^2.1.1", + "p-is-promise": "^1.1.0" + } + }, + "invariant": { + "version": "2.2.4", + "resolved": "http://npm.byted.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-absolute-url": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", + "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "http://npm.byted.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", + "dev": true + } + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "http://npm.byted.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-my-ip-valid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", + "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", + "dev": true + }, + "is-my-json-valid": { + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", + "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", + "dev": true, + "requires": { + "generate-function": "^2.0.0", + "generate-object-property": "^1.1.0", + "is-my-ip-valid": "^1.0.0", + "jsonpointer": "^4.0.0", + "xtend": "^4.0.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-object": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "dev": true + }, + "is-observable": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/is-observable/-/is-observable-1.1.0.tgz", + "integrity": "sha1-s+mGyPRN6VCGfKtUA/WjRlAFl14=", + "dev": true, + "requires": { + "symbol-observable": "^1.1.0" + }, + "dependencies": { + "symbol-observable": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha1-wiaIrtTqs83C3+rLtWFmBWCgCAQ=", + "dev": true + } + } + }, + "is-odd": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha1-dkZiRnH9fqVYzNmieVGC8pWPGyQ=", + "dev": true, + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=", + "dev": true + } + } + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-property": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-scoped": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-scoped/-/is-scoped-1.0.0.tgz", + "integrity": "sha1-RJypgpnnEwOCViieyytUDcQ3yzA=", + "dev": true, + "requires": { + "scoped-regex": "^1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-svg": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/is-svg/-/is-svg-2.1.0.tgz", + "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=", + "dev": true, + "requires": { + "html-comment-regex": "^1.1.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isbinaryfile": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz", + "integrity": "sha1-Sj6XTsDLqQBNP8bN5yCeppNopiE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isnumeric": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/isnumeric/-/isnumeric-0.2.0.tgz", + "integrity": "sha1-ojR7o2DeGeM9D/1ZD933dVy/LmQ=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "http://npm.byted.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istextorbinary": { + "version": "2.2.1", + "resolved": "http://npm.byted.org/istextorbinary/-/istextorbinary-2.2.1.tgz", + "integrity": "sha1-pSMaCO9t0ismjQiVCEz41Ytb7FM=", + "dev": true, + "requires": { + "binaryextensions": "2", + "editions": "^1.3.3", + "textextensions": "2" + } + }, + "isurl": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha1-sn9PSfPNqj6kSgpbfzRi5u3DnWc=", + "dev": true, + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "js-base64": { + "version": "2.4.5", + "resolved": "http://npm.byted.org/js-base64/-/js-base64-2.4.5.tgz", + "integrity": "sha1-4pPNPHyC8HDXAPx6HKCi5p8QH5I=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.7.0", + "resolved": "http://npm.byted.org/js-yaml/-/js-yaml-3.7.0.tgz", + "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^2.6.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "jscodeshift": { + "version": "0.5.1", + "resolved": "http://npm.byted.org/jscodeshift/-/jscodeshift-0.5.1.tgz", + "integrity": "sha1-SvanIWSL6GOK4UZKGQNC2lKWDDM=", + "dev": true, + "requires": { + "babel-plugin-transform-flow-strip-types": "^6.8.0", + "babel-preset-es2015": "^6.9.0", + "babel-preset-stage-1": "^6.5.0", + "babel-register": "^6.9.0", + "babylon": "^7.0.0-beta.47", + "colors": "^1.1.2", + "flow-parser": "^0.*", + "lodash": "^4.13.1", + "micromatch": "^2.3.7", + "neo-async": "^2.5.0", + "node-dir": "0.1.8", + "nomnom": "^1.8.1", + "recast": "^0.15.0", + "temp": "^0.8.1", + "write-file-atomic": "^1.2.0" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "babylon": { + "version": "7.0.0-beta.0-ranges", + "resolved": "http://npm.byted.org/babylon/-/babylon-7.0.0-beta.0-ranges.tgz", + "integrity": "sha1-sq7osZ2dLdM768BB4VLxykeU6wU=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "http://npm.byted.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "http://npm.byted.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "http://npm.byted.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + } + } + }, + "jsesc": { + "version": "0.5.0", + "resolved": "http://npm.byted.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "json-loader": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/json-loader/-/json-loader-0.5.7.tgz", + "integrity": "sha1-3KFKcCNf+C8KyaOr62DTN6NlGF0=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "http://npm.byted.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "http://npm.byted.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "~0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "http://npm.byted.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "http://npm.byted.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "keyv": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha1-RJI7o55osSp87H32wyaMAx8u83M=", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "leb": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/leb/-/leb-0.3.0.tgz", + "integrity": "sha1-Mr7p+tFoMo1q6oUi2DP0GA7tHaM=", + "dev": true + }, + "listr": { + "version": "0.14.1", + "resolved": "http://npm.byted.org/listr/-/listr-0.14.1.tgz", + "integrity": "sha1-inr6SnE1zuTJIdEo4LffxuUi1D0=", + "dev": true, + "requires": { + "@samverschueren/stream-to-observable": "^0.3.0", + "cli-truncate": "^0.2.1", + "figures": "^1.7.0", + "indent-string": "^2.1.0", + "is-observable": "^1.1.0", + "is-promise": "^2.1.0", + "is-stream": "^1.1.0", + "listr-silent-renderer": "^1.1.1", + "listr-update-renderer": "^0.4.0", + "listr-verbose-renderer": "^0.4.0", + "log-symbols": "^1.0.2", + "log-update": "^1.0.2", + "ora": "^0.2.3", + "p-map": "^1.1.1", + "rxjs": "^6.1.0", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "figures": { + "version": "1.7.0", + "resolved": "http://npm.byted.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "dev": true, + "requires": { + "chalk": "^1.0.0" + } + }, + "rxjs": { + "version": "6.2.1", + "resolved": "http://npm.byted.org/rxjs/-/rxjs-6.2.1.tgz", + "integrity": "sha1-JGzr7BiabLwUOj759i1vTJGBPKE=", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + } + } + }, + "listr-silent-renderer": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", + "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=", + "dev": true + }, + "listr-update-renderer": { + "version": "0.4.0", + "resolved": "http://npm.byted.org/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz", + "integrity": "sha1-NE2YDaLKLosUW6MFkI8yrj9MyKc=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "cli-truncate": "^0.2.1", + "elegant-spinner": "^1.0.1", + "figures": "^1.7.0", + "indent-string": "^3.0.0", + "log-symbols": "^1.0.2", + "log-update": "^1.0.2", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "figures": { + "version": "1.7.0", + "resolved": "http://npm.byted.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "indent-string": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "dev": true, + "requires": { + "chalk": "^1.0.0" + } + } + } + }, + "listr-verbose-renderer": { + "version": "0.4.1", + "resolved": "http://npm.byted.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", + "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "cli-cursor": "^1.0.2", + "date-fns": "^1.27.2", + "figures": "^1.7.0" + }, + "dependencies": { + "cli-cursor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "http://npm.byted.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + } + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "dev": true + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "http://npm.byted.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha1-G3eTz3JZ6jj7NmHU04syYK+K5Oc=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "http://npm.byted.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "http://npm.byted.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "http://npm.byted.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "http://npm.byted.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "http://npm.byted.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "lodash.mergewith": { + "version": "4.6.1", + "resolved": "http://npm.byted.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", + "integrity": "sha1-Y5BX5ybDr72z59QnQcqo1uQzWSc=", + "dev": true + }, + "lodash.tail": { + "version": "4.1.1", + "resolved": "http://npm.byted.org/lodash.tail/-/lodash.tail-4.1.1.tgz", + "integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=", + "dev": true + }, + "lodash.template": { + "version": "4.4.0", + "resolved": "http://npm.byted.org/lodash.template/-/lodash.template-4.4.0.tgz", + "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", + "dev": true, + "requires": { + "lodash._reinterpolate": "~3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", + "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", + "dev": true, + "requires": { + "lodash._reinterpolate": "~3.0.0" + } + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "http://npm.byted.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha1-V0Dhxdbw39pK2TI7UzIQfva0xAo=", + "dev": true, + "requires": { + "chalk": "^2.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "log-update": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/log-update/-/log-update-1.0.2.tgz", + "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", + "dev": true, + "requires": { + "ansi-escapes": "^1.0.0", + "cli-cursor": "^1.0.2" + }, + "dependencies": { + "ansi-escapes": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + } + } + }, + "long": { + "version": "3.2.0", + "resolved": "http://npm.byted.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "^3.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "http://npm.byted.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha1-oRdc80lt/IQ2wVbDNLSVWZK85pw=", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "mamacro": { + "version": "0.0.3", + "resolved": "http://npm.byted.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha1-rSyVdhl8nxq/MI0Hh4Zb2XWj8+Q=", + "dev": true + }, + "map-cache": { + "version": "0.2.2", + "resolved": "http://npm.byted.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "math-expression-evaluator": { + "version": "1.2.17", + "resolved": "http://npm.byted.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", + "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=", + "dev": true + }, + "math-random": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "dev": true + }, + "md5.js": { + "version": "1.3.4", + "resolved": "http://npm.byted.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "mem": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "mem-fs": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/mem-fs/-/mem-fs-1.1.3.tgz", + "integrity": "sha1-uK6NLj/Lb10/kWXBLUVRoGXZicw=", + "dev": true, + "requires": { + "through2": "^2.0.0", + "vinyl": "^1.1.0", + "vinyl-file": "^2.0.0" + } + }, + "mem-fs-editor": { + "version": "4.0.2", + "resolved": "http://npm.byted.org/mem-fs-editor/-/mem-fs-editor-4.0.2.tgz", + "integrity": "sha1-VaebHoJNpjElTEyVumNmYCx3r5A=", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "deep-extend": "^0.5.1", + "ejs": "^2.5.9", + "glob": "^7.0.3", + "globby": "^8.0.0", + "isbinaryfile": "^3.0.2", + "mkdirp": "^0.5.0", + "multimatch": "^2.0.0", + "rimraf": "^2.2.8", + "through2": "^2.0.0", + "vinyl": "^2.0.1" + }, + "dependencies": { + "clone": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/clone/-/clone-2.1.1.tgz", + "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "vinyl": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/vinyl/-/vinyl-2.1.0.tgz", + "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "http://npm.byted.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "meow": { + "version": "3.7.0", + "resolved": "http://npm.byted.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "merge2": { + "version": "1.2.2", + "resolved": "http://npm.byted.org/merge2/-/merge2-1.2.2.tgz", + "integrity": "sha1-AyEuPajYbE2FI869YxgZNBT5TjQ=", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "http://npm.byted.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha1-8IA1HIZbDcViqEYpZtqlNUPHik0=", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "requires": { + "mime-db": "~1.33.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", + "dev": true + }, + "mimic-response": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/mimic-response/-/mimic-response-1.0.0.tgz", + "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha1-LhlN4ERibUoQ5/f7wAznPoPk1cc=", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "http://npm.byted.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "http://npm.byted.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mississippi": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha1-NEKlCPr8KFAEhv7qmUCWduTuWm8=", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^2.0.1", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha1-pJ5yaNzhoNlpjkUybFYm3zVD0P4=", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mixin-object": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/mixin-object/-/mixin-object-2.0.1.tgz", + "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", + "dev": true, + "requires": { + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "dependencies": { + "for-in": { + "version": "0.1.8", + "resolved": "http://npm.byted.org/for-in/-/for-in-0.1.8.tgz", + "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=", + "dev": true + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://npm.byted.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multimatch": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "http://npm.byted.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.10.0", + "resolved": "http://npm.byted.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha1-ltDNYQ69WNS03pzAxoKM2pnHVI8=", + "dev": true + }, + "nanomatch": { + "version": "1.2.9", + "resolved": "http://npm.byted.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha1-h59xUMstq3pHElkGbBBO7m4Pp8I=", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-odd": "^2.0.0", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "neo-async": { + "version": "2.5.1", + "resolved": "http://npm.byted.org/neo-async/-/neo-async-2.5.1.tgz", + "integrity": "sha1-rLkJ4yex6H7J7xX0G4omlRKtQe4=", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "nice-try": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/nice-try/-/nice-try-1.0.4.tgz", + "integrity": "sha1-2Tli9sUvLBVYwPvabVEoGfHv4cQ=", + "dev": true + }, + "node-dir": { + "version": "0.1.8", + "resolved": "http://npm.byted.org/node-dir/-/node-dir-0.1.8.tgz", + "integrity": "sha1-VfuN62mQcHB/tn+RpGDwRIKUx30=", + "dev": true + }, + "node-gyp": { + "version": "3.7.0", + "resolved": "http://npm.byted.org/node-gyp/-/node-gyp-3.7.0.tgz", + "integrity": "sha1-eJR46PbEXid6oBTz4o+VjyhvkgM=", + "dev": true, + "requires": { + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": ">=2.9.0 <2.82.0", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" + }, + "dependencies": { + "semver": { + "version": "5.3.0", + "resolved": "http://npm.byted.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + } + } + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha1-X5QmPUBPbkR2fXJpAf/wVHjWAN8=", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^1.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.0", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.10.3", + "vm-browserify": "0.0.4" + } + }, + "node-sass": { + "version": "4.9.0", + "resolved": "http://npm.byted.org/node-sass/-/node-sass-4.9.0.tgz", + "integrity": "sha1-0biqhV2Y7WhNaEjbkpogdxzCrlI=", + "dev": true, + "requires": { + "async-foreach": "^0.1.3", + "chalk": "^1.1.1", + "cross-spawn": "^3.0.0", + "gaze": "^1.0.0", + "get-stdin": "^4.0.1", + "glob": "^7.0.3", + "in-publish": "^2.0.0", + "lodash.assign": "^4.2.0", + "lodash.clonedeep": "^4.3.2", + "lodash.mergewith": "^4.6.0", + "meow": "^3.7.0", + "mkdirp": "^0.5.1", + "nan": "^2.10.0", + "node-gyp": "^3.3.1", + "npmlog": "^4.0.0", + "request": "~2.79.0", + "sass-graph": "^2.2.4", + "stdout-stream": "^1.4.0", + "true-case-path": "^1.0.2" + }, + "dependencies": { + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", + "dev": true + }, + "har-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "commander": "^2.9.0", + "is-my-json-valid": "^2.12.4", + "pinkie-promise": "^2.0.0" + } + }, + "qs": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", + "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", + "dev": true + }, + "request": { + "version": "2.79.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", + "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", + "dev": true, + "requires": { + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "caseless": "~0.11.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.1.1", + "har-validator": "~2.0.6", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "oauth-sign": "~0.8.1", + "qs": "~6.3.0", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "~0.4.1", + "uuid": "^3.0.0" + } + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "dev": true + } + } + }, + "nomnom": { + "version": "1.8.1", + "resolved": "http://npm.byted.org/nomnom/-/nomnom-1.8.1.tgz", + "integrity": "sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc=", + "dev": true, + "requires": { + "chalk": "~0.4.0", + "underscore": "~1.6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-1.0.0.tgz", + "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", + "dev": true + }, + "chalk": { + "version": "0.4.0", + "resolved": "http://npm.byted.org/chalk/-/chalk-0.4.0.tgz", + "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", + "dev": true, + "requires": { + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" + } + }, + "strip-ansi": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-0.1.1.tgz", + "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", + "dev": true + } + } + }, + "nopt": { + "version": "3.0.6", + "resolved": "http://npm.byted.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "http://npm.byted.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "http://npm.byted.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true + }, + "normalize-url": { + "version": "1.9.1", + "resolved": "http://npm.byted.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "http://npm.byted.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=", + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "http://npm.byted.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "http://npm.byted.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "http://npm.byted.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + }, + "dependencies": { + "for-own": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + } + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onecolor": { + "version": "3.0.5", + "resolved": "http://npm.byted.org/onecolor/-/onecolor-3.0.5.tgz", + "integrity": "sha1-Nu/zIgE3nv3xGA+0ReUajiQl+fY=", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "ora": { + "version": "0.2.3", + "resolved": "http://npm.byted.org/ora/-/ora-0.2.3.tgz", + "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "cli-cursor": "^1.0.2", + "cli-spinners": "^0.1.2", + "object-assign": "^4.0.1" + }, + "dependencies": { + "cli-cursor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + } + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha1-hc36+uso6Gd/QW4odZK18/SepBA=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "p-cancelable": { + "version": "0.4.1", + "resolved": "http://npm.byted.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "integrity": "sha1-NfNj1n1SCByNlYXje8zrfgu8sqA=", + "dev": true + }, + "p-each-series": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-each-series/-/p-each-series-1.0.0.tgz", + "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", + "dev": true, + "requires": { + "p-reduce": "^1.0.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", + "dev": true + }, + "p-lazy": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-lazy/-/p-lazy-1.0.0.tgz", + "integrity": "sha1-7FPIAvLuOsKPFmzILQsrAt4nqDU=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha1-uGvV8MJWkJEcdZD8v8IBDVSzzLg=", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-map": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha1-5OlPMR6rvIYzoeeZCBZfyiYkG2s=", + "dev": true + }, + "p-reduce": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-reduce/-/p-reduce-1.0.0.tgz", + "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", + "dev": true + }, + "p-timeout": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha1-2N0ZeVldLcATnh/ka4tkbLPN8Dg=", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pako": { + "version": "1.0.6", + "resolved": "http://npm.byted.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha1-AQEhG6pwxLykoPY/Igbpe3368lg=", + "dev": true + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "dev": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "http://npm.byted.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha1-9r8pOBgzK9DatU77Fgh3JHRebKg=", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "http://npm.byted.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "pasition": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/pasition/-/pasition-1.0.1.tgz", + "integrity": "sha1-HRqCIoD2PeIJfILfur5BZFfzgx4=" + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "http://npm.byted.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "pbkdf2": { + "version": "3.0.16", + "resolved": "http://npm.byted.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha1-dAQgjsawG2LYW/g4U6gGT42cKlw=", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pixrem": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/pixrem/-/pixrem-4.0.1.tgz", + "integrity": "sha1-LaSh3m7EQjxfw3lOkwuB1EkOxoY=", + "dev": true, + "requires": { + "browserslist": "^2.0.0", + "postcss": "^6.0.0", + "reduce-css-calc": "^1.2.7" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "browserslist": { + "version": "2.11.3", + "resolved": "http://npm.byted.org/browserslist/-/browserslist-2.11.3.tgz", + "integrity": "sha1-/jYWeu0bvN5IJ+v+cTR6LMcLmbI=", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000792", + "electron-to-chromium": "^1.3.30" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "pleeease-filters": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/pleeease-filters/-/pleeease-filters-4.0.0.tgz", + "integrity": "sha1-ZjKy+wVkjSdY2GU4T7zteeHMrsc=", + "dev": true, + "requires": { + "onecolor": "^3.0.4", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postcss": { + "version": "5.2.18", + "resolved": "http://npm.byted.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "js-base64": "^2.1.9", + "source-map": "^0.5.6", + "supports-color": "^3.2.3" + }, + "dependencies": { + "supports-color": { + "version": "3.2.3", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "postcss-apply": { + "version": "0.8.0", + "resolved": "http://npm.byted.org/postcss-apply/-/postcss-apply-0.8.0.tgz", + "integrity": "sha1-FOVEu7XLbxweBIhXll15rgZrE0M=", + "dev": true, + "requires": { + "babel-runtime": "^6.23.0", + "balanced-match": "^0.4.2", + "postcss": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-attribute-case-insensitive": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-2.0.0.tgz", + "integrity": "sha1-lNxCLI+QmX8WvTOjZUu77AhJY7Q=", + "dev": true, + "requires": { + "postcss": "^6.0.0", + "postcss-selector-parser": "^2.2.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-calc": { + "version": "5.3.1", + "resolved": "http://npm.byted.org/postcss-calc/-/postcss-calc-5.3.1.tgz", + "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", + "dev": true, + "requires": { + "postcss": "^5.0.2", + "postcss-message-helpers": "^2.0.0", + "reduce-css-calc": "^1.2.6" + } + }, + "postcss-color-function": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/postcss-color-function/-/postcss-color-function-4.0.1.tgz", + "integrity": "sha1-QCs/LOvD9pR+YY+2vjZU++zvZEQ=", + "dev": true, + "requires": { + "css-color-function": "~1.3.3", + "postcss": "^6.0.1", + "postcss-message-helpers": "^2.0.0", + "postcss-value-parser": "^3.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-color-gray": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/postcss-color-gray/-/postcss-color-gray-4.1.0.tgz", + "integrity": "sha1-5Vge1X6qgm+2UsoRseK3sTap+d8=", + "dev": true, + "requires": { + "color": "^2.0.1", + "postcss": "^6.0.14", + "postcss-message-helpers": "^2.0.0", + "reduce-function-call": "^1.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/color/-/color-2.0.1.tgz", + "integrity": "sha1-5O14o8RgPQiR66VDCwS4YxT0yDk=", + "dev": true, + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, + "color-string": { + "version": "1.5.2", + "resolved": "http://npm.byted.org/color-string/-/color-string-1.5.2.tgz", + "integrity": "sha1-JuRYFLw8mny9Z1FkikFDRRSnc6k=", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-color-hex-alpha": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/postcss-color-hex-alpha/-/postcss-color-hex-alpha-3.0.0.tgz", + "integrity": "sha1-HlPmyKyyN5Vej9CLfs2xuLgwn5U=", + "dev": true, + "requires": { + "color": "^1.0.3", + "postcss": "^6.0.1", + "postcss-message-helpers": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/color/-/color-1.0.3.tgz", + "integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=", + "dev": true, + "requires": { + "color-convert": "^1.8.2", + "color-string": "^1.4.0" + } + }, + "color-string": { + "version": "1.5.2", + "resolved": "http://npm.byted.org/color-string/-/color-string-1.5.2.tgz", + "integrity": "sha1-JuRYFLw8mny9Z1FkikFDRRSnc6k=", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-color-hsl": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/postcss-color-hsl/-/postcss-color-hsl-2.0.0.tgz", + "integrity": "sha1-EnA2ZvoxBDDj8wpFTawThjF9WEQ=", + "dev": true, + "requires": { + "postcss": "^6.0.1", + "postcss-value-parser": "^3.3.0", + "units-css": "^0.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-color-hwb": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/postcss-color-hwb/-/postcss-color-hwb-3.0.0.tgz", + "integrity": "sha1-NAKxnvTYSXVAwftQcr6YY8qVVx4=", + "dev": true, + "requires": { + "color": "^1.0.3", + "postcss": "^6.0.1", + "postcss-message-helpers": "^2.0.0", + "reduce-function-call": "^1.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/color/-/color-1.0.3.tgz", + "integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=", + "dev": true, + "requires": { + "color-convert": "^1.8.2", + "color-string": "^1.4.0" + } + }, + "color-string": { + "version": "1.5.2", + "resolved": "http://npm.byted.org/color-string/-/color-string-1.5.2.tgz", + "integrity": "sha1-JuRYFLw8mny9Z1FkikFDRRSnc6k=", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-color-rebeccapurple": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-3.1.0.tgz", + "integrity": "sha1-zhJp7MLQ2L+SqrRL2ITmMxJMM+w=", + "dev": true, + "requires": { + "postcss": "^6.0.22", + "postcss-values-parser": "^1.5.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-color-rgb": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/postcss-color-rgb/-/postcss-color-rgb-2.0.0.tgz", + "integrity": "sha1-FFOcinExSUtILg3RzCZf9lFLUmM=", + "dev": true, + "requires": { + "postcss": "^6.0.1", + "postcss-value-parser": "^3.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-color-rgba-fallback": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/postcss-color-rgba-fallback/-/postcss-color-rgba-fallback-3.0.0.tgz", + "integrity": "sha1-N9XJNToHoJJwkSqCYGu0Kg1wLAQ=", + "dev": true, + "requires": { + "postcss": "^6.0.6", + "postcss-value-parser": "^3.3.0", + "rgb-hex": "^2.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-colormin": { + "version": "2.2.2", + "resolved": "http://npm.byted.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz", + "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", + "dev": true, + "requires": { + "colormin": "^1.0.5", + "postcss": "^5.0.13", + "postcss-value-parser": "^3.2.3" + } + }, + "postcss-convert-values": { + "version": "2.6.1", + "resolved": "http://npm.byted.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", + "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", + "dev": true, + "requires": { + "postcss": "^5.0.11", + "postcss-value-parser": "^3.1.2" + } + }, + "postcss-cssnext": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/postcss-cssnext/-/postcss-cssnext-3.1.0.tgz", + "integrity": "sha1-kn3Ck0GpOCVM3jjqYKkjud/t6tk=", + "dev": true, + "requires": { + "autoprefixer": "^7.1.1", + "caniuse-api": "^2.0.0", + "chalk": "^2.0.1", + "pixrem": "^4.0.0", + "pleeease-filters": "^4.0.0", + "postcss": "^6.0.5", + "postcss-apply": "^0.8.0", + "postcss-attribute-case-insensitive": "^2.0.0", + "postcss-calc": "^6.0.0", + "postcss-color-function": "^4.0.0", + "postcss-color-gray": "^4.0.0", + "postcss-color-hex-alpha": "^3.0.0", + "postcss-color-hsl": "^2.0.0", + "postcss-color-hwb": "^3.0.0", + "postcss-color-rebeccapurple": "^3.0.0", + "postcss-color-rgb": "^2.0.0", + "postcss-color-rgba-fallback": "^3.0.0", + "postcss-custom-media": "^6.0.0", + "postcss-custom-properties": "^6.1.0", + "postcss-custom-selectors": "^4.0.1", + "postcss-font-family-system-ui": "^3.0.0", + "postcss-font-variant": "^3.0.0", + "postcss-image-set-polyfill": "^0.3.5", + "postcss-initial": "^2.0.0", + "postcss-media-minmax": "^3.0.0", + "postcss-nesting": "^4.0.1", + "postcss-pseudo-class-any-link": "^4.0.0", + "postcss-pseudoelements": "^5.0.0", + "postcss-replace-overflow-wrap": "^2.0.0", + "postcss-selector-matches": "^3.0.1", + "postcss-selector-not": "^3.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "autoprefixer": { + "version": "7.2.6", + "resolved": "http://npm.byted.org/autoprefixer/-/autoprefixer-7.2.6.tgz", + "integrity": "sha1-JWZy+G98c12oScTwfQCKuwVgZ9w=", + "dev": true, + "requires": { + "browserslist": "^2.11.3", + "caniuse-lite": "^1.0.30000805", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^6.0.17", + "postcss-value-parser": "^3.2.3" + } + }, + "browserslist": { + "version": "2.11.3", + "resolved": "http://npm.byted.org/browserslist/-/browserslist-2.11.3.tgz", + "integrity": "sha1-/jYWeu0bvN5IJ+v+cTR6LMcLmbI=", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000792", + "electron-to-chromium": "^1.3.30" + } + }, + "caniuse-api": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/caniuse-api/-/caniuse-api-2.0.0.tgz", + "integrity": "sha1-sd21pZZrFvSNxJmERNS7xsfZ2DQ=", + "dev": true, + "requires": { + "browserslist": "^2.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "postcss-calc": { + "version": "6.0.1", + "resolved": "http://npm.byted.org/postcss-calc/-/postcss-calc-6.0.1.tgz", + "integrity": "sha1-PSQXG79udinUIqQ26/5t2VEfQzA=", + "dev": true, + "requires": { + "css-unit-converter": "^1.1.1", + "postcss": "^6.0.0", + "postcss-selector-parser": "^2.2.2", + "reduce-css-calc": "^2.0.0" + } + }, + "reduce-css-calc": { + "version": "2.1.4", + "resolved": "http://npm.byted.org/reduce-css-calc/-/reduce-css-calc-2.1.4.tgz", + "integrity": "sha1-wg6c2oRFrXPU/0vqlgxvg1N5Fwg=", + "dev": true, + "requires": { + "css-unit-converter": "^1.1.1", + "postcss-value-parser": "^3.3.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-custom-media": { + "version": "6.0.0", + "resolved": "http://npm.byted.org/postcss-custom-media/-/postcss-custom-media-6.0.0.tgz", + "integrity": "sha1-vlMnhBEOyylQRPtTlaGABushpzc=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-custom-properties": { + "version": "6.3.1", + "resolved": "http://npm.byted.org/postcss-custom-properties/-/postcss-custom-properties-6.3.1.tgz", + "integrity": "sha1-XFKr3jE9fsk2jEq/Z9J6ZWy6izk=", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "postcss": "^6.0.18" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-custom-selectors": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/postcss-custom-selectors/-/postcss-custom-selectors-4.0.1.tgz", + "integrity": "sha1-eBOC+UxS5yfvXKR3bqKt9JphE4I=", + "dev": true, + "requires": { + "postcss": "^6.0.1", + "postcss-selector-matches": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-discard-comments": { + "version": "2.0.4", + "resolved": "http://npm.byted.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", + "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", + "dev": true, + "requires": { + "postcss": "^5.0.14" + } + }, + "postcss-discard-duplicates": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", + "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-discard-empty": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", + "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", + "dev": true, + "requires": { + "postcss": "^5.0.14" + } + }, + "postcss-discard-overridden": { + "version": "0.1.1", + "resolved": "http://npm.byted.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", + "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", + "dev": true, + "requires": { + "postcss": "^5.0.16" + } + }, + "postcss-discard-unused": { + "version": "2.2.3", + "resolved": "http://npm.byted.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", + "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", + "dev": true, + "requires": { + "postcss": "^5.0.14", + "uniqs": "^2.0.0" + } + }, + "postcss-filter-plugins": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz", + "integrity": "sha1-giRf34IzcEFkXkdxFNjlk6oYuOw=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-font-family-system-ui": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/postcss-font-family-system-ui/-/postcss-font-family-system-ui-3.0.0.tgz", + "integrity": "sha1-Z1/nqeApZp8F+Nui5EwiJe3oBiM=", + "dev": true, + "requires": { + "postcss": "^6.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-font-variant": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/postcss-font-variant/-/postcss-font-variant-3.0.0.tgz", + "integrity": "sha1-CMzIj2BQuoLtjvLMdsDGprQfGD4=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-image-set-polyfill": { + "version": "0.3.5", + "resolved": "http://npm.byted.org/postcss-image-set-polyfill/-/postcss-image-set-polyfill-0.3.5.tgz", + "integrity": "sha1-Dxk0E3AM8fgr05Bm7wFtZaShgYE=", + "dev": true, + "requires": { + "postcss": "^6.0.1", + "postcss-media-query-parser": "^0.2.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-initial": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/postcss-initial/-/postcss-initial-2.0.0.tgz", + "integrity": "sha1-cnFfczbgu3k1HZnuZcSiU6hEG6Q=", + "dev": true, + "requires": { + "lodash.template": "^4.2.4", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-load-config": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz", + "integrity": "sha1-U56a/J3chiASHr+djDZz4M5Q0oo=", + "dev": true, + "requires": { + "cosmiconfig": "^2.1.0", + "object-assign": "^4.1.0", + "postcss-load-options": "^1.2.0", + "postcss-load-plugins": "^2.3.0" + } + }, + "postcss-load-options": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz", + "integrity": "sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=", + "dev": true, + "requires": { + "cosmiconfig": "^2.1.0", + "object-assign": "^4.1.0" + } + }, + "postcss-load-plugins": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz", + "integrity": "sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=", + "dev": true, + "requires": { + "cosmiconfig": "^2.1.1", + "object-assign": "^4.1.0" + } + }, + "postcss-loader": { + "version": "2.1.5", + "resolved": "http://npm.byted.org/postcss-loader/-/postcss-loader-2.1.5.tgz", + "integrity": "sha1-PGM27mQcj5UTgXJTOuRhqDWV54g=", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "postcss": "^6.0.0", + "postcss-load-config": "^1.2.0", + "schema-utils": "^0.4.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-media-minmax": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/postcss-media-minmax/-/postcss-media-minmax-3.0.0.tgz", + "integrity": "sha1-Z1JWA3pD70C8Twdgv9BtTcadSNI=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-media-query-parser": { + "version": "0.2.3", + "resolved": "http://npm.byted.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", + "integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=", + "dev": true + }, + "postcss-merge-idents": { + "version": "2.1.7", + "resolved": "http://npm.byted.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", + "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.10", + "postcss-value-parser": "^3.1.1" + } + }, + "postcss-merge-longhand": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", + "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-merge-rules": { + "version": "2.1.2", + "resolved": "http://npm.byted.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", + "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", + "dev": true, + "requires": { + "browserslist": "^1.5.2", + "caniuse-api": "^1.5.2", + "postcss": "^5.0.4", + "postcss-selector-parser": "^2.2.2", + "vendors": "^1.0.0" + } + }, + "postcss-message-helpers": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", + "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=", + "dev": true + }, + "postcss-minify-font-values": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", + "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.2" + } + }, + "postcss-minify-gradients": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", + "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", + "dev": true, + "requires": { + "postcss": "^5.0.12", + "postcss-value-parser": "^3.3.0" + } + }, + "postcss-minify-params": { + "version": "1.2.2", + "resolved": "http://npm.byted.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", + "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.1", + "postcss": "^5.0.2", + "postcss-value-parser": "^3.0.2", + "uniqs": "^2.0.0" + } + }, + "postcss-minify-selectors": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", + "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.2", + "has": "^1.0.1", + "postcss": "^5.0.14", + "postcss-selector-parser": "^2.0.0" + } + }, + "postcss-modules-extract-imports": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz", + "integrity": "sha1-ZhQOzs447wa/DT41XWm/WdFB6oU=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-local-by-default": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz", + "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=", + "dev": true, + "requires": { + "css-selector-tokenizer": "^0.7.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-scope": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz", + "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=", + "dev": true, + "requires": { + "css-selector-tokenizer": "^0.7.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-values": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz", + "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=", + "dev": true, + "requires": { + "icss-replace-symbols": "^1.1.0", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-nesting": { + "version": "4.2.1", + "resolved": "http://npm.byted.org/postcss-nesting/-/postcss-nesting-4.2.1.tgz", + "integrity": "sha1-BIO84ziz8IKM7ZD/UwspuYsAMA0=", + "dev": true, + "requires": { + "postcss": "^6.0.11" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-normalize-charset": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", + "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", + "dev": true, + "requires": { + "postcss": "^5.0.5" + } + }, + "postcss-normalize-url": { + "version": "3.0.8", + "resolved": "http://npm.byted.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", + "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", + "dev": true, + "requires": { + "is-absolute-url": "^2.0.0", + "normalize-url": "^1.4.0", + "postcss": "^5.0.14", + "postcss-value-parser": "^3.2.3" + } + }, + "postcss-ordered-values": { + "version": "2.2.3", + "resolved": "http://npm.byted.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", + "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", + "dev": true, + "requires": { + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.1" + } + }, + "postcss-pseudo-class-any-link": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-4.0.0.tgz", + "integrity": "sha1-kVKgYT00UHIFE+iJKFS65C0O5o4=", + "dev": true, + "requires": { + "postcss": "^6.0.1", + "postcss-selector-parser": "^2.2.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-pseudoelements": { + "version": "5.0.0", + "resolved": "http://npm.byted.org/postcss-pseudoelements/-/postcss-pseudoelements-5.0.0.tgz", + "integrity": "sha1-7vGU6NUkZFylIKlJ6V5RjoEkAss=", + "dev": true, + "requires": { + "postcss": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-reduce-idents": { + "version": "2.4.0", + "resolved": "http://npm.byted.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", + "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", + "dev": true, + "requires": { + "postcss": "^5.0.4", + "postcss-value-parser": "^3.0.2" + } + }, + "postcss-reduce-initial": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", + "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", + "dev": true, + "requires": { + "postcss": "^5.0.4" + } + }, + "postcss-reduce-transforms": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", + "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.8", + "postcss-value-parser": "^3.0.1" + } + }, + "postcss-replace-overflow-wrap": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-2.0.0.tgz", + "integrity": "sha1-eU22+qVPjbEAhUOSqTr0V2i04ls=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-selector-matches": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/postcss-selector-matches/-/postcss-selector-matches-3.0.1.tgz", + "integrity": "sha1-5WNAEeE5UIgYYbvdWMLQER/8lqs=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-selector-not": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/postcss-selector-not/-/postcss-selector-not-3.0.1.tgz", + "integrity": "sha1-Lk2y8JZTNsAefOx9tsYN/3ZzNdk=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2", + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-selector-parser": { + "version": "2.2.3", + "resolved": "http://npm.byted.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", + "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", + "dev": true, + "requires": { + "flatten": "^1.0.2", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-svgo": { + "version": "2.1.6", + "resolved": "http://npm.byted.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", + "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", + "dev": true, + "requires": { + "is-svg": "^2.0.0", + "postcss": "^5.0.14", + "postcss-value-parser": "^3.2.3", + "svgo": "^0.7.0" + } + }, + "postcss-unique-selectors": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", + "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.1", + "postcss": "^5.0.4", + "uniqs": "^2.0.0" + } + }, + "postcss-value-parser": { + "version": "3.3.0", + "resolved": "http://npm.byted.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", + "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=", + "dev": true + }, + "postcss-values-parser": { + "version": "1.5.0", + "resolved": "http://npm.byted.org/postcss-values-parser/-/postcss-values-parser-1.5.0.tgz", + "integrity": "sha1-XZ+mPivLAXnOSPMjUwN2XrifMEc=", + "dev": true, + "requires": { + "flatten": "^1.0.2", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-zindex": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", + "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", + "dev": true, + "requires": { + "has": "^1.0.1", + "postcss": "^5.0.4", + "uniqs": "^2.0.0" + } + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "prettier": { + "version": "1.13.5", + "resolved": "http://npm.byted.org/prettier/-/prettier-1.13.5.tgz", + "integrity": "sha1-euIHaZjI7c551jg06bewn+rWv9A=", + "dev": true + }, + "pretty-bytes": { + "version": "4.0.2", + "resolved": "http://npm.byted.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", + "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=", + "dev": true + }, + "private": { + "version": "0.1.8", + "resolved": "http://npm.byted.org/private/-/private-0.1.8.tgz", + "integrity": "sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "http://npm.byted.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "prr": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "http://npm.byted.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha1-RuuRByBr9zSJ+LhbadkTNMZhCZQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "pump": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "http://npm.byted.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha1-NlE74karJ1cLGjdKXOJ4v9dDcM4=", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "http://npm.byted.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "http://npm.byted.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true + }, + "query-string": { + "version": "4.3.4", + "resolved": "http://npm.byted.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dev": true, + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "querystring": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randomatic": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/randomatic/-/randomatic-3.0.0.tgz", + "integrity": "sha1-01SQAw6091eN4pLObfsEqRoSiSM=", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=", + "dev": true + } + } + }, + "randombytes": { + "version": "2.0.6", + "resolved": "http://npm.byted.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha1-0wLFIpSFiISKjTAMkytEwkIx2oA=", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "http://npm.byted.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha1-ySGW/IarQr6YPxvzF3giSTHWFFg=", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "read-chunk": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/read-chunk/-/read-chunk-2.1.0.tgz", + "integrity": "sha1-agTAkoAF7Z1C4aasVgDhnLx/9lU=", + "dev": true, + "requires": { + "pify": "^3.0.0", + "safe-buffer": "^5.1.1" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://npm.byted.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" + } + }, + "recast": { + "version": "0.15.0", + "resolved": "http://npm.byted.org/recast/-/recast-0.15.0.tgz", + "integrity": "sha1-uMi/3aJF4VgMCk2fwl1Oggv1cgg=", + "dev": true, + "requires": { + "ast-types": "0.11.5", + "esprima": "~4.0.0", + "private": "~0.1.5", + "source-map": "~0.6.1" + }, + "dependencies": { + "esprima": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha1-RJnt3NERDgshi6zy+n9/WfVcqAQ=", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + } + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "http://npm.byted.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "reduce-css-calc": { + "version": "1.3.0", + "resolved": "http://npm.byted.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2", + "math-expression-evaluator": "^1.2.14", + "reduce-function-call": "^1.0.1" + } + }, + "reduce-function-call": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz", + "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=", + "dev": true, + "requires": { + "balanced-match": "^0.4.2" + } + }, + "regenerate": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha1-SoVuxLVuQHfFV1icroXnpMiGmhE=", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "http://npm.byted.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=", + "dev": true + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "http://npm.byted.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha1-HkmWg3Ix2ot/PPQRTXG1aRoGgN0=", + "dev": true, + "requires": { + "babel-runtime": "^6.18.0", + "babel-types": "^6.19.0", + "private": "^0.1.6" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "http://npm.byted.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha1-db3FiioUls7EihKDW8VMjVYjNt0=", + "dev": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "^1.2.1", + "regjsgen": "^0.2.0", + "regjsparser": "^0.1.4" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "http://npm.byted.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "http://npm.byted.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "dev": true, + "requires": { + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.1.1", + "har-validator": "~4.2.1", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "oauth-sign": "~0.8.1", + "performance-now": "^0.2.0", + "qs": "~6.4.0", + "safe-buffer": "^5.0.1", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.0.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-from-string": { + "version": "1.2.1", + "resolved": "http://npm.byted.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve": { + "version": "1.8.1", + "resolved": "http://npm.byted.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha1-gvHsGaQjrB+9CAsLqwa6NuhKeiY=", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "responselike": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "http://npm.byted.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", + "dev": true + }, + "rgb": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/rgb/-/rgb-0.1.0.tgz", + "integrity": "sha1-vieykej+/+rBvZlylyG/pA/AN7U=", + "dev": true + }, + "rgb-hex": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/rgb-hex/-/rgb-hex-2.1.0.tgz", + "integrity": "sha1-x3PF/iJoolV42SU5qCp6XOU77aY=", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "http://npm.byted.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "http://npm.byted.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha1-ocGm9iR1FXe6XQeRTLyShQWFiQw=", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "rxjs": { + "version": "5.5.11", + "resolved": "http://npm.byted.org/rxjs/-/rxjs-5.5.11.tgz", + "integrity": "sha1-9zMCfKQ+O+xrmURzvkq5itQ87Yc=", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "http://npm.byted.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "http://npm.byted.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", + "dev": true + }, + "sass-graph": { + "version": "2.2.4", + "resolved": "http://npm.byted.org/sass-graph/-/sass-graph-2.2.4.tgz", + "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "dev": true, + "requires": { + "glob": "^7.0.0", + "lodash": "^4.0.0", + "scss-tokenizer": "^0.2.3", + "yargs": "^7.0.0" + } + }, + "sass-loader": { + "version": "6.0.7", + "resolved": "http://npm.byted.org/sass-loader/-/sass-loader-6.0.7.tgz", + "integrity": "sha1-3S/bPn7v9KU/NbpqxAhxVIg1PQA=", + "dev": true, + "requires": { + "clone-deep": "^2.0.1", + "loader-utils": "^1.0.1", + "lodash.tail": "^4.1.1", + "neo-async": "^2.5.0", + "pify": "^3.0.0" + } + }, + "sax": { + "version": "1.2.4", + "resolved": "http://npm.byted.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", + "dev": true + }, + "schema-utils": { + "version": "0.4.5", + "resolved": "http://npm.byted.org/schema-utils/-/schema-utils-0.4.5.tgz", + "integrity": "sha1-IYNvBgiqwXt4+ePiTa/xSlyhOj4=", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + }, + "scoped-regex": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/scoped-regex/-/scoped-regex-1.0.0.tgz", + "integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=", + "dev": true + }, + "scss-tokenizer": { + "version": "0.2.3", + "resolved": "http://npm.byted.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", + "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", + "dev": true, + "requires": { + "js-base64": "^2.1.8", + "source-map": "^0.4.2" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "semver": { + "version": "5.5.0", + "resolved": "http://npm.byted.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha1-3Eu8emyp2Rbe5dQ1FvAJK1j3uKs=", + "dev": true + }, + "serialize-javascript": { + "version": "1.5.0", + "resolved": "http://npm.byted.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", + "integrity": "sha1-GqM2FiyIqJDdrVOEuuvJOmVRYf4=", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "http://npm.byted.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha1-N6XPC4HsvGlD3hCbopYNGyZYSuc=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shallow-clone": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/shallow-clone/-/shallow-clone-1.0.0.tgz", + "integrity": "sha1-RIDNBuiC72iyrYij6lSDLixItXE=", + "dev": true, + "requires": { + "is-extendable": "^0.1.1", + "kind-of": "^5.0.0", + "mixin-object": "^2.0.1" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", + "dev": true + } + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shelljs": { + "version": "0.8.2", + "resolved": "http://npm.byted.org/shelljs/-/shelljs-0.8.2.tgz", + "integrity": "sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "http://npm.byted.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dev": true, + "requires": { + "is-arrayish": "^0.3.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.3.2", + "resolved": "http://npm.byted.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha1-RXSirlb3qyBolvtDHq7tBm/fjwM=", + "dev": true + } + } + }, + "slash": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "http://npm.byted.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "dev": true + }, + "slide": { + "version": "1.1.6", + "resolved": "http://npm.byted.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "http://npm.byted.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "sntp": { + "version": "1.0.9", + "resolved": "http://npm.byted.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "requires": { + "hoek": "2.x.x" + } + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "http://npm.byted.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha1-qqR0A/eyRakvvJfqCPJQ1gh+0IU=", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "http://npm.byted.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha1-cuLMNAlVQ+Q7LGKyxMENSpBU8lk=", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "http://npm.byted.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha1-Aoam3ovkJkEzhZTpfM6nXwosWF8=", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "http://npm.byted.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha1-BaW01xU6GVvJLDxCW2nzsqlSTII=", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha1-LHrmEFbHFKW5ubKyr30xHvXHj+k=", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha1-meEZt6XaAOBUkcn6M4t5BII7QdA=", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha1-enzShHDMbToc/m1miG9rxDDTrIc=", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.14.2", + "resolved": "http://npm.byted.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "ssri": { + "version": "5.3.0", + "resolved": "http://npm.byted.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha1-ujhyycbTOgcEp9cf8EXl7EiZnQY=", + "dev": true, + "requires": { + "safe-buffer": "^5.1.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "http://npm.byted.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://npm.byted.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stdout-stream": { + "version": "1.4.0", + "resolved": "http://npm.byted.org/stdout-stream/-/stdout-stream-1.4.0.tgz", + "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.2", + "resolved": "http://npm.byted.org/stream-each/-/stream-each-1.2.2.tgz", + "integrity": "sha1-joxGP5HaiZF3h2WHP+TZYNj2Fr0=", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "http://npm.byted.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, + "string-template": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "http://npm.byted.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "stringstream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", + "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-bom-stream": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", + "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", + "dev": true, + "requires": { + "first-chunk-stream": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "style-loader": { + "version": "0.20.3", + "resolved": "http://npm.byted.org/style-loader/-/style-loader-0.20.3.tgz", + "integrity": "sha1-6+8GuJ3sSRvLH9s0UukTpv0cEMQ=", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "schema-utils": "^0.4.5" + } + }, + "sugarss": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/sugarss/-/sugarss-1.0.1.tgz", + "integrity": "sha1-voJtkAPg8kdzX5I2XcP9fxuunkQ=", + "dev": true, + "requires": { + "postcss": "^6.0.14" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.22", + "resolved": "http://npm.byted.org/postcss/-/postcss-6.0.22.tgz", + "integrity": "sha1-4jt4MUkFw7kMvWFwISHnp4hI8qM=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "svgo": { + "version": "0.7.2", + "resolved": "http://npm.byted.org/svgo/-/svgo-0.7.2.tgz", + "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", + "dev": true, + "requires": { + "coa": "~1.0.1", + "colors": "~1.1.2", + "csso": "~2.3.1", + "js-yaml": "~3.7.0", + "mkdirp": "~0.5.1", + "sax": "~1.2.1", + "whet.extend": "~0.9.9" + } + }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + }, + "tapable": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/tapable/-/tapable-1.0.0.tgz", + "integrity": "sha1-y7Y52QAu7ZxrWXXrIFmNeTbx+fI=", + "dev": true + }, + "tar": { + "version": "2.2.1", + "resolved": "http://npm.byted.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "dev": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" + } + }, + "temp": { + "version": "0.8.3", + "resolved": "http://npm.byted.org/temp/-/temp-0.8.3.tgz", + "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", + "dev": true, + "requires": { + "os-tmpdir": "^1.0.0", + "rimraf": "~2.2.6" + }, + "dependencies": { + "rimraf": { + "version": "2.2.8", + "resolved": "http://npm.byted.org/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", + "dev": true + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "textextensions": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/textextensions/-/textextensions-2.2.0.tgz", + "integrity": "sha1-OKxnYVEoW2WGVFgZh6DOGkSQ0oY=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "http://npm.byted.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "http://npm.byted.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "http://npm.byted.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha1-HSjj0qrfHVpZlsTp+VYBzQU0gK4=", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "http://npm.byted.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha1-bTQzWIl2jSGyvNoKonfO07G/rfk=", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "http://npm.byted.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "http://npm.byted.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "http://npm.byted.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "dev": true, + "requires": { + "punycode": "^1.4.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "true-case-path": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/true-case-path/-/true-case-path-1.0.2.tgz", + "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", + "dev": true, + "requires": { + "glob": "^6.0.4" + }, + "dependencies": { + "glob": { + "version": "6.0.4", + "resolved": "http://npm.byted.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "tslib": { + "version": "1.9.2", + "resolved": "http://npm.byted.org/tslib/-/tslib-1.9.2.tgz", + "integrity": "sha1-i+DMmh9tx3J8ON6xbC69GiiSmI4=", + "dev": true + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "http://npm.byted.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "http://npm.byted.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "http://npm.byted.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-es": { + "version": "3.3.10", + "resolved": "http://npm.byted.org/uglify-es/-/uglify-es-3.3.10.tgz", + "integrity": "sha1-iwt5ks6+IO3CbeG/MlzveXuPP6U=", + "dev": true, + "requires": { + "commander": "~2.14.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.14.1", + "resolved": "http://npm.byted.org/commander/-/commander-2.14.1.tgz", + "integrity": "sha1-IjUSPjevjKPGXfRbAm29NXsBuao=", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + } + } + }, + "uglifyjs-webpack-plugin": { + "version": "1.2.6", + "resolved": "http://npm.byted.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.6.tgz", + "integrity": "sha1-9LtE8CQx6CswHY1GJDMKajVyk4E=", + "dev": true, + "requires": { + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "schema-utils": "^0.4.5", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "uglify-es": "^3.3.4", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + } + } + }, + "underscore": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + }, + "union-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "http://npm.byted.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "uniqs": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", + "dev": true + }, + "unique-filename": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/unique-filename/-/unique-filename-1.1.0.tgz", + "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/unique-slug/-/unique-slug-2.0.0.tgz", + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "units-css": { + "version": "0.4.0", + "resolved": "http://npm.byted.org/units-css/-/units-css-0.4.0.tgz", + "integrity": "sha1-1iKGU6UZg9fBb/KPi53Dsf/tOgc=", + "dev": true, + "requires": { + "isnumeric": "^0.2.0", + "viewport-dimensions": "^0.2.0" + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "http://npm.byted.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "http://npm.byted.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "untildify": { + "version": "3.0.3", + "resolved": "http://npm.byted.org/untildify/-/untildify-3.0.3.tgz", + "integrity": "sha1-HntCsUC8/ZIrIucMoSZb/jY0x8k=", + "dev": true + }, + "upath": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/upath/-/upath-1.1.0.tgz", + "integrity": "sha1-NSVll+RqWB20eT0M5H+prr/J+r0=", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "http://npm.byted.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", + "dev": true + } + } + }, + "urix": { + "version": "0.1.0", + "resolved": "http://npm.byted.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "http://npm.byted.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "http://npm.byted.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + }, + "dependencies": { + "prepend-http": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + } + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "http://npm.byted.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true + }, + "use": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/use/-/use-3.1.0.tgz", + "integrity": "sha1-FHFr8D/f79AwQK71jYtLhfOnxUQ=", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "util": { + "version": "0.10.4", + "resolved": "http://npm.byted.org/util/-/util-0.10.4.tgz", + "integrity": "sha1-OqASW/5mikZy3liFfTrOJ+y3aQE=", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", + "dev": true + }, + "v8-compile-cache": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/v8-compile-cache/-/v8-compile-cache-2.0.0.tgz", + "integrity": "sha1-UmSS41/GFoZChHALcEPgG67gnwo=", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.3", + "resolved": "http://npm.byted.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha1-gWQ7y+8b3+zUYjeT3EZIlIupgzg=", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vendors": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/vendors/-/vendors-1.0.2.tgz", + "integrity": "sha1-f8te759WI7FWvOqJ7DfWNnbyGAE=", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "http://npm.byted.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + } + } + }, + "viewport-dimensions": { + "version": "0.2.0", + "resolved": "http://npm.byted.org/viewport-dimensions/-/viewport-dimensions-0.2.0.tgz", + "integrity": "sha1-3nQHR9tTh/0XJfUXXpG6x2r982w=", + "dev": true + }, + "vinyl": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-file": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/vinyl-file/-/vinyl-file-2.0.0.tgz", + "integrity": "sha1-p+v1/779obfRjRQPyweyI++2dRo=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.3.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0", + "strip-bom-stream": "^2.0.0", + "vinyl": "^1.1.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "http://npm.byted.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "http://npm.byted.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha1-S8EsLr6KonenHx0/FNaFx7RGzQA=", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "webpack": { + "version": "4.12.0", + "resolved": "http://npm.byted.org/webpack/-/webpack-4.12.0.tgz", + "integrity": "sha1-FHWOA1rml0f2jdDt88Wlcqgr3uk=", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.5.12", + "@webassemblyjs/helper-module-context": "1.5.12", + "@webassemblyjs/wasm-edit": "1.5.12", + "@webassemblyjs/wasm-opt": "1.5.12", + "@webassemblyjs/wasm-parser": "1.5.12", + "acorn": "^5.6.2", + "acorn-dynamic-import": "^3.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^1.0.0", + "enhanced-resolve": "^4.0.0", + "eslint-scope": "^3.7.1", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^0.4.4", + "tapable": "^1.0.0", + "uglifyjs-webpack-plugin": "^1.2.4", + "watchpack": "^1.5.0", + "webpack-sources": "^1.0.1" + } + }, + "webpack-addons": { + "version": "1.1.5", + "resolved": "http://npm.byted.org/webpack-addons/-/webpack-addons-1.1.5.tgz", + "integrity": "sha1-KxeN/oc/tudeQKgZ+lwm5Km8g3o=", + "dev": true, + "requires": { + "jscodeshift": "^0.4.0" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "http://npm.byted.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "ast-types": { + "version": "0.10.1", + "resolved": "http://npm.byted.org/ast-types/-/ast-types-0.10.1.tgz", + "integrity": "sha1-9S/KlxVXmhT4QdZ9f40lQyq2o90=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "http://npm.byted.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha1-RJnt3NERDgshi6zy+n9/WfVcqAQ=", + "dev": true + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "http://npm.byted.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "http://npm.byted.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "http://npm.byted.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "jscodeshift": { + "version": "0.4.1", + "resolved": "http://npm.byted.org/jscodeshift/-/jscodeshift-0.4.1.tgz", + "integrity": "sha1-2pGhwuzPoDozh6IdOZSOJRztREo=", + "dev": true, + "requires": { + "async": "^1.5.0", + "babel-plugin-transform-flow-strip-types": "^6.8.0", + "babel-preset-es2015": "^6.9.0", + "babel-preset-stage-1": "^6.5.0", + "babel-register": "^6.9.0", + "babylon": "^6.17.3", + "colors": "^1.1.2", + "flow-parser": "^0.*", + "lodash": "^4.13.1", + "micromatch": "^2.3.7", + "node-dir": "0.1.8", + "nomnom": "^1.8.1", + "recast": "^0.12.5", + "temp": "^0.8.1", + "write-file-atomic": "^1.2.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "http://npm.byted.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "http://npm.byted.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "recast": { + "version": "0.12.9", + "resolved": "http://npm.byted.org/recast/-/recast-0.12.9.tgz", + "integrity": "sha1-6OUr25aRr0Ysy9fBXVpRE2R6FfE=", + "dev": true, + "requires": { + "ast-types": "0.10.1", + "core-js": "^2.4.1", + "esprima": "~4.0.0", + "private": "~0.1.5", + "source-map": "~0.6.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + } + } + }, + "webpack-cli": { + "version": "2.1.5", + "resolved": "http://npm.byted.org/webpack-cli/-/webpack-cli-2.1.5.tgz", + "integrity": "sha1-MIH96y8gXwpUqjl5hogLDCCnH3o=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "diff": "^3.5.0", + "enhanced-resolve": "^4.0.0", + "envinfo": "^5.7.0", + "glob-all": "^3.1.0", + "global-modules": "^1.0.0", + "got": "^8.3.1", + "import-local": "^1.0.0", + "inquirer": "^5.2.0", + "interpret": "^1.1.0", + "jscodeshift": "^0.5.0", + "listr": "^0.14.1", + "loader-utils": "^1.1.0", + "lodash": "^4.17.10", + "log-symbols": "^2.2.0", + "mkdirp": "^0.5.1", + "p-each-series": "^1.0.0", + "p-lazy": "^1.0.0", + "prettier": "^1.12.1", + "supports-color": "^5.4.0", + "v8-compile-cache": "^2.0.0", + "webpack-addons": "^1.1.5", + "yargs": "^11.1.0", + "yeoman-environment": "^2.1.1", + "yeoman-generator": "^2.0.5" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cliui": { + "version": "4.1.0", + "resolved": "http://npm.byted.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "http://npm.byted.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha1-QrwpAKa1uL0XN2yOiCtlr8zyS/I=", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "http://npm.byted.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "http://npm.byted.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "yargs": { + "version": "11.1.0", + "resolved": "http://npm.byted.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha1-kLhpk07W6HERXqL/WLA/RyTtLXc=", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "http://npm.byted.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "webpack-sources": { + "version": "1.1.0", + "resolved": "http://npm.byted.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha1-oQHrrlnWUHNU1x2AE5UKOot6WlQ=", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "http://npm.byted.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + } + } + }, + "whet.extend": { + "version": "0.9.9", + "resolved": "http://npm.byted.org/whet.extend/-/whet.extend-0.9.9.tgz", + "integrity": "sha1-+HfVv2SMl+WqVC+twW1qJZucEaE=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "http://npm.byted.org/which/-/which-1.3.1.tgz", + "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "http://npm.byted.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "http://npm.byted.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha1-rgdOa9wMFKQx6ATmJFScYzsABFc=", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "http://npm.byted.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha1-rsxAWXb6talVJhgIRvDboojzpKA=", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "http://npm.byted.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "http://npm.byted.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "1.3.4", + "resolved": "http://npm.byted.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "http://npm.byted.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "http://npm.byted.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "7.1.0", + "resolved": "http://npm.byted.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + } + } + }, + "yargs-parser": { + "version": "5.0.0", + "resolved": "http://npm.byted.org/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + } + } + }, + "yeoman-environment": { + "version": "2.2.0", + "resolved": "http://npm.byted.org/yeoman-environment/-/yeoman-environment-2.2.0.tgz", + "integrity": "sha1-bA7pOo2WKp9tvFrU6QrnqzSHU5M=", + "dev": true, + "requires": { + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^3.1.0", + "diff": "^3.3.1", + "escape-string-regexp": "^1.0.2", + "globby": "^8.0.1", + "grouped-queue": "^0.3.3", + "inquirer": "^5.2.0", + "is-scoped": "^1.0.0", + "lodash": "^4.17.10", + "log-symbols": "^2.1.0", + "mem-fs": "^1.1.0", + "strip-ansi": "^4.0.0", + "text-table": "^0.2.0", + "untildify": "^3.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "http://npm.byted.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "yeoman-generator": { + "version": "2.0.5", + "resolved": "http://npm.byted.org/yeoman-generator/-/yeoman-generator-2.0.5.tgz", + "integrity": "sha1-V7CzR0cBKTzJ7JZSiPNACwCIfIE=", + "dev": true, + "requires": { + "async": "^2.6.0", + "chalk": "^2.3.0", + "cli-table": "^0.3.1", + "cross-spawn": "^6.0.5", + "dargs": "^5.1.0", + "dateformat": "^3.0.3", + "debug": "^3.1.0", + "detect-conflict": "^1.0.0", + "error": "^7.0.2", + "find-up": "^2.1.0", + "github-username": "^4.0.0", + "istextorbinary": "^2.2.1", + "lodash": "^4.17.10", + "make-dir": "^1.1.0", + "mem-fs-editor": "^4.0.0", + "minimist": "^1.2.0", + "pretty-bytes": "^4.0.2", + "read-chunk": "^2.1.0", + "read-pkg-up": "^3.0.0", + "rimraf": "^2.6.2", + "run-async": "^2.0.0", + "shelljs": "^0.8.0", + "text-table": "^0.2.0", + "through2": "^2.0.0", + "yeoman-environment": "^2.0.5" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://npm.byted.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "async": { + "version": "2.6.1", + "resolved": "http://npm.byted.org/async/-/async-2.6.1.tgz", + "integrity": "sha1-skWiPKcZMAROxT+kaqAKPofGphA=", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://npm.byted.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "http://npm.byted.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "http://npm.byted.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "http://npm.byted.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "http://npm.byted.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha1-zvMdyOCho7sNEFwM2Xzzv0f0428=", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "http://npm.byted.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://npm.byted.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "zlib": { + "version": "1.0.5", + "resolved": "http://npm.byted.org/zlib/-/zlib-1.0.5.tgz", + "integrity": "sha1-bnyXL8NxxkWmr7A6sUdp3vEU/MA=", + "dev": true + } + } +} diff --git a/packages/xgplayer/package.json b/packages/xgplayer/package.json new file mode 100644 index 00000000..2b018c14 --- /dev/null +++ b/packages/xgplayer/package.json @@ -0,0 +1,60 @@ +{ + "name": "xgplayer", + "version": "1.0.2", + "description": "video player", + "main": "./dist/index.js", + "scripts": { + "prepare": "npm run build", + "build": "webpack --progress --display-chunks -p", + "watch": "webpack --progress --display-chunks -p --watch" + }, + "keywords": [ + "video", + "player" + ], + "babel": { + "presets": [ + "es2015" + ], + "plugins": [ + "add-module-exports", + "babel-plugin-bulk-import" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/bytedance/xgplayer.git" + }, + "author": "yinguohui@bytedance.com", + "license": "MIT", + "dependencies": { + "babel-plugin-add-module-exports": "^0.2.1", + "event-emitter": "^0.3.5", + "pasition": "^1.0.1" + }, + "browserslist": [ + "> 5%", + "IE 9", + "iOS 7", + "Firefox > 20" + ], + "devDependencies": { + "babel-loader": "^7.1.4", + "babel-plugin-bulk-import": "^1.0.2", + "babel-plugin-transform-object-rest-spread": "^6.26.0", + "babel-plugin-transform-runtime": "^6.23.0", + "babel-preset-es2015": "^6.24.1", + "core-js": "^2.5.4", + "css-loader": "^0.28.11", + "json-loader": "^0.5.7", + "node-sass": "^4.8.3", + "postcss-cssnext": "^3.1.0", + "postcss-loader": "^2.1.5", + "sass-loader": "^6.0.7", + "style-loader": "^0.20.3", + "sugarss": "^1.0.1", + "webpack": "^4.8.1", + "webpack-cli": "^2.1.3", + "zlib": "^1.0.5" + } +} diff --git a/packages/xgplayer/postcss.config.js b/packages/xgplayer/postcss.config.js new file mode 100644 index 00000000..ed4ffc3d --- /dev/null +++ b/packages/xgplayer/postcss.config.js @@ -0,0 +1,7 @@ +module.exports = { + plugins: { + 'postcss-cssnext': { + browserslist: ['cover 99.5%'] + } + } +} diff --git a/packages/xgplayer/src/.DS_Store b/packages/xgplayer/src/.DS_Store new file mode 100644 index 00000000..7f1ca211 Binary files /dev/null and b/packages/xgplayer/src/.DS_Store differ diff --git a/packages/xgplayer/src/control/definition.js b/packages/xgplayer/src/control/definition.js new file mode 100755 index 00000000..be844376 --- /dev/null +++ b/packages/xgplayer/src/control/definition.js @@ -0,0 +1,102 @@ +import Player from '../player' + +let definition = function () { + let player = this; let util = Player.util; let sniffer = Player.sniffer + let ul = util.createDom('xg-definition', '', {tabindex: 3}, 'xgplayer-definition'); let root = player.controls + if (sniffer.device === 'mobile') { + return + } + player.on('resourceReady', function (list) { + if (list && list instanceof Array && list.length > 1) { + util.addClass(player.root, 'xgplayer-is-definition') + player.on('canplay', function () { + let tmp = ['
      ']; let src = player.config.url; let a = document.createElement('a') + if (player.switchURL) { + ['mp4', 'hls', 'flv'].every(item => { + if (player[item]) { + a.href = player[item].url + src = a.href + return false + } else { + return true + } + }) + } else { + src = player.currentSrc || player.src + } + list.forEach(item => { + a.href = item.url + tmp.push(`
    • ${item.name}
    • `) + }) + let cursrc = list.filter(item => { a.href = item.url; return a.href === src }) + tmp.push(`

    ${(cursrc[0] || {cname: ''}).cname}

    `) + let urlInRoot = root.querySelector('.xgplayer-definition') + if (urlInRoot) { + urlInRoot.innerHTML = '清晰度' + tmp.join('') + } else { + ul.innerHTML = '清晰度' + tmp.join('') + root.appendChild(ul) + } + }) + } + }); + + ['touchstart', 'click'].forEach(item => { + ul.addEventListener(item, function (e) { + e.preventDefault() + e.stopPropagation() + let li = e.target || e.srcElement; let a = document.createElement('a') + if (li && li.tagName.toLocaleLowerCase() === 'li') { + Array.prototype.forEach.call(li.parentNode.childNodes, item => { + util.removeClass(item, 'definition') + }) + util.addClass(li, 'definition') + li.parentNode.nextSibling.innerHTML = `${li.getAttribute('cname')}` + a.href = li.getAttribute('url') + if (player.switchURL) { + let curRUL = document.createElement('a'); + ['mp4', 'hls', 'flv'].every(item => { + if (player[item]) { + curRUL = player[item].url + return false + } else { + return true + } + }) + if (curRUL.href !== a.href && !player.ended) { + player.switchURL(a.href) + } + } else { + if (a.href !== player.currentSrc) { + let curTime = player.currentTime; let paused = player.paused + if (!player.ended) { + player.src = a.href + player.once('canplay', function () { + player.currentTime = curTime + if (!paused) { + player.play() + } + }) + } + } + } + player.emit('definitionchange', a.href) + } else if (li && (li.tagName.toLocaleLowerCase() === 'p' || li.tagName.toLocaleLowerCase() === 'em')) { + util.addClass(ul, 'xgplayer-definition-active') + ul.focus() + } + }, false) + }) + + ul.addEventListener('blur', (e) => { + e.preventDefault() + e.stopPropagation() + util.removeClass(ul, 'xgplayer-definition-active') + }) + + player.once('destroy', () => { + ul = null + }) +} + +Player.install('definition', definition) diff --git a/packages/xgplayer/src/control/error.js b/packages/xgplayer/src/control/error.js new file mode 100755 index 00000000..c608a669 --- /dev/null +++ b/packages/xgplayer/src/control/error.js @@ -0,0 +1,25 @@ +import Player from '../player' + +let error = function () { + let player = this; let util = Player.util; let error = util.createDom('xg-error', ',请刷新试试 ', {}, 'xgplayer-error') + player.root.appendChild(error) + let text = error.querySelector('.xgplayer-error-text') + let refresh = error.querySelector('.xgplayer-error-refresh') + player.on('error', function () { + text.textContent = player.lang[player.video.error.message] || player.lang.ERROR + util.addClass(player.root, 'xgplayer-is-error') + }); + + ['touchstart', 'click'].forEach(item => { + refresh.addEventListener(item, function (e) { + player.reload() + }) + }) + + player.once('destroy', () => { + refresh = null + error = null + }) +} + +Player.install('error', error) diff --git a/packages/xgplayer/src/control/flex.js b/packages/xgplayer/src/control/flex.js new file mode 100644 index 00000000..5278f75b --- /dev/null +++ b/packages/xgplayer/src/control/flex.js @@ -0,0 +1,9 @@ +import Player from '../player' + +let flex = function () { + let player = this; let util = Player.util + let playceholder = util.createDom('xg-placeholder', '', {}, 'xgplayer-placeholder') + player.controls.appendChild(playceholder) +} + +Player.install('__flex__', flex) diff --git a/packages/xgplayer/src/control/fullscreen.js b/packages/xgplayer/src/control/fullscreen.js new file mode 100755 index 00000000..b48c9d4f --- /dev/null +++ b/packages/xgplayer/src/control/fullscreen.js @@ -0,0 +1,93 @@ +import Player from '../player' + +let fullscreen = function () { + let player = this; let util = Player.util + let scale = 0.03 + let iconPath = { + active: 'M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z', + default: 'M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z' + } + let btn = util.createDom('xg-fullscreen', ` + + `, {}, 'xgplayer-fullscreen') + let root = player.controls; let container = player.root + let tips = util.createDom('xg-tips', '全屏', {}, 'xgplayer-tips') + let path = btn.querySelector('path') + btn.appendChild(tips) + let getFullscreen = function (el) { + let fullscreeSupport = document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled + path.setAttribute('d', iconPath.active) + tips.textContent = '退出全屏' + if (fullscreeSupport) { + if (el.requestFullscreen) { + el.requestFullscreen() + } else if (el.mozRequestFullScreen) { + el.mozRequestFullScreen() + } else if (el.webkitRequestFullScreen) { + el.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT) + } else if (el.msRequestFullscreen) { + el.msRequestFullscreen() + } else { + util.addClass(el, 'xgplayer-fullscreen-active') + } + } else { + util.addClass(el, 'xgplayer-fullscreen-active') + } + } + let exitFullscreen = function (el) { + let fullscreeSupport = document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled + path.setAttribute('d', iconPath.default) + tips.textContent = '全屏' + if (fullscreeSupport) { + if (document.exitFullscreen) { + document.exitFullscreen() + } else if (document.webkitExitFullscreen) { + document.webkitExitFullscreen() + } else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen() + } else if (document.msExitFullscreen) { + document.msExitFullscreen() + } + } else { + util.removeClass(el, 'xgplayer-fullscreen-active') + } + } + root.appendChild(btn); + ['click', 'touchstart'].forEach(item => { + btn.addEventListener(item, function (e) { + e.preventDefault() + e.stopPropagation() + if (util.hasClass(container, 'xgplayer-fullscreen-active') || util.hasClass(container, 'xgplayer-is-fullscreen')) { + exitFullscreen(container) + } else { + getFullscreen(container) + } + }) + }) + + let handle = function (e) { + let fullscreenEl = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement + if (fullscreenEl && fullscreenEl === container) { + util.addClass(container, 'xgplayer-is-fullscreen') + path.setAttribute('d', iconPath.active) + tips.textContent = '退出全屏' + } else { + util.removeClass(container, 'xgplayer-is-fullscreen') + path.setAttribute('d', iconPath.default) + tips.textContent = '全屏' + } + }; + + ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'].forEach(item => { + document.addEventListener(item, handle) + }) + + player.once('destroy', function () { + ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'].forEach(item => { + document.removeEventListener(item, handle) + }) + btn = null + }) +} + +Player.install('fullscreen', fullscreen) diff --git a/packages/xgplayer/src/control/i18n.js b/packages/xgplayer/src/control/i18n.js new file mode 100755 index 00000000..c26df251 --- /dev/null +++ b/packages/xgplayer/src/control/i18n.js @@ -0,0 +1,54 @@ +import Player from '../player' + +let i18n = function () { + let player = this; let lang = {}; let util = player.constructor.util + lang.en = { + HAVE_NOTHING: 'There is no information on whether audio/video is ready', + HAVE_METADATA: 'audio/video metadata is ready ', + HAVE_CURRENT_DATA: 'Data about the current play location is available, but there is not enough data to play the next frame/millisecond', + HAVE_FUTURE_DATA: 'Current and at least one frame of data is available', + HAVE_ENOUGH_DATA: 'The available data is sufficient to start playing', + NETWORK_EMPTY: 'Audio/video has not been initialized', + NETWORK_IDLE: 'Audio/video is active and has been selected for resources, but no network is used', + NETWORK_LOADING: 'The browser is downloading the data', + NETWORK_NO_SOURCE: 'No audio/video source was found', + MEDIA_ERR_ABORTED: 'The fetch process is aborted by the user', + MEDIA_ERR_NETWORK: 'An error occurred while downloading', + MEDIA_ERR_DECODE: 'An error occurred while decoding', + MEDIA_ERR_SRC_NOT_SUPPORTED: 'Audio/video is not supported', + REPLAY: 'Replay', + ERROR: 'network is offline' + } + lang['zh-cn'] = { + HAVE_NOTHING: '没有关于音频/视频是否就绪的信息', + HAVE_METADATA: '音频/视频的元数据已就绪', + HAVE_CURRENT_DATA: '关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒', + HAVE_FUTURE_DATA: '当前及至少下一帧的数据是可用的', + HAVE_ENOUGH_DATA: '可用数据足以开始播放', + NETWORK_EMPTY: '音频/视频尚未初始化', + NETWORK_IDLE: '音频/视频是活动的且已选取资源,但并未使用网络', + NETWORK_LOADING: '浏览器正在下载数据', + NETWORK_NO_SOURCE: '未找到音频/视频来源', + MEDIA_ERR_ABORTED: '取回过程被用户中止', + MEDIA_ERR_NETWORK: '当下载时发生错误', + MEDIA_ERR_DECODE: '当解码时发生错误', + MEDIA_ERR_SRC_NOT_SUPPORTED: '不支持的音频/视频格式', + REPLAY: '重播', + ERROR: '网络连接似乎出现了问题' + } + + Object.defineProperty(player, 'lang', { + get: function () { + return lang[player.config.lang] || lang['en'] + }, + set: function (value) { + if (util.typeOf(value) === 'Object') { + Object.keys(value).forEach(key => { + lang[key] = value[key] + }) + } + } + }) +} + +Player.install('i18n', i18n) diff --git a/packages/xgplayer/src/control/loading.js b/packages/xgplayer/src/control/loading.js new file mode 100755 index 00000000..5cc44a03 --- /dev/null +++ b/packages/xgplayer/src/control/loading.js @@ -0,0 +1,15 @@ +import Player from '../player' + +let loading = function () { + let player = this; let util = Player.util; let container = util.createDom('xg-loading', ` + + + + `, {}, 'xgplayer-loading') + player.root.appendChild(container) + player.once('destroy', () => { + container = null + }) +} + +Player.install('loading', loading) diff --git a/packages/xgplayer/src/control/mobile.js b/packages/xgplayer/src/control/mobile.js new file mode 100755 index 00000000..38466166 --- /dev/null +++ b/packages/xgplayer/src/control/mobile.js @@ -0,0 +1,117 @@ +import Player from '../player' +import SVG from '../utils/svg' + +let whitelistPass = (list) => { + let util = Player.util + return list.some(item => { + if (util.typeOf(item) === 'Function') { + return item.call(navigator.userAgent) + } else if (util.typeOf(item) === 'RegExp') { + return item.test(navigator.userAgent) + } else if (util.typeOf(item) === 'String') { + return navigator.userAgent.indexOf(item) > -1 + } else { + return false + } + }) +} + +let debug = (config) => { + let options = {} + Object.assign(options, { + host: '127.0.0.1', + port: 9090 + }, config) + let script = document.createElement('script') + let h4 = document.createElement('h4') + h4.style.cssText = 'position:fixed;bottom:0;padding:10px;width:100%;background-color:#fff;text-align:center' + h4.textContent = `weinre --boundHost ${options.host} --httpPort ${options.port}\r\n 启动服务后,刷新页面` + script.anonymous = true + script.async = true + script.src = `http://${options.host}:${options.port}/target/target-script-min.js#anonymous` + script.onload = function () { + h4.parentNode.removeChild(h4) + } + document.body.appendChild(script) + document.body.appendChild(h4) +} + +let mobile = function () { + let player = this + + let util = Player.util; let root = player.root + player.config.autoplay = false + let whitelist = player.config.whitelist + let pass = whitelistPass(whitelist) + player.mobilePass = pass + let iconPath = { + pause: 'M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z', + play: 'M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z' + } + + let btn = util.createDom('xg-start', ` + + + `, {}, 'xgplayer-start') + let enter = util.createDom('xg-enter', '', {}, 'xgplayer-enter') + let logo = enter.querySelector('.xgplayer-enter-logo') + root.appendChild(btn) + root.appendChild(enter) + let path = btn.querySelector('path') + let enterLogo = new Image() + let svg = new SVG({ + from: iconPath.play, + to: iconPath.pause, + progress: (shape, percent) => { + path.setAttribute('d', svg.toSVGString(shape)) + } + }) + enter.querySelector('.xgplayer-enter-tips').style.display = 'block' + player.start() + if (pass) { + enterLogo.src = util.getBgImage(logo) + player.video.addEventListener('touchstart', (e) => { + e.preventDefault() + player.emit('focus') + }, false) + btn.addEventListener('touchstart', (e) => { + e.preventDefault() + if (util.hasClass(root, 'xgplayer-nostart')) { + util.removeClass(root, 'xgplayer-nostart') + util.addClass(root, 'xgplayer-is-enter') + player.on('canplay', () => { + util.removeClass(root, 'xgplayer-is-enter') + }) + player.once('playing', () => { + util.removeClass(root, 'xgplayer-is-enter') + }) + player.play() + } else { + if (player.paused) { + player.play() + } else { + player.pause() + } + } + }) + player.on('play', () => { + svg.reset(iconPath.play, iconPath.pause) + }) + player.on('pause', () => { + svg.reset(iconPath.pause, iconPath.play) + }) + } else { + util.addClass(root, 'xgplayer-mobile-npassed') + player.once('ready', function () { + player.video.controls = player.config.controls + player.video.controlsList = player.config.controlsList.join(' ') + if (player.config.poster) { + player.video.poster = player.config.poster + } + }) + } + if (player.config.debug) { + debug(player.config.debug) + } +} +Player.install('mobile', mobile) diff --git a/packages/xgplayer/src/control/pc.js b/packages/xgplayer/src/control/pc.js new file mode 100755 index 00000000..90e80ace --- /dev/null +++ b/packages/xgplayer/src/control/pc.js @@ -0,0 +1,142 @@ +import Player from '../player' + +let pc = function () { + let player = this + let util = Player.util; let controls = player.controls; let root = player.root + let clk = 0; let _click_ + let iconPath = { + pause: 'M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z', + play: 'M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z' + } + let btn = util.createDom('xg-start', ` + + + `, {}, 'xgplayer-start') + let enter = util.createDom('xg-enter', '', {}, 'xgplayer-enter') + let logo = enter.querySelector('.xgplayer-enter-logo') + root.appendChild(btn) + root.appendChild(enter) + let path = btn.querySelector('path') + let enterLogo = new Image() + enterLogo.onload = () => { + enter.querySelector('.xgplayer-enter-tips').style.display = 'block' + } + enterLogo.src = util.getBgImage(logo); + ['click', 'touchstart'].forEach(item => { + btn.addEventListener(item, function (e) { + e.preventDefault() + e.stopPropagation() + if (!player.config.url) { + return + } + if (util.hasClass(root, 'xgplayer-nostart')) { + util.removeClass(root, 'xgplayer-nostart') // for ie quick switch + util.addClass(root, 'xgplayer-is-enter') + if (!root.querySelector('video')) { + player.start() + } + player.on('canplay', () => { + util.removeClass(root, 'xgplayer-is-enter') + }) + player.once('playing', () => { + util.removeClass(root, 'xgplayer-is-enter') + }) + player.play() + setTimeout(() => { + player.play() + }, 10) + } else { + if (player.paused) { + util.removeClass(root, 'xgplayer-nostart xgplayer-isloading') + setTimeout(() => { + player.play() + }, 10) + } + } + }) + }) + btn.addEventListener('animationend', (e) => { + e.preventDefault() + util.removeClass(btn, 'xgplayer-start-interact') + btn.style.display = 'none' + }) + player.on('play', () => { + path.setAttribute('d', iconPath.pause) + btn.style.display = 'inline-block' + util.addClass(btn, 'xgplayer-start-interact') + }) + player.on('pause', () => { + path.setAttribute('d', iconPath.play) + btn.style.display = 'inline-block' + util.addClass(btn, 'xgplayer-start-interact') + }) + + player.video.addEventListener('click', function (e) { + e.preventDefault() + e.stopPropagation() + if (document.activeElement !== player.video) { + player.video.focus() + return + } + clk++ + if (_click_) { + clearTimeout(_click_) + } + if (clk === 1) { + _click_ = setTimeout(function () { + if (util.hasClass(player.root, 'xgplayer-nostart')) { + return false + } else if (!player.ended) { + if (player.paused) { + player.play() + } else { + player.pause() + } + } + clk = 0 + }, 200) + } else { + clk = 0 + } + }, false) + + player.video.addEventListener('dblclick', function (e) { + e.preventDefault() + e.stopPropagation() + if (document.activeElement !== player.video) { + player.video.focus() + return + } + let fullscreen = controls.querySelector('.xgplayer-fullscreen') + if (fullscreen) { + let clk + if (document.createEvent) { + clk = document.createEvent('Event') + clk.initEvent('click', true, true) + } else { + clk = new Event('click') + } + fullscreen.dispatchEvent(clk) + } + }, false) + + root.addEventListener('mouseenter', function (e) { + player.emit('focus', player) + }, false) + + root.addEventListener('mouseleave', function (e) { + player.emit('blur', player) + }, false) + + controls.addEventListener('mouseenter', function (e) { + if (player.userTimer) { + clearTimeout(player.userTimer) + } + }, false) + + controls.addEventListener('mouseleave', function (e) { + player.emit('focus', player) + }, false) +} + +Player.install('pc', pc) diff --git a/packages/xgplayer/src/control/play.js b/packages/xgplayer/src/control/play.js new file mode 100755 index 00000000..f6752429 --- /dev/null +++ b/packages/xgplayer/src/control/play.js @@ -0,0 +1,62 @@ +import Player from '../player' +import SVG from '../utils/svg' + +let play = function () { + let player = this + let root = player.controls; let util = Player.util; let scale = player.config.iconScale || 0.0320625 + let iconPath = { + play: 'M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z', + pause: 'M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z' + } + let btn = util.createDom('xg-play', ` + + `) + let tips = util.createDom('xg-tips', '播放', {}, 'xgplayer-tips') + let path = btn.querySelector('path') + btn.appendChild(tips) + + let svg = new SVG({ + progress: (shape, percent) => { + path.setAttribute('d', svg.toSVGString(shape)) + }, + from: iconPath.pause, + to: iconPath.play + }) + + let ev = ['click', 'touchstart'] + btn.className = 'xgplayer-play' + root.appendChild(btn) + ev.forEach(item => { + btn.addEventListener(item, function (e) { + e.preventDefault() + e.stopPropagation() + if (player.ended) { + return + } + if (player.paused) { + player.play() + } else { + player.pause() + } + }, false) + }) + + player.on('play', () => { + tips.textContent = '暂停' + if (svg.to !== iconPath.pause) { + svg.reset(iconPath.pause, iconPath.play) + } + }) + + player.on('pause', () => { + tips.textContent = '播放' + if (svg.to !== iconPath.play) { + svg.reset(iconPath.play, iconPath.pause) + } + }) + player.once('destroy', () => { + btn = null + }) +} + +Player.install('play', play) diff --git a/packages/xgplayer/src/control/playbackRate.js b/packages/xgplayer/src/control/playbackRate.js new file mode 100644 index 00000000..a4f4ae2f --- /dev/null +++ b/packages/xgplayer/src/control/playbackRate.js @@ -0,0 +1,37 @@ +import Player from '../player' + +let playbackRate = function () { + let player = this; let util = Player.util + let rateTpl = [] + if (player.config.playbackRate) { + player.config.playbackRate.sort((a, b) => b - a) + player.config.playbackRate.forEach(item => { + rateTpl.push(`
  • ${item}x
  • `) + }) + } else { + return false + } + let ul = util.createDom('xg-playback', `

    1x

      ${rateTpl.join('')}
    `, {}, 'xgplayer-playback'); let root = player.controls + root.appendChild(ul); + ['touchstart', 'click'].forEach(item => { + ul.addEventListener(item, function (e) { + e.preventDefault() + e.stopPropagation() + let li = e.target || e.srcElement + if (li && li.tagName.toLocaleLowerCase() === 'li') { + Array.prototype.forEach.call(li.parentNode.childNodes, item => { + util.removeClass(item, 'active') + }) + util.addClass(li, 'active') + ul.querySelector('p').textContent = li.textContent + player.video.playbackRate = li.textContent.replace(/x$/g, '') * 1 + } + }, false) + }) + + player.once('destroy', () => { + ul = null + }) +} + +Player.install('playbackRate', playbackRate) diff --git a/packages/xgplayer/src/control/poster.js b/packages/xgplayer/src/control/poster.js new file mode 100755 index 00000000..bed340ee --- /dev/null +++ b/packages/xgplayer/src/control/poster.js @@ -0,0 +1,19 @@ +import Player from '../player' + +let poster = function () { + let player = this; let util = Player.util + let poster = util.createDom('xg-poster', '', {}, 'xgplayer-poster'); let root = player.root + if (player.config.poster) { + poster.style.backgroundImage = `url(${player.config.poster})` + root.appendChild(poster) + } + player.on('play', () => { + poster.style.display = 'none' + }) + + player.once('destroy', () => { + poster = null + }) +} + +Player.install('poster', poster) diff --git a/packages/xgplayer/src/control/progress.js b/packages/xgplayer/src/control/progress.js new file mode 100755 index 00000000..68532d92 --- /dev/null +++ b/packages/xgplayer/src/control/progress.js @@ -0,0 +1,103 @@ +import Player from '../player' + +let progress = function () { + let player = this; let util = Player.util + let container = util.createDom('xg-progress', '', {tabindex: 1}, 'xgplayer-progress'); let root = player.controls; let containerWidth + root.appendChild(container) + let progress = container.querySelector('.xgplayer-progress-played') + let cache = container.querySelector('.xgplayer-progress-cache') + let point = container.querySelector('.xgplayer-progress-point'); + ['touchstart', 'mousedown'].forEach(item => { + container.addEventListener(item, function (e) { + e.preventDefault() + e.stopPropagation() + util.event(e) + if (e._target === point || player.ended) { + return false + } + container.focus() + containerWidth = container.getBoundingClientRect().width + let {left} = progress.getBoundingClientRect(); let isMove = false + let move = function (e) { + e.preventDefault() + e.stopPropagation() + util.event(e) + isMove = true + let w = e.clientX - left + let now = w / containerWidth * player.duration + progress.style.width = `${w * 100 / containerWidth}%` + player.currentTime = Number(now).toFixed(1) + } + let up = function (e) { + e.preventDefault() + e.stopPropagation() + util.event(e) + window.removeEventListener('mousemove', move) + window.removeEventListener('touchmove', move) + window.removeEventListener('mouseup', up) + window.removeEventListener('touchend', up) + container.blur() + if (!isMove) { + let w = e.clientX - left + let now = w / containerWidth * player.duration + progress.style.width = `${w * 100 / containerWidth}%` + player.currentTime = Number(now).toFixed(1) + } + isMove = false + } + window.addEventListener('mousemove', move) + window.addEventListener('touchmove', move) + window.addEventListener('mouseup', up) + window.addEventListener('touchend', up) + return false + }) + }) + + container.addEventListener('mouseenter', function (e) { + if (player.ended) { return false } + let containerLeft = container.getBoundingClientRect().left + let containerWidth = container.getBoundingClientRect().width + let compute = function (e) { + let now = (e.clientX - containerLeft) / containerWidth * player.duration + point.textContent = util.format(now) + point.style.left = `${e.clientX - containerLeft - 15}px` + point.style.display = 'block' + } + let move = function (e) { + compute(e) + } + let leave = function (e) { + container.removeEventListener('mousemove', move, false) + container.removeEventListener('mouseleave', leave, false) + compute(e) + point.style.display = 'none' + } + container.addEventListener('mousemove', move, false) + container.addEventListener('mouseleave', leave, false) + compute(e) + }, false) + + player.on('timeupdate', function () { + if (!containerWidth) { + containerWidth = container.getBoundingClientRect().width + } + progress.style.width = `${player.currentTime * 100 / player.duration}%` + }); + ['cacheupdate', 'ended', 'timeupdate'].forEach(item => { + player.on(item, function () { + let buffered = player.buffered + if (buffered && buffered.length > 0) { + let end = buffered.end(buffered.length - 1) + cache.style.width = `${end / player.duration * 100}%` + } + }) + }) + player.once('destroy', () => { + container = null + progress = null + point = null + cache = null + }) +} + +Player.install('progress', progress) diff --git a/packages/xgplayer/src/control/replay.js b/packages/xgplayer/src/control/replay.js new file mode 100755 index 00000000..f17ccc14 --- /dev/null +++ b/packages/xgplayer/src/control/replay.js @@ -0,0 +1,29 @@ +import Player from '../player' + +let replay = function () { + let player = this; let util = Player.util + let container = util.createDom('xg-replay', ` + + + + 重播 + `, {}, 'xgplayer-replay'); let root = player.root + let btn = container.querySelector('.xgplayer-replay-svg') + root.appendChild(container) + player.on('ended', function () { + container.querySelector('.xgplayer-replay-txt').textContent = player.lang.REPLAY + if (!player.config.loop) { + util.addClass(root, 'replay') + } + }) + btn.addEventListener('click', function (e) { + e.preventDefault() + util.removeClass(root, 'replay') + player.replay() + }) + player.once('destroy', () => { + btn = null + }) +} + +Player.install('replay', replay) diff --git a/packages/xgplayer/src/control/time.js b/packages/xgplayer/src/control/time.js new file mode 100755 index 00000000..d907bec1 --- /dev/null +++ b/packages/xgplayer/src/control/time.js @@ -0,0 +1,20 @@ +import Player from '../player' + +let time = function () { + let player = this; let util = Player.util + let format = util.format + let curtime = util.createDom('xg-time', `${player.currentTime || format(0)}${player.duration || format(0)}`, {}, 'xgplayer-time'); let root = player.controls + root.appendChild(curtime) + let handle = function () { + curtime.innerHTML = `${format(player.currentTime || 0)}${format(player.duration)}` + } + player.on('durationchange', handle) + player.on('timeupdate', handle) + player.once('destroy', () => { + player.off('durationchange', handle) + player.off('timeupdate', handle) + curtime = null + }) +} + +Player.install('time', time) diff --git a/packages/xgplayer/src/control/volume.js b/packages/xgplayer/src/control/volume.js new file mode 100755 index 00000000..89e70864 --- /dev/null +++ b/packages/xgplayer/src/control/volume.js @@ -0,0 +1,158 @@ +import Player from '../player' +import SVG from '../utils/svg' + +let volume = function () { + let player = this; let util = Player.util; let scale = 0.0220625 + let volume = player.config.volume + let iconPath = { + muted: 'M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z', + small: 'M795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z', + large: 'M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z' + } + let v2s = (vol) => { + let s = '' + if (vol === 0) { + s = 'muted' + } else if (vol < 0.5) { + s = 'small' + } else { + s = 'large' + } + return s + } + let curIocnPath = iconPath[v2s(volume)] + let defaultPath = iconPath[v2s(volume)] + let container = util.createDom('xg-volume', ` + + + + + + + + + + `, + {}, 'xgplayer-volume'); let root = player.controls + root.appendChild(container) + let containerHeight + let slider = container.querySelector('.xgplayer-slider') + let bar = container.querySelector('.xgplayer-bar') + let selected = container.querySelector('.xgplayer-drag') + let icon = container.querySelector('.xgplayer-icon') + selected.style.height = `${player.config.volume * 100}%` + let path = root.querySelectorAll('path')[1] + let svg = new SVG({ + progress: (shape, percent) => { + let _p = svg.toSVGString(shape) + path.setAttribute('d', _p) + curIocnPath = _p + }, + from: curIocnPath, + to: iconPath['large'] + }) + let barSize = null + slider.volume = player.config.volume; + + ['touchstart', 'mousedown'].forEach(item => { + bar.addEventListener(item, function (e) { + e.preventDefault() + e.stopPropagation() + slider.focus() + util.event(e) + containerHeight = bar.getBoundingClientRect().height + let pos = {x: e.clientX, y: e.clientY}; let height = selected.getBoundingClientRect().height; let isMove = false + let move = function (e) { + e.preventDefault() + e.stopPropagation() + util.event(e) + isMove = true + let w = height - e.clientY + pos.y + let now = w / containerHeight + selected.style.height = `${w}px` + player.volume = Math.max(Math.min(now, 1), 0.01) + } + let up = function (e) { + e.preventDefault() + e.stopPropagation() + util.event(e) + window.removeEventListener('mousemove', move) + window.removeEventListener('touchmove', move) + window.removeEventListener('mouseup', up) + window.removeEventListener('touchend', up) + if (!barSize) { + barSize = bar.getBoundingClientRect() + } + if (!isMove) { + let w = barSize.height - (e.clientY - barSize.top) + let now = w / barSize.height + selected.style.height = `${w}px` + if (now <= 0) { + if (player.volume > 0) { + selected.volume = player.video.volume + } else { + now = selected.volume + } + } + player.volume = Math.max(Math.min(now, 1), 0.01) + } + slider.volume = player.volume + isMove = false + } + window.addEventListener('mousemove', move) + window.addEventListener('touchmove', move) + window.addEventListener('mouseup', up) + window.addEventListener('touchend', up) + return false + }) + }); + + ['touchstart', 'mousedown'].forEach((item) => { + icon.addEventListener(item, function (e) { + e.preventDefault() + e.stopPropagation() + if (util.hasClass(slider, 'xgplayer-none')) { + util.removeClass(slider, 'xgplayer-none') + slider.focus() + } else { + if (player.volume === 0) { + player.volume = slider.volume + } else { + player.volume = 0 + } + } + }) + }) + + slider.addEventListener('blur', function (e) { + e.preventDefault() + e.stopPropagation() + util.addClass(slider, 'xgplayer-none') + }) + + let _changeTimer = null + player.on('volumechange', function () { + if (_changeTimer) { + clearTimeout(_changeTimer) + } + _changeTimer = setTimeout(() => { + svg.reset(iconPath[v2s(player.volume)], curIocnPath) + curIocnPath = iconPath[v2s[player.volume]] + if (!containerHeight) { + containerHeight = bar.getBoundingClientRect().height || 76 + } + selected.style.height = `${player.volume * containerHeight}px` + }, 50) + }) + + player.once('canplay', function () { + player.volume = player.config.volume + }) + + player.once('destroy', () => { + container = null + selected = null + }) +} + +Player.install('volume', volume) diff --git a/packages/xgplayer/src/error.js b/packages/xgplayer/src/error.js new file mode 100644 index 00000000..dfabb288 --- /dev/null +++ b/packages/xgplayer/src/error.js @@ -0,0 +1,72 @@ +import {version} from '../package.json' +const ErrorTypes = { + network: { + code: 1, + msg: '视频下载错误', + remark: '只要视频下载错误就使用此类型,无论是video本身的超时还是xhr的分段请求超时或者资源不存在' + }, + mse: { + code: 2, + msg: '流追加错误', + remark: '追加流的时候如果类型不对、无法被正确解码则会触发此类错误' + }, + parse: { + code: 3, + msg: '解析错误', + remark: 'mp4、hls、flv我们都是使用js进行格式解析,如果解析失败则会触发此类错误' + }, + format: { + code: 4, + msg: '格式错误', + remark: '如果浏览器不支持的格式导致播放错误' + }, + decoder: { + code: 5, + msg: '解码错误', + remark: '浏览器解码异常会抛出此类型错误' + }, + runtime: { + code: 6, + msg: '语法错误', + remark: '播放器语法错误' + }, + timeout: { + code: 7, + msg: '播放超时', + remark: '播放过程中无法正常请求下一个分段导致播放中断' + }, + other: { + code: 8, + msg: '其他错误', + remark: '不可知的错误或被忽略的错误类型' + } +} + +class Errors { + constructor (type, vid, errd = {line: '', handle: '', msg: '', version: ''}, vd = 0, vu = []) { + let r = {} + r.pv = version // 播放器版本 + r.errt = type + r.v = vid // 视频id + r.uid = /tt_webid=(\d+)/gi.test(document.cookie) ? RegExp.$1 : '' // user_id + r.dm = document.domain // domain + r.sv = 1 // 统计接口的服务器端版本号 + r.pt = 0 // 启动本次播放的时间戳 + r.at = 0 // 在 complete 时默认完成,如果在之前数据已经上报获取到,则不需要在设置 + r.lt = 0 // QUESTION: 没有点播就离开,目前只是在 beforeunload 中做了监听,数据不准确 + r.bft = 0 // 结束时监听,在开始时置零 + r.br = 0 // 如果是 timeout 事件触发,意味着播放中断 + r.lc = 0 // TODO: 需要获得重播的事件,目前不敢对 beforeReplay 进行赋值操作 + r.vu = vu // 视频地址列表 + r.vd = 0 // 视频时长 + r.vs = 0 // TODO:video_size 视频总大小,从APi获取不到,建议可以从API获取,在complete中即可获取 + r.ps = 0 // TODO:parsed_size 已经解码的大小 + r.rs = 0 // TODO:requested_size 已经请求的大小 + r.errt = type // 错误类型 + r.errd = errd // 错误详情 + r.ex = (ErrorTypes[type] || {}).msg // 补充信息 + return r + } +} + +export default Errors diff --git a/packages/xgplayer/src/index.js b/packages/xgplayer/src/index.js new file mode 100755 index 00000000..dff3f8d5 --- /dev/null +++ b/packages/xgplayer/src/index.js @@ -0,0 +1,4 @@ +import Player from './player' +import * as Controls from './control/*.js' +import './style/index.scss' +export default Player diff --git a/packages/xgplayer/src/player.js b/packages/xgplayer/src/player.js new file mode 100755 index 00000000..eadbe1d5 --- /dev/null +++ b/packages/xgplayer/src/player.js @@ -0,0 +1,204 @@ +import Proxy from './proxy' +import util from './utils/util' +import sniffer from './utils/sniffer' +import Errors from './error' +import {version} from '../package.json' +class Player extends Proxy { + constructor (options) { + super(options) + this.config = util.deepCopy({ + width: 600, + height: 337.5, + ignores: [], + whitelist: [], + lang: (document.documentElement.getAttribute('lang') || navigator.language || 'zh-cn').toLocaleLowerCase(), + inactive: 3000, + volume: 0.6, + controls: true, + controlsList: ['nodownload'] + }, options) + this.version = version + this.userTimer = null + this.waitTimer = null + this.history = [] + this.root = util.findDom(document, `#${this.config.id}`) + this.controls = util.createDom('xg-controls', '', {unselectable: 'on', onselectstart: 'return false'}, 'xgplayer-controls') + if (!this.root) { + let el = this.config.el + if (el && el.nodeType === 1) { + this.root = el + } else { + this.emit('error', new Errors('use', this.config.vid, { + line: 32, + handle: 'Constructor', + msg: 'container id can\'t be empty' + })) + return false + } + } + + util.addClass(this.root, `xgplayer xgplayer-${sniffer.device} xgplayer-nostart ${this.config.controls ? '' : 'no-controls'}`) + this.root.appendChild(this.controls) + this.root.style.width = `${this.config.width}px` + this.root.style.height = `${this.config.height}px` + if (Player.plugins) { + let ignores = this.config.ignores + Object.keys(Player.plugins).forEach(name => { + let descriptor = Player.plugins[name] + if (!ignores.some(item => name === item)) { + if (['pc', 'tablet', 'mobile'].some(type => type === name)) { + if (name === sniffer.device) { + descriptor.call(this, this) + } + } else { + descriptor.call(this, this) + } + } + }) + } + this.ev.forEach((item) => { + let evName = Object.keys(item)[0]; let evFunc = this[item[evName]] + if (evFunc) { + this.on(evName, evFunc) + } + }); + + ['focus', 'blur'].forEach(item => { + this.on(item, this['on' + item.charAt(0).toUpperCase() + item.slice(1)]) + }) + setTimeout(() => { + this.emit('ready') + }, 0) + if (options.autoplay) { + this.start() + } + } + + start (url = this.config.url) { + let root = this.root; let player = this + if (util.typeOf(url) === 'String') { + this.video.src = url + } else { + url.forEach(item => { + this.video.appendChild(util.createDom('source', '', {src: `${item.src}`, type: `${item.type || ''}`})) + }) + } + root.insertBefore(this.video, root.firstChild) + player.userTimer = setTimeout(function () { + player.emit('blur') + }, player.config.inactive) + setTimeout(() => { + this.emit('complete') + }, 1) + } + + reload () { + this.video.load() + this.once('loadeddata', function () { + this.play() + }) + } + + destroy () { + if (!this.paused) { + this.pause() + this.once('pause', () => { + this.emit('destroy') + this.root.parentNode.removeChild(this.root) + }) + } else { + this.emit('destroy') + this.root.parentNode.removeChild(this.root) + } + } + + replay () { + let _replay = this._replay + // ie9 bugfix + util.removeClass(this.root, 'xgplayer-ended') + if (_replay && _replay instanceof Function) { + _replay() + } else { + this.currentTime = 0 + this.play() + } + } + + onFocus () { + let player = this + util.removeClass(this.root, 'xgplayer-inactive') + if (player.userTimer) { + clearTimeout(player.userTimer) + } + player.userTimer = setTimeout(function () { + player.emit('blur') + }, player.config.inactive) + } + + onBlur () { + if (!this.paused && !this.ended) { + util.addClass(this.root, 'xgplayer-inactive') + } + } + + onPlay () { + util.addClass(this.root, 'xgplayer-playing') + util.removeClass(this.root, 'xgplayer-pause') + } + + onPause () { + util.addClass(this.root, 'xgplayer-pause') + if (this.userTimer) { + clearTimeout(this.userTimer) + } + this.emit('focus') + } + + onEnded () { + util.addClass(this.root, 'xgplayer-ended') + util.removeClass(this.root, 'xgplayer-playing') + } + + onSeeking () { + // util.addClass(this.root, 'seeking'); + } + + onSeeked () { + // for ie,playing fired before waiting + if (this.waitTimer) { + clearTimeout(this.waitTimer) + } + util.removeClass(this.root, 'xgplayer-isloading') + } + + onWaiting () { + let self = this + if (self.waitTimer) { + clearTimeout(self.waitTimer) + } + self.waitTimer = setTimeout(function () { + util.addClass(self.root, 'xgplayer-isloading') + }, 500) + } + + onPlaying () { + if (this.waitTimer) { + clearTimeout(this.waitTimer) + } + util.removeClass(this.root, 'xgplayer-isloading xgplayer-nostart xgplayer-pause xgplayer-ended xgplayer-is-error xgplayer-replay') + util.addClass(this.root, 'xgplayer-playing') + } + + static install (name, descriptor) { + if (!Player.plugins) { + Player.plugins = {} + } + Player.plugins[name] = descriptor + } +} + +Player.util = util +Player.sniffer = sniffer +Player.Errors = Errors + +export default Player diff --git a/packages/xgplayer/src/proxy.js b/packages/xgplayer/src/proxy.js new file mode 100755 index 00000000..23248d02 --- /dev/null +++ b/packages/xgplayer/src/proxy.js @@ -0,0 +1,234 @@ +import EventEmitter from 'event-emitter' +import util from './utils/util' +import Errors from './error' + +class Proxy { + constructor (options) { + this._hasStart = false + let videoConfig = { + controls: false, + autoplay: options.autoplay, + playsinline: options.playsinline, + 'webkit-playsinline': options.playsinline, + 'x5-video-player-type': options['x5-video-player-type'], + 'x5-video-player-fullscreen': options['x5-video-player-fullscreen'], + 'x5-video-orientation': options['x5-video-orientation'], + airplay: options['airplay'], + 'webkit-airplay': options['airplay'], + tabindex: 2 + } + if (options.loop) { + videoConfig.loop = 'loop' + } + this.video = util.createDom('video', '', videoConfig, '') + this.ev = ['play', 'playing', 'pause', 'ended', 'error', 'seeking', 'seeked', + 'timeupdate', 'waiting', 'canplay', 'canplaythrough', 'durationchange', 'volumechange', 'loadeddata'].map((item) => { + return { + [item]: `on${item.charAt(0).toUpperCase()}${item.slice(1)}` + } + }) + EventEmitter(this) + + this.ev.forEach(item => { + let self = this; let name = Object.keys(item)[0] + self.video.addEventListener(name, function () { + if (name === 'play') { + self.hasStart = true + } + if (name === 'error') { + if (self.video.error) { + self.emit(name, new Errors('other', videoConfig.vid, { + line: 41, + msg: self.error, + handle: 'Constructor' + })) + } + } else { + self.emit(name, self) + } + }, false) + }) + } + + get hasStart () { + return this._hasStart + } + set hasStart (bool) { + if (typeof bool === 'boolean' && bool === true && !this._hasStart) { + this._hasStart = true + this.emit('hasstart') + } + } + + play () { + this.video.play() + } + pause () { + this.video.pause() + } + canPlayType () { + this.video.canPlayType() + } + getBufferedRange () { + let range = [0, 0]; let video = this.video; let buffered = video.buffered + let currentTime = video.currentTime + if (buffered) { + for (let i = 0, len = buffered.length; i < len; i++) { + range[0] = buffered.start(i) + range[1] = buffered.end(i) + if (range[0] <= currentTime && currentTime <= range[1]) { + break + } + } + } + if (range[0] - currentTime <= 0 && currentTime - range[1] <= 0) { + return range + } else { + return [0, 0] + } + } + set autoplay (isTrue) { + this.video.autoplay = isTrue + } + get autoplay () { + return this.video.autoplay + } + get buffered () { + return this.video.buffered + } + get crossOrigin () { + return this.video.crossOrigin + } + set crossOrigin (isTrue) { + this.video.crossOrigin = isTrue + } + get currentSrc () { + return this.video.currentSrc + } + set currentSrc (src) { + this.video.currentSrc = src + } + get currentTime () { + return this.video.currentTime + } + set currentTime (time) { + this.video.currentTime = time + } + get defaultMuted () { + return this.video.defaultMuted + } + set defaultMuted (isTrue) { + this.video.defaultMuted = isTrue + } + get duration () { + return this.video.duration + } + get ended () { + return this.video.ended + } + get error () { + let err = this.video.error + if (!err) { + return null + } + let status = [{ + en: 'MEDIA_ERR_ABORTED', + cn: '取回过程被用户中止' + }, { + en: 'MEDIA_ERR_NETWORK', + cn: '当下载时发生错误' + }, { + en: 'MEDIA_ERR_DECODE', + cn: '当解码时发生错误' + }, { + en: 'MEDIA_ERR_SRC_NOT_SUPPORTED', + cn: '不支持音频/视频' + }] + return this.lang ? this.lang[status[err.code - 1].en] : status[err.code - 1].en + } + get loop () { + return this.video.loop + } + set loop (isTrue) { + this.video.loop = isTrue + } + get muted () { + return this.video.muted + } + set muted (isTrue) { + this.video.muted = isTrue + } + get networkState () { + let status = [{ + en: 'NETWORK_EMPTY', + cn: '音频/视频尚未初始化' + }, { + en: 'NETWORK_IDLE', + cn: '音频/视频是活动的且已选取资源,但并未使用网络' + }, { + en: 'NETWORK_LOADING', + cn: '浏览器正在下载数据' + }, { + en: 'NETWORK_NO_SOURCE', + cn: '未找到音频/视频来源' + }] + return this.lang ? this.lang[status[this.video.networkState].en] : status[this.video.networkState].en + } + get paused () { + return this.video.paused + } + get playbackRate () { + return this.video.playbackRate + } + set playbackRate (rate) { + this.video.playbackRate = rate + } + get played () { + return this.video.played + } + get preload () { + return this.video.preload + } + set preload (isTrue) { + this.video.preload = isTrue + } + get readyState () { + let status = [{ + en: 'HAVE_NOTHING', + cn: '没有关于音频/视频是否就绪的信息' + }, { + en: 'HAVE_METADATA', + cn: '关于音频/视频就绪的元数据' + }, { + en: 'HAVE_CURRENT_DATA', + cn: '关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒' + }, { + en: 'HAVE_FUTURE_DATA', + cn: '当前及至少下一帧的数据是可用的' + }, { + en: 'HAVE_ENOUGH_DATA', + cn: '可用数据足以开始播放' + }] + return this.lang ? this.lang[status[this.video.readyState].en] : status[this.video.readyState] + } + get seekable () { + return this.video.seekable + } + get seeking () { + return this.video.seeking + } + get src () { + return this.video.src + } + set src (url) { + this.video.src = url + } + get volume () { + return this.video.volume + } + set volume (vol) { + this.video.volume = vol + } +} + +export default Proxy diff --git a/packages/xgplayer/src/style/.DS_Store b/packages/xgplayer/src/style/.DS_Store new file mode 100644 index 00000000..ba680f81 Binary files /dev/null and b/packages/xgplayer/src/style/.DS_Store differ diff --git a/packages/xgplayer/src/style/index.scss b/packages/xgplayer/src/style/index.scss new file mode 100644 index 00000000..950c5aa5 --- /dev/null +++ b/packages/xgplayer/src/style/index.scss @@ -0,0 +1,2 @@ +@import "./variable.scss"; +@import "./player.scss"; diff --git a/packages/xgplayer/src/style/player.scss b/packages/xgplayer/src/style/player.scss new file mode 100644 index 00000000..ea09bcfa --- /dev/null +++ b/packages/xgplayer/src/style/player.scss @@ -0,0 +1,632 @@ +@keyframes playPause { + 0% { + transform: scale(1,1); + opacity: 1; + } + 99% { + transform: scale(1.3, 1.3); + opacity: 0; + } + 100% { + transform: scale(0,0); + opacity: 0; + } +} +@keyframes loadingRotate { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } +} +@keyframes loadingDashOffset { + 0% { + stroke-dashoffset: 236; + } + 100% { + stroke-dashoffset: 0; + } +} +@keyframes enterTips{ + 0% { + opacity: 0; + left: 0; + width: 3px; + } + 50% { + opacity: 1; + left: 50%; + width: 5px; + } + 100% { + opacity: 0; + left: 100%; + width: 3px; + } +} +.xgplayer{ + background: $playerBgColor; + width: 100%; + height: 100%; + position: relative; + *{ + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; + } + .xgplayer-none{ + display: none + } + &.xgplayer-is-fullscreen{ + width: 100%!important; + height: 100%!important; + z-index: 9999; + } + video{ + width:100%; + height: 100%; + outline: none; + } +} +.xgplayer-icon { + display: block; + width: 40px; + height: 40px; + overflow: hidden; + fill:$playerIconColor; +} +.xgplayer-controls{ + display: flex; + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 40px; + background-image: $controlsBgImage; + z-index: 10; + @at-root .xgplayer-nostart &{ + display: none; + } + @at-root .xgplayer-inactive & { + display: none; + } + @at-root .xgplayer-is-live & { + > *{ + display: none; + } + .xgplayer-play, + .xgplayer-placeholder, + .xgplayer-volume, + .xgplayer-live, + .xgplayer-fullscreen { + display: block; + } + } +} +.xgplayer-progress{ + display: block; + position: absolute; + height: 20px; + line-height: 20px; + left: 0; + right: 0; + outline: none; + top: -10px; + z-index: 15; +} +.xgplayer-progress-outer{ + background: $progressOuterBgColor; + display: block; + height: 3px; + line-height: 3px; + margin-top: 8.5px; + width: 100%; + position: relative; +} +.xgplayer-progress-cache,.xgplayer-progress-played{ + display: block; + height: 100%; + line-height: 1; + position: absolute; + left: 0; + top: 0; +} +.xgplayer-progress-cache{ + width: 0; + background: $progressCacheBgColor; +} +.xgplayer-progress-played{ + display: block; + width: 0; + background-image: $progressPlayedBgImage; + border-radius: 0 1.5px 1.5px 0; + &:after{ + content:" "; + display: none; + position: absolute; + right: -4px; + top: -4px; + width: 14px; + height: 14px; + border-radius: 50%; + background: #FFFFFF; + box-shadow: $progressPlayedShadow; + } +} +.xgplayer-progress-point{ + position: absolute; + &.xgplayer-tips{ + margin-left: 0; + top: -25px; + display: none; + } +} +.xgplayer-progress:hover,.xgplayer-progress:focus{ + .xgplayer-progress-outer{ + height: 6px; + margin-top: 7px; + } + .xgplayer-progress-played:after{ + display: block + } +} +.xgplayer-play{ + position: relative; + order: 0; + display: block; + .xgplayer-icon{ + margin-top: 3px; + } + &:hover{ + .xgplayer-tips{ + display: block; + } + } +} +.xgplayer-time{ + order: 2; + font-family: ArialMT; + font-size: 13px; + color: $timeColor; + line-height: 40px; + display: inline-block; + span::after{ + content: "/"; + display: inline-block; + padding: 0 3px; + } + em{ + color: $timeDurationColor; + } +} +.xgplayer-tips{ + background: $tipsBgColor; + border-radius: 1px; + display: none; + position: absolute; + font-family: PingFangSC-Regular; + font-size: $tipsFontsize; + color: $tipsColor; + padding: 2px 4px; + text-align: center; + top: -30px; + left: 50%; + margin-left: -16px; + width: auto; + white-space: nowrap; +} +.xgplayer-volume{ + outline: none; + order: 4; + display: inline-block; + position: relative; + .xgplayer-icon{ + margin-top: 8px; + } +} +.xgplayer-slider{ + display: block; + position: absolute; + width: 28px; + height: 88px; + background: $sliderBgColor; + border-radius: 1px; + bottom: 50px; + outline: none; + left: 0; + &:after{ + content:" "; + display:block; + height: 15px; + width:28px; + position: absolute; + bottom: -15px; + left: 0; + z-index: 20; + } +} +.xgplayer-bar,.xgplayer-drag{ + display: block; + position: absolute; + bottom: 6px; + left: 12px; + background: $sliderBarBgColor; + border-radius: 100px; + width: 4px; + height: 76px; + outline: none; +} +.xgplayer-drag{ + bottom: 0; + left: 0; + background: $sliderDragBgColor; + max-height: 76px; + &:after{ + content: " "; + display: inline-block; + width: 8px; + height: 8px; + background: $sliderDragAfterBgColor; + box-shadow: $sliderDragAfterShadow; + position: absolute; + border-radius: 50%; + left: -2px; + top: -6px; + } +} +.xgplayer-placeholder{ + flex:1; + order: 3; + display: block; +} + +.xgplayer-start{ + border-radius: 50%; + display: inline-block; + width: 70px; + height: 70px; + background: $startBgColor; + overflow: hidden; + text-align: center; + line-height: 70px; + vertical-align: middle; + position: absolute; + left: 50%; + top: 50%; + z-index: 1000; + margin: -55px auto auto -35px; + @at-root .xgplayer-nostart &{ + margin: -35px auto auto -35px; + } + @at-root .xgplayer-inactive &{ + margin: -35px auto auto -35px; + } + svg{ + fill: $startSvgFill; + margin: 14px; + } + &.xgplayer-start-interact{ + animation: playPause 0.4s ease-out forwards; + } + &:hover{ + background: $startHoverBgColor; + svg { + fill: $startHoverFillColor; + } + } +} + +.xgplayer-definition{ + order: 5; + width: 60px; + position: relative; + outline: none; + display: none; + cursor: pointer; + .xgplayer-tips{ + margin-left: -20px; + } + &:hover{ + .xgplayer-tips{ + display: block; + } + } + &.xgplayer-definition-active{ + ul{ + display: block; + } + .xgplayer-tips{ + display: none; + } + } + ul{ + display: none; + list-style: none; + width: 78px; + background: $definitionUlBgColor; + border-radius: 1px; + position: absolute; + bottom: 50px; + left: 0; + text-align: center; + white-space: nowrap; + margin-left: -10px; + z-index: 26; + li{ + opacity: 0.7; + font-family: PingFangSC-Regular; + font-size: 11px; + color: $definitionLiColor; + padding: 6px 13px; + &.definition{ + color: $definitionLiActiveColor; + opacity: 1; + } + } + &::after{ + content: " "; + display: inline-block; + height: 30px; + width: 100%; + position: absolute; + bottom: -20px; + left: 0; + } + } + .name { + text-align: center; + font-family: PingFangSC-Regular; + font-size: 13px; + line-height: 40px; + color: $definitionNameColor; + em{ + padding: 1px 10px; + background: $definitionNameBgColor; + border-radius: 10px; + } + } + @at-root .xgplayer-is-definition &{ + display: block; + } +} + +.xgplayer-fullscreen{ + order: 10; + position: relative; + display: inline-block; + .xgplayer-icon{ + margin: 4px -4px 0 0; + } + &:hover { + .xgplayer-tips { + display: block; + } + } + @at-root .xgplayer-is-fullscreen .xgplayer-fullscreen .xgplayer-tips{ + left: -30%; + } + @at-root .xgplayer.xgplayer-fullscreen-active{ + position: fixed !important; + left: 0 !important; + top: 0 !important; + width: 100%!important; + height: 100%!important; + z-index: 99999 !important; + } +} + +.xgplayer-loading{ + display: none; + width: 100px; + height: 100px; + overflow: hidden; + transform: scale(0.7); + position: absolute; + left: 50%; + top: 50%; + margin: -70px auto auto -50px; + svg{ + border-radius: 50%; + transform-origin: center; + animation: loadingRotate 1s linear infinite; + path{ + stroke: #ddd; + stroke-dasharray: 236; + animation: loadingDashOffset 2s linear infinite; + animation-direction: alternate-reverse; + fill: none; + stroke-width: 12px; + } + } + @at-root .xgplayer-nostart .xgplayer-loading{ + display: none; + } + @at-root .xgplayer-isloading .xgplayer-loading{ + display: block; + } +} + +.xgplayer-replay{ + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 500; + display: none; + justify-content: center; + align-items: center; + background: $replayBgColor; + flex-direction: column; + svg{ + background: $replaySvgBgColor; + border-radius: 100%; + cursor: pointer; + path{ + transform: translate(20px, 21px); + fill: $replaySvgPathFillColor; + } + &:hover{ + background: $replaySvgHoverBgColor; + path { + fill: $replaySvgHoverFillColor; + } + } + } + .xgplayer-replay-txt{ + display: inline-block; + font-family: PingFangSC-Regular; + font-size: 14px; + color: $replayTxtColor; + line-height: 34px; + cursor: pointer; + } + + @at-root .xgplayer.xgplayer-ended{ + .xgplayer-controls { + display: none; + } + .xgplayer-replay{ + display: flex; + } + } +} + +.xgplayer-enter{ + display: none; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: url($enterBgImage) no-repeat center center / cover; + z-index: 1100; + .xgplayer-enter-logo{ + display: block; + position: absolute; + left: 50%; + top: 50%; + width: 130px; + height: 38px; + margin: -19px auto auto -69px; + background: url($enterLogo) no-repeat center center / cover; + } + .xgplayer-enter-tips{ + display: none; + position: absolute; + left: 50%; + top: 50%; + width: 120px; + height: 1px; + background: $enterTipsBgColor; + margin: 32px auto auto -62px; + &:before{ + content: " "; + display: block; + width: 5px; + height: 1px; + border-radius: 50%; + position: absolute; + left: 0; + top: 0; + animation: enterTips 1.6s linear infinite; + background: #fff; + } + } + @at-root .xgplayer-is-enter &{ + display: block; + } +} + +.xgplayer-poster{ + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 100; + background-size: cover; +} +.xgplayer-live{ + display: block; + font-size: 12px; + color: $liveColor; + line-height: 40px; + order: 1; +} + +.xgplayer .xgplayer-none{ + display: none; +} + +.xgplayer-error{ + background: $errorBgColor; + display: none; + position: absolute; + left: 0; + top: 0; + width:100%; + height: 100%; + z-index: 1200; + font-family: PingFangSC-Regular; + font-size: 14px; + color: $errorColor; + text-align: center; + line-height: 100%; + justify-content: center; + align-items: center; + .xgplayer-error-refresh{ + color: $errorRefreshColor; + padding: 0 3px; + cursor: pointer; + } + @at-root .xgplayer-is-error &{ + display: flex; + } +} +.xgplayer-mobile{ + &.xgplayer-ended{ + .xgplayer-start{ + display: none; + } + } + &.xgplayer-inactive{ + .xgplayer-start{ + display: none; + } + } + .xgplayer-start{ + width: 60px; + height: 60px; + line-height: 60px; + display: none; + margin: -50px auto auto -30px; + svg{ + margin: 10px; + } + } + &.xgplayer-nostart{ + .xgplayer-start{ + margin: -30px auto auto -30px; + display: block; + } + } + & .xgplayer-loading{ + transform: scale(0.5) + } + &.xgplayer-mobile-npassed{ + .xgplayer-controls{ + display: none; + } + .xgplayer-poster{ + display: none; + } + .xgplayer-start{ + display: none; + } + } +} diff --git a/packages/xgplayer/src/style/variable.scss b/packages/xgplayer/src/style/variable.scss new file mode 100644 index 00000000..33805c64 --- /dev/null +++ b/packages/xgplayer/src/style/variable.scss @@ -0,0 +1,69 @@ +// player + +$playerBgColor: rgba(0, 0, 0, 0.26); +$playerIconColor: #fff; + +// controls +$controlsBgImage: linear-gradient(-1deg, rgba(0, 0, 0, 0.30) 0%, rgba(0, 0, 0, 0.00) 100%); + +// progress-bar +$progressOuterBgColor: rgba(255, 255, 255, 0.30); +$progressCacheBgColor: rgba(255, 255, 255, 0.50); +$progressPlayedBgImage: linear-gradient(-90deg, #FA1F41 0%, #E31106 100%); +$progressPlayedShadow: 0 0 2px 0 rgba(0, 0, 0, 0.26); + +// time +$timeColor: #fff; +$timeDurationColor: rgba(255, 255, 255, 0.50); + +// tips +$tipsColor: #fff; +$tipsBgColor: rgba(0, 0, 0, 0.54); +$tipsFontsize: 11px; + +// slider +$sliderBgColor: rgba(0, 0, 0, 0.54); +$sliderBarBgColor: rgba(255, 255, 255, 0.30); +$sliderDragBgColor: #FA1F41; +$sliderDragAfterBgColor: #fff; +$sliderDragAfterShadow: 0 0 5px 0 rgba(0, 0, 0, 0.26); + +// start + +$startBgColor: rgba(255,255,255,0.3); +$startSvgFill: rgba(255, 255, 255, 0.7); +$startHoverBgColor: rgba(255, 255, 255, 0.5); +$startHoverFillColor: rgba(255, 255, 255, 0.6); + +// definition + +$definitionUlBgColor: rgba(0, 0, 0, 0.54); +$definitionLiColor: rgba(255, 255, 255, 0.80); +$definitionLiActiveColor: #fff; +$definitionNameColor: rgba(255, 255, 255, 0.80); +$definitionNameBgColor: rgba(0, 0, 0, 0.38); + +// replay + +$replayBgColor: rgba(0, 0, 0, 0.54); +$replaySvgBgColor: rgba(0,0,0,0.58); +$replaySvgPathFillColor: #ddd; +$replaySvgHoverBgColor: rgba(0, 0, 0, .38); +$replaySvgHoverFillColor: #fff; +$replayTxtColor: #fff; + + +// enter-logo +$enterBgImage: 'http://s2.pstatp.com/cdn/expire-1-M/byted-player-images/1.0.0/xg-bg.svg'; +$enterLogo: '//s2.pstatp.com/cdn/expire-1-M/byted-player-images/1.0.0/xg-logo.svg'; +$enterTipsBgColor: linear-gradient(to right, #000, red, red, red, #000); + +// live + +$liveColor: #fff; + +// error + +$errorBgColor: #000; +$errorColor: #fff; +$errorRefreshColor: #FA1F41; diff --git a/packages/xgplayer/src/utils/animation.js b/packages/xgplayer/src/utils/animation.js new file mode 100644 index 00000000..639bc694 --- /dev/null +++ b/packages/xgplayer/src/utils/animation.js @@ -0,0 +1,23 @@ +(function () { + var lastTime = 0 + var vendors = ['webkit', 'moz'] + for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { + window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'] + window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'] + } + if (!window.requestAnimationFrame) { + window.requestAnimationFrame = function (callback, element) { + var currTime = new Date().getTime() + var timeToCall = Math.max(0, 16 - (currTime - lastTime)) + var id = window.setTimeout(function () { callback(currTime + timeToCall) }, timeToCall) + lastTime = currTime + timeToCall + return id + } + } + + if (!window.cancelAnimationFrame) { + window.cancelAnimationFrame = function (id) { + clearTimeout(id) + } + } +}()) diff --git a/packages/xgplayer/src/utils/sniffer.js b/packages/xgplayer/src/utils/sniffer.js new file mode 100755 index 00000000..72097c2d --- /dev/null +++ b/packages/xgplayer/src/utils/sniffer.js @@ -0,0 +1,38 @@ +let sniffer = { + get device () { + let r = sniffer.os + return r.isPc ? 'pc' : r.isTablet ? 'tablet' : 'mobile' + }, + get browser () { + let ua = navigator.userAgent.toLowerCase() + let reg = { + ie: /rv:([\d.]+)\) like gecko/, + firfox: /firefox\/([\d.]+)/, + chrome: /chrome\/([\d.]+)/, + opera: /opera.([\d.]+)/, + safari: /version\/([\d.]+).*safari/ + } + return [].concat(Object.keys(reg).filter(key => reg[key].test(ua)))[0] + }, + get os () { + let ua = navigator.userAgent + let isWindowsPhone = /(?:Windows Phone)/.test(ua) + let isSymbian = /(?:SymbianOS)/.test(ua) || isWindowsPhone + let isAndroid = /(?:Android)/.test(ua) + let isFireFox = /(?:Firefox)/.test(ua) + let isTablet = /(?:iPad|PlayBook)/.test(ua) || (isAndroid && !/(?:Mobile)/.test(ua)) || (isFireFox && /(?:Tablet)/.test(ua)) + let isPhone = /(?:iPhone)/.test(ua) && !isTablet + let isPc = !isPhone && !isAndroid && !isSymbian + return { + isTablet, + isPhone, + isAndroid, + isPc, + isSymbian, + isWindowsPhone, + isFireFox + } + } +} + +export default sniffer diff --git a/packages/xgplayer/src/utils/svg.js b/packages/xgplayer/src/utils/svg.js new file mode 100644 index 00000000..c853c3dc --- /dev/null +++ b/packages/xgplayer/src/utils/svg.js @@ -0,0 +1,86 @@ +import pasition from 'pasition' +import './animation' +class SVG { + constructor (options = {}) { + this.from = options.from + this.to = options.to + this.easing = options.easing || function (t) { return t * t } + this.duration = options.duration || 150 + this.curPath = '' + this.progress = options.progress + this.state = 0// 0=idle,1=busy,2=break off + } + animate () { + let self = this; let beginTime = new Date(); let time = self.duration + let outShape = null + let pathA = self.path2shapes(self.from) + let pathB = self.path2shapes(self.to) + let pathArr = self._preprocessing(pathA, pathB) + self.state = 1 + let tick = () => { + let dt = new Date() - beginTime + if (dt >= time || self.state === 2) { + outShape = pathB + self.progress(outShape, 1) + window.cancelAnimationFrame(self.tickId) + self.state = 0 + return + } + let percent = self.easing(dt / time) + outShape = self._lerp(pathArr[0], pathArr[1], percent) + self.progress(outShape, percent) + self.tickId = window.requestAnimationFrame(tick) + } + tick() + } + toSVGString (shapes) { + return shapes.map(function (shape) { + shape.forEach(function (point, idx) { + if (!idx) { + point.splice(2, 0, 'C') + point.unshift('M') + } else { + point.splice(0, 2, 'C') + } + }) + return shape.map(function (point) { + return point.join(' ') + }).join('') + }).join('') + } + start () { + self.animate() + } + stop () { + if (this.state !== 0) { + this.state = 2 + } + window.cancelAnimationFrame(self.tickId) + this.state = 0 + } + reverse () { + if (this.state !== 0) { + this.stop() + } + let tmp = this.from + this.from = this.to + this.to = tmp + this.animate() + } + reset (to, from = this.from) { + if (this.state !== 0) { + this.stop() + } + this.from = from + this.to = to + this.animate() + } +} + +for (let k in pasition) { + if (pasition[k] instanceof Function && !SVG.prototype[k]) { + SVG.prototype[k] = pasition[k] + } +} + +export default SVG diff --git a/packages/xgplayer/src/utils/util.js b/packages/xgplayer/src/utils/util.js new file mode 100755 index 00000000..7c1238b6 --- /dev/null +++ b/packages/xgplayer/src/utils/util.js @@ -0,0 +1,122 @@ +let util = {} + +util.createDom = function (el = 'div', tpl = '', attrs = {}, cname = '') { + let dom = document.createElement(el) + dom.className = cname + dom.innerHTML = tpl + Object.keys(attrs).forEach(item => { + let key = item; let value = attrs[item] + if (el === 'video' || el === 'audio') { + if (value) { + dom.setAttribute(key, value) + } + } else { + dom.setAttribute(key, value) + } + }) + return dom +} + +util.hasClass = function (el, className) { + if (el.classList) { + return Array.prototype.some.call(el.classList, item => item === className) + } else { + return !!el.className.match(new RegExp('(\\s|^)' + className + '(\\s|$)')) + } +} + +util.addClass = function (el, className) { + if (el.classList) { + className.replace(/(^\s+|\s+$)/g, '').split(/\s+/g).forEach(item => { + item && el.classList.add(item) + }) + } else if (!util.hasClass(el, className)) { + el.className += ' ' + className + } +} + +util.removeClass = function (el, className) { + if (el.classList) { + className.split(/\s+/g).forEach(item => { + el.classList.remove(item) + }) + } else if (util.hasClass(el, className)) { + className.split(/\s+/g).forEach(item => { + let reg = new RegExp('(\\s|^)' + item + '(\\s|$)') + el.className = el.className.replace(reg, ' ') + }) + } +} + +util.toggleClass = function (el, className) { + className.split(/\s+/g).forEach(item => { + if (util.hasClass(el, item)) { + util.removeClass(el, item) + } else { + util.addClass(el, item) + } + }) +} + +util.findDom = function (el = document, sel) { + return el.querySelector(sel) +} + +util.padStart = function (str, length, pad) { + let charstr = String(pad); let len = length >> 0; let maxlen = Math.ceil(len / charstr.length) + let chars = []; let r = String(str) + while (maxlen--) { + chars.push(charstr) + } + return chars.join('').substring(0, len - r.length) + r +} + +util.format = function (time) { + if (window.isNaN(time)) { + return '' + } + let hour = util.padStart(Math.floor(time / 3600), 2, 0) + let minute = util.padStart(Math.floor((time - hour * 3600) / 60), 2, 0) + let second = util.padStart(Math.floor((time - hour * 3600 - minute * 60)), 2, 0) + return (hour === '00' ? [minute, second] : [hour, minute, second]).join(':') +} + +util.event = function (e) { + if (e.touches) { + let touch = e.touches[0] || e.changedTouches[0] + e.clientX = touch.clientX || 0 + e.clientY = touch.clientY || 0 + e.offsetX = touch.pageX - touch.target.offsetLeft + e.offsetY = touch.pageY - touch.target.offsetTop + } + e._target = e.target || e.srcElement +} + +util.typeOf = function (obj) { + return Object.prototype.toString.call(obj).match(/([^\s.*]+)(?=]$)/g)[0] +} + +util.deepCopy = function (dst, src) { + if (util.typeOf(src) === 'Object' && util.typeOf(dst) === 'Object') { + Object.keys(src).forEach(key => { + if (util.typeOf(src[key]) === 'Object' && !(src[key] instanceof Node)) { + if (!dst[key]) { + dst[key] = src[key] + } else { + util.deepCopy(dst[key], src[key]) + } + } else { + dst[key] = src[key] + } + }) + return dst + } +} +util.getBgImage = function (el) { + let a = document.createElement('a') + let url = (el.currentStyle || window.getComputedStyle(el, null)).backgroundImage + a.href = url.replace(/url\("|"\)/g, '') + return a.href +} + +export default util diff --git a/packages/xgplayer/webpack.config.js b/packages/xgplayer/webpack.config.js new file mode 100644 index 00000000..1b0ebf43 --- /dev/null +++ b/packages/xgplayer/webpack.config.js @@ -0,0 +1,71 @@ +const polyfill = [] + +const umd = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/dist`, + filename: 'index.js', + library: 'xgplayer', + libraryTarget: 'umd' + }, + mode: 'production', + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader' + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true + } + }, + 'postcss-loader', + 'sass-loader' + ] + }] + }, + optimization: { + minimize: true + } +} + +const client = { + entry: polyfill.concat(['./src/index.js']), + output: { + path: `${__dirname}/browser`, + filename: 'xgplayer.js', + library: 'Player', + libraryTarget: 'window' + }, + module: { + rules: [{ + test: /\.js$/, + loader: 'babel-loader' + }, { + test: /\.scss$/, + use: [ + 'style-loader', + { + loader: 'css-loader', + options: { + importLoaders: 1, + minimize: true + } + }, + 'postcss-loader', + 'sass-loader' + ] + }] + }, + mode: 'production', + optimization: { + minimize: true + } +} + +module.exports = [umd, client] diff --git a/xgplayer.png b/xgplayer.png new file mode 100644 index 00000000..a082f055 Binary files /dev/null and b/xgplayer.png differ