├── CNAME ├── css ├── includes │ ├── _variables.scss │ ├── components │ │ ├── _inputfile.scss │ │ ├── _button.scss │ │ └── _filelist.scss │ └── _layout.scss ├── styles.scss └── styles.processed.css ├── js ├── components │ ├── button.js │ ├── filelist.js │ └── inputfile.js ├── vendor │ ├── react-dom.min.js │ ├── compatibility.js │ └── react-with-addons.min.js └── app.js ├── README.md ├── index.html └── LICENSE /CNAME: -------------------------------------------------------------------------------- 1 | react-pdfjs.jjperezaguinaga.com -------------------------------------------------------------------------------- /css/includes/_variables.scss: -------------------------------------------------------------------------------- 1 | $color-bg: #ffffff; 2 | $color-black: #222; 3 | $color-grey: #444; 4 | $color-yellow: #ffe23f; -------------------------------------------------------------------------------- /css/styles.scss: -------------------------------------------------------------------------------- 1 | @import "includes/variables"; 2 | @import "includes/layout"; 3 | 4 | @import "includes/components/button"; 5 | @import "includes/components/inputfile"; 6 | @import "includes/components/filelist"; -------------------------------------------------------------------------------- /css/includes/components/_inputfile.scss: -------------------------------------------------------------------------------- 1 | .InputFile { 2 | margin: 1em auto; 3 | 4 | &__input { 5 | width: 0.1px; 6 | height: 0.1px; 7 | opacity: 0; 8 | overflow: hidden; 9 | position: absolute; 10 | z-index: -1; 11 | } 12 | &__label { 13 | cursor: pointer; 14 | } 15 | } -------------------------------------------------------------------------------- /js/components/button.js: -------------------------------------------------------------------------------- 1 | export const Button = ({children, type, onClick, isActive}) => { 2 | const buttonClasses = ['Button'] 3 | 4 | type !== null ? buttonClasses.push(`Button--is-${type}`) : buttonClasses.push('Button--is-default') 5 | isActive ? buttonClasses.push('Button--is-active') : buttonClasses.push('Button--is-inactive') 6 | 7 | return ( 8 | 9 | ) 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PDF Viewer 2 | 3 | 📄 React + PDF.js Experiment. Submission for /r/codingprompts (Week 2). Preview 4 | and load PDF documents to read them in your browser. 5 | 6 | ## Technologies 7 | 8 | * ReactJS for templating/routing 📖 9 | * PDF.js by Mozilla for Rendering PDFs 📕 10 | 11 | Works in Chrome + Firefox + Safari, untested in IE. 12 | 13 | ## Play around 14 | 15 | Feel free to play around with the code at Codepen.io! 16 | https://codepen.io/jjperezaguinaga/project/editor/APYyRa/ 17 | -------------------------------------------------------------------------------- /css/includes/components/_button.scss: -------------------------------------------------------------------------------- 1 | .Button { 2 | padding: 5px 15px; 3 | font-size: 13px; 4 | border-radius: 4px; 5 | border: 1px inset rgba(0,0,0,0.3); 6 | background-color: #4ECE3D; 7 | color: white; 8 | text-align: center; 9 | cursor: pointer; 10 | transition: background-color 180ms ease-in; 11 | &:hover { 12 | background-color: #40B730; 13 | } 14 | &--is-primary { 15 | border: none; 16 | font-size: 16px; 17 | padding: 10px 25px; 18 | } 19 | &--is-active { 20 | background-color: #39A12B; 21 | } 22 | } -------------------------------------------------------------------------------- /css/includes/components/_filelist.scss: -------------------------------------------------------------------------------- 1 | .FileList { 2 | display: flex; 3 | flex-wrap: wrap; 4 | font-size: 0.8em; 5 | 6 | &__item { 7 | display: flex; 8 | align-items: center; 9 | padding: 0 1.5em; 10 | transition: background 180ms ease-in; 11 | cursor: pointer; 12 | width: 100%; 13 | 14 | &:hover { 15 | background: #dedede; 16 | } 17 | 18 | figure { 19 | margin: 0; 20 | margin-right: 1em; 21 | } 22 | 23 | small { 24 | display: block; 25 | color: #aaa; 26 | } 27 | 28 | h3 { 29 | text-align: left; 30 | text-overflow: ellipsis; 31 | overflow: hidden; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /js/vendor/react-dom.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ReactDOM v15.3.0 3 | * 4 | * Copyright 2013-present, Facebook, Inc. 5 | * All rights reserved. 6 | * 7 | * This source code is licensed under the BSD-style license found in the 8 | * LICENSE file in the root directory of this source tree. An additional grant 9 | * of patent rights can be found in the PATENTS file in the same directory. 10 | * 11 | */ 12 | !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e(require("react"));else if("function"==typeof define&&define.amd)define(["react"],e);else{var f;f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,f.ReactDOM=e(f.React)}}(function(e){return e.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED}); -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | My React Project on CodePen 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /js/components/filelist.js: -------------------------------------------------------------------------------- 1 | export default class FileList extends React.Component { 2 | constructor(props) { 3 | super(props) 4 | } 5 | _printSize(size) { 6 | const sizes = ['Bytes', 'KB', 'MB', 'GB'] 7 | let i = 0; while( size > 900 ) { size /= 1024; i++; } 8 | return `${(Math.round(size*100)/100)} ${sizes[i]}` 9 | } 10 | render() { 11 | const { files } = this.props; 12 | return ( 13 |
14 | { 15 | files.map( file => 16 | (
this.props.loadFile(file)}> 17 |
📄
18 |

{file.name}{this._printSize(file.size)}

19 |
)) 20 | } 21 |
22 | ) 23 | } 24 | } -------------------------------------------------------------------------------- /js/components/inputfile.js: -------------------------------------------------------------------------------- 1 | import { Button } from './button' 2 | 3 | export default class InputFile extends React.Component { 4 | triggerInput = e => { 5 | ReactDOM.findDOMNode(this._inputFile).click(); 6 | } 7 | render() { 8 | return ( 9 |
10 | 20 |
21 | ) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Jose Aguinaga 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /css/includes/_layout.scss: -------------------------------------------------------------------------------- 1 | html, body { 2 | margin: 0px; 3 | padding: 0px; 4 | width: 100%; 5 | height: 99%; 6 | position: relative; 7 | } 8 | 9 | body { 10 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 11 | background: $color-bg; 12 | background: radial-gradient(ellipse at center, rgba(255,255,255,1) 20%,rgba(210,210,210,1) 100%); 13 | padding: 0px; 14 | } 15 | 16 | h1 { 17 | margin: 0px; 18 | } 19 | 20 | p { 21 | margin: 0px; 22 | } 23 | 24 | canvas { 25 | position: relative; 26 | margin: 0 auto 3em auto; 27 | padding: 0; 28 | overflow: visible; 29 | background-clip: content-box; 30 | box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.54); 31 | background-color: white; 32 | width: 100%; 33 | } 34 | 35 | .center { 36 | width: 760px; 37 | height: 480px; 38 | position: absolute; 39 | left: 50%; 40 | top: 50%; 41 | margin-left: -360px; 42 | margin-top: -200px; 43 | text-align: center; 44 | display: flex; 45 | flex: 1 auto; 46 | background: black; 47 | box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.25); 48 | } 49 | 50 | .Sidebar { 51 | display: inline-block; 52 | width: 35%; 53 | background: white; 54 | overflow-y: scroll; 55 | overflow-x: hidden; 56 | } 57 | 58 | .Content { 59 | display: inline-block; 60 | width: 65%; 61 | background: #3E3E3E; 62 | padding: 3em; 63 | overflow-y: scroll; 64 | overflow-x: hidden; 65 | } -------------------------------------------------------------------------------- /css/styles.processed.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | margin: 0px; 4 | padding: 0px; 5 | width: 100%; 6 | height: 99%; 7 | position: relative; 8 | } 9 | 10 | body { 11 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 12 | background: #ffffff; 13 | background: radial-gradient(ellipse at center, white 20%, #d2d2d2 100%); 14 | padding: 0px; 15 | } 16 | 17 | h1 { 18 | margin: 0px; 19 | } 20 | 21 | p { 22 | margin: 0px; 23 | } 24 | 25 | canvas { 26 | position: relative; 27 | margin: 0 auto 3em auto; 28 | padding: 0; 29 | overflow: visible; 30 | background-clip: content-box; 31 | box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.54); 32 | background-color: white; 33 | width: 100%; 34 | } 35 | 36 | .center { 37 | width: 760px; 38 | height: 480px; 39 | position: absolute; 40 | left: 50%; 41 | top: 50%; 42 | margin-left: -360px; 43 | margin-top: -200px; 44 | text-align: center; 45 | display: -ms-flexbox; 46 | display: flex; 47 | -ms-flex: 1 auto; 48 | flex: 1 auto; 49 | background: black; 50 | box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.25); 51 | } 52 | 53 | .Sidebar { 54 | display: inline-block; 55 | width: 35%; 56 | background: white; 57 | overflow-y: scroll; 58 | overflow-x: hidden; 59 | } 60 | 61 | .Content { 62 | display: inline-block; 63 | width: 65%; 64 | background: #3E3E3E; 65 | padding: 3em; 66 | overflow-y: scroll; 67 | overflow-x: hidden; 68 | } 69 | 70 | .Button { 71 | padding: 5px 15px; 72 | font-size: 13px; 73 | border-radius: 4px; 74 | border: 1px inset rgba(0, 0, 0, 0.3); 75 | background-color: #4ECE3D; 76 | color: white; 77 | text-align: center; 78 | cursor: pointer; 79 | transition: background-color 180ms ease-in; 80 | } 81 | 82 | .Button:hover { 83 | background-color: #40B730; 84 | } 85 | 86 | .Button--is-primary { 87 | border: none; 88 | font-size: 16px; 89 | padding: 10px 25px; 90 | } 91 | 92 | .Button--is-active { 93 | background-color: #39A12B; 94 | } 95 | 96 | .InputFile { 97 | margin: 1em auto; 98 | } 99 | 100 | .InputFile__input { 101 | width: 0.1px; 102 | height: 0.1px; 103 | opacity: 0; 104 | overflow: hidden; 105 | position: absolute; 106 | z-index: -1; 107 | } 108 | 109 | .InputFile__label { 110 | cursor: pointer; 111 | } 112 | 113 | .FileList { 114 | display: -ms-flexbox; 115 | display: flex; 116 | -ms-flex-wrap: wrap; 117 | flex-wrap: wrap; 118 | font-size: 0.8em; 119 | } 120 | 121 | .FileList__item { 122 | display: -ms-flexbox; 123 | display: flex; 124 | -ms-flex-align: center; 125 | align-items: center; 126 | padding: 0 1.5em; 127 | transition: background 180ms ease-in; 128 | cursor: pointer; 129 | width: 100%; 130 | } 131 | 132 | .FileList__item:hover { 133 | background: #dedede; 134 | } 135 | 136 | .FileList__item figure { 137 | margin: 0; 138 | margin-right: 1em; 139 | } 140 | 141 | .FileList__item small { 142 | display: block; 143 | color: #aaa; 144 | } 145 | 146 | .FileList__item h3 { 147 | text-align: left; 148 | text-overflow: ellipsis; 149 | overflow: hidden; 150 | } -------------------------------------------------------------------------------- /js/app.js: -------------------------------------------------------------------------------- 1 | import { default as InputFile } from './components/inputfile' 2 | import { default as FileList } from './components/filelist' 3 | 4 | class App extends React.Component { 5 | constructor(props) { 6 | super(props); 7 | this.state = { 8 | fileReader: new FileReader(), 9 | files: [], 10 | pages: [], 11 | currentFile: null 12 | } 13 | this.state.fileReader.onload = this.loadFileReader.bind(this) 14 | } 15 | 16 | loadFileReader = e => { 17 | PDFJS.getDocument(new Uint8Array(e.target.result)).then(pdf => { 18 | // Hardcoded to match the current viewport 19 | let scale = 0.72; 20 | 21 | let viewport, canvas, context, renderContext; 22 | 23 | // This is a good example of why handling DOM directly w/React is a bad idea 24 | // Ideally we just use data and grab context from canvas using something like 25 | // this.context = c.getContext('2d')} /> 26 | // otherwise you need to manually keep track of DOM manipulations 27 | const pageContainer = this._pageContainer; 28 | let { pages } = this.state; 29 | pages.map( page => pageContainer.removeChild(page) ) 30 | pages = [] 31 | 32 | for (let i = 1; i <= pdf.numPages; i++) { 33 | pdf.getPage(i).then(page => { 34 | 35 | viewport = page.getViewport(scale); 36 | 37 | // Prepare canvas using PDF page dimensions. 38 | canvas = document.createElement("canvas"); 39 | context = canvas.getContext('2d'); 40 | 41 | canvas.height = viewport.height; 42 | canvas.width = viewport.width; 43 | 44 | // Render PDF page into canvas context. 45 | renderContext = { 46 | canvasContext: context, 47 | viewport: viewport 48 | }; 49 | 50 | page.render(renderContext); 51 | pageContainer.appendChild(canvas) 52 | pages.push(canvas) 53 | }); 54 | } 55 | this.setState({ pages }) 56 | }); 57 | } 58 | 59 | loadFile = file => { 60 | // Quick example of short-circuit evaluation 61 | file !== this.state.currentFile && (this.setState({ currentFile: file }) || this.state.fileReader.readAsArrayBuffer(file)); 62 | } 63 | 64 | uploadFileHandler = e => { 65 | const { files } = this.state; 66 | const file = e.target.files[0] 67 | files.push( file ); 68 | this.setState({ files }); 69 | this.loadFile(file) 70 | } 71 | 72 | render() { 73 | let { files } = this.state; 74 | console.log("Files", files) 75 | console.log("Pages", this.state.pages) 76 | return ( 77 |
78 |
79 | 80 | Select a PDF file 81 | 82 | 83 |
84 |
85 |

Your PDF file will be viewed here.

86 |
this._pageContainer = c}>
87 |
88 |
) 89 | } 90 | 91 | }; 92 | 93 | ReactDOM.render( 94 | , 95 | document.getElementById('app') 96 | ); -------------------------------------------------------------------------------- /js/vendor/compatibility.js: -------------------------------------------------------------------------------- 1 | /* Copyright 2017 Mozilla Foundation 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | (function webpackUniversalModuleDefinition(root, factory) { 17 | if(typeof exports === 'object' && typeof module === 'object') 18 | module.exports = factory(); 19 | else if(typeof define === 'function' && define.amd) 20 | define("pdfjs-dist/web/compatibility", [], factory); 21 | else if(typeof exports === 'object') 22 | exports["pdfjs-dist/web/compatibility"] = factory(); 23 | else 24 | root["pdfjs-dist/web/compatibility"] = factory(); 25 | })(this, function() { 26 | return /******/ (function(modules) { // webpackBootstrap 27 | /******/ // The module cache 28 | /******/ var installedModules = {}; 29 | /******/ 30 | /******/ // The require function 31 | /******/ function __webpack_require__(moduleId) { 32 | /******/ 33 | /******/ // Check if module is in cache 34 | /******/ if(installedModules[moduleId]) { 35 | /******/ return installedModules[moduleId].exports; 36 | /******/ } 37 | /******/ // Create a new module (and put it into the cache) 38 | /******/ var module = installedModules[moduleId] = { 39 | /******/ i: moduleId, 40 | /******/ l: false, 41 | /******/ exports: {} 42 | /******/ }; 43 | /******/ 44 | /******/ // Execute the module function 45 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 46 | /******/ 47 | /******/ // Flag the module as loaded 48 | /******/ module.l = true; 49 | /******/ 50 | /******/ // Return the exports of the module 51 | /******/ return module.exports; 52 | /******/ } 53 | /******/ 54 | /******/ 55 | /******/ // expose the modules object (__webpack_modules__) 56 | /******/ __webpack_require__.m = modules; 57 | /******/ 58 | /******/ // expose the module cache 59 | /******/ __webpack_require__.c = installedModules; 60 | /******/ 61 | /******/ // identity function for calling harmony imports with the correct context 62 | /******/ __webpack_require__.i = function(value) { return value; }; 63 | /******/ 64 | /******/ // define getter function for harmony exports 65 | /******/ __webpack_require__.d = function(exports, name, getter) { 66 | /******/ if(!__webpack_require__.o(exports, name)) { 67 | /******/ Object.defineProperty(exports, name, { 68 | /******/ configurable: false, 69 | /******/ enumerable: true, 70 | /******/ get: getter 71 | /******/ }); 72 | /******/ } 73 | /******/ }; 74 | /******/ 75 | /******/ // getDefaultExport function for compatibility with non-harmony modules 76 | /******/ __webpack_require__.n = function(module) { 77 | /******/ var getter = module && module.__esModule ? 78 | /******/ function getDefault() { return module['default']; } : 79 | /******/ function getModuleExports() { return module; }; 80 | /******/ __webpack_require__.d(getter, 'a', getter); 81 | /******/ return getter; 82 | /******/ }; 83 | /******/ 84 | /******/ // Object.prototype.hasOwnProperty.call 85 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 86 | /******/ 87 | /******/ // __webpack_public_path__ 88 | /******/ __webpack_require__.p = ""; 89 | /******/ 90 | /******/ // Load entry module and return exports 91 | /******/ return __webpack_require__(__webpack_require__.s = 1); 92 | /******/ }) 93 | /************************************************************************/ 94 | /******/ ([ 95 | /* 0 */ 96 | /***/ (function(module, exports, __webpack_require__) { 97 | 98 | "use strict"; 99 | 100 | 101 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; 102 | 103 | if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { 104 | var globalScope = typeof window !== 'undefined' && window.Math === Math ? window : typeof global !== 'undefined' && global.Math === Math ? global : typeof self !== 'undefined' && self.Math === Math ? self : undefined; 105 | var userAgent = typeof navigator !== 'undefined' && navigator.userAgent || ''; 106 | var isAndroid = /Android/.test(userAgent); 107 | var isAndroidPre3 = /Android\s[0-2][^\d]/.test(userAgent); 108 | var isAndroidPre5 = /Android\s[0-4][^\d]/.test(userAgent); 109 | var isChrome = userAgent.indexOf('Chrom') >= 0; 110 | var isChromeWithRangeBug = /Chrome\/(39|40)\./.test(userAgent); 111 | var isIOSChrome = userAgent.indexOf('CriOS') >= 0; 112 | var isIE = userAgent.indexOf('Trident') >= 0; 113 | var isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent); 114 | var isOpera = userAgent.indexOf('Opera') >= 0; 115 | var isSafari = /Safari\//.test(userAgent) && !/(Chrome\/|Android\s)/.test(userAgent); 116 | var hasDOM = (typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && (typeof document === 'undefined' ? 'undefined' : _typeof(document)) === 'object'; 117 | if (typeof PDFJS === 'undefined') { 118 | globalScope.PDFJS = {}; 119 | } 120 | PDFJS.compatibilityChecked = true; 121 | (function checkTypedArrayCompatibility() { 122 | if (typeof Uint8Array !== 'undefined') { 123 | if (typeof Uint8Array.prototype.subarray === 'undefined') { 124 | Uint8Array.prototype.subarray = function subarray(start, end) { 125 | return new Uint8Array(this.slice(start, end)); 126 | }; 127 | Float32Array.prototype.subarray = function subarray(start, end) { 128 | return new Float32Array(this.slice(start, end)); 129 | }; 130 | } 131 | if (typeof Float64Array === 'undefined') { 132 | globalScope.Float64Array = Float32Array; 133 | } 134 | return; 135 | } 136 | function subarray(start, end) { 137 | return new TypedArray(this.slice(start, end)); 138 | } 139 | function setArrayOffset(array, offset) { 140 | if (arguments.length < 2) { 141 | offset = 0; 142 | } 143 | for (var i = 0, n = array.length; i < n; ++i, ++offset) { 144 | this[offset] = array[i] & 0xFF; 145 | } 146 | } 147 | function Uint32ArrayView(buffer, length) { 148 | this.buffer = buffer; 149 | this.byteLength = buffer.length; 150 | this.length = length; 151 | ensureUint32ArrayViewProps(this.length); 152 | } 153 | Uint32ArrayView.prototype = Object.create(null); 154 | var uint32ArrayViewSetters = 0; 155 | function createUint32ArrayProp(index) { 156 | return { 157 | get: function get() { 158 | var buffer = this.buffer, 159 | offset = index << 2; 160 | return (buffer[offset] | buffer[offset + 1] << 8 | buffer[offset + 2] << 16 | buffer[offset + 3] << 24) >>> 0; 161 | }, 162 | set: function set(value) { 163 | var buffer = this.buffer, 164 | offset = index << 2; 165 | buffer[offset] = value & 255; 166 | buffer[offset + 1] = value >> 8 & 255; 167 | buffer[offset + 2] = value >> 16 & 255; 168 | buffer[offset + 3] = value >>> 24 & 255; 169 | } 170 | }; 171 | } 172 | function ensureUint32ArrayViewProps(length) { 173 | while (uint32ArrayViewSetters < length) { 174 | Object.defineProperty(Uint32ArrayView.prototype, uint32ArrayViewSetters, createUint32ArrayProp(uint32ArrayViewSetters)); 175 | uint32ArrayViewSetters++; 176 | } 177 | } 178 | function TypedArray(arg1) { 179 | var result, i, n; 180 | if (typeof arg1 === 'number') { 181 | result = []; 182 | for (i = 0; i < arg1; ++i) { 183 | result[i] = 0; 184 | } 185 | } else if ('slice' in arg1) { 186 | result = arg1.slice(0); 187 | } else { 188 | result = []; 189 | for (i = 0, n = arg1.length; i < n; ++i) { 190 | result[i] = arg1[i]; 191 | } 192 | } 193 | result.subarray = subarray; 194 | result.buffer = result; 195 | result.byteLength = result.length; 196 | result.set = setArrayOffset; 197 | if ((typeof arg1 === 'undefined' ? 'undefined' : _typeof(arg1)) === 'object' && arg1.buffer) { 198 | result.buffer = arg1.buffer; 199 | } 200 | return result; 201 | } 202 | globalScope.Uint8Array = TypedArray; 203 | globalScope.Int8Array = TypedArray; 204 | globalScope.Int32Array = TypedArray; 205 | globalScope.Uint16Array = TypedArray; 206 | globalScope.Float32Array = TypedArray; 207 | globalScope.Float64Array = TypedArray; 208 | globalScope.Uint32Array = function () { 209 | if (arguments.length === 3) { 210 | if (arguments[1] !== 0) { 211 | throw new Error('offset !== 0 is not supported'); 212 | } 213 | return new Uint32ArrayView(arguments[0], arguments[2]); 214 | } 215 | return TypedArray.apply(this, arguments); 216 | }; 217 | })(); 218 | (function canvasPixelArrayBuffer() { 219 | if (!hasDOM || !window.CanvasPixelArray) { 220 | return; 221 | } 222 | var cpaProto = window.CanvasPixelArray.prototype; 223 | if ('buffer' in cpaProto) { 224 | return; 225 | } 226 | Object.defineProperty(cpaProto, 'buffer', { 227 | get: function get() { 228 | return this; 229 | }, 230 | 231 | enumerable: false, 232 | configurable: true 233 | }); 234 | Object.defineProperty(cpaProto, 'byteLength', { 235 | get: function get() { 236 | return this.length; 237 | }, 238 | 239 | enumerable: false, 240 | configurable: true 241 | }); 242 | })(); 243 | (function normalizeURLObject() { 244 | if (!globalScope.URL) { 245 | globalScope.URL = globalScope.webkitURL; 246 | } 247 | })(); 248 | (function checkObjectDefinePropertyCompatibility() { 249 | if (typeof Object.defineProperty !== 'undefined') { 250 | var definePropertyPossible = true; 251 | try { 252 | if (hasDOM) { 253 | Object.defineProperty(new Image(), 'id', { value: 'test' }); 254 | } 255 | var Test = function Test() {}; 256 | Test.prototype = { 257 | get id() {} 258 | }; 259 | Object.defineProperty(new Test(), 'id', { 260 | value: '', 261 | configurable: true, 262 | enumerable: true, 263 | writable: false 264 | }); 265 | } catch (e) { 266 | definePropertyPossible = false; 267 | } 268 | if (definePropertyPossible) { 269 | return; 270 | } 271 | } 272 | Object.defineProperty = function objectDefineProperty(obj, name, def) { 273 | delete obj[name]; 274 | if ('get' in def) { 275 | obj.__defineGetter__(name, def['get']); 276 | } 277 | if ('set' in def) { 278 | obj.__defineSetter__(name, def['set']); 279 | } 280 | if ('value' in def) { 281 | obj.__defineSetter__(name, function objectDefinePropertySetter(value) { 282 | this.__defineGetter__(name, function objectDefinePropertyGetter() { 283 | return value; 284 | }); 285 | return value; 286 | }); 287 | obj[name] = def.value; 288 | } 289 | }; 290 | })(); 291 | (function checkXMLHttpRequestResponseCompatibility() { 292 | if (typeof XMLHttpRequest === 'undefined') { 293 | return; 294 | } 295 | var xhrPrototype = XMLHttpRequest.prototype; 296 | var xhr = new XMLHttpRequest(); 297 | if (!('overrideMimeType' in xhr)) { 298 | Object.defineProperty(xhrPrototype, 'overrideMimeType', { 299 | value: function xmlHttpRequestOverrideMimeType(mimeType) {} 300 | }); 301 | } 302 | if ('responseType' in xhr) { 303 | return; 304 | } 305 | Object.defineProperty(xhrPrototype, 'responseType', { 306 | get: function xmlHttpRequestGetResponseType() { 307 | return this._responseType || 'text'; 308 | }, 309 | set: function xmlHttpRequestSetResponseType(value) { 310 | if (value === 'text' || value === 'arraybuffer') { 311 | this._responseType = value; 312 | if (value === 'arraybuffer' && typeof this.overrideMimeType === 'function') { 313 | this.overrideMimeType('text/plain; charset=x-user-defined'); 314 | } 315 | } 316 | } 317 | }); 318 | if (typeof VBArray !== 'undefined') { 319 | Object.defineProperty(xhrPrototype, 'response', { 320 | get: function xmlHttpRequestResponseGet() { 321 | if (this.responseType === 'arraybuffer') { 322 | return new Uint8Array(new VBArray(this.responseBody).toArray()); 323 | } 324 | return this.responseText; 325 | } 326 | }); 327 | return; 328 | } 329 | Object.defineProperty(xhrPrototype, 'response', { 330 | get: function xmlHttpRequestResponseGet() { 331 | if (this.responseType !== 'arraybuffer') { 332 | return this.responseText; 333 | } 334 | var text = this.responseText; 335 | var i, 336 | n = text.length; 337 | var result = new Uint8Array(n); 338 | for (i = 0; i < n; ++i) { 339 | result[i] = text.charCodeAt(i) & 0xFF; 340 | } 341 | return result.buffer; 342 | } 343 | }); 344 | })(); 345 | (function checkWindowBtoaCompatibility() { 346 | if ('btoa' in globalScope) { 347 | return; 348 | } 349 | var digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; 350 | globalScope.btoa = function (chars) { 351 | var buffer = ''; 352 | var i, n; 353 | for (i = 0, n = chars.length; i < n; i += 3) { 354 | var b1 = chars.charCodeAt(i) & 0xFF; 355 | var b2 = chars.charCodeAt(i + 1) & 0xFF; 356 | var b3 = chars.charCodeAt(i + 2) & 0xFF; 357 | var d1 = b1 >> 2, 358 | d2 = (b1 & 3) << 4 | b2 >> 4; 359 | var d3 = i + 1 < n ? (b2 & 0xF) << 2 | b3 >> 6 : 64; 360 | var d4 = i + 2 < n ? b3 & 0x3F : 64; 361 | buffer += digits.charAt(d1) + digits.charAt(d2) + digits.charAt(d3) + digits.charAt(d4); 362 | } 363 | return buffer; 364 | }; 365 | })(); 366 | (function checkWindowAtobCompatibility() { 367 | if ('atob' in globalScope) { 368 | return; 369 | } 370 | var digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; 371 | globalScope.atob = function (input) { 372 | input = input.replace(/=+$/, ''); 373 | if (input.length % 4 === 1) { 374 | throw new Error('bad atob input'); 375 | } 376 | for (var bc = 0, bs, buffer, idx = 0, output = ''; buffer = input.charAt(idx++); ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0) { 377 | buffer = digits.indexOf(buffer); 378 | } 379 | return output; 380 | }; 381 | })(); 382 | (function checkFunctionPrototypeBindCompatibility() { 383 | if (typeof Function.prototype.bind !== 'undefined') { 384 | return; 385 | } 386 | Function.prototype.bind = function functionPrototypeBind(obj) { 387 | var fn = this, 388 | headArgs = Array.prototype.slice.call(arguments, 1); 389 | var bound = function functionPrototypeBindBound() { 390 | var args = headArgs.concat(Array.prototype.slice.call(arguments)); 391 | return fn.apply(obj, args); 392 | }; 393 | return bound; 394 | }; 395 | })(); 396 | (function checkDatasetProperty() { 397 | if (!hasDOM) { 398 | return; 399 | } 400 | var div = document.createElement('div'); 401 | if ('dataset' in div) { 402 | return; 403 | } 404 | Object.defineProperty(HTMLElement.prototype, 'dataset', { 405 | get: function get() { 406 | if (this._dataset) { 407 | return this._dataset; 408 | } 409 | var dataset = {}; 410 | for (var j = 0, jj = this.attributes.length; j < jj; j++) { 411 | var attribute = this.attributes[j]; 412 | if (attribute.name.substring(0, 5) !== 'data-') { 413 | continue; 414 | } 415 | var key = attribute.name.substring(5).replace(/\-([a-z])/g, function (all, ch) { 416 | return ch.toUpperCase(); 417 | }); 418 | dataset[key] = attribute.value; 419 | } 420 | Object.defineProperty(this, '_dataset', { 421 | value: dataset, 422 | writable: false, 423 | enumerable: false 424 | }); 425 | return dataset; 426 | }, 427 | 428 | enumerable: true 429 | }); 430 | })(); 431 | (function checkClassListProperty() { 432 | function changeList(element, itemName, add, remove) { 433 | var s = element.className || ''; 434 | var list = s.split(/\s+/g); 435 | if (list[0] === '') { 436 | list.shift(); 437 | } 438 | var index = list.indexOf(itemName); 439 | if (index < 0 && add) { 440 | list.push(itemName); 441 | } 442 | if (index >= 0 && remove) { 443 | list.splice(index, 1); 444 | } 445 | element.className = list.join(' '); 446 | return index >= 0; 447 | } 448 | if (!hasDOM) { 449 | return; 450 | } 451 | var div = document.createElement('div'); 452 | if ('classList' in div) { 453 | return; 454 | } 455 | var classListPrototype = { 456 | add: function add(name) { 457 | changeList(this.element, name, true, false); 458 | }, 459 | contains: function contains(name) { 460 | return changeList(this.element, name, false, false); 461 | }, 462 | remove: function remove(name) { 463 | changeList(this.element, name, false, true); 464 | }, 465 | toggle: function toggle(name) { 466 | changeList(this.element, name, true, true); 467 | } 468 | }; 469 | Object.defineProperty(HTMLElement.prototype, 'classList', { 470 | get: function get() { 471 | if (this._classList) { 472 | return this._classList; 473 | } 474 | var classList = Object.create(classListPrototype, { 475 | element: { 476 | value: this, 477 | writable: false, 478 | enumerable: true 479 | } 480 | }); 481 | Object.defineProperty(this, '_classList', { 482 | value: classList, 483 | writable: false, 484 | enumerable: false 485 | }); 486 | return classList; 487 | }, 488 | 489 | enumerable: true 490 | }); 491 | })(); 492 | (function checkWorkerConsoleCompatibility() { 493 | if (typeof importScripts === 'undefined' || 'console' in globalScope) { 494 | return; 495 | } 496 | var consoleTimer = {}; 497 | var workerConsole = { 498 | log: function log() { 499 | var args = Array.prototype.slice.call(arguments); 500 | globalScope.postMessage({ 501 | targetName: 'main', 502 | action: 'console_log', 503 | data: args 504 | }); 505 | }, 506 | error: function error() { 507 | var args = Array.prototype.slice.call(arguments); 508 | globalScope.postMessage({ 509 | targetName: 'main', 510 | action: 'console_error', 511 | data: args 512 | }); 513 | }, 514 | time: function time(name) { 515 | consoleTimer[name] = Date.now(); 516 | }, 517 | timeEnd: function timeEnd(name) { 518 | var time = consoleTimer[name]; 519 | if (!time) { 520 | throw new Error('Unknown timer name ' + name); 521 | } 522 | this.log('Timer:', name, Date.now() - time); 523 | } 524 | }; 525 | globalScope.console = workerConsole; 526 | })(); 527 | (function checkConsoleCompatibility() { 528 | if (!hasDOM) { 529 | return; 530 | } 531 | if (!('console' in window)) { 532 | window.console = { 533 | log: function log() {}, 534 | error: function error() {}, 535 | warn: function warn() {} 536 | }; 537 | return; 538 | } 539 | if (!('bind' in console.log)) { 540 | console.log = function (fn) { 541 | return function (msg) { 542 | return fn(msg); 543 | }; 544 | }(console.log); 545 | console.error = function (fn) { 546 | return function (msg) { 547 | return fn(msg); 548 | }; 549 | }(console.error); 550 | console.warn = function (fn) { 551 | return function (msg) { 552 | return fn(msg); 553 | }; 554 | }(console.warn); 555 | return; 556 | } 557 | })(); 558 | (function checkOnClickCompatibility() { 559 | function ignoreIfTargetDisabled(event) { 560 | if (isDisabled(event.target)) { 561 | event.stopPropagation(); 562 | } 563 | } 564 | function isDisabled(node) { 565 | return node.disabled || node.parentNode && isDisabled(node.parentNode); 566 | } 567 | if (isOpera) { 568 | document.addEventListener('click', ignoreIfTargetDisabled, true); 569 | } 570 | })(); 571 | (function checkOnBlobSupport() { 572 | if (isIE || isIOSChrome) { 573 | PDFJS.disableCreateObjectURL = true; 574 | } 575 | })(); 576 | (function checkNavigatorLanguage() { 577 | if (typeof navigator === 'undefined') { 578 | return; 579 | } 580 | if ('language' in navigator) { 581 | return; 582 | } 583 | PDFJS.locale = navigator.userLanguage || 'en-US'; 584 | })(); 585 | (function checkRangeRequests() { 586 | if (isSafari || isAndroidPre3 || isChromeWithRangeBug || isIOS) { 587 | PDFJS.disableRange = true; 588 | PDFJS.disableStream = true; 589 | } 590 | })(); 591 | (function checkHistoryManipulation() { 592 | if (!hasDOM) { 593 | return; 594 | } 595 | if (!history.pushState || isAndroidPre3) { 596 | PDFJS.disableHistory = true; 597 | } 598 | })(); 599 | (function checkSetPresenceInImageData() { 600 | if (!hasDOM) { 601 | return; 602 | } 603 | if (window.CanvasPixelArray) { 604 | if (typeof window.CanvasPixelArray.prototype.set !== 'function') { 605 | window.CanvasPixelArray.prototype.set = function (arr) { 606 | for (var i = 0, ii = this.length; i < ii; i++) { 607 | this[i] = arr[i]; 608 | } 609 | }; 610 | } 611 | } else { 612 | var polyfill = false, 613 | versionMatch; 614 | if (isChrome) { 615 | versionMatch = userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); 616 | polyfill = versionMatch && parseInt(versionMatch[2]) < 21; 617 | } else if (isAndroid) { 618 | polyfill = isAndroidPre5; 619 | } else if (isSafari) { 620 | versionMatch = userAgent.match(/Version\/([0-9]+)\.([0-9]+)\.([0-9]+) Safari\//); 621 | polyfill = versionMatch && parseInt(versionMatch[1]) < 6; 622 | } 623 | if (polyfill) { 624 | var contextPrototype = window.CanvasRenderingContext2D.prototype; 625 | var createImageData = contextPrototype.createImageData; 626 | contextPrototype.createImageData = function (w, h) { 627 | var imageData = createImageData.call(this, w, h); 628 | imageData.data.set = function (arr) { 629 | for (var i = 0, ii = this.length; i < ii; i++) { 630 | this[i] = arr[i]; 631 | } 632 | }; 633 | return imageData; 634 | }; 635 | contextPrototype = null; 636 | } 637 | } 638 | })(); 639 | (function checkRequestAnimationFrame() { 640 | function installFakeAnimationFrameFunctions() { 641 | window.requestAnimationFrame = function (callback) { 642 | return window.setTimeout(callback, 20); 643 | }; 644 | window.cancelAnimationFrame = function (timeoutID) { 645 | window.clearTimeout(timeoutID); 646 | }; 647 | } 648 | if (!hasDOM) { 649 | return; 650 | } 651 | if (isIOS) { 652 | installFakeAnimationFrameFunctions(); 653 | return; 654 | } 655 | if ('requestAnimationFrame' in window) { 656 | return; 657 | } 658 | window.requestAnimationFrame = window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame; 659 | if (window.requestAnimationFrame) { 660 | return; 661 | } 662 | installFakeAnimationFrameFunctions(); 663 | })(); 664 | (function checkCanvasSizeLimitation() { 665 | if (isIOS || isAndroid) { 666 | PDFJS.maxCanvasPixels = 5242880; 667 | } 668 | })(); 669 | (function checkFullscreenSupport() { 670 | if (!hasDOM) { 671 | return; 672 | } 673 | if (isIE && window.parent !== window) { 674 | PDFJS.disableFullscreen = true; 675 | } 676 | })(); 677 | (function checkCurrentScript() { 678 | if (!hasDOM) { 679 | return; 680 | } 681 | if ('currentScript' in document) { 682 | return; 683 | } 684 | Object.defineProperty(document, 'currentScript', { 685 | get: function get() { 686 | var scripts = document.getElementsByTagName('script'); 687 | return scripts[scripts.length - 1]; 688 | }, 689 | 690 | enumerable: true, 691 | configurable: true 692 | }); 693 | })(); 694 | (function checkInputTypeNumberAssign() { 695 | if (!hasDOM) { 696 | return; 697 | } 698 | var el = document.createElement('input'); 699 | try { 700 | el.type = 'number'; 701 | } catch (ex) { 702 | var inputProto = el.constructor.prototype; 703 | var typeProperty = Object.getOwnPropertyDescriptor(inputProto, 'type'); 704 | Object.defineProperty(inputProto, 'type', { 705 | get: function get() { 706 | return typeProperty.get.call(this); 707 | }, 708 | set: function set(value) { 709 | typeProperty.set.call(this, value === 'number' ? 'text' : value); 710 | }, 711 | 712 | enumerable: true, 713 | configurable: true 714 | }); 715 | } 716 | })(); 717 | (function checkDocumentReadyState() { 718 | if (!hasDOM) { 719 | return; 720 | } 721 | if (!document.attachEvent) { 722 | return; 723 | } 724 | var documentProto = document.constructor.prototype; 725 | var readyStateProto = Object.getOwnPropertyDescriptor(documentProto, 'readyState'); 726 | Object.defineProperty(documentProto, 'readyState', { 727 | get: function get() { 728 | var value = readyStateProto.get.call(this); 729 | return value === 'interactive' ? 'loading' : value; 730 | }, 731 | set: function set(value) { 732 | readyStateProto.set.call(this, value); 733 | }, 734 | 735 | enumerable: true, 736 | configurable: true 737 | }); 738 | })(); 739 | (function checkChildNodeRemove() { 740 | if (!hasDOM) { 741 | return; 742 | } 743 | if (typeof Element.prototype.remove !== 'undefined') { 744 | return; 745 | } 746 | Element.prototype.remove = function () { 747 | if (this.parentNode) { 748 | this.parentNode.removeChild(this); 749 | } 750 | }; 751 | })(); 752 | (function checkPromise() { 753 | if (globalScope.Promise) { 754 | if (typeof globalScope.Promise.all !== 'function') { 755 | globalScope.Promise.all = function (iterable) { 756 | var count = 0, 757 | results = [], 758 | resolve, 759 | reject; 760 | var promise = new globalScope.Promise(function (resolve_, reject_) { 761 | resolve = resolve_; 762 | reject = reject_; 763 | }); 764 | iterable.forEach(function (p, i) { 765 | count++; 766 | p.then(function (result) { 767 | results[i] = result; 768 | count--; 769 | if (count === 0) { 770 | resolve(results); 771 | } 772 | }, reject); 773 | }); 774 | if (count === 0) { 775 | resolve(results); 776 | } 777 | return promise; 778 | }; 779 | } 780 | if (typeof globalScope.Promise.resolve !== 'function') { 781 | globalScope.Promise.resolve = function (value) { 782 | return new globalScope.Promise(function (resolve) { 783 | resolve(value); 784 | }); 785 | }; 786 | } 787 | if (typeof globalScope.Promise.reject !== 'function') { 788 | globalScope.Promise.reject = function (reason) { 789 | return new globalScope.Promise(function (resolve, reject) { 790 | reject(reason); 791 | }); 792 | }; 793 | } 794 | if (typeof globalScope.Promise.prototype.catch !== 'function') { 795 | globalScope.Promise.prototype.catch = function (onReject) { 796 | return globalScope.Promise.prototype.then(undefined, onReject); 797 | }; 798 | } 799 | return; 800 | } 801 | var STATUS_PENDING = 0; 802 | var STATUS_RESOLVED = 1; 803 | var STATUS_REJECTED = 2; 804 | var REJECTION_TIMEOUT = 500; 805 | var HandlerManager = { 806 | handlers: [], 807 | running: false, 808 | unhandledRejections: [], 809 | pendingRejectionCheck: false, 810 | scheduleHandlers: function scheduleHandlers(promise) { 811 | if (promise._status === STATUS_PENDING) { 812 | return; 813 | } 814 | this.handlers = this.handlers.concat(promise._handlers); 815 | promise._handlers = []; 816 | if (this.running) { 817 | return; 818 | } 819 | this.running = true; 820 | setTimeout(this.runHandlers.bind(this), 0); 821 | }, 822 | runHandlers: function runHandlers() { 823 | var RUN_TIMEOUT = 1; 824 | var timeoutAt = Date.now() + RUN_TIMEOUT; 825 | while (this.handlers.length > 0) { 826 | var handler = this.handlers.shift(); 827 | var nextStatus = handler.thisPromise._status; 828 | var nextValue = handler.thisPromise._value; 829 | try { 830 | if (nextStatus === STATUS_RESOLVED) { 831 | if (typeof handler.onResolve === 'function') { 832 | nextValue = handler.onResolve(nextValue); 833 | } 834 | } else if (typeof handler.onReject === 'function') { 835 | nextValue = handler.onReject(nextValue); 836 | nextStatus = STATUS_RESOLVED; 837 | if (handler.thisPromise._unhandledRejection) { 838 | this.removeUnhandeledRejection(handler.thisPromise); 839 | } 840 | } 841 | } catch (ex) { 842 | nextStatus = STATUS_REJECTED; 843 | nextValue = ex; 844 | } 845 | handler.nextPromise._updateStatus(nextStatus, nextValue); 846 | if (Date.now() >= timeoutAt) { 847 | break; 848 | } 849 | } 850 | if (this.handlers.length > 0) { 851 | setTimeout(this.runHandlers.bind(this), 0); 852 | return; 853 | } 854 | this.running = false; 855 | }, 856 | addUnhandledRejection: function addUnhandledRejection(promise) { 857 | this.unhandledRejections.push({ 858 | promise: promise, 859 | time: Date.now() 860 | }); 861 | this.scheduleRejectionCheck(); 862 | }, 863 | removeUnhandeledRejection: function removeUnhandeledRejection(promise) { 864 | promise._unhandledRejection = false; 865 | for (var i = 0; i < this.unhandledRejections.length; i++) { 866 | if (this.unhandledRejections[i].promise === promise) { 867 | this.unhandledRejections.splice(i); 868 | i--; 869 | } 870 | } 871 | }, 872 | scheduleRejectionCheck: function scheduleRejectionCheck() { 873 | var _this = this; 874 | 875 | if (this.pendingRejectionCheck) { 876 | return; 877 | } 878 | this.pendingRejectionCheck = true; 879 | setTimeout(function () { 880 | _this.pendingRejectionCheck = false; 881 | var now = Date.now(); 882 | for (var i = 0; i < _this.unhandledRejections.length; i++) { 883 | if (now - _this.unhandledRejections[i].time > REJECTION_TIMEOUT) { 884 | var unhandled = _this.unhandledRejections[i].promise._value; 885 | var msg = 'Unhandled rejection: ' + unhandled; 886 | if (unhandled.stack) { 887 | msg += '\n' + unhandled.stack; 888 | } 889 | try { 890 | throw new Error(msg); 891 | } catch (_) { 892 | console.warn(msg); 893 | } 894 | _this.unhandledRejections.splice(i); 895 | i--; 896 | } 897 | } 898 | if (_this.unhandledRejections.length) { 899 | _this.scheduleRejectionCheck(); 900 | } 901 | }, REJECTION_TIMEOUT); 902 | } 903 | }; 904 | var Promise = function Promise(resolver) { 905 | this._status = STATUS_PENDING; 906 | this._handlers = []; 907 | try { 908 | resolver.call(this, this._resolve.bind(this), this._reject.bind(this)); 909 | } catch (e) { 910 | this._reject(e); 911 | } 912 | }; 913 | Promise.all = function Promise_all(promises) { 914 | var resolveAll, rejectAll; 915 | var deferred = new Promise(function (resolve, reject) { 916 | resolveAll = resolve; 917 | rejectAll = reject; 918 | }); 919 | var unresolved = promises.length; 920 | var results = []; 921 | if (unresolved === 0) { 922 | resolveAll(results); 923 | return deferred; 924 | } 925 | function reject(reason) { 926 | if (deferred._status === STATUS_REJECTED) { 927 | return; 928 | } 929 | results = []; 930 | rejectAll(reason); 931 | } 932 | for (var i = 0, ii = promises.length; i < ii; ++i) { 933 | var promise = promises[i]; 934 | var resolve = function (i) { 935 | return function (value) { 936 | if (deferred._status === STATUS_REJECTED) { 937 | return; 938 | } 939 | results[i] = value; 940 | unresolved--; 941 | if (unresolved === 0) { 942 | resolveAll(results); 943 | } 944 | }; 945 | }(i); 946 | if (Promise.isPromise(promise)) { 947 | promise.then(resolve, reject); 948 | } else { 949 | resolve(promise); 950 | } 951 | } 952 | return deferred; 953 | }; 954 | Promise.isPromise = function Promise_isPromise(value) { 955 | return value && typeof value.then === 'function'; 956 | }; 957 | Promise.resolve = function Promise_resolve(value) { 958 | return new Promise(function (resolve) { 959 | resolve(value); 960 | }); 961 | }; 962 | Promise.reject = function Promise_reject(reason) { 963 | return new Promise(function (resolve, reject) { 964 | reject(reason); 965 | }); 966 | }; 967 | Promise.prototype = { 968 | _status: null, 969 | _value: null, 970 | _handlers: null, 971 | _unhandledRejection: null, 972 | _updateStatus: function Promise__updateStatus(status, value) { 973 | if (this._status === STATUS_RESOLVED || this._status === STATUS_REJECTED) { 974 | return; 975 | } 976 | if (status === STATUS_RESOLVED && Promise.isPromise(value)) { 977 | value.then(this._updateStatus.bind(this, STATUS_RESOLVED), this._updateStatus.bind(this, STATUS_REJECTED)); 978 | return; 979 | } 980 | this._status = status; 981 | this._value = value; 982 | if (status === STATUS_REJECTED && this._handlers.length === 0) { 983 | this._unhandledRejection = true; 984 | HandlerManager.addUnhandledRejection(this); 985 | } 986 | HandlerManager.scheduleHandlers(this); 987 | }, 988 | _resolve: function Promise_resolve(value) { 989 | this._updateStatus(STATUS_RESOLVED, value); 990 | }, 991 | _reject: function Promise_reject(reason) { 992 | this._updateStatus(STATUS_REJECTED, reason); 993 | }, 994 | then: function Promise_then(onResolve, onReject) { 995 | var nextPromise = new Promise(function (resolve, reject) { 996 | this.resolve = resolve; 997 | this.reject = reject; 998 | }); 999 | this._handlers.push({ 1000 | thisPromise: this, 1001 | onResolve: onResolve, 1002 | onReject: onReject, 1003 | nextPromise: nextPromise 1004 | }); 1005 | HandlerManager.scheduleHandlers(this); 1006 | return nextPromise; 1007 | }, 1008 | catch: function Promise_catch(onReject) { 1009 | return this.then(undefined, onReject); 1010 | } 1011 | }; 1012 | globalScope.Promise = Promise; 1013 | })(); 1014 | (function checkWeakMap() { 1015 | if (globalScope.WeakMap) { 1016 | return; 1017 | } 1018 | var id = 0; 1019 | function WeakMap() { 1020 | this.id = '$weakmap' + id++; 1021 | } 1022 | WeakMap.prototype = { 1023 | has: function has(obj) { 1024 | if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' && typeof obj !== 'function' || obj === null) { 1025 | return false; 1026 | } 1027 | return !!Object.getOwnPropertyDescriptor(obj, this.id); 1028 | }, 1029 | get: function get(obj) { 1030 | return this.has(obj) ? obj[this.id] : undefined; 1031 | }, 1032 | set: function set(obj, value) { 1033 | Object.defineProperty(obj, this.id, { 1034 | value: value, 1035 | enumerable: false, 1036 | configurable: true 1037 | }); 1038 | }, 1039 | delete: function _delete(obj) { 1040 | delete obj[this.id]; 1041 | } 1042 | }; 1043 | globalScope.WeakMap = WeakMap; 1044 | })(); 1045 | (function checkURLConstructor() { 1046 | var hasWorkingUrl = false; 1047 | try { 1048 | if (typeof URL === 'function' && _typeof(URL.prototype) === 'object' && 'origin' in URL.prototype) { 1049 | var u = new URL('b', 'http://a'); 1050 | u.pathname = 'c%20d'; 1051 | hasWorkingUrl = u.href === 'http://a/c%20d'; 1052 | } 1053 | } catch (e) {} 1054 | if (hasWorkingUrl) { 1055 | return; 1056 | } 1057 | var relative = Object.create(null); 1058 | relative['ftp'] = 21; 1059 | relative['file'] = 0; 1060 | relative['gopher'] = 70; 1061 | relative['http'] = 80; 1062 | relative['https'] = 443; 1063 | relative['ws'] = 80; 1064 | relative['wss'] = 443; 1065 | var relativePathDotMapping = Object.create(null); 1066 | relativePathDotMapping['%2e'] = '.'; 1067 | relativePathDotMapping['.%2e'] = '..'; 1068 | relativePathDotMapping['%2e.'] = '..'; 1069 | relativePathDotMapping['%2e%2e'] = '..'; 1070 | function isRelativeScheme(scheme) { 1071 | return relative[scheme] !== undefined; 1072 | } 1073 | function invalid() { 1074 | clear.call(this); 1075 | this._isInvalid = true; 1076 | } 1077 | function IDNAToASCII(h) { 1078 | if (h === '') { 1079 | invalid.call(this); 1080 | } 1081 | return h.toLowerCase(); 1082 | } 1083 | function percentEscape(c) { 1084 | var unicode = c.charCodeAt(0); 1085 | if (unicode > 0x20 && unicode < 0x7F && [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf(unicode) === -1) { 1086 | return c; 1087 | } 1088 | return encodeURIComponent(c); 1089 | } 1090 | function percentEscapeQuery(c) { 1091 | var unicode = c.charCodeAt(0); 1092 | if (unicode > 0x20 && unicode < 0x7F && [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) === -1) { 1093 | return c; 1094 | } 1095 | return encodeURIComponent(c); 1096 | } 1097 | var EOF, 1098 | ALPHA = /[a-zA-Z]/, 1099 | ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/; 1100 | function parse(input, stateOverride, base) { 1101 | function err(message) { 1102 | errors.push(message); 1103 | } 1104 | var state = stateOverride || 'scheme start', 1105 | cursor = 0, 1106 | buffer = '', 1107 | seenAt = false, 1108 | seenBracket = false, 1109 | errors = []; 1110 | loop: while ((input[cursor - 1] !== EOF || cursor === 0) && !this._isInvalid) { 1111 | var c = input[cursor]; 1112 | switch (state) { 1113 | case 'scheme start': 1114 | if (c && ALPHA.test(c)) { 1115 | buffer += c.toLowerCase(); 1116 | state = 'scheme'; 1117 | } else if (!stateOverride) { 1118 | buffer = ''; 1119 | state = 'no scheme'; 1120 | continue; 1121 | } else { 1122 | err('Invalid scheme.'); 1123 | break loop; 1124 | } 1125 | break; 1126 | case 'scheme': 1127 | if (c && ALPHANUMERIC.test(c)) { 1128 | buffer += c.toLowerCase(); 1129 | } else if (c === ':') { 1130 | this._scheme = buffer; 1131 | buffer = ''; 1132 | if (stateOverride) { 1133 | break loop; 1134 | } 1135 | if (isRelativeScheme(this._scheme)) { 1136 | this._isRelative = true; 1137 | } 1138 | if (this._scheme === 'file') { 1139 | state = 'relative'; 1140 | } else if (this._isRelative && base && base._scheme === this._scheme) { 1141 | state = 'relative or authority'; 1142 | } else if (this._isRelative) { 1143 | state = 'authority first slash'; 1144 | } else { 1145 | state = 'scheme data'; 1146 | } 1147 | } else if (!stateOverride) { 1148 | buffer = ''; 1149 | cursor = 0; 1150 | state = 'no scheme'; 1151 | continue; 1152 | } else if (c === EOF) { 1153 | break loop; 1154 | } else { 1155 | err('Code point not allowed in scheme: ' + c); 1156 | break loop; 1157 | } 1158 | break; 1159 | case 'scheme data': 1160 | if (c === '?') { 1161 | this._query = '?'; 1162 | state = 'query'; 1163 | } else if (c === '#') { 1164 | this._fragment = '#'; 1165 | state = 'fragment'; 1166 | } else { 1167 | if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') { 1168 | this._schemeData += percentEscape(c); 1169 | } 1170 | } 1171 | break; 1172 | case 'no scheme': 1173 | if (!base || !isRelativeScheme(base._scheme)) { 1174 | err('Missing scheme.'); 1175 | invalid.call(this); 1176 | } else { 1177 | state = 'relative'; 1178 | continue; 1179 | } 1180 | break; 1181 | case 'relative or authority': 1182 | if (c === '/' && input[cursor + 1] === '/') { 1183 | state = 'authority ignore slashes'; 1184 | } else { 1185 | err('Expected /, got: ' + c); 1186 | state = 'relative'; 1187 | continue; 1188 | } 1189 | break; 1190 | case 'relative': 1191 | this._isRelative = true; 1192 | if (this._scheme !== 'file') { 1193 | this._scheme = base._scheme; 1194 | } 1195 | if (c === EOF) { 1196 | this._host = base._host; 1197 | this._port = base._port; 1198 | this._path = base._path.slice(); 1199 | this._query = base._query; 1200 | this._username = base._username; 1201 | this._password = base._password; 1202 | break loop; 1203 | } else if (c === '/' || c === '\\') { 1204 | if (c === '\\') { 1205 | err('\\ is an invalid code point.'); 1206 | } 1207 | state = 'relative slash'; 1208 | } else if (c === '?') { 1209 | this._host = base._host; 1210 | this._port = base._port; 1211 | this._path = base._path.slice(); 1212 | this._query = '?'; 1213 | this._username = base._username; 1214 | this._password = base._password; 1215 | state = 'query'; 1216 | } else if (c === '#') { 1217 | this._host = base._host; 1218 | this._port = base._port; 1219 | this._path = base._path.slice(); 1220 | this._query = base._query; 1221 | this._fragment = '#'; 1222 | this._username = base._username; 1223 | this._password = base._password; 1224 | state = 'fragment'; 1225 | } else { 1226 | var nextC = input[cursor + 1]; 1227 | var nextNextC = input[cursor + 2]; 1228 | if (this._scheme !== 'file' || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || nextNextC !== EOF && nextNextC !== '/' && nextNextC !== '\\' && nextNextC !== '?' && nextNextC !== '#') { 1229 | this._host = base._host; 1230 | this._port = base._port; 1231 | this._username = base._username; 1232 | this._password = base._password; 1233 | this._path = base._path.slice(); 1234 | this._path.pop(); 1235 | } 1236 | state = 'relative path'; 1237 | continue; 1238 | } 1239 | break; 1240 | case 'relative slash': 1241 | if (c === '/' || c === '\\') { 1242 | if (c === '\\') { 1243 | err('\\ is an invalid code point.'); 1244 | } 1245 | if (this._scheme === 'file') { 1246 | state = 'file host'; 1247 | } else { 1248 | state = 'authority ignore slashes'; 1249 | } 1250 | } else { 1251 | if (this._scheme !== 'file') { 1252 | this._host = base._host; 1253 | this._port = base._port; 1254 | this._username = base._username; 1255 | this._password = base._password; 1256 | } 1257 | state = 'relative path'; 1258 | continue; 1259 | } 1260 | break; 1261 | case 'authority first slash': 1262 | if (c === '/') { 1263 | state = 'authority second slash'; 1264 | } else { 1265 | err('Expected \'/\', got: ' + c); 1266 | state = 'authority ignore slashes'; 1267 | continue; 1268 | } 1269 | break; 1270 | case 'authority second slash': 1271 | state = 'authority ignore slashes'; 1272 | if (c !== '/') { 1273 | err('Expected \'/\', got: ' + c); 1274 | continue; 1275 | } 1276 | break; 1277 | case 'authority ignore slashes': 1278 | if (c !== '/' && c !== '\\') { 1279 | state = 'authority'; 1280 | continue; 1281 | } else { 1282 | err('Expected authority, got: ' + c); 1283 | } 1284 | break; 1285 | case 'authority': 1286 | if (c === '@') { 1287 | if (seenAt) { 1288 | err('@ already seen.'); 1289 | buffer += '%40'; 1290 | } 1291 | seenAt = true; 1292 | for (var i = 0; i < buffer.length; i++) { 1293 | var cp = buffer[i]; 1294 | if (cp === '\t' || cp === '\n' || cp === '\r') { 1295 | err('Invalid whitespace in authority.'); 1296 | continue; 1297 | } 1298 | if (cp === ':' && this._password === null) { 1299 | this._password = ''; 1300 | continue; 1301 | } 1302 | var tempC = percentEscape(cp); 1303 | if (this._password !== null) { 1304 | this._password += tempC; 1305 | } else { 1306 | this._username += tempC; 1307 | } 1308 | } 1309 | buffer = ''; 1310 | } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') { 1311 | cursor -= buffer.length; 1312 | buffer = ''; 1313 | state = 'host'; 1314 | continue; 1315 | } else { 1316 | buffer += c; 1317 | } 1318 | break; 1319 | case 'file host': 1320 | if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') { 1321 | if (buffer.length === 2 && ALPHA.test(buffer[0]) && (buffer[1] === ':' || buffer[1] === '|')) { 1322 | state = 'relative path'; 1323 | } else if (buffer.length === 0) { 1324 | state = 'relative path start'; 1325 | } else { 1326 | this._host = IDNAToASCII.call(this, buffer); 1327 | buffer = ''; 1328 | state = 'relative path start'; 1329 | } 1330 | continue; 1331 | } else if (c === '\t' || c === '\n' || c === '\r') { 1332 | err('Invalid whitespace in file host.'); 1333 | } else { 1334 | buffer += c; 1335 | } 1336 | break; 1337 | case 'host': 1338 | case 'hostname': 1339 | if (c === ':' && !seenBracket) { 1340 | this._host = IDNAToASCII.call(this, buffer); 1341 | buffer = ''; 1342 | state = 'port'; 1343 | if (stateOverride === 'hostname') { 1344 | break loop; 1345 | } 1346 | } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') { 1347 | this._host = IDNAToASCII.call(this, buffer); 1348 | buffer = ''; 1349 | state = 'relative path start'; 1350 | if (stateOverride) { 1351 | break loop; 1352 | } 1353 | continue; 1354 | } else if (c !== '\t' && c !== '\n' && c !== '\r') { 1355 | if (c === '[') { 1356 | seenBracket = true; 1357 | } else if (c === ']') { 1358 | seenBracket = false; 1359 | } 1360 | buffer += c; 1361 | } else { 1362 | err('Invalid code point in host/hostname: ' + c); 1363 | } 1364 | break; 1365 | case 'port': 1366 | if (/[0-9]/.test(c)) { 1367 | buffer += c; 1368 | } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#' || stateOverride) { 1369 | if (buffer !== '') { 1370 | var temp = parseInt(buffer, 10); 1371 | if (temp !== relative[this._scheme]) { 1372 | this._port = temp + ''; 1373 | } 1374 | buffer = ''; 1375 | } 1376 | if (stateOverride) { 1377 | break loop; 1378 | } 1379 | state = 'relative path start'; 1380 | continue; 1381 | } else if (c === '\t' || c === '\n' || c === '\r') { 1382 | err('Invalid code point in port: ' + c); 1383 | } else { 1384 | invalid.call(this); 1385 | } 1386 | break; 1387 | case 'relative path start': 1388 | if (c === '\\') { 1389 | err('\'\\\' not allowed in path.'); 1390 | } 1391 | state = 'relative path'; 1392 | if (c !== '/' && c !== '\\') { 1393 | continue; 1394 | } 1395 | break; 1396 | case 'relative path': 1397 | if (c === EOF || c === '/' || c === '\\' || !stateOverride && (c === '?' || c === '#')) { 1398 | if (c === '\\') { 1399 | err('\\ not allowed in relative path.'); 1400 | } 1401 | var tmp; 1402 | if (tmp = relativePathDotMapping[buffer.toLowerCase()]) { 1403 | buffer = tmp; 1404 | } 1405 | if (buffer === '..') { 1406 | this._path.pop(); 1407 | if (c !== '/' && c !== '\\') { 1408 | this._path.push(''); 1409 | } 1410 | } else if (buffer === '.' && c !== '/' && c !== '\\') { 1411 | this._path.push(''); 1412 | } else if (buffer !== '.') { 1413 | if (this._scheme === 'file' && this._path.length === 0 && buffer.length === 2 && ALPHA.test(buffer[0]) && buffer[1] === '|') { 1414 | buffer = buffer[0] + ':'; 1415 | } 1416 | this._path.push(buffer); 1417 | } 1418 | buffer = ''; 1419 | if (c === '?') { 1420 | this._query = '?'; 1421 | state = 'query'; 1422 | } else if (c === '#') { 1423 | this._fragment = '#'; 1424 | state = 'fragment'; 1425 | } 1426 | } else if (c !== '\t' && c !== '\n' && c !== '\r') { 1427 | buffer += percentEscape(c); 1428 | } 1429 | break; 1430 | case 'query': 1431 | if (!stateOverride && c === '#') { 1432 | this._fragment = '#'; 1433 | state = 'fragment'; 1434 | } else if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') { 1435 | this._query += percentEscapeQuery(c); 1436 | } 1437 | break; 1438 | case 'fragment': 1439 | if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') { 1440 | this._fragment += c; 1441 | } 1442 | break; 1443 | } 1444 | cursor++; 1445 | } 1446 | } 1447 | function clear() { 1448 | this._scheme = ''; 1449 | this._schemeData = ''; 1450 | this._username = ''; 1451 | this._password = null; 1452 | this._host = ''; 1453 | this._port = ''; 1454 | this._path = []; 1455 | this._query = ''; 1456 | this._fragment = ''; 1457 | this._isInvalid = false; 1458 | this._isRelative = false; 1459 | } 1460 | function JURL(url, base) { 1461 | if (base !== undefined && !(base instanceof JURL)) { 1462 | base = new JURL(String(base)); 1463 | } 1464 | this._url = url; 1465 | clear.call(this); 1466 | var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, ''); 1467 | parse.call(this, input, null, base); 1468 | } 1469 | JURL.prototype = { 1470 | toString: function toString() { 1471 | return this.href; 1472 | }, 1473 | 1474 | get href() { 1475 | if (this._isInvalid) { 1476 | return this._url; 1477 | } 1478 | var authority = ''; 1479 | if (this._username !== '' || this._password !== null) { 1480 | authority = this._username + (this._password !== null ? ':' + this._password : '') + '@'; 1481 | } 1482 | return this.protocol + (this._isRelative ? '//' + authority + this.host : '') + this.pathname + this._query + this._fragment; 1483 | }, 1484 | set href(value) { 1485 | clear.call(this); 1486 | parse.call(this, value); 1487 | }, 1488 | get protocol() { 1489 | return this._scheme + ':'; 1490 | }, 1491 | set protocol(value) { 1492 | if (this._isInvalid) { 1493 | return; 1494 | } 1495 | parse.call(this, value + ':', 'scheme start'); 1496 | }, 1497 | get host() { 1498 | return this._isInvalid ? '' : this._port ? this._host + ':' + this._port : this._host; 1499 | }, 1500 | set host(value) { 1501 | if (this._isInvalid || !this._isRelative) { 1502 | return; 1503 | } 1504 | parse.call(this, value, 'host'); 1505 | }, 1506 | get hostname() { 1507 | return this._host; 1508 | }, 1509 | set hostname(value) { 1510 | if (this._isInvalid || !this._isRelative) { 1511 | return; 1512 | } 1513 | parse.call(this, value, 'hostname'); 1514 | }, 1515 | get port() { 1516 | return this._port; 1517 | }, 1518 | set port(value) { 1519 | if (this._isInvalid || !this._isRelative) { 1520 | return; 1521 | } 1522 | parse.call(this, value, 'port'); 1523 | }, 1524 | get pathname() { 1525 | return this._isInvalid ? '' : this._isRelative ? '/' + this._path.join('/') : this._schemeData; 1526 | }, 1527 | set pathname(value) { 1528 | if (this._isInvalid || !this._isRelative) { 1529 | return; 1530 | } 1531 | this._path = []; 1532 | parse.call(this, value, 'relative path start'); 1533 | }, 1534 | get search() { 1535 | return this._isInvalid || !this._query || this._query === '?' ? '' : this._query; 1536 | }, 1537 | set search(value) { 1538 | if (this._isInvalid || !this._isRelative) { 1539 | return; 1540 | } 1541 | this._query = '?'; 1542 | if (value[0] === '?') { 1543 | value = value.slice(1); 1544 | } 1545 | parse.call(this, value, 'query'); 1546 | }, 1547 | get hash() { 1548 | return this._isInvalid || !this._fragment || this._fragment === '#' ? '' : this._fragment; 1549 | }, 1550 | set hash(value) { 1551 | if (this._isInvalid) { 1552 | return; 1553 | } 1554 | this._fragment = '#'; 1555 | if (value[0] === '#') { 1556 | value = value.slice(1); 1557 | } 1558 | parse.call(this, value, 'fragment'); 1559 | }, 1560 | get origin() { 1561 | var host; 1562 | if (this._isInvalid || !this._scheme) { 1563 | return ''; 1564 | } 1565 | switch (this._scheme) { 1566 | case 'data': 1567 | case 'file': 1568 | case 'javascript': 1569 | case 'mailto': 1570 | return 'null'; 1571 | case 'blob': 1572 | try { 1573 | return new JURL(this._schemeData).origin || 'null'; 1574 | } catch (_) {} 1575 | return 'null'; 1576 | } 1577 | host = this.host; 1578 | if (!host) { 1579 | return ''; 1580 | } 1581 | return this._scheme + '://' + host; 1582 | } 1583 | }; 1584 | var OriginalURL = globalScope.URL; 1585 | if (OriginalURL) { 1586 | JURL.createObjectURL = function (blob) { 1587 | return OriginalURL.createObjectURL.apply(OriginalURL, arguments); 1588 | }; 1589 | JURL.revokeObjectURL = function (url) { 1590 | OriginalURL.revokeObjectURL(url); 1591 | }; 1592 | } 1593 | globalScope.URL = JURL; 1594 | })(); 1595 | } 1596 | 1597 | /***/ }), 1598 | /* 1 */ 1599 | /***/ (function(module, exports, __webpack_require__) { 1600 | 1601 | "use strict"; 1602 | 1603 | 1604 | __webpack_require__(0); 1605 | 1606 | /***/ }) 1607 | /******/ ]); 1608 | }); 1609 | //# sourceMappingURL=compatibility.js.map -------------------------------------------------------------------------------- /js/vendor/react-with-addons.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * React (with addons) v15.3.0 3 | * 4 | * Copyright 2013-present, Facebook, Inc. 5 | * All rights reserved. 6 | * 7 | * This source code is licensed under the BSD-style license found in the 8 | * LICENSE file in the root directory of this source tree. An additional grant 9 | * of patent rights can be found in the PATENTS file in the same directory. 10 | * 11 | */ 12 | !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a8&&T<=11),N=32,w=String.fromCharCode(N),S=f.topLevelTypes,k={beforeInput:{phasedRegistrationNames:{bubbled:C({onBeforeInput:null}),captured:C({onBeforeInputCapture:null})},dependencies:[S.topCompositionEnd,S.topKeyPress,S.topTextInput,S.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:C({onCompositionEnd:null}),captured:C({onCompositionEndCapture:null})},dependencies:[S.topBlur,S.topCompositionEnd,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:C({onCompositionStart:null}),captured:C({onCompositionStartCapture:null})},dependencies:[S.topBlur,S.topCompositionStart,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:C({onCompositionUpdate:null}),captured:C({onCompositionUpdateCapture:null})},dependencies:[S.topBlur,S.topCompositionUpdate,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]}},M=!1,R=null,A={eventTypes:k,extractEvents:function(e,t,n,r){return[l(e,t,n,r),d(e,t,n,r)]}};t.exports=A},{107:107,111:111,155:155,16:16,173:173,20:20,21:21}],3:[function(e,t,n){"use strict";function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},i=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){i.forEach(function(t){o[r(t,e)]=o[e]})});var a={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},s={isUnitlessNumber:o,shorthandPropertyExpansions:a};t.exports=s},{}],4:[function(e,t,n){"use strict";var r=e(3),o=e(155),i=(e(72),e(157),e(125)),a=e(168),s=e(175),u=(e(177),s(function(e){return a(e)})),l=!1,c="cssFloat";if(o.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(e){l=!0}void 0===document.documentElement.style.cssFloat&&(c="styleFloat")}var d={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!=o&&(n+=u(r)+":",n+=i(r,o,t)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var a in t)if(t.hasOwnProperty(a)){var s=i(a,t[a],n);if("float"!==a&&"cssFloat"!==a||(a=c),s)o[a]=s;else{var u=l&&r.shorthandPropertyExpansions[a];if(u)for(var p in u)o[p]="";else o[a]=""}}}};t.exports=d},{125:125,155:155,157:157,168:168,175:175,177:177,3:3,72:72}],5:[function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=e(144),i=e(178),a=e(26);e(169);i(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?o("24"):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n8));var L=!1;_.canUseDOM&&(L=N("input")&&(!("documentMode"in document)||document.documentMode>11));var U={get:function(){return D.get.call(this)},set:function(e){O=""+e,D.set.call(this,e)}},F={eventTypes:M,extractEvents:function(e,t,n,o){var i,a,s=t?E.getNodeFromInstance(t):window;if(r(s)?I?i=u:a=l:w(s)?L?i=f:(i=m,a=h):v(s)&&(i=g),i){var c=i(e,t);if(c){var p=x.getPooled(M.change,c,n,o);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}a&&a(e,s,t)}};t.exports=F},{109:109,133:133,140:140,141:141,155:155,16:16,17:17,173:173,20:20,44:44,98:98}],7:[function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){c.insertTreeBefore(e,t,n)}function i(e,t,n){Array.isArray(t)?s(e,t[0],t[1],n):v(e,t,n)}function a(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],u(e,t,n),e.removeChild(n)}e.removeChild(t)}function s(e,t,n,r){for(var o=t;;){var i=o.nextSibling;if(v(e,o,r),o===n)break;o=i}}function u(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function l(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&v(r,document.createTextNode(n),o):n?(m(o,n),u(r,o,t)):u(r,e,t)}var c=e(8),p=e(12),d=e(77),f=(e(44),e(72),e(124)),h=e(146),m=e(147),v=f(function(e,t,n){e.insertBefore(t,n)}),g=p.dangerouslyReplaceNodeWithMarkup,y={dangerouslyReplaceNodeWithMarkup:g,replaceDelimitedText:l,processUpdates:function(e,t){for(var n=0;n-1?void 0:a("96",e),!l.plugins[n]){t.extractEvents?void 0:a("97",e),l.plugins[n]=t;var r=t.eventTypes;for(var i in r)o(r[i],t,i)?void 0:a("98",i,e)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];i(s,t,n)}return!0}return!!e.registrationName&&(i(e.registrationName,t,n),!0)}function i(e,t,n){l.registrationNameModules[e]?a("100",e):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=e(144),s=(e(169),null),u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s?a("101"):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];u.hasOwnProperty(n)&&u[n]===o||(u[n]?a("102",n):void 0,u[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=l},{144:144,169:169}],19:[function(e,t,n){"use strict";function r(e){return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel}function o(e){return e===y.topMouseMove||e===y.topTouchMove}function i(e){return e===y.topMouseDown||e===y.topTouchStart}function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=C.getNodeFromInstance(r),t?v.invokeGuardedCallbackWithCatch(o,n,e):v.invokeGuardedCallback(o,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),i.addPoolingTo(r),t.exports=r},{137:137,178:178,26:26}],22:[function(e,t,n){"use strict";var r=e(10),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_NUMERIC_VALUE,s=r.injection.HAS_POSITIVE_NUMERIC_VALUE,u=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,l={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:s,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,default:i,defer:i,dir:0,disabled:i,download:u,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,referrerPolicy:0,rel:0,required:i,reversed:i,role:0,rows:s,rowSpan:a,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:s,sizes:0,span:s,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};t.exports=l},{10:10}],23:[function(e,t,n){"use strict";function r(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function o(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var i={escape:r,unescape:o};t.exports=i},{}],24:[function(e,t,n){"use strict";var r=e(73),o=e(93),i={linkState:function(e){return new r(this.state[e],o.createStateKeySetter(this,e))}};t.exports=i},{73:73,93:93}],25:[function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?s("87"):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?s("88"):void 0}function i(e){r(e),null!=e.checked||null!=e.onChange?s("89"):void 0}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var s=e(144),u=e(83),l=e(82),c=e(84),p=(e(169),e(177),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),d={value:function(e,t,n){return!e[t]||p[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func},f={},h={checkPropTypes:function(e,t,n){for(var r in d){if(d.hasOwnProperty(r))var o=d[r](t,r,e,l.prop,null,c);o instanceof Error&&!(o.message in f)&&(f[o.message]=!0,a(n))}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(i(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(i(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};t.exports=h},{144:144,169:169,177:177,82:82,83:83,84:84}],26:[function(e,t,n){"use strict";var r=e(144),o=(e(169),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},u=function(e,t,n,r,o){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,r,o),a}return new i(e,t,n,r,o)},l=function(e){var t=this;e instanceof t?void 0:r("25"),e.destructor(),t.instancePool.length=0||null!=t.is}function h(e){var t=e.type;d(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=null,this._domID=null,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var m=e(144),v=e(178),g=e(1),y=e(4),C=e(8),b=e(9),_=e(10),E=e(11),T=e(16),x=e(17),P=e(18),N=e(28),w=e(35),S=e(41),k=e(43),M=e(44),R=e(50),A=e(52),O=e(53),D=e(57),I=(e(72),e(76)),L=e(91),U=(e(161),e(126)),F=(e(169),e(140),e(173)),j=(e(176),e(152),e(177),k),V=x.deleteListener,B=M.getNodeFromInstance,W=N.listenTo,H=P.registrationNameModules,q={string:!0,number:!0},K=F({style:null}),Y=F({__html:null}),z={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},G=11,Q={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},$={listing:!0,pre:!0,textarea:!0},Z=v({menuitem:!0},X),J=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ee={},te={}.hasOwnProperty,ne=1;h.displayName="ReactDOMComponent",h.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=ne++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(c,this);break;case"button":i=S.getHostProps(this,i,t);break;case"input":R.mountWrapper(this,i,t),i=R.getHostProps(this,i),e.getReactMountReady().enqueue(c,this);break;case"option":A.mountWrapper(this,i,t),i=A.getHostProps(this,i);break;case"select":O.mountWrapper(this,i,t),i=O.getHostProps(this,i),e.getReactMountReady().enqueue(c,this);break;case"textarea":D.mountWrapper(this,i,t),i=D.getHostProps(this,i),e.getReactMountReady().enqueue(c,this)}o(this,i);var a,p;null!=t?(a=t._namespaceURI,p=t._tag):n._tag&&(a=n._namespaceURI,p=n._tag),(null==a||a===b.svg&&"foreignobject"===p)&&(a=b.html),a===b.html&&("svg"===this._tag?a=b.svg:"math"===this._tag&&(a=b.mathml)),this._namespaceURI=a;var d;if(e.useCreateElement){var f,h=n._ownerDocument;if(a===b.html)if("script"===this._tag){var m=h.createElement("div"),v=this._currentElement.type;m.innerHTML="<"+v+">",f=m.removeChild(m.firstChild)}else f=i.is?h.createElement(this._currentElement.type,i.is):h.createElement(this._currentElement.type);else f=h.createElementNS(a,this._currentElement.type);M.precacheNode(this,f),this._flags|=j.hasCachedChildNodes,this._hostParent||E.setAttributeForRoot(f),this._updateDOMProperties(null,i,e);var y=C(f);this._createInitialChildren(e,i,r,y),d=y}else{var _=this._createOpenTagMarkupAndPutListeners(e,i),T=this._createContentMarkup(e,i,r);d=!T&&X[this._tag]?_+"/>":_+">"+T+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(s,this),i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(u,this),i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"select":i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"button":i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(l,this)}return d},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(H.hasOwnProperty(r))o&&i(this,r,o,e);else{r===K&&(o&&(o=this._previousStyleCopy=v({},t.style)),o=y.createMarkupForStyles(o,this));var a=null;null!=this._tag&&f(this._tag,t)?z.hasOwnProperty(r)||(a=E.createMarkupForCustomAttribute(r,o)):a=E.createMarkupForProperty(r,o),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+E.createMarkupForRoot()),n+=" "+E.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=q[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=U(i);else if(null!=a){var s=this.mountChildren(a,e,n);r=s.join("")}}return $[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&C.queueHTML(r,o.__html);else{var i=q[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)C.queueText(r,i);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;u"},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),t.exports=a},{178:178,44:44,8:8}],47:[function(e,t,n){"use strict";function r(e){return o.createFactory(e)}var o=e(61),i=e(174),a=i({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hgroup:"hgroup",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul",var:"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",image:"image",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},r);t.exports=a},{174:174,61:61}],48:[function(e,t,n){"use strict";var r={useCreateElement:!0};t.exports=r},{}],49:[function(e,t,n){"use strict";var r=e(7),o=e(44),i={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};t.exports=i},{44:44,7:7}],50:[function(e,t,n){"use strict";function r(){this._rootNodeID&&d.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);p.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var a=c.getNodeFromInstance(this),s=a;s.parentNode;)s=s.parentNode;for(var u=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),d=0;dt.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),i=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=l(e,o),u=l(e,i);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=e(155),l=e(136),c=e(137),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:i,setOffsets:p?a:s};t.exports=d},{136:136,137:137,155:155}],55:[function(e,t,n){"use strict";var r=e(60),o=e(90),i=e(99);r.inject();var a={renderToString:o.renderToString,renderToStaticMarkup:o.renderToStaticMarkup,version:i};t.exports=a},{60:60,90:90,99:99}],56:[function(e,t,n){"use strict";var r=e(144),o=e(178),i=e(7),a=e(8),s=e(44),u=(e(72),e(126)),l=(e(169),e(152),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=null,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(l.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,i=" react-text: "+o+" ",l=" /react-text ";if(this._domID=o,this._hostParent=t,e.useCreateElement){var c=n._ownerDocument,p=c.createComment(i),d=c.createComment(l),f=a(c.createDocumentFragment());return a.queueChild(f,a(p)),this._stringText&&a.queueChild(f,a(c.createTextNode(this._stringText))),a.queueChild(f,a(d)),s.precacheNode(this,p),this._closingComment=d,f}var h=u(this._stringText);return e.renderToStaticMarkup?h:""+h+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();i.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?r("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),t.exports=l},{126:126,144:144,152:152,169:169,178:178,44:44,7:7,72:72,8:8}],57:[function(e,t,n){"use strict";function r(){this._rootNodeID&&p.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=u.executeOnChange(t,e);return c.asap(r,this),n}var i=e(144),a=e(178),s=e(14),u=e(25),l=e(44),c=e(98),p=(e(169),e(177),{getHostProps:function(e,t){null!=t.dangerouslySetInnerHTML?i("91"):void 0;var n=a({},s.getHostProps(e,t),{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=u.getValue(t),r=n;if(null==n){var a=t.defaultValue,s=t.children;null!=s&&(null!=a?i("92"):void 0,Array.isArray(s)&&(s.length<=1?void 0:i("93"),s=s[0]),a=""+s),null==a&&(a=""),r=a}e._wrapperState={initialValue:""+r,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=l.getNodeFromInstance(e),r=u.getValue(t);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==t.defaultValue&&(n.defaultValue=o)}null!=t.defaultValue&&(n.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=l.getNodeFromInstance(e);t.value=t.textContent}});t.exports=p},{14:14,144:144,169:169,177:177,178:178,25:25,44:44,98:98}],58:[function(e,t,n){"use strict";function r(e,t){"_hostNode"in e?void 0:u("33"),"_hostNode"in t?void 0:u("33");for(var n=0,r=e;r;r=r._hostParent)n++;for(var o=0,i=t;i;i=i._hostParent)o++;for(;n-o>0;)e=e._hostParent,n--;for(;o-n>0;)t=t._hostParent,o--;for(var a=n;a--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function o(e,t){"_hostNode"in e?void 0:u("35"),"_hostNode"in t?void 0:u("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function i(e){return"_hostNode"in e?void 0:u("36"),e._hostParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var o;for(o=r.length;o-- >0;)t(r[o],!1,n);for(o=0;o0;)n(u[l],!1,i)}var u=e(144);e(169);t.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:s}},{144:144,169:169}],59:[function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=e(178),i=e(98),a=e(118),s=e(161),u={initialize:s,close:function(){d.isBatchingUpdates=!1}},l={initialize:s,close:i.flushBatchedUpdates.bind(i)},c=[l,u];o(r.prototype,a.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,i){var a=d.isBatchingUpdates;d.isBatchingUpdates=!0,a?e(t,n,r,o,i):p.perform(e,null,t,n,r,o,i)}};t.exports=d},{118:118,161:161,178:178,98:98}],60:[function(e,t,n){"use strict";function r(){E||(E=!0,g.EventEmitter.injectReactEventListener(v),g.EventPluginHub.injectEventPluginOrder(a),g.EventPluginUtils.injectComponentTree(p),g.EventPluginUtils.injectTreeTraversal(f),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:_,EnterLeaveEventPlugin:s,ChangeEventPlugin:i,SelectEventPlugin:b,BeforeInputEventPlugin:o}),g.HostComponent.injectGenericComponentClass(c),g.HostComponent.injectTextComponentClass(h),g.DOMProperty.injectDOMPropertyConfig(u),g.DOMProperty.injectDOMPropertyConfig(C),g.EmptyComponent.injectEmptyComponentFactory(function(e){return new d(e)}),g.Updates.injectReconcileTransaction(y),g.Updates.injectBatchingStrategy(m),g.Component.injectEnvironment(l))}var o=e(2),i=e(6),a=e(13),s=e(15),u=e(22),l=e(35),c=e(42),p=e(44),d=e(46),f=e(58),h=e(56),m=e(59),v=e(65),g=e(69),y=e(86),C=e(102),b=e(103),_=e(104),E=!1;t.exports={inject:r}},{102:102,103:103,104:104,13:13,15:15,2:2,22:22,35:35,42:42,44:44,46:46,56:56,58:58,59:59,6:6,65:65,69:69,86:86}],61:[function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function o(e){return void 0!==e.key}var i=e(178),a=e(39),s=(e(177),e(122),Object.prototype.hasOwnProperty),u="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,l={key:!0,ref:!0,__self:!0,__source:!0},c=function(e,t,n,r,o,i,a){var s={$$typeof:u,type:e,key:t,ref:n,props:a,_owner:i};return s};c.createElement=function(e,t,n){var i,u={},p=null,d=null,f=null,h=null;if(null!=t){r(t)&&(d=t.ref),o(t)&&(p=""+t.key),f=void 0===t.__self?null:t.__self,h=void 0===t.__source?null:t.__source;for(i in t)s.call(t,i)&&!l.hasOwnProperty(i)&&(u[i]=t[i])}var m=arguments.length-2;if(1===m)u.children=n;else if(m>1){for(var v=Array(m),g=0;g1){for(var C=Array(y),b=0;b/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return i.test(e)?e:e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};t.exports=a},{121:121}],75:[function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,s=C(U,null,null,null,null,null,t);if(e){var u=_.get(e);a=u._processChildContext(u._context)}else a=N;var c=p(n);if(c){var f=c._currentElement,h=f.props;if(k(h,t)){var m=c._renderedComponent.getPublicInstance(),v=r&&function(){r.call(m)};return F._updateRootComponent(c,s,a,n,v),m}F.unmountComponentAtNode(n)}var g=o(n),y=g&&!!i(g),b=l(n),E=y&&!c&&!b,T=F._renderNewRootComponent(s,n,E,a)._renderedComponent.getPublicInstance();return r&&r.call(T),T},render:function(e,t,n){return F._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){!e||e.nodeType!==A&&e.nodeType!==O&&e.nodeType!==D?d("40"):void 0;var t=p(e);return t?(delete I[t._instance.rootID],P.batchedUpdates(u,t,e,!1),!0):(l(e),1===e.nodeType&&e.hasAttribute(R),!1)},_mountImageIntoNode:function(e,t,n,i,a){if(!t||t.nodeType!==A&&t.nodeType!==O&&t.nodeType!==D?d("41"):void 0,i){var s=o(t);if(E.canReuseMarkup(e,s))return void v.precacheNode(n,s);var u=s.getAttribute(E.CHECKSUM_ATTR_NAME);s.removeAttribute(E.CHECKSUM_ATTR_NAME);var l=s.outerHTML;s.setAttribute(E.CHECKSUM_ATTR_NAME,u);var c=e,p=r(c,l),h=" (client) "+c.substring(p-20,p+20)+"\n (server) "+l.substring(p-20,p+20);t.nodeType===O?d("42",h):void 0}if(t.nodeType===O?d("43"):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);f.insertTreeBefore(t,e,null)}else S(t,e),v.precacheNode(n,t.firstChild)}};t.exports=F},{10:10,139:139,144:144,146:146,149:149,162:162,169:169,177:177,28:28,39:39,44:44,45:45,48:48,61:61,66:66,71:71,72:72,74:74,8:8,87:87,97:97,98:98}],76:[function(e,t,n){"use strict";function r(e,t,n){return{type:d.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:d.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:f.getHostNode(e),toIndex:n,afterNode:t}}function i(e,t){return{type:d.REMOVE_NODE,content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function a(e){return{type:d.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e){return{type:d.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e,t){return t&&(e=e||[],e.push(t)),e}function l(e,t){p.processChildrenUpdates(e,t)}var c=e(144),p=e(36),d=(e(71),e(72),e(77)),f=(e(39),e(87)),h=e(31),m=(e(161),e(128)),v=(e(169),{Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return h.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o,i){var a;return a=m(t),h.updateChildren(e,a,n,r,o,this,this._hostContainerInfo,i),a},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],u=f.mountComponent(s,t,this,this._hostContainerInfo,n);s._mountIndex=i++,o.push(u)}return o},updateTextContent:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");var r=[s(e)];l(this,r)},updateMarkup:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");var r=[a(e)];l(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},i=[],a=this._reconcilerUpdateChildren(r,e,i,o,t,n);if(a||r){var s,c=null,p=0,d=0,h=0,m=null;for(s in a)if(a.hasOwnProperty(s)){var v=r&&r[s],g=a[s];v===g?(c=u(c,this.moveChild(v,m,p,d)),d=Math.max(v._mountIndex,d),v._mountIndex=p):(v&&(d=Math.max(v._mountIndex,d)),c=u(c,this._mountChildAtIndex(g,i[h],m,p,t,n)),h++),p++,m=f.getHostNode(g)}for(s in o)o.hasOwnProperty(s)&&(c=u(c,this._unmountChild(r[s],o[s])));c&&l(this,c),this._renderedChildren=a}},unmountChildren:function(e){var t=this._renderedChildren;h.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex>"),N={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),symbol:i("symbol"),any:a(),arrayOf:s,element:u(),instanceOf:l,node:f(),objectOf:p,oneOf:c,oneOfType:d,shape:h};t.exports=N},{135:135,161:161,177:177,61:61,81:81,84:84}],84:[function(e,t,n){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=r},{}],85:[function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=u,this.updater=n||s}function o(){}var i=e(178),a=e(34),s=e(79),u=e(162);o.prototype=a.prototype,r.prototype=new o,r.prototype.constructor=r,i(r.prototype,a.prototype),r.prototype.isPureReactComponent=!0,t.exports=r},{162:162,178:178,34:34,79:79}],86:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.useCreateElement=e}var o=e(178),i=e(5),a=e(26),s=e(28),u=e(70),l=(e(72),e(118)),c=e(97),p={initialize:u.getSelectionInformation,close:u.restoreSelection},d={initialize:function(){var e=s.isEnabled();return s.setEnabled(!1),e},close:function(e){s.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h=[p,d,f],m={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},getUpdateQueue:function(){return c},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};o(r.prototype,l.Mixin,m),a.addPoolingTo(r),t.exports=r},{118:118,178:178,26:26,28:28,5:5,70:70,72:72,97:97}],87:[function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=e(88),i=(e(72),e(177),{mountComponent:function(e,t,n,o,i){var a=e.mountComponent(t,n,o,i);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(r,e),a},getHostNode:function(e){return e.getHostNode()},unmountComponent:function(e,t){o.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||i!==e._context){var s=o.shouldUpdateRefs(a,t);s&&o.detachRefs(e,a),e.receiveComponent(t,n,i),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t,n){e._updateBatchNumber===n&&e.performUpdateIfNecessary(t)}});t.exports=i},{177:177,72:72,88:88}],88:[function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):i.removeComponentAsRefFrom(t,e,n)}var i=e(80),a={};a.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},a.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,r=null===t||t===!1;return n||r||t.ref!==e.ref||"string"==typeof t.ref&&t._owner!==e._owner},a.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&o(n,e,t._owner)}},t.exports=a},{80:80}],89:[function(e,t,n){"use strict";var r={isBatchingUpdates:!1,batchedUpdates:function(e){}};t.exports=r},{}],90:[function(e,t,n){"use strict";function r(e,t){var n;try{return h.injection.injectBatchingStrategy(d),n=f.getPooled(t),g++,n.perform(function(){var r=v(e,!0),o=p.mountComponent(r,n,null,s(),m);return t||(o=c.addChecksumToMarkup(o)),o},null)}finally{g--,f.release(n),g||h.injection.injectBatchingStrategy(u)}}function o(e){return l.isValidElement(e)?void 0:a("46"),r(e,!1)}function i(e){return l.isValidElement(e)?void 0:a("47"),r(e,!0)}var a=e(144),s=e(45),u=e(59),l=e(61),c=(e(72),e(74)),p=e(87),d=e(89),f=e(91),h=e(98),m=e(162),v=e(139),g=(e(169),0);t.exports={renderToString:o,renderToStaticMarkup:i}},{139:139,144:144,162:162,169:169,45:45,59:59,61:61,72:72,74:74,87:87,89:89,91:91,98:98}],91:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1,this.updateQueue=new s(this)}var o=e(178),i=e(26),a=e(118),s=(e(72),e(92)),u=[],l={enqueue:function(){}},c={getTransactionWrappers:function(){return u},getReactMountReady:function(){return l},getUpdateQueue:function(){return this.updateQueue},destructor:function(){},checkpoint:function(){},rollback:function(){}};o(r.prototype,a.Mixin,c),i.addPoolingTo(r),t.exports=r},{118:118,178:178,26:26,72:72,92:92}],92:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){}var i=e(97),a=(e(118),e(177),function(){function e(t){r(this,e),this.transaction=t}return e.prototype.isMounted=function(e){return!1},e.prototype.enqueueCallback=function(e,t,n){this.transaction.isInTransaction()&&i.enqueueCallback(e,t,n)},e.prototype.enqueueForceUpdate=function(e){this.transaction.isInTransaction()?i.enqueueForceUpdate(e):o(e,"forceUpdate")},e.prototype.enqueueReplaceState=function(e,t){this.transaction.isInTransaction()?i.enqueueReplaceState(e,t):o(e,"replaceState")},e.prototype.enqueueSetState=function(e,t){this.transaction.isInTransaction()?i.enqueueSetState(e,t):o(e,"setState")},e}());t.exports=a},{118:118,177:177,97:97}],93:[function(e,t,n){"use strict";function r(e,t){var n={};return function(r){n[t]=r,e.setState(n)}}var o={createStateSetter:function(e,t){return function(n,r,o,i,a,s){var u=t.call(e,n,r,o,i,a,s);u&&e.setState(u)}},createStateKeySetter:function(e,t){var n=e.__keySetters||(e.__keySetters={});return n[t]||(n[t]=r(e,t))}};o.Mixin={createStateSetter:function(e){return o.createStateSetter(this,e)},createStateKeySetter:function(e){return o.createStateKeySetter(this,e)}},t.exports=o},{}],94:[function(e,t,n){"use strict";var r=e(128),o={getChildMapping:function(e,t){return e?r(e):e},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},o=[];for(var i in e)t.hasOwnProperty(i)?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var u in t){if(r.hasOwnProperty(u))for(a=0;a0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function i(e,t){var n=s.get(e);return n?n:null}var a=e(144),s=(e(39),e(71)),u=(e(72),e(98)),l=(e(169),e(177),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){l.validateCallback(t,n);var o=i(e);return o?(o._pendingCallbacks?o._pendingCallbacks.push(t):o._pendingCallbacks=[t],void r(o)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=i(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=i(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=i(e,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?a("122",t,o(e)):void 0}});t.exports=l},{144:144,169:169,177:177,39:39,71:71,72:72,98:98}],98:[function(e,t,n){"use strict";function r(){w.ReactReconcileTransaction&&_?void 0:c("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=w.ReactReconcileTransaction.getPooled(!0)}function i(e,t,n,o,i,a){r(),_.batchedUpdates(e,t,n,o,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==g.length?c("124",t,g.length):void 0,g.sort(a),y++;for(var n=0;n]/;t.exports=o},{}],127:[function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=a.get(e);return t?(t=s(t),t?i.getNodeFromInstance(t):null):void("function"==typeof e.render?o("44"):o("45",Object.keys(e)))}var o=e(144),i=(e(39),e(44)),a=e(71),s=e(134);e(169),e(177);t.exports=r},{134:134,144:144,169:169,177:177,39:39,44:44,71:71}],128:[function(e,t,n){(function(n){"use strict";function r(e,t,n,r){if(e&&"object"==typeof e){var o=e,i=void 0===o[n];i&&null!=t&&(o[n]=t)}}function o(e,t){if(null==e)return e;var n={};return i(e,r,n),n}var i=(e(23),e(150));e(177);"undefined"!=typeof n&&n.env,t.exports=o}).call(this,void 0)},{150:150,177:177,23:23}],129:[function(e,t,n){"use strict";function r(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}t.exports=r},{}],130:[function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=r},{}],131:[function(e,t,n){"use strict";function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var o=e(130),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=r},{130:130}],132:[function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return!!r&&!!n[r]}function o(e){return r}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},{}],133:[function(e,t,n){"use strict";function r(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}t.exports=r},{}],134:[function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.HOST?e._renderedComponent:t===o.EMPTY?null:void 0}var o=e(78);t.exports=r},{78:78}],135:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[i]);if("function"==typeof t)return t}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";t.exports=r},{}],136:[function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var n=r(e),i=0,a=0;n;){if(3===n.nodeType){if(a=i+n.textContent.length,i<=t&&a>=t)return{node:n,offset:t-i};i=a}n=r(o(n))}}t.exports=i},{}],137:[function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=e(155),i=null;t.exports=r},{155:155}],138:[function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(s[e])return s[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in u)return s[e]=t[n];return""}var i=e(155),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},s={},u={};i.canUseDOM&&(u=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),t.exports=o},{155:155}],139:[function(e,t,n){"use strict";function r(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}function o(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function i(e,t){var n;if(null===e||e===!1)n=l.create(i);else if("object"==typeof e){var s=e;!s||"function"!=typeof s.type&&"string"!=typeof s.type?a("130",null==s.type?s.type:typeof s.type,r(s._owner)):void 0,"string"==typeof s.type?n=c.createInternalComponent(s):o(s.type)?(n=new s.type(s),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new p(s)}else"string"==typeof e||"number"==typeof e?n=c.createInstanceForText(e):a("131",typeof e);return n._mountIndex=0,n._mountImage=null,n}var a=e(144),s=e(178),u=e(38),l=e(62),c=e(68),p=(e(72),e(169),e(177),function(e){this.construct(e)});s(p.prototype,u.Mixin,{_instantiateReactComponent:i});t.exports=i},{144:144,169:169,177:177,178:178,38:38,62:62,68:68,72:72}],140:[function(e,t,n){"use strict";function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=e(155);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},{155:155}],141:[function(e,t,n){"use strict";function r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!o[e.type]:"textarea"===t}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=r},{}],142:[function(e,t,n){"use strict";function r(e){return i.isValidElement(e)?void 0:o("23"),e}var o=e(144),i=e(61);e(169);t.exports=r},{144:144,169:169,61:61}],143:[function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=e(126);t.exports=r},{126:126}],144:[function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r]/,u=e(124),l=u(function(e,t){if(e.namespaceURI!==i.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML=""+t+"";for(var n=r.firstChild.childNodes,o=0;o-1},matchesSelector:function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(t){return r(e,t)};return n.call(e,t)}};t.exports=i},{169:169}],154:[function(e,t,n){"use strict";var r=e(161),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};t.exports=o},{161:161}],155:[function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},{}],156:[function(e,t,n){"use strict";function r(e){return e.replace(o,function(e,t){return t.toUpperCase()})}var o=/-(.)/g;t.exports=r},{}],157:[function(e,t,n){"use strict";function r(e){return o(e.replace(i,"ms-"))}var o=e(156),i=/^-ms-/;t.exports=r},{156:156}],158:[function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var o=e(171);t.exports=r},{171:171}],159:[function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),r=0;r":a.innerHTML="<"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var o=e(155),i=e(169),a=o.canUseDOM?document.createElement("div"):null,s={},u=[1,'"],l=[1,"","
"],c=[3,"","
"],p=[1,'',""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,s[e]=!0}),t.exports=r},{155:155,169:169}],166:[function(e,t,n){"use strict";function r(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=r},{}],167:[function(e,t,n){"use strict";function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},{}],168:[function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=e(167),i=/^ms-/;t.exports=r},{167:167}],169:[function(e,t,n){"use strict";function r(e,t,n,r,o,i,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,s],c=0;u=new Error(t.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}t.exports=r},{}],170:[function(e,t,n){"use strict";function r(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=r},{}],171:[function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=e(170);t.exports=r},{170:170}],172:[function(e,t,n){"use strict";var r=e(169),o=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};t.exports=o},{169:169}],173:[function(e,t,n){"use strict";var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=r},{}],174:[function(e,t,n){"use strict";function r(e,t,n){if(!e)return null;var r={};for(var i in e)o.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],175:[function(e,t,n){"use strict";function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=r},{}],176:[function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=0;a