├── .github ├── movie.gif └── screenshots │ ├── active-example.jpg │ ├── obs-source.jpg │ └── project-layout.jpg ├── .gitignore ├── LICENSE.md ├── README.md ├── assets └── images │ ├── character_icons │ ├── Falco.png │ └── Fox.png │ └── sample-overlay.png ├── css ├── base.css ├── fonts │ └── SourceSansPro-Black.otf └── sample.css ├── index.php ├── js └── vue-main.js ├── node_modules ├── axios │ └── dist │ │ └── axios.js ├── vue │ └── dist │ │ └── vue.js └── vue2-animate │ └── dist │ └── vue2-animate.css ├── package.json ├── sample.html └── sample.json /.github/movie.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATTENN/vue-stream-overlay/f12409ddec481f69d9d877e61622125fd89fe49e/.github/movie.gif -------------------------------------------------------------------------------- /.github/screenshots/active-example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATTENN/vue-stream-overlay/f12409ddec481f69d9d877e61622125fd89fe49e/.github/screenshots/active-example.jpg -------------------------------------------------------------------------------- /.github/screenshots/obs-source.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATTENN/vue-stream-overlay/f12409ddec481f69d9d877e61622125fd89fe49e/.github/screenshots/obs-source.jpg -------------------------------------------------------------------------------- /.github/screenshots/project-layout.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATTENN/vue-stream-overlay/f12409ddec481f69d9d877e61622125fd89fe49e/.github/screenshots/project-layout.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/* 3 | bower_components 4 | 5 | # IntelliJ 6 | .idea/ 7 | *.ipr 8 | *.iws 9 | *.iml 10 | .idea_modules 11 | 12 | # NPM logs, etc. 13 | logs 14 | *.log 15 | npm-debug.log* 16 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2017 Brendan Hagan 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue Stream Overlay 2 | 3 | An overlay using the browser source function of Open Broadcaster Software. 4 | 5 | This is a modified version of [haganbmj/vue-stream-overlay](https://github.com/haganbmj/vue-stream-overlay) . 6 | 7 | ![example](.github/movie.gif) 8 | 9 | ## Warning 10 | 11 | This tool does not take any security measures. Therefore, **Please do not expose to the Internet.** 12 | 13 | ## Required environment 14 | 15 | - **Latest** Web browser 16 | - using Webkit / Blink / Gecko as rendering engine 17 | - Not been confirmed by Internet Explorer or Microsoft Edge. 18 | - PHP 7.1 or higher 19 | - Open Broadcaster Software 20 | - HTTP server (if possible) 21 | 22 | ## Getting Started 23 | 24 | 1. Clone this repository and go to the cloned directory. 25 | 2. Set the HTTP server document root to this directory. 26 | 3. Add browser source in OBS. Name the file `http://localhost/sample.html` 27 | 4. Open the `http://localhost/` from the browser. 28 | 29 | ## FAQ 30 | 31 | ### Is it OK to use a PHP built-in server? 32 | 33 | Exactly. 34 | -------------------------------------------------------------------------------- /assets/images/character_icons/Falco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATTENN/vue-stream-overlay/f12409ddec481f69d9d877e61622125fd89fe49e/assets/images/character_icons/Falco.png -------------------------------------------------------------------------------- /assets/images/character_icons/Fox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATTENN/vue-stream-overlay/f12409ddec481f69d9d877e61622125fd89fe49e/assets/images/character_icons/Fox.png -------------------------------------------------------------------------------- /assets/images/sample-overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATTENN/vue-stream-overlay/f12409ddec481f69d9d877e61622125fd89fe49e/assets/images/sample-overlay.png -------------------------------------------------------------------------------- /css/base.css: -------------------------------------------------------------------------------- 1 | /** 2 | * I like to think of this as my global variables. 3 | * These are for stylings that I'll need regarldess of the scene/overlay. 4 | * For example, I want my font to be consistent throughout. 5 | * 6 | * If you're alright with a bit more process, I'd highly recommend using sass/less 7 | * so that you can acutally use and share variables across files. 8 | */ 9 | 10 | @font-face { 11 | font-family: 'SourceSansPro-Black'; 12 | src: url('fonts/SourceSansPro-Black.otf'); 13 | } 14 | 15 | html { 16 | /* Setting the base font style */ 17 | font-size: 20px; 18 | font-family: 'SourceSansPro-Black'; 19 | color: black; 20 | text-transform: uppercase; 21 | 22 | /* Setting out canvas size */ 23 | width: 1280px; 24 | height: 720px; 25 | 26 | /* Ensuring there's no background, scrollbars, etc */ 27 | background: transparent; 28 | overflow: hidden; 29 | margin: 0; padding: 0; 30 | } 31 | 32 | /** 33 | * CSS sucks with centering content. I like to use flex, which is a bit easier to work with, 34 | * but you still need to go with some hacky boxes in boxes approach. 35 | * 36 | * __________________________________ <- Our outer "container" 37 | * | | 38 | * |----------------------------------| <- Out inener box, which will be vertically centered 39 | * | | in the container and will handle aligning text within it. 40 | * | | 41 | * |----------------------------------| 42 | * |__________________________________| 43 | */ 44 | .container { 45 | position: absolute; 46 | display: flex; 47 | align-items: center; 48 | justify-content: center; 49 | text-align: center; 50 | } 51 | 52 | .container > span { 53 | position: relative; 54 | 55 | width: 100%; 56 | height: auto; 57 | } 58 | -------------------------------------------------------------------------------- /css/fonts/SourceSansPro-Black.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MATTENN/vue-stream-overlay/f12409ddec481f69d9d877e61622125fd89fe49e/css/fonts/SourceSansPro-Black.otf -------------------------------------------------------------------------------- /css/sample.css: -------------------------------------------------------------------------------- 1 | /** 2 | * These are the custom positionings and stylings related to sample.html 3 | * In this file, we'll define the background and where the text should be positioned. 4 | */ 5 | /* 6 | body { 7 | 8 | background-image: url('../assets/images/sample-overlay.png'); 9 | background-size: 100% 100%; 10 | background-repeat: no-repeat; 11 | 12 | }*/ 13 | 14 | 15 | #name{ 16 | background-color: #e2e3e5; 17 | font-size: 3em; 18 | font-weight: bold; 19 | padding: 10px; 20 | font-family: "FTT-RodinWanpaku"; 21 | } 22 | #origin{ 23 | background-color: #000000; 24 | color: #ffffff; 25 | font-size: 2em; 26 | font-weight: normal; 27 | padding: 10px; 28 | } 29 | 30 | .origin-enter-active, .origin-leave-active { 31 | transform: translate(0px, 0px); 32 | transition: transform 0.5s cubic-bezier(0.5, 0, 0.5, 0) 0.1s; 33 | } 34 | 35 | .origin-enter, .origin-leave-to { 36 | transform: translateX(0px) translateX(-50vw); 37 | } 38 | 39 | .name-enter-active, .name-leave-active { 40 | transform: translate(0px, 0px); 41 | transition: transform 0.5s cubic-bezier(0.5, 0, 0.5, 0) 0s; 42 | } 43 | 44 | .name-enter, .name-leave-to { 45 | transform: translateX(-50vw) translateX(0px); 46 | } 47 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | $_POST["show"] ?? false, 7 | "origin" => $_POST["origin"] ?? "", 8 | "name" => $_POST["name"] ?? "" 9 | ]; 10 | 11 | if (!isset($arr["show"])){ 12 | $arr["show"] = false; 13 | } 14 | 15 | file_put_contents('sample.json',json_encode($arr)); 16 | 17 | //echo "OK!"; 18 | } 19 | 20 | ?> 21 | 22 | 23 | 24 | 25 | 26 | Admin 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
35 |
36 |
37 |
38 | 39 | 42 |
43 |
44 | 45 | 46 | 47 |
48 | 49 |
50 |
51 | 52 |
53 | 54 |
55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /js/vue-main.js: -------------------------------------------------------------------------------- 1 | let POLL_INTERVAL = 2500; 2 | let JSON_PATH = './sample.json'; 3 | 4 | let app = new Vue({ 5 | el: '#app', 6 | data: { 7 | show: true, 8 | info: {} 9 | }, 10 | methods: { 11 | async loadJSON(filePath) { 12 | const resp = await axios.get(filePath, { responseType: 'json' }); 13 | this.info = resp.data; 14 | if(resp.data.show == "true"){ 15 | this.show = true; 16 | }else{ 17 | this.show = false; 18 | } 19 | 20 | } 21 | }, 22 | // Triggered when the vue instance is created, triggers the initial load. 23 | created: function() { 24 | this.loadJSON(JSON_PATH); 25 | setInterval(() => { this.loadJSON(JSON_PATH); }, POLL_INTERVAL); 26 | } 27 | 28 | }); 29 | -------------------------------------------------------------------------------- /node_modules/axios/dist/axios.js: -------------------------------------------------------------------------------- 1 | /* axios v0.16.1 | (c) 2017 by Matt Zabriskie */ 2 | (function webpackUniversalModuleDefinition(root, factory) { 3 | if(typeof exports === 'object' && typeof module === 'object') 4 | module.exports = factory(); 5 | else if(typeof define === 'function' && define.amd) 6 | define([], factory); 7 | else if(typeof exports === 'object') 8 | exports["axios"] = factory(); 9 | else 10 | root["axios"] = factory(); 11 | })(this, function() { 12 | return /******/ (function(modules) { // webpackBootstrap 13 | /******/ // The module cache 14 | /******/ var installedModules = {}; 15 | /******/ 16 | /******/ // The require function 17 | /******/ function __webpack_require__(moduleId) { 18 | /******/ 19 | /******/ // Check if module is in cache 20 | /******/ if(installedModules[moduleId]) 21 | /******/ return installedModules[moduleId].exports; 22 | /******/ 23 | /******/ // Create a new module (and put it into the cache) 24 | /******/ var module = installedModules[moduleId] = { 25 | /******/ exports: {}, 26 | /******/ id: moduleId, 27 | /******/ loaded: false 28 | /******/ }; 29 | /******/ 30 | /******/ // Execute the module function 31 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 32 | /******/ 33 | /******/ // Flag the module as loaded 34 | /******/ module.loaded = true; 35 | /******/ 36 | /******/ // Return the exports of the module 37 | /******/ return module.exports; 38 | /******/ } 39 | /******/ 40 | /******/ 41 | /******/ // expose the modules object (__webpack_modules__) 42 | /******/ __webpack_require__.m = modules; 43 | /******/ 44 | /******/ // expose the module cache 45 | /******/ __webpack_require__.c = installedModules; 46 | /******/ 47 | /******/ // __webpack_public_path__ 48 | /******/ __webpack_require__.p = ""; 49 | /******/ 50 | /******/ // Load entry module and return exports 51 | /******/ return __webpack_require__(0); 52 | /******/ }) 53 | /************************************************************************/ 54 | /******/ ([ 55 | /* 0 */ 56 | /***/ function(module, exports, __webpack_require__) { 57 | 58 | module.exports = __webpack_require__(1); 59 | 60 | /***/ }, 61 | /* 1 */ 62 | /***/ function(module, exports, __webpack_require__) { 63 | 64 | 'use strict'; 65 | 66 | var utils = __webpack_require__(2); 67 | var bind = __webpack_require__(7); 68 | var Axios = __webpack_require__(8); 69 | var defaults = __webpack_require__(9); 70 | 71 | /** 72 | * Create an instance of Axios 73 | * 74 | * @param {Object} defaultConfig The default config for the instance 75 | * @return {Axios} A new instance of Axios 76 | */ 77 | function createInstance(defaultConfig) { 78 | var context = new Axios(defaultConfig); 79 | var instance = bind(Axios.prototype.request, context); 80 | 81 | // Copy axios.prototype to instance 82 | utils.extend(instance, Axios.prototype, context); 83 | 84 | // Copy context to instance 85 | utils.extend(instance, context); 86 | 87 | return instance; 88 | } 89 | 90 | // Create the default instance to be exported 91 | var axios = createInstance(defaults); 92 | 93 | // Expose Axios class to allow class inheritance 94 | axios.Axios = Axios; 95 | 96 | // Factory for creating new instances 97 | axios.create = function create(instanceConfig) { 98 | return createInstance(utils.merge(defaults, instanceConfig)); 99 | }; 100 | 101 | // Expose Cancel & CancelToken 102 | axios.Cancel = __webpack_require__(26); 103 | axios.CancelToken = __webpack_require__(27); 104 | axios.isCancel = __webpack_require__(23); 105 | 106 | // Expose all/spread 107 | axios.all = function all(promises) { 108 | return Promise.all(promises); 109 | }; 110 | axios.spread = __webpack_require__(28); 111 | 112 | module.exports = axios; 113 | 114 | // Allow use of default import syntax in TypeScript 115 | module.exports.default = axios; 116 | 117 | 118 | /***/ }, 119 | /* 2 */ 120 | /***/ function(module, exports, __webpack_require__) { 121 | 122 | /* WEBPACK VAR INJECTION */(function(Buffer) {'use strict'; 123 | 124 | var bind = __webpack_require__(7); 125 | 126 | /*global toString:true*/ 127 | 128 | // utils is a library of generic helper functions non-specific to axios 129 | 130 | var toString = Object.prototype.toString; 131 | 132 | /** 133 | * Determine if a value is an Array 134 | * 135 | * @param {Object} val The value to test 136 | * @returns {boolean} True if value is an Array, otherwise false 137 | */ 138 | function isArray(val) { 139 | return toString.call(val) === '[object Array]'; 140 | } 141 | 142 | /** 143 | * Determine if a value is a Node Buffer 144 | * 145 | * @param {Object} val The value to test 146 | * @returns {boolean} True if value is a Node Buffer, otherwise false 147 | */ 148 | function isBuffer(val) { 149 | return ((typeof Buffer !== 'undefined') && (Buffer.isBuffer) && (Buffer.isBuffer(val))); 150 | } 151 | 152 | /** 153 | * Determine if a value is an ArrayBuffer 154 | * 155 | * @param {Object} val The value to test 156 | * @returns {boolean} True if value is an ArrayBuffer, otherwise false 157 | */ 158 | function isArrayBuffer(val) { 159 | return toString.call(val) === '[object ArrayBuffer]'; 160 | } 161 | 162 | /** 163 | * Determine if a value is a FormData 164 | * 165 | * @param {Object} val The value to test 166 | * @returns {boolean} True if value is an FormData, otherwise false 167 | */ 168 | function isFormData(val) { 169 | return (typeof FormData !== 'undefined') && (val instanceof FormData); 170 | } 171 | 172 | /** 173 | * Determine if a value is a view on an ArrayBuffer 174 | * 175 | * @param {Object} val The value to test 176 | * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false 177 | */ 178 | function isArrayBufferView(val) { 179 | var result; 180 | if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { 181 | result = ArrayBuffer.isView(val); 182 | } else { 183 | result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); 184 | } 185 | return result; 186 | } 187 | 188 | /** 189 | * Determine if a value is a String 190 | * 191 | * @param {Object} val The value to test 192 | * @returns {boolean} True if value is a String, otherwise false 193 | */ 194 | function isString(val) { 195 | return typeof val === 'string'; 196 | } 197 | 198 | /** 199 | * Determine if a value is a Number 200 | * 201 | * @param {Object} val The value to test 202 | * @returns {boolean} True if value is a Number, otherwise false 203 | */ 204 | function isNumber(val) { 205 | return typeof val === 'number'; 206 | } 207 | 208 | /** 209 | * Determine if a value is undefined 210 | * 211 | * @param {Object} val The value to test 212 | * @returns {boolean} True if the value is undefined, otherwise false 213 | */ 214 | function isUndefined(val) { 215 | return typeof val === 'undefined'; 216 | } 217 | 218 | /** 219 | * Determine if a value is an Object 220 | * 221 | * @param {Object} val The value to test 222 | * @returns {boolean} True if value is an Object, otherwise false 223 | */ 224 | function isObject(val) { 225 | return val !== null && typeof val === 'object'; 226 | } 227 | 228 | /** 229 | * Determine if a value is a Date 230 | * 231 | * @param {Object} val The value to test 232 | * @returns {boolean} True if value is a Date, otherwise false 233 | */ 234 | function isDate(val) { 235 | return toString.call(val) === '[object Date]'; 236 | } 237 | 238 | /** 239 | * Determine if a value is a File 240 | * 241 | * @param {Object} val The value to test 242 | * @returns {boolean} True if value is a File, otherwise false 243 | */ 244 | function isFile(val) { 245 | return toString.call(val) === '[object File]'; 246 | } 247 | 248 | /** 249 | * Determine if a value is a Blob 250 | * 251 | * @param {Object} val The value to test 252 | * @returns {boolean} True if value is a Blob, otherwise false 253 | */ 254 | function isBlob(val) { 255 | return toString.call(val) === '[object Blob]'; 256 | } 257 | 258 | /** 259 | * Determine if a value is a Function 260 | * 261 | * @param {Object} val The value to test 262 | * @returns {boolean} True if value is a Function, otherwise false 263 | */ 264 | function isFunction(val) { 265 | return toString.call(val) === '[object Function]'; 266 | } 267 | 268 | /** 269 | * Determine if a value is a Stream 270 | * 271 | * @param {Object} val The value to test 272 | * @returns {boolean} True if value is a Stream, otherwise false 273 | */ 274 | function isStream(val) { 275 | return isObject(val) && isFunction(val.pipe); 276 | } 277 | 278 | /** 279 | * Determine if a value is a URLSearchParams object 280 | * 281 | * @param {Object} val The value to test 282 | * @returns {boolean} True if value is a URLSearchParams object, otherwise false 283 | */ 284 | function isURLSearchParams(val) { 285 | return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; 286 | } 287 | 288 | /** 289 | * Trim excess whitespace off the beginning and end of a string 290 | * 291 | * @param {String} str The String to trim 292 | * @returns {String} The String freed of excess whitespace 293 | */ 294 | function trim(str) { 295 | return str.replace(/^\s*/, '').replace(/\s*$/, ''); 296 | } 297 | 298 | /** 299 | * Determine if we're running in a standard browser environment 300 | * 301 | * This allows axios to run in a web worker, and react-native. 302 | * Both environments support XMLHttpRequest, but not fully standard globals. 303 | * 304 | * web workers: 305 | * typeof window -> undefined 306 | * typeof document -> undefined 307 | * 308 | * react-native: 309 | * navigator.product -> 'ReactNative' 310 | */ 311 | function isStandardBrowserEnv() { 312 | if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { 313 | return false; 314 | } 315 | return ( 316 | typeof window !== 'undefined' && 317 | typeof document !== 'undefined' 318 | ); 319 | } 320 | 321 | /** 322 | * Iterate over an Array or an Object invoking a function for each item. 323 | * 324 | * If `obj` is an Array callback will be called passing 325 | * the value, index, and complete array for each item. 326 | * 327 | * If 'obj' is an Object callback will be called passing 328 | * the value, key, and complete object for each property. 329 | * 330 | * @param {Object|Array} obj The object to iterate 331 | * @param {Function} fn The callback to invoke for each item 332 | */ 333 | function forEach(obj, fn) { 334 | // Don't bother if no value provided 335 | if (obj === null || typeof obj === 'undefined') { 336 | return; 337 | } 338 | 339 | // Force an array if not already something iterable 340 | if (typeof obj !== 'object' && !isArray(obj)) { 341 | /*eslint no-param-reassign:0*/ 342 | obj = [obj]; 343 | } 344 | 345 | if (isArray(obj)) { 346 | // Iterate over array values 347 | for (var i = 0, l = obj.length; i < l; i++) { 348 | fn.call(null, obj[i], i, obj); 349 | } 350 | } else { 351 | // Iterate over object keys 352 | for (var key in obj) { 353 | if (Object.prototype.hasOwnProperty.call(obj, key)) { 354 | fn.call(null, obj[key], key, obj); 355 | } 356 | } 357 | } 358 | } 359 | 360 | /** 361 | * Accepts varargs expecting each argument to be an object, then 362 | * immutably merges the properties of each object and returns result. 363 | * 364 | * When multiple objects contain the same key the later object in 365 | * the arguments list will take precedence. 366 | * 367 | * Example: 368 | * 369 | * ```js 370 | * var result = merge({foo: 123}, {foo: 456}); 371 | * console.log(result.foo); // outputs 456 372 | * ``` 373 | * 374 | * @param {Object} obj1 Object to merge 375 | * @returns {Object} Result of all merge properties 376 | */ 377 | function merge(/* obj1, obj2, obj3, ... */) { 378 | var result = {}; 379 | function assignValue(val, key) { 380 | if (typeof result[key] === 'object' && typeof val === 'object') { 381 | result[key] = merge(result[key], val); 382 | } else { 383 | result[key] = val; 384 | } 385 | } 386 | 387 | for (var i = 0, l = arguments.length; i < l; i++) { 388 | forEach(arguments[i], assignValue); 389 | } 390 | return result; 391 | } 392 | 393 | /** 394 | * Extends object a by mutably adding to it the properties of object b. 395 | * 396 | * @param {Object} a The object to be extended 397 | * @param {Object} b The object to copy properties from 398 | * @param {Object} thisArg The object to bind function to 399 | * @return {Object} The resulting value of object a 400 | */ 401 | function extend(a, b, thisArg) { 402 | forEach(b, function assignValue(val, key) { 403 | if (thisArg && typeof val === 'function') { 404 | a[key] = bind(val, thisArg); 405 | } else { 406 | a[key] = val; 407 | } 408 | }); 409 | return a; 410 | } 411 | 412 | module.exports = { 413 | isArray: isArray, 414 | isArrayBuffer: isArrayBuffer, 415 | isBuffer: isBuffer, 416 | isFormData: isFormData, 417 | isArrayBufferView: isArrayBufferView, 418 | isString: isString, 419 | isNumber: isNumber, 420 | isObject: isObject, 421 | isUndefined: isUndefined, 422 | isDate: isDate, 423 | isFile: isFile, 424 | isBlob: isBlob, 425 | isFunction: isFunction, 426 | isStream: isStream, 427 | isURLSearchParams: isURLSearchParams, 428 | isStandardBrowserEnv: isStandardBrowserEnv, 429 | forEach: forEach, 430 | merge: merge, 431 | extend: extend, 432 | trim: trim 433 | }; 434 | 435 | /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3).Buffer)) 436 | 437 | /***/ }, 438 | /* 3 */ 439 | /***/ function(module, exports, __webpack_require__) { 440 | 441 | /* WEBPACK VAR INJECTION */(function(global) {/*! 442 | * The buffer module from node.js, for the browser. 443 | * 444 | * @author Feross Aboukhadijeh 445 | * @license MIT 446 | */ 447 | /* eslint-disable no-proto */ 448 | 449 | 'use strict' 450 | 451 | var base64 = __webpack_require__(4) 452 | var ieee754 = __webpack_require__(5) 453 | var isArray = __webpack_require__(6) 454 | 455 | exports.Buffer = Buffer 456 | exports.SlowBuffer = SlowBuffer 457 | exports.INSPECT_MAX_BYTES = 50 458 | 459 | /** 460 | * If `Buffer.TYPED_ARRAY_SUPPORT`: 461 | * === true Use Uint8Array implementation (fastest) 462 | * === false Use Object implementation (most compatible, even IE6) 463 | * 464 | * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, 465 | * Opera 11.6+, iOS 4.2+. 466 | * 467 | * Due to various browser bugs, sometimes the Object implementation will be used even 468 | * when the browser supports typed arrays. 469 | * 470 | * Note: 471 | * 472 | * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, 473 | * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. 474 | * 475 | * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. 476 | * 477 | * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of 478 | * incorrect length in some situations. 479 | 480 | * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they 481 | * get the Object implementation, which is slower but behaves correctly. 482 | */ 483 | Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined 484 | ? global.TYPED_ARRAY_SUPPORT 485 | : typedArraySupport() 486 | 487 | /* 488 | * Export kMaxLength after typed array support is determined. 489 | */ 490 | exports.kMaxLength = kMaxLength() 491 | 492 | function typedArraySupport () { 493 | try { 494 | var arr = new Uint8Array(1) 495 | arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} 496 | return arr.foo() === 42 && // typed array instances can be augmented 497 | typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` 498 | arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` 499 | } catch (e) { 500 | return false 501 | } 502 | } 503 | 504 | function kMaxLength () { 505 | return Buffer.TYPED_ARRAY_SUPPORT 506 | ? 0x7fffffff 507 | : 0x3fffffff 508 | } 509 | 510 | function createBuffer (that, length) { 511 | if (kMaxLength() < length) { 512 | throw new RangeError('Invalid typed array length') 513 | } 514 | if (Buffer.TYPED_ARRAY_SUPPORT) { 515 | // Return an augmented `Uint8Array` instance, for best performance 516 | that = new Uint8Array(length) 517 | that.__proto__ = Buffer.prototype 518 | } else { 519 | // Fallback: Return an object instance of the Buffer class 520 | if (that === null) { 521 | that = new Buffer(length) 522 | } 523 | that.length = length 524 | } 525 | 526 | return that 527 | } 528 | 529 | /** 530 | * The Buffer constructor returns instances of `Uint8Array` that have their 531 | * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of 532 | * `Uint8Array`, so the returned instances will have all the node `Buffer` methods 533 | * and the `Uint8Array` methods. Square bracket notation works as expected -- it 534 | * returns a single octet. 535 | * 536 | * The `Uint8Array` prototype remains unmodified. 537 | */ 538 | 539 | function Buffer (arg, encodingOrOffset, length) { 540 | if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { 541 | return new Buffer(arg, encodingOrOffset, length) 542 | } 543 | 544 | // Common case. 545 | if (typeof arg === 'number') { 546 | if (typeof encodingOrOffset === 'string') { 547 | throw new Error( 548 | 'If encoding is specified then the first argument must be a string' 549 | ) 550 | } 551 | return allocUnsafe(this, arg) 552 | } 553 | return from(this, arg, encodingOrOffset, length) 554 | } 555 | 556 | Buffer.poolSize = 8192 // not used by this implementation 557 | 558 | // TODO: Legacy, not needed anymore. Remove in next major version. 559 | Buffer._augment = function (arr) { 560 | arr.__proto__ = Buffer.prototype 561 | return arr 562 | } 563 | 564 | function from (that, value, encodingOrOffset, length) { 565 | if (typeof value === 'number') { 566 | throw new TypeError('"value" argument must not be a number') 567 | } 568 | 569 | if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { 570 | return fromArrayBuffer(that, value, encodingOrOffset, length) 571 | } 572 | 573 | if (typeof value === 'string') { 574 | return fromString(that, value, encodingOrOffset) 575 | } 576 | 577 | return fromObject(that, value) 578 | } 579 | 580 | /** 581 | * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError 582 | * if value is a number. 583 | * Buffer.from(str[, encoding]) 584 | * Buffer.from(array) 585 | * Buffer.from(buffer) 586 | * Buffer.from(arrayBuffer[, byteOffset[, length]]) 587 | **/ 588 | Buffer.from = function (value, encodingOrOffset, length) { 589 | return from(null, value, encodingOrOffset, length) 590 | } 591 | 592 | if (Buffer.TYPED_ARRAY_SUPPORT) { 593 | Buffer.prototype.__proto__ = Uint8Array.prototype 594 | Buffer.__proto__ = Uint8Array 595 | if (typeof Symbol !== 'undefined' && Symbol.species && 596 | Buffer[Symbol.species] === Buffer) { 597 | // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 598 | Object.defineProperty(Buffer, Symbol.species, { 599 | value: null, 600 | configurable: true 601 | }) 602 | } 603 | } 604 | 605 | function assertSize (size) { 606 | if (typeof size !== 'number') { 607 | throw new TypeError('"size" argument must be a number') 608 | } else if (size < 0) { 609 | throw new RangeError('"size" argument must not be negative') 610 | } 611 | } 612 | 613 | function alloc (that, size, fill, encoding) { 614 | assertSize(size) 615 | if (size <= 0) { 616 | return createBuffer(that, size) 617 | } 618 | if (fill !== undefined) { 619 | // Only pay attention to encoding if it's a string. This 620 | // prevents accidentally sending in a number that would 621 | // be interpretted as a start offset. 622 | return typeof encoding === 'string' 623 | ? createBuffer(that, size).fill(fill, encoding) 624 | : createBuffer(that, size).fill(fill) 625 | } 626 | return createBuffer(that, size) 627 | } 628 | 629 | /** 630 | * Creates a new filled Buffer instance. 631 | * alloc(size[, fill[, encoding]]) 632 | **/ 633 | Buffer.alloc = function (size, fill, encoding) { 634 | return alloc(null, size, fill, encoding) 635 | } 636 | 637 | function allocUnsafe (that, size) { 638 | assertSize(size) 639 | that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) 640 | if (!Buffer.TYPED_ARRAY_SUPPORT) { 641 | for (var i = 0; i < size; ++i) { 642 | that[i] = 0 643 | } 644 | } 645 | return that 646 | } 647 | 648 | /** 649 | * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. 650 | * */ 651 | Buffer.allocUnsafe = function (size) { 652 | return allocUnsafe(null, size) 653 | } 654 | /** 655 | * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. 656 | */ 657 | Buffer.allocUnsafeSlow = function (size) { 658 | return allocUnsafe(null, size) 659 | } 660 | 661 | function fromString (that, string, encoding) { 662 | if (typeof encoding !== 'string' || encoding === '') { 663 | encoding = 'utf8' 664 | } 665 | 666 | if (!Buffer.isEncoding(encoding)) { 667 | throw new TypeError('"encoding" must be a valid string encoding') 668 | } 669 | 670 | var length = byteLength(string, encoding) | 0 671 | that = createBuffer(that, length) 672 | 673 | var actual = that.write(string, encoding) 674 | 675 | if (actual !== length) { 676 | // Writing a hex string, for example, that contains invalid characters will 677 | // cause everything after the first invalid character to be ignored. (e.g. 678 | // 'abxxcd' will be treated as 'ab') 679 | that = that.slice(0, actual) 680 | } 681 | 682 | return that 683 | } 684 | 685 | function fromArrayLike (that, array) { 686 | var length = array.length < 0 ? 0 : checked(array.length) | 0 687 | that = createBuffer(that, length) 688 | for (var i = 0; i < length; i += 1) { 689 | that[i] = array[i] & 255 690 | } 691 | return that 692 | } 693 | 694 | function fromArrayBuffer (that, array, byteOffset, length) { 695 | array.byteLength // this throws if `array` is not a valid ArrayBuffer 696 | 697 | if (byteOffset < 0 || array.byteLength < byteOffset) { 698 | throw new RangeError('\'offset\' is out of bounds') 699 | } 700 | 701 | if (array.byteLength < byteOffset + (length || 0)) { 702 | throw new RangeError('\'length\' is out of bounds') 703 | } 704 | 705 | if (byteOffset === undefined && length === undefined) { 706 | array = new Uint8Array(array) 707 | } else if (length === undefined) { 708 | array = new Uint8Array(array, byteOffset) 709 | } else { 710 | array = new Uint8Array(array, byteOffset, length) 711 | } 712 | 713 | if (Buffer.TYPED_ARRAY_SUPPORT) { 714 | // Return an augmented `Uint8Array` instance, for best performance 715 | that = array 716 | that.__proto__ = Buffer.prototype 717 | } else { 718 | // Fallback: Return an object instance of the Buffer class 719 | that = fromArrayLike(that, array) 720 | } 721 | return that 722 | } 723 | 724 | function fromObject (that, obj) { 725 | if (Buffer.isBuffer(obj)) { 726 | var len = checked(obj.length) | 0 727 | that = createBuffer(that, len) 728 | 729 | if (that.length === 0) { 730 | return that 731 | } 732 | 733 | obj.copy(that, 0, 0, len) 734 | return that 735 | } 736 | 737 | if (obj) { 738 | if ((typeof ArrayBuffer !== 'undefined' && 739 | obj.buffer instanceof ArrayBuffer) || 'length' in obj) { 740 | if (typeof obj.length !== 'number' || isnan(obj.length)) { 741 | return createBuffer(that, 0) 742 | } 743 | return fromArrayLike(that, obj) 744 | } 745 | 746 | if (obj.type === 'Buffer' && isArray(obj.data)) { 747 | return fromArrayLike(that, obj.data) 748 | } 749 | } 750 | 751 | throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') 752 | } 753 | 754 | function checked (length) { 755 | // Note: cannot use `length < kMaxLength()` here because that fails when 756 | // length is NaN (which is otherwise coerced to zero.) 757 | if (length >= kMaxLength()) { 758 | throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 759 | 'size: 0x' + kMaxLength().toString(16) + ' bytes') 760 | } 761 | return length | 0 762 | } 763 | 764 | function SlowBuffer (length) { 765 | if (+length != length) { // eslint-disable-line eqeqeq 766 | length = 0 767 | } 768 | return Buffer.alloc(+length) 769 | } 770 | 771 | Buffer.isBuffer = function isBuffer (b) { 772 | return !!(b != null && b._isBuffer) 773 | } 774 | 775 | Buffer.compare = function compare (a, b) { 776 | if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { 777 | throw new TypeError('Arguments must be Buffers') 778 | } 779 | 780 | if (a === b) return 0 781 | 782 | var x = a.length 783 | var y = b.length 784 | 785 | for (var i = 0, len = Math.min(x, y); i < len; ++i) { 786 | if (a[i] !== b[i]) { 787 | x = a[i] 788 | y = b[i] 789 | break 790 | } 791 | } 792 | 793 | if (x < y) return -1 794 | if (y < x) return 1 795 | return 0 796 | } 797 | 798 | Buffer.isEncoding = function isEncoding (encoding) { 799 | switch (String(encoding).toLowerCase()) { 800 | case 'hex': 801 | case 'utf8': 802 | case 'utf-8': 803 | case 'ascii': 804 | case 'latin1': 805 | case 'binary': 806 | case 'base64': 807 | case 'ucs2': 808 | case 'ucs-2': 809 | case 'utf16le': 810 | case 'utf-16le': 811 | return true 812 | default: 813 | return false 814 | } 815 | } 816 | 817 | Buffer.concat = function concat (list, length) { 818 | if (!isArray(list)) { 819 | throw new TypeError('"list" argument must be an Array of Buffers') 820 | } 821 | 822 | if (list.length === 0) { 823 | return Buffer.alloc(0) 824 | } 825 | 826 | var i 827 | if (length === undefined) { 828 | length = 0 829 | for (i = 0; i < list.length; ++i) { 830 | length += list[i].length 831 | } 832 | } 833 | 834 | var buffer = Buffer.allocUnsafe(length) 835 | var pos = 0 836 | for (i = 0; i < list.length; ++i) { 837 | var buf = list[i] 838 | if (!Buffer.isBuffer(buf)) { 839 | throw new TypeError('"list" argument must be an Array of Buffers') 840 | } 841 | buf.copy(buffer, pos) 842 | pos += buf.length 843 | } 844 | return buffer 845 | } 846 | 847 | function byteLength (string, encoding) { 848 | if (Buffer.isBuffer(string)) { 849 | return string.length 850 | } 851 | if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && 852 | (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { 853 | return string.byteLength 854 | } 855 | if (typeof string !== 'string') { 856 | string = '' + string 857 | } 858 | 859 | var len = string.length 860 | if (len === 0) return 0 861 | 862 | // Use a for loop to avoid recursion 863 | var loweredCase = false 864 | for (;;) { 865 | switch (encoding) { 866 | case 'ascii': 867 | case 'latin1': 868 | case 'binary': 869 | return len 870 | case 'utf8': 871 | case 'utf-8': 872 | case undefined: 873 | return utf8ToBytes(string).length 874 | case 'ucs2': 875 | case 'ucs-2': 876 | case 'utf16le': 877 | case 'utf-16le': 878 | return len * 2 879 | case 'hex': 880 | return len >>> 1 881 | case 'base64': 882 | return base64ToBytes(string).length 883 | default: 884 | if (loweredCase) return utf8ToBytes(string).length // assume utf8 885 | encoding = ('' + encoding).toLowerCase() 886 | loweredCase = true 887 | } 888 | } 889 | } 890 | Buffer.byteLength = byteLength 891 | 892 | function slowToString (encoding, start, end) { 893 | var loweredCase = false 894 | 895 | // No need to verify that "this.length <= MAX_UINT32" since it's a read-only 896 | // property of a typed array. 897 | 898 | // This behaves neither like String nor Uint8Array in that we set start/end 899 | // to their upper/lower bounds if the value passed is out of range. 900 | // undefined is handled specially as per ECMA-262 6th Edition, 901 | // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. 902 | if (start === undefined || start < 0) { 903 | start = 0 904 | } 905 | // Return early if start > this.length. Done here to prevent potential uint32 906 | // coercion fail below. 907 | if (start > this.length) { 908 | return '' 909 | } 910 | 911 | if (end === undefined || end > this.length) { 912 | end = this.length 913 | } 914 | 915 | if (end <= 0) { 916 | return '' 917 | } 918 | 919 | // Force coersion to uint32. This will also coerce falsey/NaN values to 0. 920 | end >>>= 0 921 | start >>>= 0 922 | 923 | if (end <= start) { 924 | return '' 925 | } 926 | 927 | if (!encoding) encoding = 'utf8' 928 | 929 | while (true) { 930 | switch (encoding) { 931 | case 'hex': 932 | return hexSlice(this, start, end) 933 | 934 | case 'utf8': 935 | case 'utf-8': 936 | return utf8Slice(this, start, end) 937 | 938 | case 'ascii': 939 | return asciiSlice(this, start, end) 940 | 941 | case 'latin1': 942 | case 'binary': 943 | return latin1Slice(this, start, end) 944 | 945 | case 'base64': 946 | return base64Slice(this, start, end) 947 | 948 | case 'ucs2': 949 | case 'ucs-2': 950 | case 'utf16le': 951 | case 'utf-16le': 952 | return utf16leSlice(this, start, end) 953 | 954 | default: 955 | if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) 956 | encoding = (encoding + '').toLowerCase() 957 | loweredCase = true 958 | } 959 | } 960 | } 961 | 962 | // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect 963 | // Buffer instances. 964 | Buffer.prototype._isBuffer = true 965 | 966 | function swap (b, n, m) { 967 | var i = b[n] 968 | b[n] = b[m] 969 | b[m] = i 970 | } 971 | 972 | Buffer.prototype.swap16 = function swap16 () { 973 | var len = this.length 974 | if (len % 2 !== 0) { 975 | throw new RangeError('Buffer size must be a multiple of 16-bits') 976 | } 977 | for (var i = 0; i < len; i += 2) { 978 | swap(this, i, i + 1) 979 | } 980 | return this 981 | } 982 | 983 | Buffer.prototype.swap32 = function swap32 () { 984 | var len = this.length 985 | if (len % 4 !== 0) { 986 | throw new RangeError('Buffer size must be a multiple of 32-bits') 987 | } 988 | for (var i = 0; i < len; i += 4) { 989 | swap(this, i, i + 3) 990 | swap(this, i + 1, i + 2) 991 | } 992 | return this 993 | } 994 | 995 | Buffer.prototype.swap64 = function swap64 () { 996 | var len = this.length 997 | if (len % 8 !== 0) { 998 | throw new RangeError('Buffer size must be a multiple of 64-bits') 999 | } 1000 | for (var i = 0; i < len; i += 8) { 1001 | swap(this, i, i + 7) 1002 | swap(this, i + 1, i + 6) 1003 | swap(this, i + 2, i + 5) 1004 | swap(this, i + 3, i + 4) 1005 | } 1006 | return this 1007 | } 1008 | 1009 | Buffer.prototype.toString = function toString () { 1010 | var length = this.length | 0 1011 | if (length === 0) return '' 1012 | if (arguments.length === 0) return utf8Slice(this, 0, length) 1013 | return slowToString.apply(this, arguments) 1014 | } 1015 | 1016 | Buffer.prototype.equals = function equals (b) { 1017 | if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') 1018 | if (this === b) return true 1019 | return Buffer.compare(this, b) === 0 1020 | } 1021 | 1022 | Buffer.prototype.inspect = function inspect () { 1023 | var str = '' 1024 | var max = exports.INSPECT_MAX_BYTES 1025 | if (this.length > 0) { 1026 | str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') 1027 | if (this.length > max) str += ' ... ' 1028 | } 1029 | return '' 1030 | } 1031 | 1032 | Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { 1033 | if (!Buffer.isBuffer(target)) { 1034 | throw new TypeError('Argument must be a Buffer') 1035 | } 1036 | 1037 | if (start === undefined) { 1038 | start = 0 1039 | } 1040 | if (end === undefined) { 1041 | end = target ? target.length : 0 1042 | } 1043 | if (thisStart === undefined) { 1044 | thisStart = 0 1045 | } 1046 | if (thisEnd === undefined) { 1047 | thisEnd = this.length 1048 | } 1049 | 1050 | if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { 1051 | throw new RangeError('out of range index') 1052 | } 1053 | 1054 | if (thisStart >= thisEnd && start >= end) { 1055 | return 0 1056 | } 1057 | if (thisStart >= thisEnd) { 1058 | return -1 1059 | } 1060 | if (start >= end) { 1061 | return 1 1062 | } 1063 | 1064 | start >>>= 0 1065 | end >>>= 0 1066 | thisStart >>>= 0 1067 | thisEnd >>>= 0 1068 | 1069 | if (this === target) return 0 1070 | 1071 | var x = thisEnd - thisStart 1072 | var y = end - start 1073 | var len = Math.min(x, y) 1074 | 1075 | var thisCopy = this.slice(thisStart, thisEnd) 1076 | var targetCopy = target.slice(start, end) 1077 | 1078 | for (var i = 0; i < len; ++i) { 1079 | if (thisCopy[i] !== targetCopy[i]) { 1080 | x = thisCopy[i] 1081 | y = targetCopy[i] 1082 | break 1083 | } 1084 | } 1085 | 1086 | if (x < y) return -1 1087 | if (y < x) return 1 1088 | return 0 1089 | } 1090 | 1091 | // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, 1092 | // OR the last index of `val` in `buffer` at offset <= `byteOffset`. 1093 | // 1094 | // Arguments: 1095 | // - buffer - a Buffer to search 1096 | // - val - a string, Buffer, or number 1097 | // - byteOffset - an index into `buffer`; will be clamped to an int32 1098 | // - encoding - an optional encoding, relevant is val is a string 1099 | // - dir - true for indexOf, false for lastIndexOf 1100 | function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { 1101 | // Empty buffer means no match 1102 | if (buffer.length === 0) return -1 1103 | 1104 | // Normalize byteOffset 1105 | if (typeof byteOffset === 'string') { 1106 | encoding = byteOffset 1107 | byteOffset = 0 1108 | } else if (byteOffset > 0x7fffffff) { 1109 | byteOffset = 0x7fffffff 1110 | } else if (byteOffset < -0x80000000) { 1111 | byteOffset = -0x80000000 1112 | } 1113 | byteOffset = +byteOffset // Coerce to Number. 1114 | if (isNaN(byteOffset)) { 1115 | // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer 1116 | byteOffset = dir ? 0 : (buffer.length - 1) 1117 | } 1118 | 1119 | // Normalize byteOffset: negative offsets start from the end of the buffer 1120 | if (byteOffset < 0) byteOffset = buffer.length + byteOffset 1121 | if (byteOffset >= buffer.length) { 1122 | if (dir) return -1 1123 | else byteOffset = buffer.length - 1 1124 | } else if (byteOffset < 0) { 1125 | if (dir) byteOffset = 0 1126 | else return -1 1127 | } 1128 | 1129 | // Normalize val 1130 | if (typeof val === 'string') { 1131 | val = Buffer.from(val, encoding) 1132 | } 1133 | 1134 | // Finally, search either indexOf (if dir is true) or lastIndexOf 1135 | if (Buffer.isBuffer(val)) { 1136 | // Special case: looking for empty string/buffer always fails 1137 | if (val.length === 0) { 1138 | return -1 1139 | } 1140 | return arrayIndexOf(buffer, val, byteOffset, encoding, dir) 1141 | } else if (typeof val === 'number') { 1142 | val = val & 0xFF // Search for a byte value [0-255] 1143 | if (Buffer.TYPED_ARRAY_SUPPORT && 1144 | typeof Uint8Array.prototype.indexOf === 'function') { 1145 | if (dir) { 1146 | return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) 1147 | } else { 1148 | return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) 1149 | } 1150 | } 1151 | return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) 1152 | } 1153 | 1154 | throw new TypeError('val must be string, number or Buffer') 1155 | } 1156 | 1157 | function arrayIndexOf (arr, val, byteOffset, encoding, dir) { 1158 | var indexSize = 1 1159 | var arrLength = arr.length 1160 | var valLength = val.length 1161 | 1162 | if (encoding !== undefined) { 1163 | encoding = String(encoding).toLowerCase() 1164 | if (encoding === 'ucs2' || encoding === 'ucs-2' || 1165 | encoding === 'utf16le' || encoding === 'utf-16le') { 1166 | if (arr.length < 2 || val.length < 2) { 1167 | return -1 1168 | } 1169 | indexSize = 2 1170 | arrLength /= 2 1171 | valLength /= 2 1172 | byteOffset /= 2 1173 | } 1174 | } 1175 | 1176 | function read (buf, i) { 1177 | if (indexSize === 1) { 1178 | return buf[i] 1179 | } else { 1180 | return buf.readUInt16BE(i * indexSize) 1181 | } 1182 | } 1183 | 1184 | var i 1185 | if (dir) { 1186 | var foundIndex = -1 1187 | for (i = byteOffset; i < arrLength; i++) { 1188 | if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { 1189 | if (foundIndex === -1) foundIndex = i 1190 | if (i - foundIndex + 1 === valLength) return foundIndex * indexSize 1191 | } else { 1192 | if (foundIndex !== -1) i -= i - foundIndex 1193 | foundIndex = -1 1194 | } 1195 | } 1196 | } else { 1197 | if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength 1198 | for (i = byteOffset; i >= 0; i--) { 1199 | var found = true 1200 | for (var j = 0; j < valLength; j++) { 1201 | if (read(arr, i + j) !== read(val, j)) { 1202 | found = false 1203 | break 1204 | } 1205 | } 1206 | if (found) return i 1207 | } 1208 | } 1209 | 1210 | return -1 1211 | } 1212 | 1213 | Buffer.prototype.includes = function includes (val, byteOffset, encoding) { 1214 | return this.indexOf(val, byteOffset, encoding) !== -1 1215 | } 1216 | 1217 | Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { 1218 | return bidirectionalIndexOf(this, val, byteOffset, encoding, true) 1219 | } 1220 | 1221 | Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { 1222 | return bidirectionalIndexOf(this, val, byteOffset, encoding, false) 1223 | } 1224 | 1225 | function hexWrite (buf, string, offset, length) { 1226 | offset = Number(offset) || 0 1227 | var remaining = buf.length - offset 1228 | if (!length) { 1229 | length = remaining 1230 | } else { 1231 | length = Number(length) 1232 | if (length > remaining) { 1233 | length = remaining 1234 | } 1235 | } 1236 | 1237 | // must be an even number of digits 1238 | var strLen = string.length 1239 | if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') 1240 | 1241 | if (length > strLen / 2) { 1242 | length = strLen / 2 1243 | } 1244 | for (var i = 0; i < length; ++i) { 1245 | var parsed = parseInt(string.substr(i * 2, 2), 16) 1246 | if (isNaN(parsed)) return i 1247 | buf[offset + i] = parsed 1248 | } 1249 | return i 1250 | } 1251 | 1252 | function utf8Write (buf, string, offset, length) { 1253 | return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) 1254 | } 1255 | 1256 | function asciiWrite (buf, string, offset, length) { 1257 | return blitBuffer(asciiToBytes(string), buf, offset, length) 1258 | } 1259 | 1260 | function latin1Write (buf, string, offset, length) { 1261 | return asciiWrite(buf, string, offset, length) 1262 | } 1263 | 1264 | function base64Write (buf, string, offset, length) { 1265 | return blitBuffer(base64ToBytes(string), buf, offset, length) 1266 | } 1267 | 1268 | function ucs2Write (buf, string, offset, length) { 1269 | return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) 1270 | } 1271 | 1272 | Buffer.prototype.write = function write (string, offset, length, encoding) { 1273 | // Buffer#write(string) 1274 | if (offset === undefined) { 1275 | encoding = 'utf8' 1276 | length = this.length 1277 | offset = 0 1278 | // Buffer#write(string, encoding) 1279 | } else if (length === undefined && typeof offset === 'string') { 1280 | encoding = offset 1281 | length = this.length 1282 | offset = 0 1283 | // Buffer#write(string, offset[, length][, encoding]) 1284 | } else if (isFinite(offset)) { 1285 | offset = offset | 0 1286 | if (isFinite(length)) { 1287 | length = length | 0 1288 | if (encoding === undefined) encoding = 'utf8' 1289 | } else { 1290 | encoding = length 1291 | length = undefined 1292 | } 1293 | // legacy write(string, encoding, offset, length) - remove in v0.13 1294 | } else { 1295 | throw new Error( 1296 | 'Buffer.write(string, encoding, offset[, length]) is no longer supported' 1297 | ) 1298 | } 1299 | 1300 | var remaining = this.length - offset 1301 | if (length === undefined || length > remaining) length = remaining 1302 | 1303 | if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { 1304 | throw new RangeError('Attempt to write outside buffer bounds') 1305 | } 1306 | 1307 | if (!encoding) encoding = 'utf8' 1308 | 1309 | var loweredCase = false 1310 | for (;;) { 1311 | switch (encoding) { 1312 | case 'hex': 1313 | return hexWrite(this, string, offset, length) 1314 | 1315 | case 'utf8': 1316 | case 'utf-8': 1317 | return utf8Write(this, string, offset, length) 1318 | 1319 | case 'ascii': 1320 | return asciiWrite(this, string, offset, length) 1321 | 1322 | case 'latin1': 1323 | case 'binary': 1324 | return latin1Write(this, string, offset, length) 1325 | 1326 | case 'base64': 1327 | // Warning: maxLength not taken into account in base64Write 1328 | return base64Write(this, string, offset, length) 1329 | 1330 | case 'ucs2': 1331 | case 'ucs-2': 1332 | case 'utf16le': 1333 | case 'utf-16le': 1334 | return ucs2Write(this, string, offset, length) 1335 | 1336 | default: 1337 | if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) 1338 | encoding = ('' + encoding).toLowerCase() 1339 | loweredCase = true 1340 | } 1341 | } 1342 | } 1343 | 1344 | Buffer.prototype.toJSON = function toJSON () { 1345 | return { 1346 | type: 'Buffer', 1347 | data: Array.prototype.slice.call(this._arr || this, 0) 1348 | } 1349 | } 1350 | 1351 | function base64Slice (buf, start, end) { 1352 | if (start === 0 && end === buf.length) { 1353 | return base64.fromByteArray(buf) 1354 | } else { 1355 | return base64.fromByteArray(buf.slice(start, end)) 1356 | } 1357 | } 1358 | 1359 | function utf8Slice (buf, start, end) { 1360 | end = Math.min(buf.length, end) 1361 | var res = [] 1362 | 1363 | var i = start 1364 | while (i < end) { 1365 | var firstByte = buf[i] 1366 | var codePoint = null 1367 | var bytesPerSequence = (firstByte > 0xEF) ? 4 1368 | : (firstByte > 0xDF) ? 3 1369 | : (firstByte > 0xBF) ? 2 1370 | : 1 1371 | 1372 | if (i + bytesPerSequence <= end) { 1373 | var secondByte, thirdByte, fourthByte, tempCodePoint 1374 | 1375 | switch (bytesPerSequence) { 1376 | case 1: 1377 | if (firstByte < 0x80) { 1378 | codePoint = firstByte 1379 | } 1380 | break 1381 | case 2: 1382 | secondByte = buf[i + 1] 1383 | if ((secondByte & 0xC0) === 0x80) { 1384 | tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) 1385 | if (tempCodePoint > 0x7F) { 1386 | codePoint = tempCodePoint 1387 | } 1388 | } 1389 | break 1390 | case 3: 1391 | secondByte = buf[i + 1] 1392 | thirdByte = buf[i + 2] 1393 | if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { 1394 | tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) 1395 | if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { 1396 | codePoint = tempCodePoint 1397 | } 1398 | } 1399 | break 1400 | case 4: 1401 | secondByte = buf[i + 1] 1402 | thirdByte = buf[i + 2] 1403 | fourthByte = buf[i + 3] 1404 | if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { 1405 | tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) 1406 | if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { 1407 | codePoint = tempCodePoint 1408 | } 1409 | } 1410 | } 1411 | } 1412 | 1413 | if (codePoint === null) { 1414 | // we did not generate a valid codePoint so insert a 1415 | // replacement char (U+FFFD) and advance only 1 byte 1416 | codePoint = 0xFFFD 1417 | bytesPerSequence = 1 1418 | } else if (codePoint > 0xFFFF) { 1419 | // encode to utf16 (surrogate pair dance) 1420 | codePoint -= 0x10000 1421 | res.push(codePoint >>> 10 & 0x3FF | 0xD800) 1422 | codePoint = 0xDC00 | codePoint & 0x3FF 1423 | } 1424 | 1425 | res.push(codePoint) 1426 | i += bytesPerSequence 1427 | } 1428 | 1429 | return decodeCodePointsArray(res) 1430 | } 1431 | 1432 | // Based on http://stackoverflow.com/a/22747272/680742, the browser with 1433 | // the lowest limit is Chrome, with 0x10000 args. 1434 | // We go 1 magnitude less, for safety 1435 | var MAX_ARGUMENTS_LENGTH = 0x1000 1436 | 1437 | function decodeCodePointsArray (codePoints) { 1438 | var len = codePoints.length 1439 | if (len <= MAX_ARGUMENTS_LENGTH) { 1440 | return String.fromCharCode.apply(String, codePoints) // avoid extra slice() 1441 | } 1442 | 1443 | // Decode in chunks to avoid "call stack size exceeded". 1444 | var res = '' 1445 | var i = 0 1446 | while (i < len) { 1447 | res += String.fromCharCode.apply( 1448 | String, 1449 | codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) 1450 | ) 1451 | } 1452 | return res 1453 | } 1454 | 1455 | function asciiSlice (buf, start, end) { 1456 | var ret = '' 1457 | end = Math.min(buf.length, end) 1458 | 1459 | for (var i = start; i < end; ++i) { 1460 | ret += String.fromCharCode(buf[i] & 0x7F) 1461 | } 1462 | return ret 1463 | } 1464 | 1465 | function latin1Slice (buf, start, end) { 1466 | var ret = '' 1467 | end = Math.min(buf.length, end) 1468 | 1469 | for (var i = start; i < end; ++i) { 1470 | ret += String.fromCharCode(buf[i]) 1471 | } 1472 | return ret 1473 | } 1474 | 1475 | function hexSlice (buf, start, end) { 1476 | var len = buf.length 1477 | 1478 | if (!start || start < 0) start = 0 1479 | if (!end || end < 0 || end > len) end = len 1480 | 1481 | var out = '' 1482 | for (var i = start; i < end; ++i) { 1483 | out += toHex(buf[i]) 1484 | } 1485 | return out 1486 | } 1487 | 1488 | function utf16leSlice (buf, start, end) { 1489 | var bytes = buf.slice(start, end) 1490 | var res = '' 1491 | for (var i = 0; i < bytes.length; i += 2) { 1492 | res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) 1493 | } 1494 | return res 1495 | } 1496 | 1497 | Buffer.prototype.slice = function slice (start, end) { 1498 | var len = this.length 1499 | start = ~~start 1500 | end = end === undefined ? len : ~~end 1501 | 1502 | if (start < 0) { 1503 | start += len 1504 | if (start < 0) start = 0 1505 | } else if (start > len) { 1506 | start = len 1507 | } 1508 | 1509 | if (end < 0) { 1510 | end += len 1511 | if (end < 0) end = 0 1512 | } else if (end > len) { 1513 | end = len 1514 | } 1515 | 1516 | if (end < start) end = start 1517 | 1518 | var newBuf 1519 | if (Buffer.TYPED_ARRAY_SUPPORT) { 1520 | newBuf = this.subarray(start, end) 1521 | newBuf.__proto__ = Buffer.prototype 1522 | } else { 1523 | var sliceLen = end - start 1524 | newBuf = new Buffer(sliceLen, undefined) 1525 | for (var i = 0; i < sliceLen; ++i) { 1526 | newBuf[i] = this[i + start] 1527 | } 1528 | } 1529 | 1530 | return newBuf 1531 | } 1532 | 1533 | /* 1534 | * Need to make sure that buffer isn't trying to write out of bounds. 1535 | */ 1536 | function checkOffset (offset, ext, length) { 1537 | if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') 1538 | if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') 1539 | } 1540 | 1541 | Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { 1542 | offset = offset | 0 1543 | byteLength = byteLength | 0 1544 | if (!noAssert) checkOffset(offset, byteLength, this.length) 1545 | 1546 | var val = this[offset] 1547 | var mul = 1 1548 | var i = 0 1549 | while (++i < byteLength && (mul *= 0x100)) { 1550 | val += this[offset + i] * mul 1551 | } 1552 | 1553 | return val 1554 | } 1555 | 1556 | Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { 1557 | offset = offset | 0 1558 | byteLength = byteLength | 0 1559 | if (!noAssert) { 1560 | checkOffset(offset, byteLength, this.length) 1561 | } 1562 | 1563 | var val = this[offset + --byteLength] 1564 | var mul = 1 1565 | while (byteLength > 0 && (mul *= 0x100)) { 1566 | val += this[offset + --byteLength] * mul 1567 | } 1568 | 1569 | return val 1570 | } 1571 | 1572 | Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { 1573 | if (!noAssert) checkOffset(offset, 1, this.length) 1574 | return this[offset] 1575 | } 1576 | 1577 | Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { 1578 | if (!noAssert) checkOffset(offset, 2, this.length) 1579 | return this[offset] | (this[offset + 1] << 8) 1580 | } 1581 | 1582 | Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { 1583 | if (!noAssert) checkOffset(offset, 2, this.length) 1584 | return (this[offset] << 8) | this[offset + 1] 1585 | } 1586 | 1587 | Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { 1588 | if (!noAssert) checkOffset(offset, 4, this.length) 1589 | 1590 | return ((this[offset]) | 1591 | (this[offset + 1] << 8) | 1592 | (this[offset + 2] << 16)) + 1593 | (this[offset + 3] * 0x1000000) 1594 | } 1595 | 1596 | Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { 1597 | if (!noAssert) checkOffset(offset, 4, this.length) 1598 | 1599 | return (this[offset] * 0x1000000) + 1600 | ((this[offset + 1] << 16) | 1601 | (this[offset + 2] << 8) | 1602 | this[offset + 3]) 1603 | } 1604 | 1605 | Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { 1606 | offset = offset | 0 1607 | byteLength = byteLength | 0 1608 | if (!noAssert) checkOffset(offset, byteLength, this.length) 1609 | 1610 | var val = this[offset] 1611 | var mul = 1 1612 | var i = 0 1613 | while (++i < byteLength && (mul *= 0x100)) { 1614 | val += this[offset + i] * mul 1615 | } 1616 | mul *= 0x80 1617 | 1618 | if (val >= mul) val -= Math.pow(2, 8 * byteLength) 1619 | 1620 | return val 1621 | } 1622 | 1623 | Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { 1624 | offset = offset | 0 1625 | byteLength = byteLength | 0 1626 | if (!noAssert) checkOffset(offset, byteLength, this.length) 1627 | 1628 | var i = byteLength 1629 | var mul = 1 1630 | var val = this[offset + --i] 1631 | while (i > 0 && (mul *= 0x100)) { 1632 | val += this[offset + --i] * mul 1633 | } 1634 | mul *= 0x80 1635 | 1636 | if (val >= mul) val -= Math.pow(2, 8 * byteLength) 1637 | 1638 | return val 1639 | } 1640 | 1641 | Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { 1642 | if (!noAssert) checkOffset(offset, 1, this.length) 1643 | if (!(this[offset] & 0x80)) return (this[offset]) 1644 | return ((0xff - this[offset] + 1) * -1) 1645 | } 1646 | 1647 | Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { 1648 | if (!noAssert) checkOffset(offset, 2, this.length) 1649 | var val = this[offset] | (this[offset + 1] << 8) 1650 | return (val & 0x8000) ? val | 0xFFFF0000 : val 1651 | } 1652 | 1653 | Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { 1654 | if (!noAssert) checkOffset(offset, 2, this.length) 1655 | var val = this[offset + 1] | (this[offset] << 8) 1656 | return (val & 0x8000) ? val | 0xFFFF0000 : val 1657 | } 1658 | 1659 | Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { 1660 | if (!noAssert) checkOffset(offset, 4, this.length) 1661 | 1662 | return (this[offset]) | 1663 | (this[offset + 1] << 8) | 1664 | (this[offset + 2] << 16) | 1665 | (this[offset + 3] << 24) 1666 | } 1667 | 1668 | Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { 1669 | if (!noAssert) checkOffset(offset, 4, this.length) 1670 | 1671 | return (this[offset] << 24) | 1672 | (this[offset + 1] << 16) | 1673 | (this[offset + 2] << 8) | 1674 | (this[offset + 3]) 1675 | } 1676 | 1677 | Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { 1678 | if (!noAssert) checkOffset(offset, 4, this.length) 1679 | return ieee754.read(this, offset, true, 23, 4) 1680 | } 1681 | 1682 | Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { 1683 | if (!noAssert) checkOffset(offset, 4, this.length) 1684 | return ieee754.read(this, offset, false, 23, 4) 1685 | } 1686 | 1687 | Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { 1688 | if (!noAssert) checkOffset(offset, 8, this.length) 1689 | return ieee754.read(this, offset, true, 52, 8) 1690 | } 1691 | 1692 | Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { 1693 | if (!noAssert) checkOffset(offset, 8, this.length) 1694 | return ieee754.read(this, offset, false, 52, 8) 1695 | } 1696 | 1697 | function checkInt (buf, value, offset, ext, max, min) { 1698 | if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') 1699 | if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') 1700 | if (offset + ext > buf.length) throw new RangeError('Index out of range') 1701 | } 1702 | 1703 | Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { 1704 | value = +value 1705 | offset = offset | 0 1706 | byteLength = byteLength | 0 1707 | if (!noAssert) { 1708 | var maxBytes = Math.pow(2, 8 * byteLength) - 1 1709 | checkInt(this, value, offset, byteLength, maxBytes, 0) 1710 | } 1711 | 1712 | var mul = 1 1713 | var i = 0 1714 | this[offset] = value & 0xFF 1715 | while (++i < byteLength && (mul *= 0x100)) { 1716 | this[offset + i] = (value / mul) & 0xFF 1717 | } 1718 | 1719 | return offset + byteLength 1720 | } 1721 | 1722 | Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { 1723 | value = +value 1724 | offset = offset | 0 1725 | byteLength = byteLength | 0 1726 | if (!noAssert) { 1727 | var maxBytes = Math.pow(2, 8 * byteLength) - 1 1728 | checkInt(this, value, offset, byteLength, maxBytes, 0) 1729 | } 1730 | 1731 | var i = byteLength - 1 1732 | var mul = 1 1733 | this[offset + i] = value & 0xFF 1734 | while (--i >= 0 && (mul *= 0x100)) { 1735 | this[offset + i] = (value / mul) & 0xFF 1736 | } 1737 | 1738 | return offset + byteLength 1739 | } 1740 | 1741 | Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { 1742 | value = +value 1743 | offset = offset | 0 1744 | if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) 1745 | if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) 1746 | this[offset] = (value & 0xff) 1747 | return offset + 1 1748 | } 1749 | 1750 | function objectWriteUInt16 (buf, value, offset, littleEndian) { 1751 | if (value < 0) value = 0xffff + value + 1 1752 | for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { 1753 | buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> 1754 | (littleEndian ? i : 1 - i) * 8 1755 | } 1756 | } 1757 | 1758 | Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { 1759 | value = +value 1760 | offset = offset | 0 1761 | if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) 1762 | if (Buffer.TYPED_ARRAY_SUPPORT) { 1763 | this[offset] = (value & 0xff) 1764 | this[offset + 1] = (value >>> 8) 1765 | } else { 1766 | objectWriteUInt16(this, value, offset, true) 1767 | } 1768 | return offset + 2 1769 | } 1770 | 1771 | Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { 1772 | value = +value 1773 | offset = offset | 0 1774 | if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) 1775 | if (Buffer.TYPED_ARRAY_SUPPORT) { 1776 | this[offset] = (value >>> 8) 1777 | this[offset + 1] = (value & 0xff) 1778 | } else { 1779 | objectWriteUInt16(this, value, offset, false) 1780 | } 1781 | return offset + 2 1782 | } 1783 | 1784 | function objectWriteUInt32 (buf, value, offset, littleEndian) { 1785 | if (value < 0) value = 0xffffffff + value + 1 1786 | for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { 1787 | buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff 1788 | } 1789 | } 1790 | 1791 | Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { 1792 | value = +value 1793 | offset = offset | 0 1794 | if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) 1795 | if (Buffer.TYPED_ARRAY_SUPPORT) { 1796 | this[offset + 3] = (value >>> 24) 1797 | this[offset + 2] = (value >>> 16) 1798 | this[offset + 1] = (value >>> 8) 1799 | this[offset] = (value & 0xff) 1800 | } else { 1801 | objectWriteUInt32(this, value, offset, true) 1802 | } 1803 | return offset + 4 1804 | } 1805 | 1806 | Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { 1807 | value = +value 1808 | offset = offset | 0 1809 | if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) 1810 | if (Buffer.TYPED_ARRAY_SUPPORT) { 1811 | this[offset] = (value >>> 24) 1812 | this[offset + 1] = (value >>> 16) 1813 | this[offset + 2] = (value >>> 8) 1814 | this[offset + 3] = (value & 0xff) 1815 | } else { 1816 | objectWriteUInt32(this, value, offset, false) 1817 | } 1818 | return offset + 4 1819 | } 1820 | 1821 | Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { 1822 | value = +value 1823 | offset = offset | 0 1824 | if (!noAssert) { 1825 | var limit = Math.pow(2, 8 * byteLength - 1) 1826 | 1827 | checkInt(this, value, offset, byteLength, limit - 1, -limit) 1828 | } 1829 | 1830 | var i = 0 1831 | var mul = 1 1832 | var sub = 0 1833 | this[offset] = value & 0xFF 1834 | while (++i < byteLength && (mul *= 0x100)) { 1835 | if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { 1836 | sub = 1 1837 | } 1838 | this[offset + i] = ((value / mul) >> 0) - sub & 0xFF 1839 | } 1840 | 1841 | return offset + byteLength 1842 | } 1843 | 1844 | Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { 1845 | value = +value 1846 | offset = offset | 0 1847 | if (!noAssert) { 1848 | var limit = Math.pow(2, 8 * byteLength - 1) 1849 | 1850 | checkInt(this, value, offset, byteLength, limit - 1, -limit) 1851 | } 1852 | 1853 | var i = byteLength - 1 1854 | var mul = 1 1855 | var sub = 0 1856 | this[offset + i] = value & 0xFF 1857 | while (--i >= 0 && (mul *= 0x100)) { 1858 | if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { 1859 | sub = 1 1860 | } 1861 | this[offset + i] = ((value / mul) >> 0) - sub & 0xFF 1862 | } 1863 | 1864 | return offset + byteLength 1865 | } 1866 | 1867 | Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { 1868 | value = +value 1869 | offset = offset | 0 1870 | if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) 1871 | if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) 1872 | if (value < 0) value = 0xff + value + 1 1873 | this[offset] = (value & 0xff) 1874 | return offset + 1 1875 | } 1876 | 1877 | Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { 1878 | value = +value 1879 | offset = offset | 0 1880 | if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) 1881 | if (Buffer.TYPED_ARRAY_SUPPORT) { 1882 | this[offset] = (value & 0xff) 1883 | this[offset + 1] = (value >>> 8) 1884 | } else { 1885 | objectWriteUInt16(this, value, offset, true) 1886 | } 1887 | return offset + 2 1888 | } 1889 | 1890 | Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { 1891 | value = +value 1892 | offset = offset | 0 1893 | if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) 1894 | if (Buffer.TYPED_ARRAY_SUPPORT) { 1895 | this[offset] = (value >>> 8) 1896 | this[offset + 1] = (value & 0xff) 1897 | } else { 1898 | objectWriteUInt16(this, value, offset, false) 1899 | } 1900 | return offset + 2 1901 | } 1902 | 1903 | Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { 1904 | value = +value 1905 | offset = offset | 0 1906 | if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) 1907 | if (Buffer.TYPED_ARRAY_SUPPORT) { 1908 | this[offset] = (value & 0xff) 1909 | this[offset + 1] = (value >>> 8) 1910 | this[offset + 2] = (value >>> 16) 1911 | this[offset + 3] = (value >>> 24) 1912 | } else { 1913 | objectWriteUInt32(this, value, offset, true) 1914 | } 1915 | return offset + 4 1916 | } 1917 | 1918 | Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { 1919 | value = +value 1920 | offset = offset | 0 1921 | if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) 1922 | if (value < 0) value = 0xffffffff + value + 1 1923 | if (Buffer.TYPED_ARRAY_SUPPORT) { 1924 | this[offset] = (value >>> 24) 1925 | this[offset + 1] = (value >>> 16) 1926 | this[offset + 2] = (value >>> 8) 1927 | this[offset + 3] = (value & 0xff) 1928 | } else { 1929 | objectWriteUInt32(this, value, offset, false) 1930 | } 1931 | return offset + 4 1932 | } 1933 | 1934 | function checkIEEE754 (buf, value, offset, ext, max, min) { 1935 | if (offset + ext > buf.length) throw new RangeError('Index out of range') 1936 | if (offset < 0) throw new RangeError('Index out of range') 1937 | } 1938 | 1939 | function writeFloat (buf, value, offset, littleEndian, noAssert) { 1940 | if (!noAssert) { 1941 | checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) 1942 | } 1943 | ieee754.write(buf, value, offset, littleEndian, 23, 4) 1944 | return offset + 4 1945 | } 1946 | 1947 | Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { 1948 | return writeFloat(this, value, offset, true, noAssert) 1949 | } 1950 | 1951 | Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { 1952 | return writeFloat(this, value, offset, false, noAssert) 1953 | } 1954 | 1955 | function writeDouble (buf, value, offset, littleEndian, noAssert) { 1956 | if (!noAssert) { 1957 | checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) 1958 | } 1959 | ieee754.write(buf, value, offset, littleEndian, 52, 8) 1960 | return offset + 8 1961 | } 1962 | 1963 | Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { 1964 | return writeDouble(this, value, offset, true, noAssert) 1965 | } 1966 | 1967 | Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { 1968 | return writeDouble(this, value, offset, false, noAssert) 1969 | } 1970 | 1971 | // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) 1972 | Buffer.prototype.copy = function copy (target, targetStart, start, end) { 1973 | if (!start) start = 0 1974 | if (!end && end !== 0) end = this.length 1975 | if (targetStart >= target.length) targetStart = target.length 1976 | if (!targetStart) targetStart = 0 1977 | if (end > 0 && end < start) end = start 1978 | 1979 | // Copy 0 bytes; we're done 1980 | if (end === start) return 0 1981 | if (target.length === 0 || this.length === 0) return 0 1982 | 1983 | // Fatal error conditions 1984 | if (targetStart < 0) { 1985 | throw new RangeError('targetStart out of bounds') 1986 | } 1987 | if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') 1988 | if (end < 0) throw new RangeError('sourceEnd out of bounds') 1989 | 1990 | // Are we oob? 1991 | if (end > this.length) end = this.length 1992 | if (target.length - targetStart < end - start) { 1993 | end = target.length - targetStart + start 1994 | } 1995 | 1996 | var len = end - start 1997 | var i 1998 | 1999 | if (this === target && start < targetStart && targetStart < end) { 2000 | // descending copy from end 2001 | for (i = len - 1; i >= 0; --i) { 2002 | target[i + targetStart] = this[i + start] 2003 | } 2004 | } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { 2005 | // ascending copy from start 2006 | for (i = 0; i < len; ++i) { 2007 | target[i + targetStart] = this[i + start] 2008 | } 2009 | } else { 2010 | Uint8Array.prototype.set.call( 2011 | target, 2012 | this.subarray(start, start + len), 2013 | targetStart 2014 | ) 2015 | } 2016 | 2017 | return len 2018 | } 2019 | 2020 | // Usage: 2021 | // buffer.fill(number[, offset[, end]]) 2022 | // buffer.fill(buffer[, offset[, end]]) 2023 | // buffer.fill(string[, offset[, end]][, encoding]) 2024 | Buffer.prototype.fill = function fill (val, start, end, encoding) { 2025 | // Handle string cases: 2026 | if (typeof val === 'string') { 2027 | if (typeof start === 'string') { 2028 | encoding = start 2029 | start = 0 2030 | end = this.length 2031 | } else if (typeof end === 'string') { 2032 | encoding = end 2033 | end = this.length 2034 | } 2035 | if (val.length === 1) { 2036 | var code = val.charCodeAt(0) 2037 | if (code < 256) { 2038 | val = code 2039 | } 2040 | } 2041 | if (encoding !== undefined && typeof encoding !== 'string') { 2042 | throw new TypeError('encoding must be a string') 2043 | } 2044 | if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { 2045 | throw new TypeError('Unknown encoding: ' + encoding) 2046 | } 2047 | } else if (typeof val === 'number') { 2048 | val = val & 255 2049 | } 2050 | 2051 | // Invalid ranges are not set to a default, so can range check early. 2052 | if (start < 0 || this.length < start || this.length < end) { 2053 | throw new RangeError('Out of range index') 2054 | } 2055 | 2056 | if (end <= start) { 2057 | return this 2058 | } 2059 | 2060 | start = start >>> 0 2061 | end = end === undefined ? this.length : end >>> 0 2062 | 2063 | if (!val) val = 0 2064 | 2065 | var i 2066 | if (typeof val === 'number') { 2067 | for (i = start; i < end; ++i) { 2068 | this[i] = val 2069 | } 2070 | } else { 2071 | var bytes = Buffer.isBuffer(val) 2072 | ? val 2073 | : utf8ToBytes(new Buffer(val, encoding).toString()) 2074 | var len = bytes.length 2075 | for (i = 0; i < end - start; ++i) { 2076 | this[i + start] = bytes[i % len] 2077 | } 2078 | } 2079 | 2080 | return this 2081 | } 2082 | 2083 | // HELPER FUNCTIONS 2084 | // ================ 2085 | 2086 | var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g 2087 | 2088 | function base64clean (str) { 2089 | // Node strips out invalid characters like \n and \t from the string, base64-js does not 2090 | str = stringtrim(str).replace(INVALID_BASE64_RE, '') 2091 | // Node converts strings with length < 2 to '' 2092 | if (str.length < 2) return '' 2093 | // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not 2094 | while (str.length % 4 !== 0) { 2095 | str = str + '=' 2096 | } 2097 | return str 2098 | } 2099 | 2100 | function stringtrim (str) { 2101 | if (str.trim) return str.trim() 2102 | return str.replace(/^\s+|\s+$/g, '') 2103 | } 2104 | 2105 | function toHex (n) { 2106 | if (n < 16) return '0' + n.toString(16) 2107 | return n.toString(16) 2108 | } 2109 | 2110 | function utf8ToBytes (string, units) { 2111 | units = units || Infinity 2112 | var codePoint 2113 | var length = string.length 2114 | var leadSurrogate = null 2115 | var bytes = [] 2116 | 2117 | for (var i = 0; i < length; ++i) { 2118 | codePoint = string.charCodeAt(i) 2119 | 2120 | // is surrogate component 2121 | if (codePoint > 0xD7FF && codePoint < 0xE000) { 2122 | // last char was a lead 2123 | if (!leadSurrogate) { 2124 | // no lead yet 2125 | if (codePoint > 0xDBFF) { 2126 | // unexpected trail 2127 | if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) 2128 | continue 2129 | } else if (i + 1 === length) { 2130 | // unpaired lead 2131 | if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) 2132 | continue 2133 | } 2134 | 2135 | // valid lead 2136 | leadSurrogate = codePoint 2137 | 2138 | continue 2139 | } 2140 | 2141 | // 2 leads in a row 2142 | if (codePoint < 0xDC00) { 2143 | if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) 2144 | leadSurrogate = codePoint 2145 | continue 2146 | } 2147 | 2148 | // valid surrogate pair 2149 | codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 2150 | } else if (leadSurrogate) { 2151 | // valid bmp char, but last char was a lead 2152 | if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) 2153 | } 2154 | 2155 | leadSurrogate = null 2156 | 2157 | // encode utf8 2158 | if (codePoint < 0x80) { 2159 | if ((units -= 1) < 0) break 2160 | bytes.push(codePoint) 2161 | } else if (codePoint < 0x800) { 2162 | if ((units -= 2) < 0) break 2163 | bytes.push( 2164 | codePoint >> 0x6 | 0xC0, 2165 | codePoint & 0x3F | 0x80 2166 | ) 2167 | } else if (codePoint < 0x10000) { 2168 | if ((units -= 3) < 0) break 2169 | bytes.push( 2170 | codePoint >> 0xC | 0xE0, 2171 | codePoint >> 0x6 & 0x3F | 0x80, 2172 | codePoint & 0x3F | 0x80 2173 | ) 2174 | } else if (codePoint < 0x110000) { 2175 | if ((units -= 4) < 0) break 2176 | bytes.push( 2177 | codePoint >> 0x12 | 0xF0, 2178 | codePoint >> 0xC & 0x3F | 0x80, 2179 | codePoint >> 0x6 & 0x3F | 0x80, 2180 | codePoint & 0x3F | 0x80 2181 | ) 2182 | } else { 2183 | throw new Error('Invalid code point') 2184 | } 2185 | } 2186 | 2187 | return bytes 2188 | } 2189 | 2190 | function asciiToBytes (str) { 2191 | var byteArray = [] 2192 | for (var i = 0; i < str.length; ++i) { 2193 | // Node's code seems to be doing this and not & 0x7F.. 2194 | byteArray.push(str.charCodeAt(i) & 0xFF) 2195 | } 2196 | return byteArray 2197 | } 2198 | 2199 | function utf16leToBytes (str, units) { 2200 | var c, hi, lo 2201 | var byteArray = [] 2202 | for (var i = 0; i < str.length; ++i) { 2203 | if ((units -= 2) < 0) break 2204 | 2205 | c = str.charCodeAt(i) 2206 | hi = c >> 8 2207 | lo = c % 256 2208 | byteArray.push(lo) 2209 | byteArray.push(hi) 2210 | } 2211 | 2212 | return byteArray 2213 | } 2214 | 2215 | function base64ToBytes (str) { 2216 | return base64.toByteArray(base64clean(str)) 2217 | } 2218 | 2219 | function blitBuffer (src, dst, offset, length) { 2220 | for (var i = 0; i < length; ++i) { 2221 | if ((i + offset >= dst.length) || (i >= src.length)) break 2222 | dst[i + offset] = src[i] 2223 | } 2224 | return i 2225 | } 2226 | 2227 | function isnan (val) { 2228 | return val !== val // eslint-disable-line no-self-compare 2229 | } 2230 | 2231 | /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) 2232 | 2233 | /***/ }, 2234 | /* 4 */ 2235 | /***/ function(module, exports) { 2236 | 2237 | 'use strict' 2238 | 2239 | exports.byteLength = byteLength 2240 | exports.toByteArray = toByteArray 2241 | exports.fromByteArray = fromByteArray 2242 | 2243 | var lookup = [] 2244 | var revLookup = [] 2245 | var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array 2246 | 2247 | var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' 2248 | for (var i = 0, len = code.length; i < len; ++i) { 2249 | lookup[i] = code[i] 2250 | revLookup[code.charCodeAt(i)] = i 2251 | } 2252 | 2253 | revLookup['-'.charCodeAt(0)] = 62 2254 | revLookup['_'.charCodeAt(0)] = 63 2255 | 2256 | function placeHoldersCount (b64) { 2257 | var len = b64.length 2258 | if (len % 4 > 0) { 2259 | throw new Error('Invalid string. Length must be a multiple of 4') 2260 | } 2261 | 2262 | // the number of equal signs (place holders) 2263 | // if there are two placeholders, than the two characters before it 2264 | // represent one byte 2265 | // if there is only one, then the three characters before it represent 2 bytes 2266 | // this is just a cheap hack to not do indexOf twice 2267 | return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0 2268 | } 2269 | 2270 | function byteLength (b64) { 2271 | // base64 is 4/3 + up to two characters of the original data 2272 | return b64.length * 3 / 4 - placeHoldersCount(b64) 2273 | } 2274 | 2275 | function toByteArray (b64) { 2276 | var i, j, l, tmp, placeHolders, arr 2277 | var len = b64.length 2278 | placeHolders = placeHoldersCount(b64) 2279 | 2280 | arr = new Arr(len * 3 / 4 - placeHolders) 2281 | 2282 | // if there are placeholders, only get up to the last complete 4 chars 2283 | l = placeHolders > 0 ? len - 4 : len 2284 | 2285 | var L = 0 2286 | 2287 | for (i = 0, j = 0; i < l; i += 4, j += 3) { 2288 | tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] 2289 | arr[L++] = (tmp >> 16) & 0xFF 2290 | arr[L++] = (tmp >> 8) & 0xFF 2291 | arr[L++] = tmp & 0xFF 2292 | } 2293 | 2294 | if (placeHolders === 2) { 2295 | tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) 2296 | arr[L++] = tmp & 0xFF 2297 | } else if (placeHolders === 1) { 2298 | tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) 2299 | arr[L++] = (tmp >> 8) & 0xFF 2300 | arr[L++] = tmp & 0xFF 2301 | } 2302 | 2303 | return arr 2304 | } 2305 | 2306 | function tripletToBase64 (num) { 2307 | return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] 2308 | } 2309 | 2310 | function encodeChunk (uint8, start, end) { 2311 | var tmp 2312 | var output = [] 2313 | for (var i = start; i < end; i += 3) { 2314 | tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) 2315 | output.push(tripletToBase64(tmp)) 2316 | } 2317 | return output.join('') 2318 | } 2319 | 2320 | function fromByteArray (uint8) { 2321 | var tmp 2322 | var len = uint8.length 2323 | var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes 2324 | var output = '' 2325 | var parts = [] 2326 | var maxChunkLength = 16383 // must be multiple of 3 2327 | 2328 | // go through the array every three bytes, we'll deal with trailing stuff later 2329 | for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { 2330 | parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) 2331 | } 2332 | 2333 | // pad the end with zeros, but make sure to not forget the extra bytes 2334 | if (extraBytes === 1) { 2335 | tmp = uint8[len - 1] 2336 | output += lookup[tmp >> 2] 2337 | output += lookup[(tmp << 4) & 0x3F] 2338 | output += '==' 2339 | } else if (extraBytes === 2) { 2340 | tmp = (uint8[len - 2] << 8) + (uint8[len - 1]) 2341 | output += lookup[tmp >> 10] 2342 | output += lookup[(tmp >> 4) & 0x3F] 2343 | output += lookup[(tmp << 2) & 0x3F] 2344 | output += '=' 2345 | } 2346 | 2347 | parts.push(output) 2348 | 2349 | return parts.join('') 2350 | } 2351 | 2352 | 2353 | /***/ }, 2354 | /* 5 */ 2355 | /***/ function(module, exports) { 2356 | 2357 | exports.read = function (buffer, offset, isLE, mLen, nBytes) { 2358 | var e, m 2359 | var eLen = nBytes * 8 - mLen - 1 2360 | var eMax = (1 << eLen) - 1 2361 | var eBias = eMax >> 1 2362 | var nBits = -7 2363 | var i = isLE ? (nBytes - 1) : 0 2364 | var d = isLE ? -1 : 1 2365 | var s = buffer[offset + i] 2366 | 2367 | i += d 2368 | 2369 | e = s & ((1 << (-nBits)) - 1) 2370 | s >>= (-nBits) 2371 | nBits += eLen 2372 | for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} 2373 | 2374 | m = e & ((1 << (-nBits)) - 1) 2375 | e >>= (-nBits) 2376 | nBits += mLen 2377 | for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} 2378 | 2379 | if (e === 0) { 2380 | e = 1 - eBias 2381 | } else if (e === eMax) { 2382 | return m ? NaN : ((s ? -1 : 1) * Infinity) 2383 | } else { 2384 | m = m + Math.pow(2, mLen) 2385 | e = e - eBias 2386 | } 2387 | return (s ? -1 : 1) * m * Math.pow(2, e - mLen) 2388 | } 2389 | 2390 | exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { 2391 | var e, m, c 2392 | var eLen = nBytes * 8 - mLen - 1 2393 | var eMax = (1 << eLen) - 1 2394 | var eBias = eMax >> 1 2395 | var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) 2396 | var i = isLE ? 0 : (nBytes - 1) 2397 | var d = isLE ? 1 : -1 2398 | var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 2399 | 2400 | value = Math.abs(value) 2401 | 2402 | if (isNaN(value) || value === Infinity) { 2403 | m = isNaN(value) ? 1 : 0 2404 | e = eMax 2405 | } else { 2406 | e = Math.floor(Math.log(value) / Math.LN2) 2407 | if (value * (c = Math.pow(2, -e)) < 1) { 2408 | e-- 2409 | c *= 2 2410 | } 2411 | if (e + eBias >= 1) { 2412 | value += rt / c 2413 | } else { 2414 | value += rt * Math.pow(2, 1 - eBias) 2415 | } 2416 | if (value * c >= 2) { 2417 | e++ 2418 | c /= 2 2419 | } 2420 | 2421 | if (e + eBias >= eMax) { 2422 | m = 0 2423 | e = eMax 2424 | } else if (e + eBias >= 1) { 2425 | m = (value * c - 1) * Math.pow(2, mLen) 2426 | e = e + eBias 2427 | } else { 2428 | m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) 2429 | e = 0 2430 | } 2431 | } 2432 | 2433 | for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} 2434 | 2435 | e = (e << mLen) | m 2436 | eLen += mLen 2437 | for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} 2438 | 2439 | buffer[offset + i - d] |= s * 128 2440 | } 2441 | 2442 | 2443 | /***/ }, 2444 | /* 6 */ 2445 | /***/ function(module, exports) { 2446 | 2447 | var toString = {}.toString; 2448 | 2449 | module.exports = Array.isArray || function (arr) { 2450 | return toString.call(arr) == '[object Array]'; 2451 | }; 2452 | 2453 | 2454 | /***/ }, 2455 | /* 7 */ 2456 | /***/ function(module, exports) { 2457 | 2458 | 'use strict'; 2459 | 2460 | module.exports = function bind(fn, thisArg) { 2461 | return function wrap() { 2462 | var args = new Array(arguments.length); 2463 | for (var i = 0; i < args.length; i++) { 2464 | args[i] = arguments[i]; 2465 | } 2466 | return fn.apply(thisArg, args); 2467 | }; 2468 | }; 2469 | 2470 | 2471 | /***/ }, 2472 | /* 8 */ 2473 | /***/ function(module, exports, __webpack_require__) { 2474 | 2475 | 'use strict'; 2476 | 2477 | var defaults = __webpack_require__(9); 2478 | var utils = __webpack_require__(2); 2479 | var InterceptorManager = __webpack_require__(20); 2480 | var dispatchRequest = __webpack_require__(21); 2481 | var isAbsoluteURL = __webpack_require__(24); 2482 | var combineURLs = __webpack_require__(25); 2483 | 2484 | /** 2485 | * Create a new instance of Axios 2486 | * 2487 | * @param {Object} instanceConfig The default config for the instance 2488 | */ 2489 | function Axios(instanceConfig) { 2490 | this.defaults = instanceConfig; 2491 | this.interceptors = { 2492 | request: new InterceptorManager(), 2493 | response: new InterceptorManager() 2494 | }; 2495 | } 2496 | 2497 | /** 2498 | * Dispatch a request 2499 | * 2500 | * @param {Object} config The config specific for this request (merged with this.defaults) 2501 | */ 2502 | Axios.prototype.request = function request(config) { 2503 | /*eslint no-param-reassign:0*/ 2504 | // Allow for axios('example/url'[, config]) a la fetch API 2505 | if (typeof config === 'string') { 2506 | config = utils.merge({ 2507 | url: arguments[0] 2508 | }, arguments[1]); 2509 | } 2510 | 2511 | config = utils.merge(defaults, this.defaults, { method: 'get' }, config); 2512 | 2513 | // Support baseURL config 2514 | if (config.baseURL && !isAbsoluteURL(config.url)) { 2515 | config.url = combineURLs(config.baseURL, config.url); 2516 | } 2517 | 2518 | // Hook up interceptors middleware 2519 | var chain = [dispatchRequest, undefined]; 2520 | var promise = Promise.resolve(config); 2521 | 2522 | this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { 2523 | chain.unshift(interceptor.fulfilled, interceptor.rejected); 2524 | }); 2525 | 2526 | this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { 2527 | chain.push(interceptor.fulfilled, interceptor.rejected); 2528 | }); 2529 | 2530 | while (chain.length) { 2531 | promise = promise.then(chain.shift(), chain.shift()); 2532 | } 2533 | 2534 | return promise; 2535 | }; 2536 | 2537 | // Provide aliases for supported request methods 2538 | utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { 2539 | /*eslint func-names:0*/ 2540 | Axios.prototype[method] = function(url, config) { 2541 | return this.request(utils.merge(config || {}, { 2542 | method: method, 2543 | url: url 2544 | })); 2545 | }; 2546 | }); 2547 | 2548 | utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { 2549 | /*eslint func-names:0*/ 2550 | Axios.prototype[method] = function(url, data, config) { 2551 | return this.request(utils.merge(config || {}, { 2552 | method: method, 2553 | url: url, 2554 | data: data 2555 | })); 2556 | }; 2557 | }); 2558 | 2559 | module.exports = Axios; 2560 | 2561 | 2562 | /***/ }, 2563 | /* 9 */ 2564 | /***/ function(module, exports, __webpack_require__) { 2565 | 2566 | 'use strict'; 2567 | 2568 | var utils = __webpack_require__(2); 2569 | var normalizeHeaderName = __webpack_require__(10); 2570 | 2571 | var DEFAULT_CONTENT_TYPE = { 2572 | 'Content-Type': 'application/x-www-form-urlencoded' 2573 | }; 2574 | 2575 | function setContentTypeIfUnset(headers, value) { 2576 | if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { 2577 | headers['Content-Type'] = value; 2578 | } 2579 | } 2580 | 2581 | function getDefaultAdapter() { 2582 | var adapter; 2583 | if (typeof XMLHttpRequest !== 'undefined') { 2584 | // For browsers use XHR adapter 2585 | adapter = __webpack_require__(11); 2586 | } else if (typeof process !== 'undefined') { 2587 | // For node use HTTP adapter 2588 | adapter = __webpack_require__(11); 2589 | } 2590 | return adapter; 2591 | } 2592 | 2593 | var defaults = { 2594 | adapter: getDefaultAdapter(), 2595 | 2596 | transformRequest: [function transformRequest(data, headers) { 2597 | normalizeHeaderName(headers, 'Content-Type'); 2598 | if (utils.isFormData(data) || 2599 | utils.isArrayBuffer(data) || 2600 | utils.isBuffer(data) || 2601 | utils.isStream(data) || 2602 | utils.isFile(data) || 2603 | utils.isBlob(data) 2604 | ) { 2605 | return data; 2606 | } 2607 | if (utils.isArrayBufferView(data)) { 2608 | return data.buffer; 2609 | } 2610 | if (utils.isURLSearchParams(data)) { 2611 | setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); 2612 | return data.toString(); 2613 | } 2614 | if (utils.isObject(data)) { 2615 | setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); 2616 | return JSON.stringify(data); 2617 | } 2618 | return data; 2619 | }], 2620 | 2621 | transformResponse: [function transformResponse(data) { 2622 | /*eslint no-param-reassign:0*/ 2623 | if (typeof data === 'string') { 2624 | try { 2625 | data = JSON.parse(data); 2626 | } catch (e) { /* Ignore */ } 2627 | } 2628 | return data; 2629 | }], 2630 | 2631 | timeout: 0, 2632 | 2633 | xsrfCookieName: 'XSRF-TOKEN', 2634 | xsrfHeaderName: 'X-XSRF-TOKEN', 2635 | 2636 | maxContentLength: -1, 2637 | 2638 | validateStatus: function validateStatus(status) { 2639 | return status >= 200 && status < 300; 2640 | } 2641 | }; 2642 | 2643 | defaults.headers = { 2644 | common: { 2645 | 'Accept': 'application/json, text/plain, */*' 2646 | } 2647 | }; 2648 | 2649 | utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { 2650 | defaults.headers[method] = {}; 2651 | }); 2652 | 2653 | utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { 2654 | defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); 2655 | }); 2656 | 2657 | module.exports = defaults; 2658 | 2659 | 2660 | /***/ }, 2661 | /* 10 */ 2662 | /***/ function(module, exports, __webpack_require__) { 2663 | 2664 | 'use strict'; 2665 | 2666 | var utils = __webpack_require__(2); 2667 | 2668 | module.exports = function normalizeHeaderName(headers, normalizedName) { 2669 | utils.forEach(headers, function processHeader(value, name) { 2670 | if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { 2671 | headers[normalizedName] = value; 2672 | delete headers[name]; 2673 | } 2674 | }); 2675 | }; 2676 | 2677 | 2678 | /***/ }, 2679 | /* 11 */ 2680 | /***/ function(module, exports, __webpack_require__) { 2681 | 2682 | 'use strict'; 2683 | 2684 | var utils = __webpack_require__(2); 2685 | var settle = __webpack_require__(12); 2686 | var buildURL = __webpack_require__(15); 2687 | var parseHeaders = __webpack_require__(16); 2688 | var isURLSameOrigin = __webpack_require__(17); 2689 | var createError = __webpack_require__(13); 2690 | var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(18); 2691 | 2692 | module.exports = function xhrAdapter(config) { 2693 | return new Promise(function dispatchXhrRequest(resolve, reject) { 2694 | var requestData = config.data; 2695 | var requestHeaders = config.headers; 2696 | 2697 | if (utils.isFormData(requestData)) { 2698 | delete requestHeaders['Content-Type']; // Let the browser set it 2699 | } 2700 | 2701 | var request = new XMLHttpRequest(); 2702 | var loadEvent = 'onreadystatechange'; 2703 | var xDomain = false; 2704 | 2705 | // For IE 8/9 CORS support 2706 | // Only supports POST and GET calls and doesn't returns the response headers. 2707 | // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest. 2708 | if (("production") !== 'test' && 2709 | typeof window !== 'undefined' && 2710 | window.XDomainRequest && !('withCredentials' in request) && 2711 | !isURLSameOrigin(config.url)) { 2712 | request = new window.XDomainRequest(); 2713 | loadEvent = 'onload'; 2714 | xDomain = true; 2715 | request.onprogress = function handleProgress() {}; 2716 | request.ontimeout = function handleTimeout() {}; 2717 | } 2718 | 2719 | // HTTP basic authentication 2720 | if (config.auth) { 2721 | var username = config.auth.username || ''; 2722 | var password = config.auth.password || ''; 2723 | requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); 2724 | } 2725 | 2726 | request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); 2727 | 2728 | // Set the request timeout in MS 2729 | request.timeout = config.timeout; 2730 | 2731 | // Listen for ready state 2732 | request[loadEvent] = function handleLoad() { 2733 | if (!request || (request.readyState !== 4 && !xDomain)) { 2734 | return; 2735 | } 2736 | 2737 | // The request errored out and we didn't get a response, this will be 2738 | // handled by onerror instead 2739 | // With one exception: request that using file: protocol, most browsers 2740 | // will return status as 0 even though it's a successful request 2741 | if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { 2742 | return; 2743 | } 2744 | 2745 | // Prepare the response 2746 | var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; 2747 | var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; 2748 | var response = { 2749 | data: responseData, 2750 | // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201) 2751 | status: request.status === 1223 ? 204 : request.status, 2752 | statusText: request.status === 1223 ? 'No Content' : request.statusText, 2753 | headers: responseHeaders, 2754 | config: config, 2755 | request: request 2756 | }; 2757 | 2758 | settle(resolve, reject, response); 2759 | 2760 | // Clean up request 2761 | request = null; 2762 | }; 2763 | 2764 | // Handle low level network errors 2765 | request.onerror = function handleError() { 2766 | // Real errors are hidden from us by the browser 2767 | // onerror should only fire if it's a network error 2768 | reject(createError('Network Error', config)); 2769 | 2770 | // Clean up request 2771 | request = null; 2772 | }; 2773 | 2774 | // Handle timeout 2775 | request.ontimeout = function handleTimeout() { 2776 | reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED')); 2777 | 2778 | // Clean up request 2779 | request = null; 2780 | }; 2781 | 2782 | // Add xsrf header 2783 | // This is only done if running in a standard browser environment. 2784 | // Specifically not if we're in a web worker, or react-native. 2785 | if (utils.isStandardBrowserEnv()) { 2786 | var cookies = __webpack_require__(19); 2787 | 2788 | // Add xsrf header 2789 | var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? 2790 | cookies.read(config.xsrfCookieName) : 2791 | undefined; 2792 | 2793 | if (xsrfValue) { 2794 | requestHeaders[config.xsrfHeaderName] = xsrfValue; 2795 | } 2796 | } 2797 | 2798 | // Add headers to the request 2799 | if ('setRequestHeader' in request) { 2800 | utils.forEach(requestHeaders, function setRequestHeader(val, key) { 2801 | if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { 2802 | // Remove Content-Type if data is undefined 2803 | delete requestHeaders[key]; 2804 | } else { 2805 | // Otherwise add header to the request 2806 | request.setRequestHeader(key, val); 2807 | } 2808 | }); 2809 | } 2810 | 2811 | // Add withCredentials to request if needed 2812 | if (config.withCredentials) { 2813 | request.withCredentials = true; 2814 | } 2815 | 2816 | // Add responseType to request if needed 2817 | if (config.responseType) { 2818 | try { 2819 | request.responseType = config.responseType; 2820 | } catch (e) { 2821 | // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. 2822 | // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. 2823 | if (config.responseType !== 'json') { 2824 | throw e; 2825 | } 2826 | } 2827 | } 2828 | 2829 | // Handle progress if needed 2830 | if (typeof config.onDownloadProgress === 'function') { 2831 | request.addEventListener('progress', config.onDownloadProgress); 2832 | } 2833 | 2834 | // Not all browsers support upload events 2835 | if (typeof config.onUploadProgress === 'function' && request.upload) { 2836 | request.upload.addEventListener('progress', config.onUploadProgress); 2837 | } 2838 | 2839 | if (config.cancelToken) { 2840 | // Handle cancellation 2841 | config.cancelToken.promise.then(function onCanceled(cancel) { 2842 | if (!request) { 2843 | return; 2844 | } 2845 | 2846 | request.abort(); 2847 | reject(cancel); 2848 | // Clean up request 2849 | request = null; 2850 | }); 2851 | } 2852 | 2853 | if (requestData === undefined) { 2854 | requestData = null; 2855 | } 2856 | 2857 | // Send the request 2858 | request.send(requestData); 2859 | }); 2860 | }; 2861 | 2862 | 2863 | /***/ }, 2864 | /* 12 */ 2865 | /***/ function(module, exports, __webpack_require__) { 2866 | 2867 | 'use strict'; 2868 | 2869 | var createError = __webpack_require__(13); 2870 | 2871 | /** 2872 | * Resolve or reject a Promise based on response status. 2873 | * 2874 | * @param {Function} resolve A function that resolves the promise. 2875 | * @param {Function} reject A function that rejects the promise. 2876 | * @param {object} response The response. 2877 | */ 2878 | module.exports = function settle(resolve, reject, response) { 2879 | var validateStatus = response.config.validateStatus; 2880 | // Note: status is not exposed by XDomainRequest 2881 | if (!response.status || !validateStatus || validateStatus(response.status)) { 2882 | resolve(response); 2883 | } else { 2884 | reject(createError( 2885 | 'Request failed with status code ' + response.status, 2886 | response.config, 2887 | null, 2888 | response 2889 | )); 2890 | } 2891 | }; 2892 | 2893 | 2894 | /***/ }, 2895 | /* 13 */ 2896 | /***/ function(module, exports, __webpack_require__) { 2897 | 2898 | 'use strict'; 2899 | 2900 | var enhanceError = __webpack_require__(14); 2901 | 2902 | /** 2903 | * Create an Error with the specified message, config, error code, and response. 2904 | * 2905 | * @param {string} message The error message. 2906 | * @param {Object} config The config. 2907 | * @param {string} [code] The error code (for example, 'ECONNABORTED'). 2908 | @ @param {Object} [response] The response. 2909 | * @returns {Error} The created error. 2910 | */ 2911 | module.exports = function createError(message, config, code, response) { 2912 | var error = new Error(message); 2913 | return enhanceError(error, config, code, response); 2914 | }; 2915 | 2916 | 2917 | /***/ }, 2918 | /* 14 */ 2919 | /***/ function(module, exports) { 2920 | 2921 | 'use strict'; 2922 | 2923 | /** 2924 | * Update an Error with the specified config, error code, and response. 2925 | * 2926 | * @param {Error} error The error to update. 2927 | * @param {Object} config The config. 2928 | * @param {string} [code] The error code (for example, 'ECONNABORTED'). 2929 | @ @param {Object} [response] The response. 2930 | * @returns {Error} The error. 2931 | */ 2932 | module.exports = function enhanceError(error, config, code, response) { 2933 | error.config = config; 2934 | if (code) { 2935 | error.code = code; 2936 | } 2937 | error.response = response; 2938 | return error; 2939 | }; 2940 | 2941 | 2942 | /***/ }, 2943 | /* 15 */ 2944 | /***/ function(module, exports, __webpack_require__) { 2945 | 2946 | 'use strict'; 2947 | 2948 | var utils = __webpack_require__(2); 2949 | 2950 | function encode(val) { 2951 | return encodeURIComponent(val). 2952 | replace(/%40/gi, '@'). 2953 | replace(/%3A/gi, ':'). 2954 | replace(/%24/g, '$'). 2955 | replace(/%2C/gi, ','). 2956 | replace(/%20/g, '+'). 2957 | replace(/%5B/gi, '['). 2958 | replace(/%5D/gi, ']'); 2959 | } 2960 | 2961 | /** 2962 | * Build a URL by appending params to the end 2963 | * 2964 | * @param {string} url The base of the url (e.g., http://www.google.com) 2965 | * @param {object} [params] The params to be appended 2966 | * @returns {string} The formatted url 2967 | */ 2968 | module.exports = function buildURL(url, params, paramsSerializer) { 2969 | /*eslint no-param-reassign:0*/ 2970 | if (!params) { 2971 | return url; 2972 | } 2973 | 2974 | var serializedParams; 2975 | if (paramsSerializer) { 2976 | serializedParams = paramsSerializer(params); 2977 | } else if (utils.isURLSearchParams(params)) { 2978 | serializedParams = params.toString(); 2979 | } else { 2980 | var parts = []; 2981 | 2982 | utils.forEach(params, function serialize(val, key) { 2983 | if (val === null || typeof val === 'undefined') { 2984 | return; 2985 | } 2986 | 2987 | if (utils.isArray(val)) { 2988 | key = key + '[]'; 2989 | } 2990 | 2991 | if (!utils.isArray(val)) { 2992 | val = [val]; 2993 | } 2994 | 2995 | utils.forEach(val, function parseValue(v) { 2996 | if (utils.isDate(v)) { 2997 | v = v.toISOString(); 2998 | } else if (utils.isObject(v)) { 2999 | v = JSON.stringify(v); 3000 | } 3001 | parts.push(encode(key) + '=' + encode(v)); 3002 | }); 3003 | }); 3004 | 3005 | serializedParams = parts.join('&'); 3006 | } 3007 | 3008 | if (serializedParams) { 3009 | url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; 3010 | } 3011 | 3012 | return url; 3013 | }; 3014 | 3015 | 3016 | /***/ }, 3017 | /* 16 */ 3018 | /***/ function(module, exports, __webpack_require__) { 3019 | 3020 | 'use strict'; 3021 | 3022 | var utils = __webpack_require__(2); 3023 | 3024 | /** 3025 | * Parse headers into an object 3026 | * 3027 | * ``` 3028 | * Date: Wed, 27 Aug 2014 08:58:49 GMT 3029 | * Content-Type: application/json 3030 | * Connection: keep-alive 3031 | * Transfer-Encoding: chunked 3032 | * ``` 3033 | * 3034 | * @param {String} headers Headers needing to be parsed 3035 | * @returns {Object} Headers parsed into an object 3036 | */ 3037 | module.exports = function parseHeaders(headers) { 3038 | var parsed = {}; 3039 | var key; 3040 | var val; 3041 | var i; 3042 | 3043 | if (!headers) { return parsed; } 3044 | 3045 | utils.forEach(headers.split('\n'), function parser(line) { 3046 | i = line.indexOf(':'); 3047 | key = utils.trim(line.substr(0, i)).toLowerCase(); 3048 | val = utils.trim(line.substr(i + 1)); 3049 | 3050 | if (key) { 3051 | parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; 3052 | } 3053 | }); 3054 | 3055 | return parsed; 3056 | }; 3057 | 3058 | 3059 | /***/ }, 3060 | /* 17 */ 3061 | /***/ function(module, exports, __webpack_require__) { 3062 | 3063 | 'use strict'; 3064 | 3065 | var utils = __webpack_require__(2); 3066 | 3067 | module.exports = ( 3068 | utils.isStandardBrowserEnv() ? 3069 | 3070 | // Standard browser envs have full support of the APIs needed to test 3071 | // whether the request URL is of the same origin as current location. 3072 | (function standardBrowserEnv() { 3073 | var msie = /(msie|trident)/i.test(navigator.userAgent); 3074 | var urlParsingNode = document.createElement('a'); 3075 | var originURL; 3076 | 3077 | /** 3078 | * Parse a URL to discover it's components 3079 | * 3080 | * @param {String} url The URL to be parsed 3081 | * @returns {Object} 3082 | */ 3083 | function resolveURL(url) { 3084 | var href = url; 3085 | 3086 | if (msie) { 3087 | // IE needs attribute set twice to normalize properties 3088 | urlParsingNode.setAttribute('href', href); 3089 | href = urlParsingNode.href; 3090 | } 3091 | 3092 | urlParsingNode.setAttribute('href', href); 3093 | 3094 | // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils 3095 | return { 3096 | href: urlParsingNode.href, 3097 | protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', 3098 | host: urlParsingNode.host, 3099 | search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', 3100 | hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', 3101 | hostname: urlParsingNode.hostname, 3102 | port: urlParsingNode.port, 3103 | pathname: (urlParsingNode.pathname.charAt(0) === '/') ? 3104 | urlParsingNode.pathname : 3105 | '/' + urlParsingNode.pathname 3106 | }; 3107 | } 3108 | 3109 | originURL = resolveURL(window.location.href); 3110 | 3111 | /** 3112 | * Determine if a URL shares the same origin as the current location 3113 | * 3114 | * @param {String} requestURL The URL to test 3115 | * @returns {boolean} True if URL shares the same origin, otherwise false 3116 | */ 3117 | return function isURLSameOrigin(requestURL) { 3118 | var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; 3119 | return (parsed.protocol === originURL.protocol && 3120 | parsed.host === originURL.host); 3121 | }; 3122 | })() : 3123 | 3124 | // Non standard browser envs (web workers, react-native) lack needed support. 3125 | (function nonStandardBrowserEnv() { 3126 | return function isURLSameOrigin() { 3127 | return true; 3128 | }; 3129 | })() 3130 | ); 3131 | 3132 | 3133 | /***/ }, 3134 | /* 18 */ 3135 | /***/ function(module, exports) { 3136 | 3137 | 'use strict'; 3138 | 3139 | // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js 3140 | 3141 | var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; 3142 | 3143 | function E() { 3144 | this.message = 'String contains an invalid character'; 3145 | } 3146 | E.prototype = new Error; 3147 | E.prototype.code = 5; 3148 | E.prototype.name = 'InvalidCharacterError'; 3149 | 3150 | function btoa(input) { 3151 | var str = String(input); 3152 | var output = ''; 3153 | for ( 3154 | // initialize result and counter 3155 | var block, charCode, idx = 0, map = chars; 3156 | // if the next str index does not exist: 3157 | // change the mapping table to "=" 3158 | // check if d has no fractional digits 3159 | str.charAt(idx | 0) || (map = '=', idx % 1); 3160 | // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 3161 | output += map.charAt(63 & block >> 8 - idx % 1 * 8) 3162 | ) { 3163 | charCode = str.charCodeAt(idx += 3 / 4); 3164 | if (charCode > 0xFF) { 3165 | throw new E(); 3166 | } 3167 | block = block << 8 | charCode; 3168 | } 3169 | return output; 3170 | } 3171 | 3172 | module.exports = btoa; 3173 | 3174 | 3175 | /***/ }, 3176 | /* 19 */ 3177 | /***/ function(module, exports, __webpack_require__) { 3178 | 3179 | 'use strict'; 3180 | 3181 | var utils = __webpack_require__(2); 3182 | 3183 | module.exports = ( 3184 | utils.isStandardBrowserEnv() ? 3185 | 3186 | // Standard browser envs support document.cookie 3187 | (function standardBrowserEnv() { 3188 | return { 3189 | write: function write(name, value, expires, path, domain, secure) { 3190 | var cookie = []; 3191 | cookie.push(name + '=' + encodeURIComponent(value)); 3192 | 3193 | if (utils.isNumber(expires)) { 3194 | cookie.push('expires=' + new Date(expires).toGMTString()); 3195 | } 3196 | 3197 | if (utils.isString(path)) { 3198 | cookie.push('path=' + path); 3199 | } 3200 | 3201 | if (utils.isString(domain)) { 3202 | cookie.push('domain=' + domain); 3203 | } 3204 | 3205 | if (secure === true) { 3206 | cookie.push('secure'); 3207 | } 3208 | 3209 | document.cookie = cookie.join('; '); 3210 | }, 3211 | 3212 | read: function read(name) { 3213 | var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); 3214 | return (match ? decodeURIComponent(match[3]) : null); 3215 | }, 3216 | 3217 | remove: function remove(name) { 3218 | this.write(name, '', Date.now() - 86400000); 3219 | } 3220 | }; 3221 | })() : 3222 | 3223 | // Non standard browser env (web workers, react-native) lack needed support. 3224 | (function nonStandardBrowserEnv() { 3225 | return { 3226 | write: function write() {}, 3227 | read: function read() { return null; }, 3228 | remove: function remove() {} 3229 | }; 3230 | })() 3231 | ); 3232 | 3233 | 3234 | /***/ }, 3235 | /* 20 */ 3236 | /***/ function(module, exports, __webpack_require__) { 3237 | 3238 | 'use strict'; 3239 | 3240 | var utils = __webpack_require__(2); 3241 | 3242 | function InterceptorManager() { 3243 | this.handlers = []; 3244 | } 3245 | 3246 | /** 3247 | * Add a new interceptor to the stack 3248 | * 3249 | * @param {Function} fulfilled The function to handle `then` for a `Promise` 3250 | * @param {Function} rejected The function to handle `reject` for a `Promise` 3251 | * 3252 | * @return {Number} An ID used to remove interceptor later 3253 | */ 3254 | InterceptorManager.prototype.use = function use(fulfilled, rejected) { 3255 | this.handlers.push({ 3256 | fulfilled: fulfilled, 3257 | rejected: rejected 3258 | }); 3259 | return this.handlers.length - 1; 3260 | }; 3261 | 3262 | /** 3263 | * Remove an interceptor from the stack 3264 | * 3265 | * @param {Number} id The ID that was returned by `use` 3266 | */ 3267 | InterceptorManager.prototype.eject = function eject(id) { 3268 | if (this.handlers[id]) { 3269 | this.handlers[id] = null; 3270 | } 3271 | }; 3272 | 3273 | /** 3274 | * Iterate over all the registered interceptors 3275 | * 3276 | * This method is particularly useful for skipping over any 3277 | * interceptors that may have become `null` calling `eject`. 3278 | * 3279 | * @param {Function} fn The function to call for each interceptor 3280 | */ 3281 | InterceptorManager.prototype.forEach = function forEach(fn) { 3282 | utils.forEach(this.handlers, function forEachHandler(h) { 3283 | if (h !== null) { 3284 | fn(h); 3285 | } 3286 | }); 3287 | }; 3288 | 3289 | module.exports = InterceptorManager; 3290 | 3291 | 3292 | /***/ }, 3293 | /* 21 */ 3294 | /***/ function(module, exports, __webpack_require__) { 3295 | 3296 | 'use strict'; 3297 | 3298 | var utils = __webpack_require__(2); 3299 | var transformData = __webpack_require__(22); 3300 | var isCancel = __webpack_require__(23); 3301 | var defaults = __webpack_require__(9); 3302 | 3303 | /** 3304 | * Throws a `Cancel` if cancellation has been requested. 3305 | */ 3306 | function throwIfCancellationRequested(config) { 3307 | if (config.cancelToken) { 3308 | config.cancelToken.throwIfRequested(); 3309 | } 3310 | } 3311 | 3312 | /** 3313 | * Dispatch a request to the server using the configured adapter. 3314 | * 3315 | * @param {object} config The config that is to be used for the request 3316 | * @returns {Promise} The Promise to be fulfilled 3317 | */ 3318 | module.exports = function dispatchRequest(config) { 3319 | throwIfCancellationRequested(config); 3320 | 3321 | // Ensure headers exist 3322 | config.headers = config.headers || {}; 3323 | 3324 | // Transform request data 3325 | config.data = transformData( 3326 | config.data, 3327 | config.headers, 3328 | config.transformRequest 3329 | ); 3330 | 3331 | // Flatten headers 3332 | config.headers = utils.merge( 3333 | config.headers.common || {}, 3334 | config.headers[config.method] || {}, 3335 | config.headers || {} 3336 | ); 3337 | 3338 | utils.forEach( 3339 | ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], 3340 | function cleanHeaderConfig(method) { 3341 | delete config.headers[method]; 3342 | } 3343 | ); 3344 | 3345 | var adapter = config.adapter || defaults.adapter; 3346 | 3347 | return adapter(config).then(function onAdapterResolution(response) { 3348 | throwIfCancellationRequested(config); 3349 | 3350 | // Transform response data 3351 | response.data = transformData( 3352 | response.data, 3353 | response.headers, 3354 | config.transformResponse 3355 | ); 3356 | 3357 | return response; 3358 | }, function onAdapterRejection(reason) { 3359 | if (!isCancel(reason)) { 3360 | throwIfCancellationRequested(config); 3361 | 3362 | // Transform response data 3363 | if (reason && reason.response) { 3364 | reason.response.data = transformData( 3365 | reason.response.data, 3366 | reason.response.headers, 3367 | config.transformResponse 3368 | ); 3369 | } 3370 | } 3371 | 3372 | return Promise.reject(reason); 3373 | }); 3374 | }; 3375 | 3376 | 3377 | /***/ }, 3378 | /* 22 */ 3379 | /***/ function(module, exports, __webpack_require__) { 3380 | 3381 | 'use strict'; 3382 | 3383 | var utils = __webpack_require__(2); 3384 | 3385 | /** 3386 | * Transform the data for a request or a response 3387 | * 3388 | * @param {Object|String} data The data to be transformed 3389 | * @param {Array} headers The headers for the request or response 3390 | * @param {Array|Function} fns A single function or Array of functions 3391 | * @returns {*} The resulting transformed data 3392 | */ 3393 | module.exports = function transformData(data, headers, fns) { 3394 | /*eslint no-param-reassign:0*/ 3395 | utils.forEach(fns, function transform(fn) { 3396 | data = fn(data, headers); 3397 | }); 3398 | 3399 | return data; 3400 | }; 3401 | 3402 | 3403 | /***/ }, 3404 | /* 23 */ 3405 | /***/ function(module, exports) { 3406 | 3407 | 'use strict'; 3408 | 3409 | module.exports = function isCancel(value) { 3410 | return !!(value && value.__CANCEL__); 3411 | }; 3412 | 3413 | 3414 | /***/ }, 3415 | /* 24 */ 3416 | /***/ function(module, exports) { 3417 | 3418 | 'use strict'; 3419 | 3420 | /** 3421 | * Determines whether the specified URL is absolute 3422 | * 3423 | * @param {string} url The URL to test 3424 | * @returns {boolean} True if the specified URL is absolute, otherwise false 3425 | */ 3426 | module.exports = function isAbsoluteURL(url) { 3427 | // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). 3428 | // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed 3429 | // by any combination of letters, digits, plus, period, or hyphen. 3430 | return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); 3431 | }; 3432 | 3433 | 3434 | /***/ }, 3435 | /* 25 */ 3436 | /***/ function(module, exports) { 3437 | 3438 | 'use strict'; 3439 | 3440 | /** 3441 | * Creates a new URL by combining the specified URLs 3442 | * 3443 | * @param {string} baseURL The base URL 3444 | * @param {string} relativeURL The relative URL 3445 | * @returns {string} The combined URL 3446 | */ 3447 | module.exports = function combineURLs(baseURL, relativeURL) { 3448 | return relativeURL 3449 | ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') 3450 | : baseURL; 3451 | }; 3452 | 3453 | 3454 | /***/ }, 3455 | /* 26 */ 3456 | /***/ function(module, exports) { 3457 | 3458 | 'use strict'; 3459 | 3460 | /** 3461 | * A `Cancel` is an object that is thrown when an operation is canceled. 3462 | * 3463 | * @class 3464 | * @param {string=} message The message. 3465 | */ 3466 | function Cancel(message) { 3467 | this.message = message; 3468 | } 3469 | 3470 | Cancel.prototype.toString = function toString() { 3471 | return 'Cancel' + (this.message ? ': ' + this.message : ''); 3472 | }; 3473 | 3474 | Cancel.prototype.__CANCEL__ = true; 3475 | 3476 | module.exports = Cancel; 3477 | 3478 | 3479 | /***/ }, 3480 | /* 27 */ 3481 | /***/ function(module, exports, __webpack_require__) { 3482 | 3483 | 'use strict'; 3484 | 3485 | var Cancel = __webpack_require__(26); 3486 | 3487 | /** 3488 | * A `CancelToken` is an object that can be used to request cancellation of an operation. 3489 | * 3490 | * @class 3491 | * @param {Function} executor The executor function. 3492 | */ 3493 | function CancelToken(executor) { 3494 | if (typeof executor !== 'function') { 3495 | throw new TypeError('executor must be a function.'); 3496 | } 3497 | 3498 | var resolvePromise; 3499 | this.promise = new Promise(function promiseExecutor(resolve) { 3500 | resolvePromise = resolve; 3501 | }); 3502 | 3503 | var token = this; 3504 | executor(function cancel(message) { 3505 | if (token.reason) { 3506 | // Cancellation has already been requested 3507 | return; 3508 | } 3509 | 3510 | token.reason = new Cancel(message); 3511 | resolvePromise(token.reason); 3512 | }); 3513 | } 3514 | 3515 | /** 3516 | * Throws a `Cancel` if cancellation has been requested. 3517 | */ 3518 | CancelToken.prototype.throwIfRequested = function throwIfRequested() { 3519 | if (this.reason) { 3520 | throw this.reason; 3521 | } 3522 | }; 3523 | 3524 | /** 3525 | * Returns an object that contains a new `CancelToken` and a function that, when called, 3526 | * cancels the `CancelToken`. 3527 | */ 3528 | CancelToken.source = function source() { 3529 | var cancel; 3530 | var token = new CancelToken(function executor(c) { 3531 | cancel = c; 3532 | }); 3533 | return { 3534 | token: token, 3535 | cancel: cancel 3536 | }; 3537 | }; 3538 | 3539 | module.exports = CancelToken; 3540 | 3541 | 3542 | /***/ }, 3543 | /* 28 */ 3544 | /***/ function(module, exports) { 3545 | 3546 | 'use strict'; 3547 | 3548 | /** 3549 | * Syntactic sugar for invoking a function and expanding an array for arguments. 3550 | * 3551 | * Common use case would be to use `Function.prototype.apply`. 3552 | * 3553 | * ```js 3554 | * function f(x, y, z) {} 3555 | * var args = [1, 2, 3]; 3556 | * f.apply(null, args); 3557 | * ``` 3558 | * 3559 | * With `spread` this example can be re-written. 3560 | * 3561 | * ```js 3562 | * spread(function(x, y, z) {})([1, 2, 3]); 3563 | * ``` 3564 | * 3565 | * @param {Function} callback 3566 | * @returns {Function} 3567 | */ 3568 | module.exports = function spread(callback) { 3569 | return function wrap(arr) { 3570 | return callback.apply(null, arr); 3571 | }; 3572 | }; 3573 | 3574 | 3575 | /***/ } 3576 | /******/ ]) 3577 | }); 3578 | ; 3579 | //# sourceMappingURL=axios.map -------------------------------------------------------------------------------- /node_modules/vue2-animate/dist/vue2-animate.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /*! 3 | * vue2-animate v1.0.4 4 | * (c) 2016 Simon Asika 5 | * Released under the MIT License. 6 | * Documentation: https://github.com/asika32764/vue2-animate 7 | */ 8 | @keyframes bounceIn { 9 | from, 10 | 20%, 11 | 40%, 12 | 60%, 13 | 80%, 14 | to { 15 | animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); 16 | } 17 | 0% { 18 | opacity: 0; 19 | transform: scale3d(0.3, 0.3, 0.3); 20 | } 21 | 20% { 22 | transform: scale3d(1.1, 1.1, 1.1); 23 | } 24 | 40% { 25 | transform: scale3d(0.9, 0.9, 0.9); 26 | } 27 | 60% { 28 | opacity: 1; 29 | transform: scale3d(1.03, 1.03, 1.03); 30 | } 31 | 80% { 32 | transform: scale3d(0.97, 0.97, 0.97); 33 | } 34 | to { 35 | opacity: 1; 36 | transform: scale3d(1, 1, 1); 37 | } 38 | } 39 | @keyframes bounceOut { 40 | 20% { 41 | transform: scale3d(0.9, 0.9, 0.9); 42 | } 43 | 50%, 44 | 55% { 45 | opacity: 1; 46 | transform: scale3d(1.1, 1.1, 1.1); 47 | } 48 | to { 49 | opacity: 0; 50 | transform: scale3d(0.3, 0.3, 0.3); 51 | } 52 | } 53 | @keyframes bounceInDown { 54 | from, 55 | 60%, 56 | 75%, 57 | 90%, 58 | to { 59 | animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); 60 | } 61 | 0% { 62 | opacity: 0; 63 | transform: translate3d(0, -3000px, 0); 64 | } 65 | 60% { 66 | opacity: 1; 67 | transform: translate3d(0, 25px, 0); 68 | } 69 | 75% { 70 | transform: translate3d(0, -10px, 0); 71 | } 72 | 90% { 73 | transform: translate3d(0, 5px, 0); 74 | } 75 | to { 76 | transform: none; 77 | } 78 | } 79 | @keyframes bounceOutDown { 80 | 20% { 81 | transform: translate3d(0, 10px, 0); 82 | } 83 | 40%, 84 | 45% { 85 | opacity: 1; 86 | transform: translate3d(0, -20px, 0); 87 | } 88 | to { 89 | opacity: 0; 90 | transform: translate3d(0, 2000px, 0); 91 | } 92 | } 93 | @keyframes bounceInLeft { 94 | from, 95 | 60%, 96 | 75%, 97 | 90%, 98 | to { 99 | animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); 100 | } 101 | 0% { 102 | opacity: 0; 103 | transform: translate3d(-3000px, 0, 0); 104 | } 105 | 60% { 106 | opacity: 1; 107 | transform: translate3d(25px, 0, 0); 108 | } 109 | 75% { 110 | transform: translate3d(-10px, 0, 0); 111 | } 112 | 90% { 113 | transform: translate3d(5px, 0, 0); 114 | } 115 | to { 116 | transform: none; 117 | } 118 | } 119 | @keyframes bounceOutLeft { 120 | 20% { 121 | opacity: 1; 122 | transform: translate3d(20px, 0, 0); 123 | } 124 | to { 125 | opacity: 0; 126 | transform: translate3d(-2000px, 0, 0); 127 | } 128 | } 129 | @keyframes bounceInRight { 130 | from, 131 | 60%, 132 | 75%, 133 | 90%, 134 | to { 135 | animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); 136 | } 137 | from { 138 | opacity: 0; 139 | transform: translate3d(3000px, 0, 0); 140 | } 141 | 60% { 142 | opacity: 1; 143 | transform: translate3d(-25px, 0, 0); 144 | } 145 | 75% { 146 | transform: translate3d(10px, 0, 0); 147 | } 148 | 90% { 149 | transform: translate3d(-5px, 0, 0); 150 | } 151 | to { 152 | transform: none; 153 | } 154 | } 155 | @keyframes bounceOutRight { 156 | 20% { 157 | opacity: 1; 158 | transform: translate3d(-20px, 0, 0); 159 | } 160 | to { 161 | opacity: 0; 162 | transform: translate3d(2000px, 0, 0); 163 | } 164 | } 165 | @keyframes bounceInUp { 166 | from, 167 | 60%, 168 | 75%, 169 | 90%, 170 | to { 171 | animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); 172 | } 173 | from { 174 | opacity: 0; 175 | transform: translate3d(0, 3000px, 0); 176 | } 177 | 60% { 178 | opacity: 1; 179 | transform: translate3d(0, -20px, 0); 180 | } 181 | 75% { 182 | transform: translate3d(0, 10px, 0); 183 | } 184 | 90% { 185 | transform: translate3d(0, -5px, 0); 186 | } 187 | to { 188 | transform: translate3d(0, 0, 0); 189 | } 190 | } 191 | @keyframes bounceOutUp { 192 | 20% { 193 | transform: translate3d(0, -10px, 0); 194 | } 195 | 40%, 196 | 45% { 197 | opacity: 1; 198 | transform: translate3d(0, 20px, 0); 199 | } 200 | to { 201 | opacity: 0; 202 | transform: translate3d(0, -2000px, 0); 203 | } 204 | } 205 | .bounce-enter-active, 206 | .bounceIn, 207 | .bounce-leave-active, 208 | .bounceOut { 209 | animation-duration: 1s; 210 | animation-fill-mode: both; 211 | } 212 | .bounce-enter-active, 213 | .bounceIn { 214 | animation-name: bounceIn; 215 | } 216 | .bounce-leave-active, 217 | .bounceOut { 218 | animation-name: bounceOut; 219 | } 220 | .bounceUp-enter-active, 221 | .bounceInUp, 222 | .bounceUp-leave-active, 223 | .bounceOutUp { 224 | animation-duration: 1s; 225 | animation-fill-mode: both; 226 | } 227 | .bounceUp-enter-active, 228 | .bounceInUp { 229 | animation-name: bounceInUp; 230 | } 231 | .bounceUp-leave-active, 232 | .bounceOutUp { 233 | animation-name: bounceOutUp; 234 | } 235 | .bounceRight-enter-active, 236 | .bounceInRight, 237 | .bounceRight-leave-active, 238 | .bounceOutRight { 239 | animation-duration: 1s; 240 | animation-fill-mode: both; 241 | } 242 | .bounceRight-enter-active, 243 | .bounceInRight { 244 | animation-name: bounceInRight; 245 | } 246 | .bounceRight-leave-active, 247 | .bounceOutRight { 248 | animation-name: bounceOutRight; 249 | } 250 | .bounceLeft-enter-active, 251 | .bounceInLeft, 252 | .bounceLeft-leave-active, 253 | .bounceOutLeft { 254 | animation-duration: 1s; 255 | animation-fill-mode: both; 256 | } 257 | .bounceLeft-enter-active, 258 | .bounceInLeft { 259 | animation-name: bounceInLeft; 260 | } 261 | .bounceLeft-leave-active, 262 | .bounceOutLeft { 263 | animation-name: bounceOutLeft; 264 | } 265 | .bounceDown-enter-active, 266 | .bounceInDown, 267 | .bounceDown-leave-active, 268 | .bounceOutDown { 269 | animation-duration: 1s; 270 | animation-fill-mode: both; 271 | } 272 | .bounceDown-enter-active, 273 | .bounceInDown { 274 | animation-name: bounceInDown; 275 | } 276 | .bounceDown-leave-active, 277 | .bounceOutDown { 278 | animation-name: bounceOutDown; 279 | } 280 | @keyframes fadeIn { 281 | from { 282 | opacity: 0; 283 | } 284 | to { 285 | opacity: 1; 286 | } 287 | } 288 | @keyframes fadeOut { 289 | from { 290 | opacity: 1; 291 | } 292 | to { 293 | opacity: 0; 294 | } 295 | } 296 | @keyframes fadeInDown { 297 | from { 298 | opacity: 0; 299 | transform: translate3d(0, -100%, 0); 300 | } 301 | to { 302 | opacity: 1; 303 | transform: none; 304 | } 305 | } 306 | @keyframes fadeOutDown { 307 | from { 308 | opacity: 1; 309 | } 310 | to { 311 | opacity: 0; 312 | transform: translate3d(0, 100%, 0); 313 | } 314 | } 315 | @keyframes fadeInDownBig { 316 | from { 317 | opacity: 0; 318 | transform: translate3d(0, -2000px, 0); 319 | } 320 | to { 321 | opacity: 1; 322 | transform: none; 323 | } 324 | } 325 | @keyframes fadeOutDownBig { 326 | from { 327 | opacity: 1; 328 | } 329 | to { 330 | opacity: 0; 331 | transform: translate3d(0, 2000px, 0); 332 | } 333 | } 334 | @keyframes fadeInLeft { 335 | from { 336 | opacity: 0; 337 | transform: translate3d(-100%, 0, 0); 338 | } 339 | to { 340 | opacity: 1; 341 | transform: none; 342 | } 343 | } 344 | @keyframes fadeOutLeft { 345 | from { 346 | opacity: 1; 347 | } 348 | to { 349 | opacity: 0; 350 | transform: translate3d(-100%, 0, 0); 351 | } 352 | } 353 | @keyframes fadeInLeftBig { 354 | from { 355 | opacity: 0; 356 | transform: translate3d(-2000px, 0, 0); 357 | } 358 | to { 359 | opacity: 1; 360 | transform: none; 361 | } 362 | } 363 | @keyframes fadeOutLeftBig { 364 | from { 365 | opacity: 1; 366 | } 367 | to { 368 | opacity: 0; 369 | transform: translate3d(-2000px, 0, 0); 370 | } 371 | } 372 | @keyframes fadeInRight { 373 | from { 374 | opacity: 0; 375 | transform: translate3d(100%, 0, 0); 376 | } 377 | to { 378 | opacity: 1; 379 | transform: none; 380 | } 381 | } 382 | @keyframes fadeOutRight { 383 | from { 384 | opacity: 1; 385 | } 386 | to { 387 | opacity: 0; 388 | transform: translate3d(100%, 0, 0); 389 | } 390 | } 391 | @keyframes fadeInRightBig { 392 | from { 393 | opacity: 0; 394 | transform: translate3d(2000px, 0, 0); 395 | } 396 | to { 397 | opacity: 1; 398 | transform: none; 399 | } 400 | } 401 | @keyframes fadeOutRightBig { 402 | from { 403 | opacity: 1; 404 | } 405 | to { 406 | opacity: 0; 407 | transform: translate3d(2000px, 0, 0); 408 | } 409 | } 410 | @keyframes fadeInUp { 411 | from { 412 | opacity: 0; 413 | transform: translate3d(0, 100%, 0); 414 | } 415 | to { 416 | opacity: 1; 417 | transform: none; 418 | } 419 | } 420 | @keyframes fadeOutUp { 421 | from { 422 | opacity: 1; 423 | } 424 | to { 425 | opacity: 0; 426 | transform: translate3d(0, -100%, 0); 427 | } 428 | } 429 | @keyframes fadeInUpBig { 430 | from { 431 | opacity: 0; 432 | transform: translate3d(0, 2000px, 0); 433 | } 434 | to { 435 | opacity: 1; 436 | transform: none; 437 | } 438 | } 439 | @keyframes fadeOutUp { 440 | from { 441 | opacity: 1; 442 | } 443 | to { 444 | opacity: 0; 445 | transform: translate3d(0, -100%, 0); 446 | } 447 | } 448 | .fade-enter-active, 449 | .fadeIn, 450 | .fade-leave-active, 451 | .fadeOut { 452 | animation-duration: 1s; 453 | animation-fill-mode: both; 454 | } 455 | .fade-enter-active, 456 | .fadeIn { 457 | animation-name: fadeIn; 458 | } 459 | .fade-leave-active, 460 | .fadeOut { 461 | animation-name: fadeOut; 462 | } 463 | .fadeUpBig-enter-active, 464 | .fadeInUpBig, 465 | .fadeUpBig-leave-active, 466 | .fadeOutUpBig { 467 | animation-duration: 1s; 468 | animation-fill-mode: both; 469 | } 470 | .fadeUpBig-enter-active, 471 | .fadeInUpBig { 472 | animation-name: fadeInUpBig; 473 | } 474 | .fadeUpBig-leave-active, 475 | .fadeOutUpBig { 476 | animation-name: fadeOutUpBig; 477 | } 478 | .fadeUp-enter-active, 479 | .fadeInUp, 480 | .fadeUp-leave-active, 481 | .fadeOutUp { 482 | animation-duration: 1s; 483 | animation-fill-mode: both; 484 | } 485 | .fadeUp-enter-active, 486 | .fadeInUp { 487 | animation-name: fadeInUp; 488 | } 489 | .fadeUp-leave-active, 490 | .fadeOutUp { 491 | animation-name: fadeOutUp; 492 | } 493 | .fadeRightBig-enter-active, 494 | .fadeInRightBig, 495 | .fadeRightBig-leave-active, 496 | .fadeOutRightBig { 497 | animation-duration: 1s; 498 | animation-fill-mode: both; 499 | } 500 | .fadeRightBig-enter-active, 501 | .fadeInRightBig { 502 | animation-name: fadeInRightBig; 503 | } 504 | .fadeRightBig-leave-active, 505 | .fadeOutRightBig { 506 | animation-name: fadeOutRightBig; 507 | } 508 | .fadeRight-enter-active, 509 | .fadeInRight, 510 | .fadeRight-leave-active, 511 | .fadeOutRight { 512 | animation-duration: 1s; 513 | animation-fill-mode: both; 514 | } 515 | .fadeRight-enter-active, 516 | .fadeInRight { 517 | animation-name: fadeInRight; 518 | } 519 | .fadeRight-leave-active, 520 | .fadeOutRight { 521 | animation-name: fadeOutRight; 522 | } 523 | .fadeLeftBig-enter-active, 524 | .fadeInLeftBig, 525 | .fadeLeftBig-leave-active, 526 | .fadeOutLeftBig { 527 | animation-duration: 1s; 528 | animation-fill-mode: both; 529 | } 530 | .fadeLeftBig-enter-active, 531 | .fadeInLeftBig { 532 | animation-name: fadeInLeftBig; 533 | } 534 | .fadeLeftBig-leave-active, 535 | .fadeOutLeftBig { 536 | animation-name: fadeOutLeftBig; 537 | } 538 | .fadeLeft-enter-active, 539 | .fadeInLeft, 540 | .fadeLeft-leave-active, 541 | .fadeOutLeft { 542 | animation-duration: 1s; 543 | animation-fill-mode: both; 544 | } 545 | .fadeLeft-enter-active, 546 | .fadeInLeft { 547 | animation-name: fadeInLeft; 548 | } 549 | .fadeLeft-leave-active, 550 | .fadeOutLeft { 551 | animation-name: fadeOutLeft; 552 | } 553 | .fadeDownBig-enter-active, 554 | .fadeInDownBig, 555 | .fadeDownBig-leave-active, 556 | .fadeOutDownBig { 557 | animation-duration: 1s; 558 | animation-fill-mode: both; 559 | } 560 | .fadeDownBig-enter-active, 561 | .fadeInDownBig { 562 | animation-name: fadeInDownBig; 563 | } 564 | .fadeDownBig-leave-active, 565 | .fadeOutDownBig { 566 | animation-name: fadeOutDownBig; 567 | } 568 | .fadeDown-enter-active, 569 | .fadeInDown, 570 | .fadeDown-leave-active, 571 | .fadeOutDown { 572 | animation-duration: 1s; 573 | animation-fill-mode: both; 574 | } 575 | .fadeDown-enter-active, 576 | .fadeInDown { 577 | animation-name: fadeInDown; 578 | } 579 | .fadeDown-leave-active, 580 | .fadeOutDown { 581 | animation-name: fadeOutDown; 582 | } 583 | @keyframes rotateIn { 584 | from { 585 | transform-origin: center; 586 | transform: rotate3d(0, 0, 1, -200deg); 587 | opacity: 0; 588 | } 589 | to { 590 | transform-origin: center; 591 | transform: none; 592 | opacity: 1; 593 | } 594 | } 595 | @keyframes rotateOut { 596 | from { 597 | transform-origin: center; 598 | opacity: 1; 599 | } 600 | to { 601 | transform-origin: center; 602 | transform: rotate3d(0, 0, 1, 200deg); 603 | opacity: 0; 604 | } 605 | } 606 | @keyframes rotateInDownLeft { 607 | from { 608 | transform-origin: left bottom; 609 | transform: rotate3d(0, 0, 1, -45deg); 610 | opacity: 0; 611 | } 612 | to { 613 | transform-origin: left bottom; 614 | transform: none; 615 | opacity: 1; 616 | } 617 | } 618 | @keyframes rotateOutDownLeft { 619 | from { 620 | transform-origin: left bottom; 621 | opacity: 1; 622 | } 623 | to { 624 | transform-origin: left bottom; 625 | transform: rotate3d(0, 0, 1, 45deg); 626 | opacity: 0; 627 | } 628 | } 629 | @keyframes rotateInDownRight { 630 | from { 631 | transform-origin: right bottom; 632 | transform: rotate3d(0, 0, 1, 45deg); 633 | opacity: 0; 634 | } 635 | to { 636 | transform-origin: right bottom; 637 | transform: none; 638 | opacity: 1; 639 | } 640 | } 641 | @keyframes rotateOutDownRight { 642 | from { 643 | transform-origin: right bottom; 644 | opacity: 1; 645 | } 646 | to { 647 | transform-origin: right bottom; 648 | transform: rotate3d(0, 0, 1, -45deg); 649 | opacity: 0; 650 | } 651 | } 652 | @keyframes rotateInUpLeft { 653 | from { 654 | transform-origin: left bottom; 655 | transform: rotate3d(0, 0, 1, 45deg); 656 | opacity: 0; 657 | } 658 | to { 659 | transform-origin: left bottom; 660 | transform: none; 661 | opacity: 1; 662 | } 663 | } 664 | @keyframes rotateOutUpLeft { 665 | from { 666 | transform-origin: left bottom; 667 | opacity: 1; 668 | } 669 | to { 670 | transform-origin: left bottom; 671 | transform: rotate3d(0, 0, 1, -45deg); 672 | opacity: 0; 673 | } 674 | } 675 | @keyframes rotateInUpRight { 676 | from { 677 | transform-origin: right bottom; 678 | transform: rotate3d(0, 0, 1, -90deg); 679 | opacity: 0; 680 | } 681 | to { 682 | transform-origin: right bottom; 683 | transform: none; 684 | opacity: 1; 685 | } 686 | } 687 | @keyframes rotateOutUpRight { 688 | from { 689 | transform-origin: right bottom; 690 | opacity: 1; 691 | } 692 | to { 693 | transform-origin: right bottom; 694 | transform: rotate3d(0, 0, 1, 90deg); 695 | opacity: 0; 696 | } 697 | } 698 | .rotate-enter-active, 699 | .rotateIn, 700 | .rotate-leave-active, 701 | .rotateOut { 702 | animation-duration: 1s; 703 | animation-fill-mode: both; 704 | } 705 | .rotate-enter-active, 706 | .rotateIn { 707 | animation-name: rotateIn; 708 | } 709 | .rotate-leave-active, 710 | .rotateOut { 711 | animation-name: rotateOut; 712 | } 713 | .rotateUpRight-enter-active, 714 | .rotateInUpRight, 715 | .rotateUpRight-leave-active, 716 | .rotateOutUpRight { 717 | animation-duration: 1s; 718 | animation-fill-mode: both; 719 | } 720 | .rotateUpRight-enter-active, 721 | .rotateInUpRight { 722 | animation-name: rotateInUpRight; 723 | } 724 | .rotateUpRight-leave-active, 725 | .rotateOutUpRight { 726 | animation-name: rotateOutUpRight; 727 | } 728 | .rotateUpLeft-enter-active, 729 | .rotateInUpLeft, 730 | .rotateUpLeft-leave-active, 731 | .rotateOutUpLeft { 732 | animation-duration: 1s; 733 | animation-fill-mode: both; 734 | } 735 | .rotateUpLeft-enter-active, 736 | .rotateInUpLeft { 737 | animation-name: rotateInUpLeft; 738 | } 739 | .rotateUpLeft-leave-active, 740 | .rotateOutUpLeft { 741 | animation-name: rotateOutUpLeft; 742 | } 743 | .rotateDownRight-enter-active, 744 | .rotateInDownRight, 745 | .rotateDownRight-leave-active, 746 | .rotateOutDownRight { 747 | animation-duration: 1s; 748 | animation-fill-mode: both; 749 | } 750 | .rotateDownRight-enter-active, 751 | .rotateInDownRight { 752 | animation-name: rotateInDownRight; 753 | } 754 | .rotateDownRight-leave-active, 755 | .rotateOutDownRight { 756 | animation-name: rotateOutDownRight; 757 | } 758 | .rotateDownLeft-enter-active, 759 | .rotateInDownLeft, 760 | .rotateDownLeft-leave-active, 761 | .rotateOutDownLeft { 762 | animation-duration: 1s; 763 | animation-fill-mode: both; 764 | } 765 | .rotateDownLeft-enter-active, 766 | .rotateInDownLeft { 767 | animation-name: rotateInDownLeft; 768 | } 769 | .rotateDownLeft-leave-active, 770 | .rotateOutDownLeft { 771 | animation-name: rotateOutDownLeft; 772 | } 773 | @keyframes slideInDown { 774 | from { 775 | transform: translate3d(0, -100%, 0); 776 | visibility: visible; 777 | } 778 | to { 779 | transform: translate3d(0, 0, 0); 780 | } 781 | } 782 | @keyframes slideOutDown { 783 | from { 784 | transform: translate3d(0, 0, 0); 785 | } 786 | to { 787 | visibility: hidden; 788 | transform: translate3d(0, 100%, 0); 789 | } 790 | } 791 | @keyframes slideInLeft { 792 | from { 793 | transform: translate3d(-100%, 0, 0); 794 | visibility: visible; 795 | } 796 | to { 797 | transform: translate3d(0, 0, 0); 798 | } 799 | } 800 | @keyframes slideOutLeft { 801 | from { 802 | transform: translate3d(0, 0, 0); 803 | } 804 | to { 805 | visibility: hidden; 806 | transform: translate3d(-100%, 0, 0); 807 | } 808 | } 809 | @keyframes slideInRight { 810 | from { 811 | transform: translate3d(100%, 0, 0); 812 | visibility: visible; 813 | } 814 | to { 815 | transform: translate3d(0, 0, 0); 816 | } 817 | } 818 | @keyframes slideOutRight { 819 | from { 820 | transform: translate3d(0, 0, 0); 821 | } 822 | to { 823 | visibility: hidden; 824 | transform: translate3d(100%, 0, 0); 825 | } 826 | } 827 | @keyframes slideInUp { 828 | from { 829 | transform: translate3d(0, 100%, 0); 830 | visibility: visible; 831 | } 832 | to { 833 | transform: translate3d(0, 0, 0); 834 | } 835 | } 836 | @keyframes slideOutUp { 837 | from { 838 | transform: translate3d(0, 0, 0); 839 | } 840 | to { 841 | visibility: hidden; 842 | transform: translate3d(0, -100%, 0); 843 | } 844 | } 845 | .slide-enter-active, 846 | .slideIn, 847 | .slide-leave-active, 848 | .slideOut { 849 | animation-duration: 1s; 850 | animation-fill-mode: both; 851 | } 852 | .slide-enter-active, 853 | .slideIn { 854 | animation-name: slideIn; 855 | } 856 | .slide-leave-active, 857 | .slideOut { 858 | animation-name: slideOut; 859 | } 860 | .slideUp-enter-active, 861 | .slideInUp, 862 | .slideUp-leave-active, 863 | .slideOutUp { 864 | animation-duration: 1s; 865 | animation-fill-mode: both; 866 | } 867 | .slideUp-enter-active, 868 | .slideInUp { 869 | animation-name: slideInUp; 870 | } 871 | .slideUp-leave-active, 872 | .slideOutUp { 873 | animation-name: slideOutUp; 874 | } 875 | .slideRight-enter-active, 876 | .slideInRight, 877 | .slideRight-leave-active, 878 | .slideOutRight { 879 | animation-duration: 1s; 880 | animation-fill-mode: both; 881 | } 882 | .slideRight-enter-active, 883 | .slideInRight { 884 | animation-name: slideInRight; 885 | } 886 | .slideRight-leave-active, 887 | .slideOutRight { 888 | animation-name: slideOutRight; 889 | } 890 | .slideLeft-enter-active, 891 | .slideInLeft, 892 | .slideLeft-leave-active, 893 | .slideOutLeft { 894 | animation-duration: 1s; 895 | animation-fill-mode: both; 896 | } 897 | .slideLeft-enter-active, 898 | .slideInLeft { 899 | animation-name: slideInLeft; 900 | } 901 | .slideLeft-leave-active, 902 | .slideOutLeft { 903 | animation-name: slideOutLeft; 904 | } 905 | .slideDown-enter-active, 906 | .slideInDown, 907 | .slideDown-leave-active, 908 | .slideOutDown { 909 | animation-duration: 1s; 910 | animation-fill-mode: both; 911 | } 912 | .slideDown-enter-active, 913 | .slideInDown { 914 | animation-name: slideInDown; 915 | } 916 | .slideDown-leave-active, 917 | .slideOutDown { 918 | animation-name: slideOutDown; 919 | } 920 | @keyframes zoomIn { 921 | from { 922 | opacity: 0; 923 | transform: scale3d(0.3, 0.3, 0.3); 924 | } 925 | 50% { 926 | opacity: 1; 927 | } 928 | } 929 | @keyframes zoomOut { 930 | from { 931 | opacity: 1; 932 | } 933 | 50% { 934 | opacity: 0; 935 | transform: scale3d(0.3, 0.3, 0.3); 936 | } 937 | to { 938 | opacity: 0; 939 | } 940 | } 941 | @keyframes zoomInDown { 942 | from { 943 | opacity: 0; 944 | transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0); 945 | animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); 946 | } 947 | 60% { 948 | opacity: 1; 949 | transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0); 950 | animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); 951 | } 952 | } 953 | @keyframes zoomOutDown { 954 | 40% { 955 | opacity: 1; 956 | transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0); 957 | animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); 958 | } 959 | to { 960 | opacity: 0; 961 | transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0); 962 | transform-origin: center bottom; 963 | animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); 964 | } 965 | } 966 | @keyframes zoomInLeft { 967 | from { 968 | opacity: 0; 969 | transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0); 970 | animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); 971 | } 972 | 60% { 973 | opacity: 1; 974 | transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0); 975 | animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); 976 | } 977 | } 978 | @keyframes zoomOutLeft { 979 | 40% { 980 | opacity: 1; 981 | transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0); 982 | } 983 | to { 984 | opacity: 0; 985 | transform: scale(0.1) translate3d(-2000px, 0, 0); 986 | transform-origin: left center; 987 | } 988 | } 989 | @keyframes zoomInRight { 990 | from { 991 | opacity: 0; 992 | transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0); 993 | animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); 994 | } 995 | 60% { 996 | opacity: 1; 997 | transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0); 998 | animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); 999 | } 1000 | } 1001 | @keyframes zoomOutRight { 1002 | 40% { 1003 | opacity: 1; 1004 | transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0); 1005 | } 1006 | to { 1007 | opacity: 0; 1008 | transform: scale(0.1) translate3d(2000px, 0, 0); 1009 | transform-origin: right center; 1010 | } 1011 | } 1012 | @keyframes zoomInUp { 1013 | from { 1014 | opacity: 0; 1015 | transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0); 1016 | animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); 1017 | } 1018 | 60% { 1019 | opacity: 1; 1020 | transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0); 1021 | animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); 1022 | } 1023 | } 1024 | @keyframes zoomOutUp { 1025 | 40% { 1026 | opacity: 1; 1027 | transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0); 1028 | animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); 1029 | } 1030 | to { 1031 | opacity: 0; 1032 | transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0); 1033 | transform-origin: center bottom; 1034 | animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1); 1035 | } 1036 | } 1037 | .zoom-enter-active, 1038 | .zoomIn, 1039 | .zoom-leave-active, 1040 | .zoomOut { 1041 | animation-duration: 1s; 1042 | animation-fill-mode: both; 1043 | } 1044 | .zoom-enter-active, 1045 | .zoomIn { 1046 | animation-name: zoomIn; 1047 | } 1048 | .zoom-leave-active, 1049 | .zoomOut { 1050 | animation-name: zoomOut; 1051 | } 1052 | .zoomUp-enter-active, 1053 | .zoomInUp, 1054 | .zoomUp-leave-active, 1055 | .zoomOutUp { 1056 | animation-duration: 1s; 1057 | animation-fill-mode: both; 1058 | } 1059 | .zoomUp-enter-active, 1060 | .zoomInUp { 1061 | animation-name: zoomInUp; 1062 | } 1063 | .zoomUp-leave-active, 1064 | .zoomOutUp { 1065 | animation-name: zoomOutUp; 1066 | } 1067 | .zoomRight-enter-active, 1068 | .zoomInRight, 1069 | .zoomRight-leave-active, 1070 | .zoomOutRight { 1071 | animation-duration: 1s; 1072 | animation-fill-mode: both; 1073 | } 1074 | .zoomRight-enter-active, 1075 | .zoomInRight { 1076 | animation-name: zoomInRight; 1077 | } 1078 | .zoomRight-leave-active, 1079 | .zoomOutRight { 1080 | animation-name: zoomOutRight; 1081 | } 1082 | .zoomLeft-enter-active, 1083 | .zoomInLeft, 1084 | .zoomLeft-leave-active, 1085 | .zoomOutLeft { 1086 | animation-duration: 1s; 1087 | animation-fill-mode: both; 1088 | } 1089 | .zoomLeft-enter-active, 1090 | .zoomInLeft { 1091 | animation-name: zoomInLeft; 1092 | } 1093 | .zoomLeft-leave-active, 1094 | .zoomOutLeft { 1095 | animation-name: zoomOutLeft; 1096 | } 1097 | .zoomDown-enter-active, 1098 | .zoomInDown, 1099 | .zoomDown-leave-active, 1100 | .zoomOutDown { 1101 | animation-duration: 1s; 1102 | animation-fill-mode: both; 1103 | } 1104 | .zoomDown-enter-active, 1105 | .zoomInDown { 1106 | animation-name: zoomInDown; 1107 | } 1108 | .zoomDown-leave-active, 1109 | .zoomOutDown { 1110 | animation-name: zoomOutDown; 1111 | } 1112 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-stream-overlay", 3 | "version": "1.0.0", 4 | "description": "Stream Overlays with VueJS", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "MATTENN", 10 | "license": "MIT", 11 | "dependencies": { 12 | "axios": "^0.16.1", 13 | "vue": "^2.3.3", 14 | "vue2-animate": "^1.0.4" 15 | }, 16 | "eslintConfig": { 17 | "parserOptions": { 18 | "ecmaVersion": 6 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /sample.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Sample.html 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |

{{ info.origin }}

20 |
21 | 22 |

{{ info.name }}

23 |
24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /sample.json: -------------------------------------------------------------------------------- 1 | {"show":false,"origin":"","name":""} --------------------------------------------------------------------------------