diff --git a/.babelrc b/.babelrc new file mode 100644 index 00000000..ccb21ce2 --- /dev/null +++ b/.babelrc @@ -0,0 +1,12 @@ +{ + "presets": ["react"], + "env": { + "test": { + "plugins": [ + "transform-es2015-modules-commonjs", + "transform-es2015-classes", + "transform-object-rest-spread" + ] + } + } +} diff --git a/.gitignore b/.gitignore index 0ea5b511..1b74f453 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,8 @@ node_modules dmgs npm-debug.log build/background.tiff -bundle.js .dat tags yarn.lock +package-lock.json +static/bundle.js diff --git a/.travis.yml b/.travis.yml index c1efda56..669fec02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ env: install: - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - npm install + - npm run build:prod deploy: provider: script script: npm run dist diff --git a/README.md b/README.md index 86a25678..10625b28 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,6 @@ ## Table of Content - [Download](#download) - [Commands](#commands) -- [Directory Structure](#directory-structure) - [FAQ](#faq) - [License](#license) @@ -45,21 +44,8 @@ $ brew update && brew cask install dat $ npm install # install dependencies $ npm start # start the application $ npm run dist # compile the app into an ASAR file to release -$ npm start --dat= # change the path for new dat archives (default ~/Downloads) -``` - -## Directory structure - -```txt -elements/ Standalone application-specific elements -lib/ Generalized components, should be moved out of project later -models/ Choo models -pages/ Views that are directly mounted on the router -public/ Various assets -scripts/ Various scripts used to build and manage the repository -app.js Client application entry file -index.html Initial HTML served -index.js Electron application entry +$ npm start --data= # change the path for new dat archives (default ~/Downloads/dat) +$ npm start --db= # change the path for users settings (default ~/.dat-desktop) ``` ## FAQ diff --git a/app.js b/app.js deleted file mode 100644 index 62d4fb75..00000000 --- a/app.js +++ /dev/null @@ -1,36 +0,0 @@ -const persist = require('choo-persist') -const expose = require('choo-expose') -const log = require('choo-log') -const css = require('sheetify') -const choo = require('choo') -const xtend = Object.assign - -require('./lib/monkeypatch') - -css('dat-colors') -css('tachyons') -css('./assets/base.css') - -const app = choo() - -app.use(persist({ - filter: function (state) { - return xtend({}, state, { dats: {} }) - } -})) - -if (process.env.NODE_ENV === 'development') { - app.use(log()) - app.use(expose()) -} - -app.use(require('./models/intro')) -app.use(require('./models/inspect')) -app.use(require('./models/download')) -app.use(require('./models/drag-drop')) -app.use(require('./models/dats')) -app.use(require('./models/error')) - -app.route('/', require('./pages/main')) - -app.mount('body div') diff --git a/app/actions/dat-middleware.js b/app/actions/dat-middleware.js new file mode 100644 index 00000000..e41a929b --- /dev/null +++ b/app/actions/dat-middleware.js @@ -0,0 +1,436 @@ +'use strict' + +import Dat from 'dat-node' +import { encode } from 'dat-encoding' +import fs from 'fs' +import { basename, join as joinPath } from 'path' +import { ipcRenderer, shell } from 'electron' +import mkdirp from 'mkdirp-promise' +import mirror from 'mirror-folder' +import promisify from 'util-promisify' + +const readFile = promisify(fs.readFile) +const writeFile = promisify(fs.writeFile) +const { Notification } = window + +export default class DatMiddleware { + constructor ({ downloadsDir, dataDir }) { + this.downloadsDir = downloadsDir + this.dataDir = dataDir + this.dats = {} + this.listeners = [] + this.execByType = { + UPDATE_TITLE: action => this.updateTitle(action), + REMOVE_DAT: action => this.removeDat(action), + TRY_ADD_DAT: action => this.tryAddDat(action), + REQUEST_DOWNLOAD: action => this.validateDownloadRequest(action), + TOGGLE_PAUSE: action => this.togglePause(action), + DOWNLOAD_SPARSE_DAT: action => this.downloadSparseDat(action), + CANCEL_DOWNLOAD_DAT: action => this.cancelDownloadDat(action) + } + } + + async validateDownloadRequest ({ key }) { + if (key) { + key = encode(key) + if (this.dats[key]) { + return this.dispatch({ + type: 'ADD_DAT_ERROR', + key, + error: new Error('Dat with same key already exists.') + }) + } + } + this.dispatch({ type: 'SHOW_DOWNLOAD_SCREEN', key }) + } + + execAction (action) { + const exec = this.execByType[action.type] + if (!exec) return false + // Telling it to all the middlewares. + this.dispatch(action) + exec(action) + .then(data => + this.dispatch({ ...action, type: `${action.type}_SUCCESS`, ...data }) + ) + .catch(error => + this.dispatch({ ...action, type: `${action.type}_ERROR`, error }) + ) + return true + } + + middleware (store) { + return dispatch => { + this.listeners.push(dispatch) + return action => { + const triggersEffect = this.execAction(action) + if (!triggersEffect) { + // This action was not ment for this middleware. + // Pass on to the next. + dispatch(action) + } + } + } + } + + dispatch (action) { + this.listeners.forEach(listener => listener(action)) + } + + async updateTitle ({ key, editValue }) { + const dat = this.dats[key] + const filePath = joinPath(dat.path, 'dat.json') + const metadata = { ...dat.dat.metadata, title: editValue } + + try { + await writeFile(filePath, JSON.stringify(metadata)) + } catch (error) { + return this.dispatch({ type: 'WRITE_METADATA_ERROR', key, error }) + } + } + + async removeDat ({ key }) { + this.removeDatInternally(key) + this.storeOnDisk() + } + + async tryAddDat (action) { + let { key, path } = action + if (key) { + key = encode(key) + if (this.dats[key]) { + return this.dispatch({ + type: 'ADD_DAT_ERROR', + key, + error: new Error('Dat with same key already added.') + }) + } + } + if (!path) path = joinPath(this.downloadsDir, key) + + for (let key in this.dats) { + const dat = this.dats[key] + if (dat.path === path) { + return this.dispatch({ + type: 'ADD_DAT_ERROR', + key, + error: new Error('Dat with same path already added.') + }) + } + } + + await this.internalAddDat(action) + } + + async internalAddDat ({ key, path, paused, ...opts }) { + if (key) { + this.dispatch({ type: 'ADD_DAT', key, path, paused }) + } + opts = { + watch: true, + resume: true, + ignoreHidden: true, + compareFileContent: true, + ...opts + } + + Dat(path, { key }, (error, dat) => { + if (error) return this.dispatch({ type: 'ADD_DAT_ERROR', key, error }) + if (!key) { + key = encode(dat.key) + this.dispatch({ type: 'ADD_DAT', key, path, paused }) + } + + dat.trackStats() + if (dat.writable) dat.importFiles(opts) + + this.dispatch({ + type: 'DAT_METADATA', + key, + metadata: { + title: basename(path), + author: 'Anonymous' + } + }) + + this.dispatch({ type: 'ADD_DAT_SUCCESS', key }) + this.dispatch({ type: 'DAT_WRITABLE', key, writable: dat.writable }) + + dat.archive.readFile('/dat.json', (err, blob) => { + if (err) return + + let metadata = {} + try { + metadata = JSON.parse(blob) + } catch (_) {} + + this.dispatch({ type: 'DAT_METADATA', key, metadata }) + }) + + if (dat.archive.content) this.walk(dat) + else dat.archive.on('content', () => this.walk(dat)) + + dat.stats.on('update', stats => { + if (!stats) stats = dat.stats.get() + this.updateProgress(dat, key, stats) + this.dispatch({ type: 'DAT_STATS', key, stats: { ...stats } }) + }) + + this.updateState(dat) + this.updateProgress(dat, key) + + if (!paused) { + this.joinNetwork(dat) + this.updateConnections(dat) + } + + let prevNetworkStats + dat.updateInterval = setInterval(() => { + const stats = JSON.stringify(dat.stats.network) + if (stats === prevNetworkStats) return + prevNetworkStats = stats + this.dispatch({ + type: 'DAT_NETWORK_STATS', + key, + stats: { + up: dat.stats.network.uploadSpeed, + down: dat.stats.network.downloadSpeed + } + }) + }, 1000) + + this.dats[key] = { dat, path, opts } + this.storeOnDisk() + }) + } + + updateProgress (dat, key, stats) { + if (!stats) stats = dat.stats.get() + const prevProgress = dat.progress + const progress = !dat.stats + ? 0 + : dat.writable ? 1 : Math.min(1, stats.downloaded / stats.length) + dat.progress = progress + + this.dispatch({ type: 'DAT_PROGRESS', key, progress }) + this.updateState(dat) + + const unfinishedBefore = prevProgress < 1 && prevProgress > 0 + if (dat.progress === 1 && unfinishedBefore) { + const notification = new Notification('Download finished', { + body: key + }) + notification.onclick = () => + shell.openExternal(`file://${dat.path}`, () => {}) + } + + const incomplete = [] + for (const d of Object.values(this.dats)) { + if (d.network && d.progress < 1) incomplete.push(d) + } + let totalProgress = incomplete.length + ? incomplete.reduce((acc, dat) => { + return acc + dat.progress + }, 0) / incomplete.length + : 1 + if (totalProgress === 1) totalProgress = -1 // deactivate + if (ipcRenderer) ipcRenderer.send('progress', totalProgress) + } + + async togglePause ({ key, paused }) { + const { dat } = this.dats[key] + if (paused) { + this.joinNetwork(dat) + } else { + dat.leaveNetwork() + } + this.storeOnDisk() + } + + async downloadSparseDat ({ key }) { + key = encode(key) + const path = joinPath(this.downloadsDir, key) + + this.dispatch({ type: 'ADD_DAT', key, path }) + + Dat(path, { key, sparse: true }, (error, dat) => { + if (error) return this.dispatch({ type: 'ADD_DAT_ERROR', key, error }) + + dat.trackStats() + + this.dispatch({ + type: 'DAT_METADATA', + key, + metadata: { + title: basename(path), + author: 'Anonymous' + } + }) + + this.dispatch({ type: 'ADD_DAT_SUCCESS', key }) + + dat.archive.readFile('/dat.json', (err, blob) => { + if (err) return + + let metadata = {} + try { + metadata = JSON.parse(blob) + } catch (_) {} + + this.dispatch({ type: 'DAT_METADATA', key, metadata }) + }) + + if (dat.archive.content) this.walk(dat) + else dat.archive.on('content', () => this.walk(dat)) + + dat.stats.on('update', stats => { + if (!stats) stats = dat.stats.get() + this.dispatch({ type: 'DAT_STATS', key, stats: { ...stats } }) + }) + + this.updateState(dat) + this.joinNetwork(dat) + this.updateConnections(dat) + + this.dats[key] = { dat, path } + }) + } + + async cancelDownloadDat (key) { + key = encode(key) + + this.removeDatInternally(key) + } + + removeDatInternally (key) { + const { dat } = this.dats[key] + delete this.dats[key] + if (dat.mirrorProgress) { + dat.mirrorProgress.destroy() + } + this.dispatch({ type: 'REMOVE_DAT', key }) + + for (const con of dat.network.connections) { + con.removeAllListeners() + } + dat.stats.removeAllListeners() + clearInterval(dat.updateInterval) + + dat.close() + } + + walk (dat) { + const key = encode(dat.key) + if (!this.dats[key]) return // maybe it was deleted? + if (!dat.files) dat.files = [] + var fs = { name: '/', fs: dat.archive } + var progress = mirror(fs, '/', { dryRun: true }) + progress.on('put', file => { + file.name = file.name.slice(1) + if (file.name === '') return + dat.files.push({ + path: file.name, + size: file.stat.size, + isFile: file.stat.isFile() + }) + dat.files.sort(function (a, b) { + return a.path.localeCompare(b.path) + }) + + const { files } = dat + this.dispatch({ type: 'DAT_FILES', key, files }) + }) + dat.mirrorProgress = progress + } + + updateState (dat) { + const key = encode(dat.key) + const state = !dat.network + ? 'paused' + : dat.writable || dat.progress === 1 + ? 'complete' + : dat.network.connected ? 'loading' : 'stale' + this.dispatch({ type: 'DAT_STATE', key, state }) + } + + updateConnections (dat) { + if (!dat.network) return + const key = encode(dat.key) + this.dispatch({ type: 'DAT_PEERS', key, peers: dat.network.connected }) + } + + joinNetwork (dat) { + dat.joinNetwork() + dat.network.on('connection', con => { + this.updateConnections(dat) + this.updateState(dat) + con.on('close', () => { + this.updateConnections(dat) + this.updateState(dat) + }) + }) + } + + async loadFromDisk () { + try { + await mkdirp(this.dataDir) + } catch (_) {} + + let blob + try { + blob = await readFile(joinPath(this.dataDir, 'dats.json'), 'utf8') + } catch (_) { + return + } + const datOpts = JSON.parse(blob) + + blob = {} + try { + blob = await readFile(joinPath(this.dataDir, 'paused.json'), 'utf8') + } catch (_) {} + const paused = JSON.parse(blob) + + for (const key of Object.keys(datOpts)) { + const opts = JSON.parse(datOpts[key]) + this.internalAddDat({ + key, + path: opts.dir, + paused: paused[key], + ...opts + }) + } + } + + async storeOnDisk () { + try { + await mkdirp(this.dataDir) + } catch (_) {} + + const datsState = Object.keys(this.dats).reduce( + (acc, key) => ({ + ...acc, + [key]: JSON.stringify({ + dir: this.dats[key].path, + opts: this.dats[key].opts + }) + }), + {} + ) + const pausedState = Object.keys(this.dats).reduce( + (acc, key) => ({ + ...acc, + [key]: !this.dats[key].dat.network + }), + {} + ) + + await writeFile( + joinPath(this.dataDir, 'dats.json'), + JSON.stringify(datsState) + ) + await writeFile( + joinPath(this.dataDir, 'paused.json'), + JSON.stringify(pausedState) + ) + } +} diff --git a/app/actions/index.js b/app/actions/index.js new file mode 100644 index 00000000..18d1eb5c --- /dev/null +++ b/app/actions/index.js @@ -0,0 +1,85 @@ +'use strict' + +import { encode } from 'dat-encoding' +import { clipboard, remote, shell } from 'electron' +import fs from 'fs' +import promisify from 'util-promisify' +import path from 'path' + +const stat = promisify(fs.stat) + +function showOpenDialog (props) { + if (process.env.RUNNING_IN_SPECTRON && process.env.OPEN_RESULT) { + return [path.resolve(__dirname, process.env.OPEN_RESULT)] + } + return remote.dialog.showOpenDialog(props) +} + +export const shareDat = key => ({ type: 'DIALOGS_LINK_OPEN', key }) +export const copyLink = link => { + clipboard.writeText(link) + return { type: 'DIALOGS_LINK_COPY' } +} +export const closeShareDat = () => ({ type: 'DIALOGS_LINK_CLOSE' }) + +export const createDat = () => dispatch => { + const files = showOpenDialog({ + properties: ['openDirectory'] + }) + if (!files || !files.length) return + const path = files[0] + addDat({ path })(dispatch) +} +export const requestDownload = key => ({ + type: 'REQUEST_DOWNLOAD', + key: encode(key) +}) +export const hideDownloadScreen = () => ({ type: 'HIDE_DOWNLOAD_SCREEN' }) +export const cancelDownloadDat = key => dispatch => + dispatch({ type: 'CANCEL_DOWNLOAD_DAT', key }) +export const changeDownloadPath = key => dispatch => { + const files = showOpenDialog({ + properties: ['openDirectory'] + }) + if (!files || !files.length) return + const path = files[0] + dispatch({ type: 'CHANGE_DOWNLOAD_PATH', key, path }) +} + +export const downloadSparseDat = ({ key }) => dispatch => + dispatch({ type: 'DOWNLOAD_SPARSE_DAT', key }) +export const addDat = ({ key, path, paused, ...opts }) => dispatch => + dispatch({ type: 'TRY_ADD_DAT', key, path, paused, ...opts }) +export const deleteDat = key => ({ type: 'DIALOGS_DELETE_OPEN', key }) +export const confirmDeleteDat = key => dispatch => { + dispatch({ type: 'REMOVE_DAT', key }) + dispatch({ type: 'DIALOGS_DELETE_CLOSE' }) +} +export const cancelDeleteDat = () => ({ type: 'DIALOGS_DELETE_CLOSE' }) +export const togglePause = ({ key, paused }) => dispatch => + dispatch({ type: 'TOGGLE_PAUSE', paused, key }) + +export const inspectDat = key => dispatch => { + dispatch({ type: 'INSPECT_DAT', key }) +} +export const closeInspectDat = () => ({ type: 'INSPECT_DAT_CLOSE' }) +export const dropFolder = folder => async dispatch => { + const isDirectory = (await stat(folder.path)).isDirectory() + if (!isDirectory) return + addDat({ path: folder.path })(dispatch) +} + +export const openHomepage = () => shell.openExternal('https://datproject.org/') +export const nextIntro = screen => ({ type: 'NEXT_INTRO', screen }) +export const hideIntro = () => ({ type: 'HIDE_INTRO' }) + +export const updateTitle = (key, title) => async dispatch => + dispatch({ + type: 'UPDATE_TITLE', + key, + title + }) + +export const toggleMenu = visible => dispatch => { + dispatch({ type: 'TOGGLE_MENU', visible }) +} diff --git a/app/components/app.js b/app/components/app.js new file mode 100644 index 00000000..44a546b5 --- /dev/null +++ b/app/components/app.js @@ -0,0 +1,29 @@ +'use strict' + +import React, { Fragment } from 'react' +import IntroContainer from '../containers/intro' +import Sprite from './sprite' +import HeaderContainer from '../containers/header' +import TableContainer from '../containers/table' +import * as Dialog from '../containers/dialog' +import StatusBarContainer from '../containers/status-bar' +import InspectContainer from '../containers/inspect' +import DragDropContainer from '../containers/drag-drop' +import DownloadContainer from '../containers/download' + +const App = () => ( + + + + + + + + + + + + +) + +export default App diff --git a/app/components/button.js b/app/components/button.js new file mode 100644 index 00000000..2f0dc743 --- /dev/null +++ b/app/components/button.js @@ -0,0 +1,119 @@ +'use strict' + +import React from 'react' +import styled from 'styled-components' + +const BaseButton = styled.button.attrs({ + onClick: props => { + if (props.trigger) { + return function (e) { + e.stopPropagation() + props.trigger.apply(this, [e]) + } + } + return undefined + } +})` + text-transform: uppercase; + letter-spacing: 0.025em; + cursor: pointer; + background-color: transparent; + .icon-only { + .btn-text { + display: none; + } + } + :hover, + :focus { + outline: 0; + } +` + +const HeaderButton = BaseButton.extend` + color: var(--color-neutral-30); + height: 2rem; + :hover, + :focus { + color: var(--color-white); + } +` + +var PlainButton = BaseButton.extend` + padding: 0.5rem 0.75rem; + font-size: 0.75rem; + background-color: transparent; + color: var(--color-neutral-40); + :hover, + :focus { + color: var(--color-neutral-70); + } +` + +var GreenButton = BaseButton.extend` + padding: 0.5rem 0.75rem; + font-size: 0.75rem; + background-color: var(--color-green); + color: var(--color-neutral-04); + :hover, + :focus { + background-color: var(--color-green-hover); + color: var(--color-white); + } +` + +var RedButton = BaseButton.extend` + padding: 0.5rem 0.75rem; + font-size: 0.75rem; + background-color: var(--color-red); + color: var(--color-neutral-04); + :hover, + :focus { + background-color: var(--color-red-hover); + color: var(--color-white); + } +` + +const InnerWrapper = styled.div` + display: flex; + flex-wrap: nowrap; + flex-direction: row; + justify-content: center; + align-items: center; +` + +export const Header = ({ children, icon, ...props }) => ( + + {children} + +) + +export const Icon = ({ icon, ...props }) => ( + + {icon} + +) + +export const Plain = ({ children, ...props }) => ( + + {children} + +) + +export const Green = ({ children, icon, ...props }) => ( + + {children} + +) + +export const Red = ({ children, icon, ...props }) => ( + + {children} + +) + +const InnerWrapperComponent = ({ children, icon }) => ( + + {icon} + {children} + +) diff --git a/app/components/dat-import.js b/app/components/dat-import.js new file mode 100644 index 00000000..a70c5d58 --- /dev/null +++ b/app/components/dat-import.js @@ -0,0 +1,80 @@ +'use strict' + +import React from 'react' +import styled from 'styled-components' +import Icon from './icon' + +const Label = styled.label` + --icon-height: 1.2rem; + color: var(--color-neutral-30); + .icon-link { + padding-top: 0.42rem; + padding-left: 0.5rem; + pointer-events: none; + width: var(--icon-height); + height: var(--icon-height); + } + input { + height: 2rem; + width: 7.5rem; + padding-right: 0.5rem; + padding-left: 2rem; + border-radius: 2px; + border: 1px solid transparent; + background-color: transparent; + color: var(--color-neutral-30); + opacity: 1; + text-transform: uppercase; + letter-spacing: 0.025em; + transition-property: width; + transition-duration: 0.15s; + transition-timing-function: ease-in; + &::-webkit-input-placeholder { + color: var(--color-neutral-30); + opacity: 1; + } + &:hover, + &:hover::-webkit-input-placeholder, + &:hover + svg { + color: var(--color-white); + } + &:focus, + &:active { + width: 14rem; + outline: none; + background-color: var(--color-white); + color: var(--color-neutral); + } + &:focus::-webkit-input-placeholder, + &:active::-webkit-input-placeholder, + &:focus + svg, + &:active + svg { + color: var(--color-neutral-50); + } + } +` + +const DatImport = ({ requestDownload, downloadSparseDat }) => { + const onKeyDown = e => { + const value = e.target.value + if (e.key !== 'Enter' || !value) return + e.target.value = '' + downloadSparseDat({ key: value, paused: false, sparse: true }) + requestDownload(value) + } + + return ( + + ) +} + +export default DatImport diff --git a/app/components/dialog.js b/app/components/dialog.js new file mode 100644 index 00000000..3775da54 --- /dev/null +++ b/app/components/dialog.js @@ -0,0 +1,192 @@ +'use strict' + +import React from 'react' +import styled from 'styled-components' +import Icon from './icon' +import * as Button from './button' + +const Inner = styled.div` + min-width: 25rem; + max-width: 32rem; + padding: 2rem 2.5rem 2rem; + background-color: var(--color-white); + box-shadow: 0 1.2rem 2.4rem rgba(0, 0, 0, 0.5); + .exit { + border: none; + color: var(--color-neutral-40); + } + .exit:hover, + .exit:focus { + color: var(--color-neutral); + } + .icon-cross { + vertical-align: middle; + width: 1.6em; + max-height: 1.6em; + transition: color 0.025s ease-out; + margin-right: auto; + margin-left: auto; + } +` + +const LabelInput = styled.label` + --input-height: 3rem; + --icon-height: 1.2rem; + --button-width: 3rem; + height: var(--input-height); + border: 0; + .btn-copy-to-clipboard { + width: var(--button-width); + height: calc(var(--input-height) - 2px); + top: 1px; + right: 1px; + bottom: 1px; + background-color: var(--color-neutral-10); + border: none; + color: var(--color-neutral-30); + &:hover, + &:focus { + outline: none; + color: var(--color-green-hover); + } + } + .icon-link, + .icon-clipboard { + position: absolute; + top: 0; + bottom: 0; + padding-top: calc(var(--icon-height) - 0.35rem); + padding-left: 0.75rem; + pointer-events: none; + display: block; + width: var(--icon-height); + height: var(--icon-height); + transition: color 0.025s ease-out; + } + .icon-link { + left: 0; + color: var(--color-neutral-30); + } + .icon-clipboard { + right: 0.8rem; + } + .dat-input-input { + width: 100%; + height: var(--input-height); + padding-right: var(--button-width); + padding-left: 2.5rem; + font-size: 1rem; + font-weight: 600; + border: 1px solid var(--color-neutral-20); + background-color: var(--color-white); + color: var(--color-green-hover); + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + &:hover, + &:focus { + outline: none; + } + } + .dat-input-check { + color: var(--color-blue); + top: 2rem; + } + .icon-check { + width: var(--icon-height); + height: 0.875rem; + vertical-align: -0.15rem; + display: inline-block; + } + .confirmation { + right: 0; + opacity: 0; + top: -0.5rem; + color: var(--color-blue); + } + .show-confirmation { + top: -1.2rem; + opacity: 1; + transition: all 0.15s ease-out; + } +` + +function CloseButton ({ onExit }) { + return ( + + ) +} + +export const Link = ({ link, copied, onCopy, onExit }) => ( +
+ +

Copy Dat Link

+ +

+ + Link copied to clipboard +

+ + + +
+

+ Anyone with this link can view your Dat. +

+ +
+
+) + +export const Confirm = ({ dat, onConfirm, onExit }) => ( +
+ +

Remove Dat

+

+ Are you sure you want to remove this dat? +
+ This can’t be undone. +

+

+ onConfirm(dat)} + > + Yes, Remove Dat + + + No, Cancel + +

+ +
+
+) diff --git a/app/components/download.js b/app/components/download.js new file mode 100644 index 00000000..0a825036 --- /dev/null +++ b/app/components/download.js @@ -0,0 +1,135 @@ +'use strict' + +import React, { Fragment } from 'react' +import styled from 'styled-components' +import { toStr } from 'dat-encoding' +import bytes from 'prettier-bytes' +import Icon from './icon' +import FileList from './file-list' +import { Plain as PlainButton, Green as GreenButton } from './button' + +const DetailHeader = styled.header` + height: 4rem; + flex-shrink: 0; + border-bottom: 1px solid var(--color-neutral-20); +` + +const DetailFooter = styled.footer` + flex-shrink: 0; + border-top: 1px solid var(--color-neutral-20); +` + +const Label = styled.div` + font-size: 0.75rem; + min-width: 8rem; + color: var(--color-neutral-60); +` + +const Download = ({ + show, + dat, + addDat, + hideDownloadScreen, + cancelDownloadDat, + changeDownloadPath +}) => { + if (!show) { + return ( + +
+ + ) + } + + const title = dat + ? dat.metadata ? dat.metadata.title : dat.key + : 'Fetching metadata …' + const author = dat + ? dat.metadata && dat.metadata.author ? dat.metadata.author : 'N/A' + : '…' + const description = dat + ? dat.metadata && dat.metadata.description + ? dat.metadata.description + : 'N/A' + : '…' + const size = + dat && dat.stats && Number(dat.stats.length) === dat.stats.length + ? bytes(dat.stats.length) + : 0 + const peers = dat ? dat.peers : '…' + + return ( +
+
+ +
+ +
+

{title}

+
+
+
+ +
+ {toStr(dat.key)} +
+
+
+ +
{size}
+
+
+ +
{peers}
+
+
+ +
{author}
+
+
+ +
{description}
+
+
+ +
+
+                {dat.path}
+              
+ changeDownloadPath(dat.key)}> + CHANGE... + +
+
+
+ + +
+
+ +

Download this Dat now?

+
+ { + addDat({ key: dat.key, path: dat.path }) + hideDownloadScreen() + }} + > + Download + + { + cancelDownloadDat(dat.key) + hideDownloadScreen() + }} + > + Cancel + +
+
+
+
+ ) +} + +export default Download diff --git a/app/components/empty.js b/app/components/empty.js new file mode 100644 index 00000000..9e3d5144 --- /dev/null +++ b/app/components/empty.js @@ -0,0 +1,72 @@ +import React from 'react' +import styled from 'styled-components' +import Icon from './icon' + +const Main = styled.main` + position: relative; + .skeleton { + position: fixed; + top: 3.5rem; + left: 1.25rem; + width: 232px; + max-width: 100vw; + } + .dotted-lines { + position: absolute; + top: 0.25rem; + right: 5.5rem; + width: 17rem; + z-index: 3; + } + .create-new-dat, + .link { + position: absolute; + width: 15rem; + color: var(--color-neutral-30); + svg { + display: inline-block; + width: 2rem; + height: 2rem; + } + } + .create-new-dat { + top: 14.5rem; + right: 4rem; + } + .link { + top: 6rem; + right: 8.5rem; + svg { + margin-bottom: -0.75rem; + } + } +` + +const Empty = () => ( +
+ +
+ +
+ +

Download A Dat

+

+ … and keep data up-to-date +
+ by entering the link here. +

+
+
+ +

Share a Folder

+

+ … and sync changes by sharing +
+ the link with someone else. +

+
+
+
+) + +export default Empty diff --git a/app/components/file-list.js b/app/components/file-list.js new file mode 100644 index 00000000..6f04a37d --- /dev/null +++ b/app/components/file-list.js @@ -0,0 +1,55 @@ +'use strict' + +import React from 'react' +import styled from 'styled-components' +import bytes from 'prettier-bytes' + +const FileListContainer = styled.div` + :host { + min-height: 5rem; + } +` + +const FileListTable = styled.table` + :host { + td { + padding: 0.25rem 0.5rem; + } + tr:odd td { + background-color: var(--color-neutral-04); + } + } +` + +const List = ({ dat }) => ( + + {dat && dat.files && dat.files.length ? ( + + + {dat.files.map(file => { + const size = + Number(file.size) === file.size && file.isFile + ? bytes(file.size) + : '' + return ( + + {file.path} + {size} + + ) + })} + + + ) : ( +
N/A
+ )} +
+) + +const FileList = ({ dat }) => ( + + + +) + +export default FileList diff --git a/app/components/finder-button.js b/app/components/finder-button.js new file mode 100644 index 00000000..a69cc8d2 --- /dev/null +++ b/app/components/finder-button.js @@ -0,0 +1,17 @@ +'use strict' + +import React from 'react' +import * as Button from './button' +import Icon from './icon' +import { resolve } from 'path' +import { shell } from 'electron' + +const FinderButton = ({ dat, onClick }) => ( + } + className='row-action btn-finder' + trigger={() => shell.openExternal(`file://${resolve(dat.path)}`, () => {})} + /> +) + +export default FinderButton diff --git a/app/components/header.js b/app/components/header.js new file mode 100644 index 00000000..d577ae90 --- /dev/null +++ b/app/components/header.js @@ -0,0 +1,75 @@ +'use strict' + +import React from 'react' +import styled from 'styled-components' +import { transparentize } from 'polished' +import { neutral } from 'dat-colors' +import { default as DatImport } from '../containers/dat-import' +import * as Button from './button' +import Icon from './icon' + +const Container = styled.header` + height: 2.5rem; + padding: 0.25rem 0.75rem; + -webkit-app-region: drag; + background-color: var(--color-neutral); + color: var(--color-white); + z-index: 4; +` + +const HideLayer = styled.div` + position: absolute; + background: ${transparentize(0.85, neutral)}; + width: 100%; + height: 100%; + left: 0; + top: 0; + z-index: 5; +` + +const Header = ({ onShare, onMenu, onReport, menuVisible, version }) => { + const toggleMenu = () => onMenu(!menuVisible) + return ( + + {menuVisible && } +
+ + } + className='b--transparent v-mid color-neutral-30 hover-color-white f7 f6-l btn-share-folder' + onClick={onShare} + > + Share Folder + + } + className='ml2 v-mid color-neutral-20 hover-color-white pointer btn-toggle-menu' + onClick={toggleMenu} + /> + {menuVisible && ( +
+

Dat Desktop {version}

+

+ Dat Desktop is a peer to peer sharing app built for humans by + humans. +

+

+ + Report Bug + +

+
+ )} +
+
+ ) +} + +export default Header diff --git a/app/components/hex-content.js b/app/components/hex-content.js new file mode 100644 index 00000000..febc7bad --- /dev/null +++ b/app/components/hex-content.js @@ -0,0 +1,59 @@ +import React from 'react' +import Swap from 'react-swap' +import * as Button from './button' +import Icon from './icon' + +const HexContent = ({ dat }) => { + let hex + let onHover + + if (dat.state === 'loading') { + hex = ( + } + className='color-blue hover-color-blue-hover ph0' + /> + ) + } else if (dat.paused) { + hex = ( + } + className='color-neutral-30 hover-color-neutral-40 ph0' + /> + ) + } else if (dat.state === 'complete') { + hex = ( + } + className='color-green hover-color-green-hover ph0' + /> + ) + } else { + hex = ( + } + className='color-neutral-30 hover-color-neutral-40 ph0' + /> + ) + } + + if (!dat.paused) { + onHover = ( + } + className='color-neutral-40 ph0' + /> + ) + } else { + onHover = hex + } + + return ( + +
{hex}
+
{onHover}
+
+ ) +} + +export default HexContent diff --git a/app/components/icon.js b/app/components/icon.js new file mode 100644 index 00000000..17b21592 --- /dev/null +++ b/app/components/icon.js @@ -0,0 +1,21 @@ +'use strict' + +import React from 'react' +import styled from 'styled-components' + +const Svg = styled.svg` + display: block; + fill: currentColor; +` + +const Icon = ({ name, ...props }) => ( + + + +) + +export default Icon diff --git a/app/components/inspect.js b/app/components/inspect.js new file mode 100644 index 00000000..888c2b09 --- /dev/null +++ b/app/components/inspect.js @@ -0,0 +1,113 @@ +'use strict' + +import React, { Fragment } from 'react' +import styled from 'styled-components' +import { toStr } from 'dat-encoding' +import bytes from 'prettier-bytes' +import FileList from './file-list' +import Icon from './icon' +import { Plain as PlainButton } from './button' + +const DetailHeader = styled.header` + height: 4rem; + flex-shrink: 0; + border-bottom: 1px solid var(--color-neutral-20); +` + +const DetailFooter = styled.footer` + flex-shrink: 0; + border-top: 1px solid var(--color-neutral-20); +` + +const LabelStyle = styled.div` + font-size: 0.75rem; + min-width: 8rem; + color: var(--color-neutral-60); +` + +const Label = ({ children }) => ( + {children} +) + +const Inspect = ({ dat, closeInspectDat, addFilesToDat }) => { + if (!dat) { + return ( + +
+ + ) + } + + const title = dat + ? dat.metadata ? dat.metadata.title : dat.key + : 'Fetching metadata …' + const author = dat + ? dat.metadata && dat.metadata.author ? dat.metadata.author : 'N/A' + : '…' + const description = dat + ? dat.metadata && dat.metadata.description + ? dat.metadata.description + : 'N/A' + : '…' + const size = + Number(dat.stats.length) === dat.stats.length ? bytes(dat.stats.length) : 0 + const peers = dat ? dat.peers : '…' + + return ( +
+
+ +
+ +
+

{title}

+
+
+
+ +
+ {toStr(dat.key)} +
+
+
+ +
{size}
+
+
+ +
{peers}
+
+
+ +
{author}
+
+
+ +
{description}
+
+
+ +
+
+                {dat.path}
+              
+
+
+
+ + +
+
+
+ +
+ closeInspectDat()}> + ← Back to Overview + +
+
+
+ ) +} + +export default Inspect diff --git a/app/components/intro.js b/app/components/intro.js new file mode 100644 index 00000000..cf63391b --- /dev/null +++ b/app/components/intro.js @@ -0,0 +1,171 @@ +'use strict' + +import React, { Fragment, Component } from 'react' +import styled from 'styled-components' +import { Green as GreenButton, Plain as PlainButton } from './button' + +const Intro = styled.main` + position: relative; + height: 100vh; + background-color: var(--color-neutral); + color: var(--color-white); + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + -webkit-app-region: drag; + overflow: hidden; +` +const Content = styled.div` + position: relative; + flex: 1; + width: 100vw; + padding: 3rem 2rem; +` + +const Footer = styled.div` + position: relative; + width: 100vw; + padding: 1rem; + display: flex; + justify-content: space-between; + button { + min-width: 5rem; + } +` +const Image = styled.img` + max-width: 100vw; + max-height: 100vh; +` + +const StyledDots = styled.div` + display: flex; + justify-content: space-between; + align-items: center; + .dot { + width: 0.5rem; + height: 0.5rem; + margin: 0.25rem; + border-radius: 50%; + background-color: var(--color-black); + } + .active { + background-color: var(--color-blue); + } +` + +const Dots = ({ screen }) => ( + + {Array(5) + .fill(null) + .map((_, i) => { + const className = i === screen - 1 ? 'dot active' : 'dot' + return
+ })} + +) + +class IntroScreen extends Component { + constructor (props) { + super(props) + this.onkeydown = this.onkeydown.bind(this) + } + + onkeydown (ev) { + if (ev.code !== 'Escape') return + window.removeEventListener('keydown', this.onkeydown) + this.props.hide() + } + + componentWillMount () { + window.addEventListener('keydown', this.onkeydown) + } + + componentWillUnmount () { + window.removeEventListener('keydown', this.onkeydown) + } + + render () { + const { show, screen, hide, next, openHomepage } = this.props + + if (!show) { + return ( + +
+ + ) + } + + return ( + + + + { + { + 1:

Hey there! This is a Dat.

, + 2: ( +

+ Think of it as a folder – with some magic. +

+ ), + 3: ( +

+ You can turn any folder on your computer into a Dat. +

+ ), + 4: ( +

+ Dats can be easily shared. Just copy the unique dat link and + securely share it. +

+ ), + 5: ( +

+ You can also import existing Dats. Check out{' '} + openHomepage()} + > + datproject.org + {' '} + to explore open datasets. +

+ ) + }[screen] + } +
+ {screen === 1 ? ( + next(screen)} + > + Get Started + + ) : ( +
+ hide()} className='btn-skip'> + Skip Intro + + + {screen < 5 ? ( + next(screen)} className='btn-next'> + Next + + ) : ( + hide()} className='btn-next btn-done'> + Done + + )} +
+ )} +
+ ) + } +} + +export default IntroScreen diff --git a/app/components/sprite.js b/app/components/sprite.js new file mode 100644 index 00000000..9c275794 --- /dev/null +++ b/app/components/sprite.js @@ -0,0 +1,8 @@ +'use strict' + +import React from 'react' +import datIcons from 'dat-icons/raw' + +const Sprite = () =>
+ +export default Sprite diff --git a/app/components/status-bar.js b/app/components/status-bar.js new file mode 100644 index 00000000..344c40dd --- /dev/null +++ b/app/components/status-bar.js @@ -0,0 +1,32 @@ +import React, { Fragment } from 'react' +import styled from 'styled-components' +import bytes from 'prettier-bytes' + +const Bar = styled.div` + position: fixed; + left:0; + bottom: 0; + width: 100vw; + padding: 0.5rem 1rem 0.75rem; + background-color: var(--color-neutral-04); + color: var(--color-neutral-60); +` + +const StatusBar = ({ up, down, show }) => { + if (!show) { + return ( + +
+ + ) + } + + return ( + + Download: {bytes(down)}/s + Upload: {bytes(up)}/s + + ) +} + +export default StatusBar diff --git a/app/components/status.js b/app/components/status.js new file mode 100644 index 00000000..e00769fa --- /dev/null +++ b/app/components/status.js @@ -0,0 +1,135 @@ +'use strict' + +import React from 'react' +import styled from 'styled-components' +import bytes from 'prettier-bytes' + +const ProgressBar = styled.div` + --progress-height: 0.5rem; + --bar-height: var(--progress-height); + --counter-width: 3rem; + --tile-width: 28px; + --stripe-width: 5px; + min-width: 8rem; + max-width: 24rem; + overflow: hidden; + padding-top: 0.4rem; + .bar { + height: var(--progress-height); + width: calc(100% - var(--counter-width)); + float: left; + overflow: hidden; + background-color: var(--color-neutral-20); + border-radius: 2px; + } + .line { + width: 0%; + height: var(--progress-height); + background-color: var(--color-blue); + border-radius: 2px; + } + .line-loading { + overflow: hidden; + position: relative; + height: var(--bar-height); + &:before { + content: ''; + width: 100%; + height: var(--bar-height); + position: absolute; + top: 0; + left: 0; + background-image: repeating-linear-gradient( + -45deg, + transparent, + transparent var(--stripe-width), + rgba(255, 255, 255, 0.1) var(--stripe-width), + rgba(255, 255, 255, 0.1) calc(2 * var(--stripe-width)) + ); + background-size: var(--tile-width) var(--bar-height); + animation: move-bg 0.75s linear infinite; + } + } + .line-complete { + background-color: var(--color-green); + } + .line-paused { + background-color: var(--color-neutral-40); + } + .counter { + float: right; + min-width: var(--counter-width); + margin-top: -0.4rem; + text-align: right; + } + + @keyframes move-bg { + 0% { + background-position: 28px 0; + } + 100% { + background-position: 0 0; + } + } +` + +const ProgressSubline = styled.span` + .arrow { + vertical-align: top; + } +` + +const speed = n => `${bytes(n || 0)}/s` + +const Status = ({ dat }) => { + const progress = Math.floor((dat.progress || 0) * 100) + const progressbarLine = + dat.state === 'loading' + ? 'line-loading' + : dat.paused || dat.state === 'stale' ? 'line-paused' : 'line-complete' + const netStats = dat.stats.network + + let progressText + + if (dat.paused) { + progressText = 'Paused.' + } else { + switch (dat.state) { + case 'complete': + progressText = `Complete. ↑ ${speed(netStats.up)}` + break + case 'loading': + progressText = ( + + {speed(netStats.down)} + {speed(netStats.up)} + + ) + break + case 'stale': + progressText = 'waiting for peers…' + break + default: + progressText = 'Paused.' + } + } + + return ( +
+ +
{progress}%
+
+
+
+ +

+ {progressText} +

+
+ ) +} + +export default Status diff --git a/app/components/table-row.js b/app/components/table-row.js new file mode 100644 index 00000000..20961a3e --- /dev/null +++ b/app/components/table-row.js @@ -0,0 +1,201 @@ +'use strict' + +import React from 'react' +import styled from 'styled-components' +import * as Button from './button' +import Icon from './icon' +import Status from './status' +import bytes from 'prettier-bytes' +import FinderButton from './finder-button' +import HexContent from './hex-content' +import TitleField from './title-field' + +const Tr = styled.tr` + transition: background-color 0.025s ease-out; + &:hover, + &:focus { + background-color: var(--color-neutral-04); + cursor: pointer; + } + .cell-1 { + width: 4rem; + } + .cell-2 { + width: 14rem; + max-width: 12rem; + @media (min-width: 768px) { + max-width: 20rem; + } + @media (min-width: 1280px) { + max-width: 24rem; + } + } + .cell-3 { + width: 15rem; + } + .cell-4 { + width: 4.5rem; + white-space: nowrap; + } + .cell-5 { + width: 4.5rem; + white-space: nowrap; + } + .cell-6 { + width: 10.25rem; + } + .cell-truncate { + width: 100%; + } +` + +const IconContainer = styled.div` + .row-action { + height: 1.5rem; + display: inline-block; + color: var(--color-neutral-20); + svg { + vertical-align: middle; + width: 0.75em; + max-height: 1.6em; + margin-top: -0.05em; + margin-right: 5px; + @media (min-width: 960px) { + width: 1.4em; + } + } + &:hover, + &:focus { + outline: none; + color: var(--color-neutral-50); + } + &:first-child { + padding-left: 0; + } + &:last-child { + padding-right: 0; + } + } + .icon-network { + display: inline-block; + color: var(--color-neutral-20); + vertical-align: sub; + width: 1em; + svg polygon { + fill: inherit; + } + } +` + +const NetworkContainer = styled.td` + vertical-align: top; + svg { + height: 1.5rem; + display: inline-block; + color: var(--color-neutral-20); + vertical-align: top; + width: 1.1em; + max-height: 1.6em; + } + .network-peers-many { + --polygon-1-color: var(--color-green); + --polygon-2-color: var(--color-green); + --polygon-3-color: var(--color-green); + } + .network-peers-1 { + --polygon-1-color: var(--color-yellow); + --polygon-2-color: var(--color-yellow); + } + .network-peers-0 { + --polygon-1-color: var(--color-red); + } +` + +const NetworkIcon = ({ dat }) => { + const iconClass = `network-peers ${ + dat.peers === 0 + ? 'network-peers-0' + : dat.peers === 1 ? 'network-peers-1' : 'network-peers-many' + }` + return +} + +const LinkButton = ({ ...props }) => ( + } + className='row-action btn-link' + {...props} + /> +) + +const DeleteButton = ({ ...props }) => ( + } + className='row-action mr2 btn-delete' + {...props} + /> +) + +const Row = ({ + dat, + shareDat, + onDeleteDat, + inspectDat, + onTogglePause, + updateTitle +}) => { + const { writable, metadata, key } = dat + const { title } = metadata + const placeholderTitle = `#${key}` + return ( + inspectDat(dat.key)}> + +
{ + event.stopPropagation() + onTogglePause(dat) + }} + > + +
+ + +
+ updateTitle(key, title)} + /> +

+ + {dat.metadata.author || 'Anonymous'} •{' '} + + + {dat.writable ? 'Read & Write' : 'Read-only'} + +

+
+ + + + + + {bytes(dat.stats.byteLength || 0)} + + + + {dat.peers} + + + + + shareDat(`dat://${dat.key}`)} /> + onDeleteDat(dat.key)} /> + + + + ) +} + +export default Row diff --git a/app/components/table.js b/app/components/table.js new file mode 100644 index 00000000..39d36891 --- /dev/null +++ b/app/components/table.js @@ -0,0 +1,77 @@ +'use strict' + +import React, { Fragment } from 'react' +import styled from 'styled-components' +import TableRowContainer from '../containers/table-row' +import Empty from './empty' + +const StyledTable = styled.table` + width: 100%; + max-width: 80rem; + margin: 0 auto; + border-collapse: collapse; + th, + td { + padding-right: 0.75rem; + padding-left: 0.75rem; + } + th { + height: 4rem; + font-size: 0.8125rem; + font-weight: normal; + color: var(--color-neutral-60); + border-bottom: 1px solid var(--color-neutral-20); + &:first-child { + width: 3rem; + padding: 0; + border: none; + } + &:last-child { + width: 8.25rem; + } + } + td { + height: 4rem; + vertical-align: top; + padding-top: 1rem; + } + tr:hover td { + background-color: var(--color-neutral--04); + } +` + +const Table = ({ dats, show }) => { + if (!show) { + return ( + +
+ + ) + } + + if (!Object.keys(dats).length) return + + return ( +
+ + + + + Link + Status + Size + Peers + + + + + {Object.keys(dats).map(key => ( + + ))} + + +
+ ) +} + +export default Table diff --git a/app/components/title-field.js b/app/components/title-field.js new file mode 100644 index 00000000..eb22784f --- /dev/null +++ b/app/components/title-field.js @@ -0,0 +1,151 @@ +import React, { Component } from 'react' +import styled from 'styled-components' +import Icon from './icon' +import { Plain as PlainButton, Green as GreenButton } from './button' + +const Overlay = styled.div` + position: absolute; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background-color: rgba(0, 0, 0, 0.2); +` + +const EditableFieldWrapper = styled.div` + position: relative; + h2 { + position: relative; + } + .indicator { + position: absolute; + display: none; + top: 0.25rem; + right: 0; + width: 0.75rem; + } + &:hover, + &:focus { + h2 { + color: var(--color-blue); + } + .indicator { + display: block; + } + } +` + +const InputField = styled.input` + :focus { + outline: none; + } +` + +class TitleField extends Component { + startEditing () { + this.setState({ editing: true }) + } + + onclick (ev) { + ev.stopPropagation() + ev.preventDefault() + this.startEditing() + + // setTimeout? Because ref on input is set asynchronously, and later. So we can't do focus, select on it until ref is set + setTimeout(() => { + this.titleInput.focus() + this.titleInput.select() + }, 0) + } + + commit () { + const oldValue = this.props.value + const newValue = this.titleInput.value + if (oldValue !== newValue) { + this.props.onChange(newValue) + } + this.cancel() + } + + cancel () { + this.setState({ + modified: false, + editing: false + }) + } + + handleKeyup (ev) { + ev.stopPropagation() + + if (ev.key === 'Escape') { + ev.preventDefault() + this.cancel() + return + } + + if (ev.key === 'Enter') { + ev.preventDefault() + this.commit() + return + } + + const oldValue = this.props.value + const newValue = ev.target.value + const modified = oldValue !== newValue + this.setState({ modified }) + } + + render () { + const { writable, value } = this.props + const { editing, modified } = this.state || {} + if (editing && writable) { + return ( +
e.stopPropagation()}> + this.cancel()} /> + + {/* why innerRef in following component? check here - styled-components/styled-components#102 */} + this.handleKeyup(ev)} + innerRef={input => { + this.titleInput = input + }} + /> + {!modified ? ( + this.commit()}>Save + ) : ( + this.commit()}>Save + )} + +
+ ) + } + + if (writable) { + return ( + +

this.onclick(ev)} + > + {value} + +

+
+ ) + } + + return ( +
+

{value}

+
+ ) + } +} + +export default TitleField diff --git a/app/consts/screen.js b/app/consts/screen.js new file mode 100644 index 00000000..e7c60e5c --- /dev/null +++ b/app/consts/screen.js @@ -0,0 +1,11 @@ +export const INTRO = 'intro' +export const DATS = 'dats' +export const DOWNLOAD = 'download' +export const INSPECT = 'inspect' + +export default { + INTRO, + DATS, + DOWNLOAD, + INSPECT +} \ No newline at end of file diff --git a/app/containers/dat-import.js b/app/containers/dat-import.js new file mode 100644 index 00000000..1232e3bc --- /dev/null +++ b/app/containers/dat-import.js @@ -0,0 +1,18 @@ +import DatImport from '../components/dat-import' +import { requestDownload, downloadSparseDat } from '../actions' +import { connect } from 'react-redux' + +const mapStateToProps = state => state + +const mapDispatchToProps = dispatch => { + return { + requestDownload: key => dispatch(requestDownload(key)), + downloadSparseDat: key => dispatch(downloadSparseDat(key)) + } +} + +const DatImportContainer = connect(mapStateToProps, mapDispatchToProps)( + DatImport +) + +export default DatImportContainer diff --git a/app/containers/dialog.js b/app/containers/dialog.js new file mode 100644 index 00000000..4c2e4a8e --- /dev/null +++ b/app/containers/dialog.js @@ -0,0 +1,29 @@ +import { Link, Confirm } from '../components/dialog' +import { + copyLink, + closeShareDat, + confirmDeleteDat, + cancelDeleteDat +} from '../actions' +import { connect } from 'react-redux' + +export const LinkContainer = connect( + state => ({ + link: state.dialogs.link.link, + copied: state.dialogs.link.copied + }), + dispatch => ({ + onCopy: link => dispatch(copyLink(link)), + onExit: () => dispatch(closeShareDat()) + }) +)(Link) + +export const ConfirmContainer = connect( + state => ({ + dat: state.dialogs.delete.dat + }), + dispatch => ({ + onConfirm: dat => dispatch(confirmDeleteDat(dat)), + onExit: () => dispatch(cancelDeleteDat()) + }) +)(Confirm) diff --git a/app/containers/download.js b/app/containers/download.js new file mode 100644 index 00000000..8acef04c --- /dev/null +++ b/app/containers/download.js @@ -0,0 +1,27 @@ +'use strict' + +import SCREEN from '../consts/screen' +import Download from '../components/download' +import { + addDat, + hideDownloadScreen, + cancelDownloadDat, + changeDownloadPath +} from '../actions' +import { connect } from 'react-redux' + +const mapStateToProps = state => ({ + show: state.screen === SCREEN.DOWNLOAD, + dat: state.dats[state.downloadDatKey] +}) + +const mapDispatchToProps = dispatch => ({ + addDat: ({ key, path }) => dispatch(addDat({ key, path })), + hideDownloadScreen: () => dispatch(hideDownloadScreen()), + cancelDownloadDat: key => dispatch(cancelDownloadDat(key)), + changeDownloadPath: key => dispatch(changeDownloadPath(key)) +}) + +const DownloadContainer = connect(mapStateToProps, mapDispatchToProps)(Download) + +export default DownloadContainer diff --git a/app/containers/drag-drop.js b/app/containers/drag-drop.js new file mode 100644 index 00000000..aa971290 --- /dev/null +++ b/app/containers/drag-drop.js @@ -0,0 +1,13 @@ +import FileDrop from 'react-file-drop' +import { connect } from 'react-redux' +import { dropFolder } from '../actions' + +const mapStateToProps = state => ({}) + +const mapDispatchToProps = dispatch => ({ + onDrop: list => dispatch(dropFolder(list[0])) +}) + +const DragDropContainer = connect(mapStateToProps, mapDispatchToProps)(FileDrop) + +export default DragDropContainer diff --git a/app/containers/header.js b/app/containers/header.js new file mode 100644 index 00000000..508e8bcd --- /dev/null +++ b/app/containers/header.js @@ -0,0 +1,20 @@ +import Header from '../components/header' +import { createDat, toggleMenu } from '../actions' +import { connect } from 'react-redux' +import { shell } from 'electron' + +const mapStateToProps = state => ({ + menuVisible: state.menu.visible, + version: state.version +}) + +const mapDispatchToProps = dispatch => ({ + onShare: () => dispatch(createDat()), + onMenu: visible => dispatch(toggleMenu(visible)), + onReport: () => + shell.openExternal('https://github.com/dat-land/dat-desktop/issues/') +}) + +const HeaderContainer = connect(mapStateToProps, mapDispatchToProps)(Header) + +export default HeaderContainer diff --git a/app/containers/inspect.js b/app/containers/inspect.js new file mode 100644 index 00000000..f36a55ee --- /dev/null +++ b/app/containers/inspect.js @@ -0,0 +1,18 @@ +'use strict' + +import SCREEN from '../consts/screen' +import Inspect from '../components/inspect' +import { closeInspectDat } from '../actions' +import { connect } from 'react-redux' + +const mapStateToProps = state => ({ + dat: state.screen === SCREEN.INSPECT ? state.dats[state.inspect.key] : null +}) + +const mapDispatchToProps = dispatch => ({ + closeInspectDat: () => dispatch(closeInspectDat()) +}) + +const InspectContainer = connect(mapStateToProps, mapDispatchToProps)(Inspect) + +export default InspectContainer diff --git a/app/containers/intro.js b/app/containers/intro.js new file mode 100644 index 00000000..23ccdac5 --- /dev/null +++ b/app/containers/intro.js @@ -0,0 +1,21 @@ +'use strict' + +import SCREEN from '../consts/screen' +import { connect } from 'react-redux' +import IntroScreen from '../components/intro' +import { openHomepage, nextIntro, hideIntro } from '../actions' + +const mapStateToProps = state => ({ + show: state.screen === SCREEN.INTRO, + screen: state.intro.screen +}) + +const mapDispatchToProps = dispatch => ({ + openHomepage: () => openHomepage(), + next: screen => dispatch(nextIntro(screen)), + hide: () => dispatch(hideIntro()) +}) + +const IntroContainer = connect(mapStateToProps, mapDispatchToProps)(IntroScreen) + +export default IntroContainer diff --git a/app/containers/status-bar.js b/app/containers/status-bar.js new file mode 100644 index 00000000..d7cd0590 --- /dev/null +++ b/app/containers/status-bar.js @@ -0,0 +1,19 @@ +'use strict' + +import SCREEN from '../consts/screen' +import StatusBar from '../components/status-bar' +import { connect } from 'react-redux' + +const mapStateToProps = state => ({ + up: state.speed.up, + down: state.speed.down, + show: state.screen === SCREEN.DATS +}) + +const mapDispatchToProps = dispatch => ({}) + +const StatusBarContainer = connect(mapStateToProps, mapDispatchToProps)( + StatusBar +) + +export default StatusBarContainer diff --git a/app/containers/table-row.js b/app/containers/table-row.js new file mode 100644 index 00000000..6cfee6b3 --- /dev/null +++ b/app/containers/table-row.js @@ -0,0 +1,27 @@ +'use strict' + +import { connect } from 'react-redux' +import TableRow from '../components/table-row' +import { + shareDat, + deleteDat, + togglePause, + inspectDat, + updateTitle +} from '../actions' + +const mapStateToProps = (state, ownProps) => ({ + dat: ownProps.dat +}) + +const mapDispatchToProps = dispatch => ({ + shareDat: link => dispatch(shareDat(link)), + onDeleteDat: key => dispatch(deleteDat(key)), + inspectDat: key => dispatch(inspectDat(key)), + onTogglePause: dat => dispatch(togglePause(dat)), + updateTitle: (key, title) => dispatch(updateTitle(key, title)) +}) + +const TableRowContainer = connect(mapStateToProps, mapDispatchToProps)(TableRow) + +export default TableRowContainer diff --git a/app/containers/table.js b/app/containers/table.js new file mode 100644 index 00000000..35f87108 --- /dev/null +++ b/app/containers/table.js @@ -0,0 +1,14 @@ +'use strict' + +import SCREEN from '../consts/screen' +import Table from '../components/table' +import { connect } from 'react-redux' + +const mapStateToProps = state => ({ + dats: state.dats, + show: state.screen === SCREEN.DATS +}) + +const TableContainer = connect(mapStateToProps, null)(Table) + +export default TableContainer diff --git a/app/index.js b/app/index.js new file mode 100644 index 00000000..ac6ed070 --- /dev/null +++ b/app/index.js @@ -0,0 +1,58 @@ +'use strict' + +import React from 'react' +import { render } from 'react-dom' +import { Provider } from 'react-redux' +import { createStore, applyMiddleware, compose } from 'redux' +import datDesktopApp from './reducers' +import { addDat } from './actions' +import App from './components/app' +import logger from 'redux-logger' +import thunk from 'redux-thunk' +import { ipcRenderer as ipc, remote } from 'electron' +import drag from 'electron-drag' +import DatMiddleware from './actions/dat-middleware' +import minimist from 'minimist' +import path from 'path' +import { homedir } from 'os' + +const argv = minimist(remote.process.argv.slice(2), { + default: { + db: path.join(homedir(), '.dat-desktop'), + data: path.join(remote.app.getPath('downloads'), '/dat') + } +}) + +const datMiddleware = new DatMiddleware({ + dataDir: argv.db, + downloadsDir: argv.data +}) +const isDev = process.env.NODE_ENV === 'development' + +const store = createStore( + datDesktopApp, + compose( + applyMiddleware( + store => datMiddleware.middleware(store), + thunk, + isDev ? logger : storage => dispatch => dispatch + ) + ) +) + +document.title = 'Dat Desktop | Welcome' + +render( + + + , + document.querySelector('div') +) + +drag('header') + +datMiddleware.loadFromDisk() + +ipc.on('log', (_, str) => console.log(str)) +ipc.on('link', key => store.dispatch(addDat({ key }))) +ipc.on('file', path => store.dispatch(addDat({ path }))) diff --git a/app/reducers/index.js b/app/reducers/index.js new file mode 100644 index 00000000..0314d15d --- /dev/null +++ b/app/reducers/index.js @@ -0,0 +1,325 @@ +'use strict' + +import SCREEN from '../consts/screen' + +const defaultState = { + dats: {}, + screen: SCREEN.INTRO, + dialogs: { + link: { + link: null, + copied: false + }, + delete: { + dat: null + } + }, + speed: { + up: 0, + down: 0 + }, + inspect: { + key: null + }, + intro: { + screen: 1 + }, + version: require('../../package.json').version, + menu: { + visible: false + }, + downloadDatKey: null +} + +const redatApp = (state = defaultState, action) => { + switch (action.type) { + case 'NEXT_INTRO': + return { + ...state, + intro: { + screen: action.screen + 1 + } + } + case 'HIDE_INTRO': + document.title = 'Dat Desktop' + return { + ...state, + screen: SCREEN.DATS + } + case 'SHOW_DOWNLOAD_SCREEN': + return { + ...state, + screen: SCREEN.DOWNLOAD, + downloadDatKey: action.key + } + case 'HIDE_DOWNLOAD_SCREEN': + return { + ...state, + screen: SCREEN.DATS, + downloadDatKey: null + } + case 'CHANGE_DOWNLOAD_PATH': + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + ...state.dats[action.key], + path: action.path + } + } + } + case 'ADD_DAT': + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + key: action.key, + path: action.path, + loading: true, + paused: action.paused, + metadata: {}, + stats: { + network: { + up: 0, + down: 0 + } + } + } + }, + screen: SCREEN.DATS + } + case 'ADD_DAT_ERROR': + case 'WRITE_METADATA_ERROR': + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + ...state.dats[action.key], + error: action.error, + loading: false + } + } + } + case 'ADD_DAT_SUCCESS': + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + ...state.dats[action.key], + loading: false + } + } + } + case 'REMOVE_DAT': + const { [action.key]: del, ...dats } = state.dats + return { ...state, dats } + case 'INSPECT_DAT': + return { + ...state, + screen: SCREEN.INSPECT, + inspect: { + key: action.key + } + } + case 'INSPECT_DAT_CLOSE': + return { + ...state, + screen: SCREEN.DATS + } + case 'DAT_FILES': + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + ...state.dats[action.key], + files: action.files + } + } + } + case 'DAT_METADATA': + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + ...state.dats[action.key], + metadata: action.metadata + } + } + } + case 'DAT_WRITABLE': + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + ...state.dats[action.key], + writable: action.writable + } + } + } + case 'DAT_STATS': + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + ...state.dats[action.key], + stats: { ...state.dats[action.key].stats, ...action.stats } + } + } + } + case 'DAT_PROGRESS': + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + ...state.dats[action.key], + progress: action.progress + } + } + } + case 'DAT_STATE': + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + ...state.dats[action.key], + state: action.state + } + } + } + case 'DAT_NETWORK_STATS': + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + ...state.dats[action.key], + stats: { ...state.dats[action.key].stats, network: action.stats } + } + }, + speed: { + up: + state.speed.up - + state.dats[action.key].stats.network.up + + action.stats.up, + down: + state.speed.down - + state.dats[action.key].stats.network.down + + action.stats.down + } + } + case 'DAT_PEERS': + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + ...state.dats[action.key], + peers: action.peers + } + } + } + case 'UPDATE_TITLE': + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + ...state.dats[action.key], + metadata: { + ...state.dats[action.key].metadata, + title: action.title + } + } + } + } + case 'DIALOGS_LINK_OPEN': + return { + ...state, + dialogs: { + ...state.dialogs, + link: { + link: action.key, + copied: false + } + } + } + case 'DIALOGS_LINK_COPY': + return { + ...state, + dialogs: { + ...state.dialogs, + link: { + ...state.dialogs.link, + copied: true + } + } + } + case 'DIALOGS_LINK_CLOSE': + return { + ...state, + dialogs: { + ...state.dialogs, + link: { + link: null, + copied: false + } + } + } + case 'DIALOGS_DELETE_OPEN': + return { + ...state, + dialogs: { + ...state.dialogs, + delete: { + dat: action.key + } + } + } + case 'DIALOGS_DELETE_CLOSE': + return { + ...state, + screen: SCREEN.DATS, + dialogs: { + ...state.dialogs, + delete: { + dat: null + } + } + } + case 'TOGGLE_PAUSE': + const dat = state.dats[action.key] + return { + ...state, + dats: { + ...state.dats, + [action.key]: { + ...dat, + paused: !action.paused, + peers: !action.paused ? 0 : dat.peers + } + } + } + case 'TOGGLE_MENU': + return { + ...state, + menu: { + ...state.menu, + visible: action.visible + } + } + default: + return state + } +} + +export default redatApp diff --git a/appveyor.yml b/appveyor.yml index e0f54fee..72844177 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,10 +11,11 @@ platform: install: - ps: Install-Product node $env:nodejs_version $env:platform - npm install - -test_script: - node --version - npm --version + +test_script: + - npm run build:prod - npm test # Don't actually build. @@ -22,4 +23,4 @@ build: off # RDP for debugging purposes init: - - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) \ No newline at end of file diff --git a/build/icon.png b/build/icon.png new file mode 100644 index 00000000..7c4c6ee9 Binary files /dev/null and b/build/icon.png differ diff --git a/dev/react-dev-tools/_metadata/verified_contents.json b/dev/react-dev-tools/_metadata/verified_contents.json new file mode 100644 index 00000000..34fd611e --- /dev/null +++ b/dev/react-dev-tools/_metadata/verified_contents.json @@ -0,0 +1 @@ +[{"description":"treehash per file","signed_content":{"payload":"eyJjb250ZW50X2hhc2hlcyI6W3siYmxvY2tfc2l6ZSI6NDA5NiwiZGlnZXN0Ijoic2hhMjU2IiwiZmlsZXMiOlt7InBhdGgiOiJidWlsZC9iYWNrZW5kLmpzIiwicm9vdF9oYXNoIjoiNTZ5Y210a2pUM3c1VEh6SU5UbVdiOGFhUE5PTEtsNG1nZnRpWFozMFV5TSJ9LHsicGF0aCI6ImJ1aWxkL2JhY2tncm91bmQuanMiLCJyb290X2hhc2giOiJwd2o2TFdiZGpDRTV4U3czRmxKT0lXSUhZdFJFWE1jNjIxeG8yZE9EajVRIn0seyJwYXRoIjoiYnVpbGQvY29udGVudFNjcmlwdC5qcyIsInJvb3RfaGFzaCI6Im1WUnMtdEp2eEFRR0pOY2l5ZjFkZjBCeVAyM1hVYlRHNjhXYVZQNE1oalUifSx7InBhdGgiOiJidWlsZC9pbmplY3QuanMiLCJyb290X2hhc2giOiJfbm9WTno4cGFGSS1JZFhQUWhXQkhuSkFPUlV0b09nLXZVcG1aV3c3NUZZIn0seyJwYXRoIjoiYnVpbGQvbWFpbi5qcyIsInJvb3RfaGFzaCI6InJ4OVdHcG9MSlNGWjh4Zjd0bXBkMXVSYjBzRFBoNkVVS1dOTlo5dkh6WDAifSx7InBhdGgiOiJidWlsZC9wYW5lbC5qcyIsInJvb3RfaGFzaCI6InNLUWVhblBlY1FEdjRfUFRPVHFiTUwzVFpvbnZkdG9oM2ZLS25lVWRqUGsifSx7InBhdGgiOiJpY29ucy8xMjgtZGVhZGNvZGUucG5nIiwicm9vdF9oYXNoIjoiMUF4MUl2eXRyeUtYQTFzQkZxU1FIWmtjWnJMbVJaNjBvcEVQcWIzSDZiNCJ9LHsicGF0aCI6Imljb25zLzEyOC1kZXZlbG9wbWVudC5wbmciLCJyb290X2hhc2giOiIxQXgxSXZ5dHJ5S1hBMXNCRnFTUUhaa2NackxtUlo2MG9wRVBxYjNINmI0In0seyJwYXRoIjoiaWNvbnMvMTI4LWRpc2FibGVkLnBuZyIsInJvb3RfaGFzaCI6InIta3JhcWpva3FJbHozTTFwQmxiSWk4dGdDXzFHU3hrT2VFMlFwU1FDblUifSx7InBhdGgiOiJpY29ucy8xMjgtb3V0ZGF0ZWQucG5nIiwicm9vdF9oYXNoIjoidVNIdEo2cUFsTHVETWRGYkxnSkpwTHBVSEVEVjRHckRSeVhHcGdSUVNfZyJ9LHsicGF0aCI6Imljb25zLzEyOC1wcm9kdWN0aW9uLnBuZyIsInJvb3RfaGFzaCI6ImF3VDBvNEVpVGowQm1lMFRBUmJaeS1ZSklEcDAzdlBpOG5XU1JPSlFMd2sifSx7InBhdGgiOiJpY29ucy8xMjgtdW5taW5pZmllZC5wbmciLCJyb290X2hhc2giOiIxQXgxSXZ5dHJ5S1hBMXNCRnFTUUhaa2NackxtUlo2MG9wRVBxYjNINmI0In0seyJwYXRoIjoiaWNvbnMvMTYtZGVhZGNvZGUucG5nIiwicm9vdF9oYXNoIjoiX2J4aVZ4bmlCcGUxRG5CSDF0azRDalhkYWp3eGtQM2hSbnBIZDVEQUxFSSJ9LHsicGF0aCI6Imljb25zLzE2LWRldmVsb3BtZW50LnBuZyIsInJvb3RfaGFzaCI6Il9ieGlWeG5pQnBlMURuQkgxdGs0Q2pYZGFqd3hrUDNoUm5wSGQ1REFMRUkifSx7InBhdGgiOiJpY29ucy8xNi1kaXNhYmxlZC5wbmciLCJyb290X2hhc2giOiJ2QWZQVW4xd3UtbU1MclFSTlNrM2pSVUN1V2ZZZWRIUHFKR1p0RUFRV1BZIn0seyJwYXRoIjoiaWNvbnMvMTYtb3V0ZGF0ZWQucG5nIiwicm9vdF9oYXNoIjoiX0VXZVpIeVprMDY0bFAyWF9jWTJHcHF1R0JIanpDcU55M1Z0c3YxXzVhRSJ9LHsicGF0aCI6Imljb25zLzE2LXByb2R1Y3Rpb24ucG5nIiwicm9vdF9oYXNoIjoiR19FcWRrQmtTQ09Tb3M5NHN6bldwUWNhZUhWcFJwN3NRbUNrd3cySUVlRSJ9LHsicGF0aCI6Imljb25zLzE2LXVubWluaWZpZWQucG5nIiwicm9vdF9oYXNoIjoiX2J4aVZ4bmlCcGUxRG5CSDF0azRDalhkYWp3eGtQM2hSbnBIZDVEQUxFSSJ9LHsicGF0aCI6Imljb25zLzMyLWRlYWRjb2RlLnBuZyIsInJvb3RfaGFzaCI6Ijk5WjZZZEtfbEw5aVFZeU1VSElwT1ZSU1dKNm5ZQUQ2Mmx4UkNrMF9kU0kifSx7InBhdGgiOiJpY29ucy8zMi1kZXZlbG9wbWVudC5wbmciLCJyb290X2hhc2giOiI5OVo2WWRLX2xMOWlRWXlNVUhJcE9WUlNXSjZuWUFENjJseFJDazBfZFNJIn0seyJwYXRoIjoiaWNvbnMvMzItZGlzYWJsZWQucG5nIiwicm9vdF9oYXNoIjoiUzN3T25MeFBzd013UGotQXRuNUF1Ny1iTklTREtWbWtlUl9hVDNlSnNXVSJ9LHsicGF0aCI6Imljb25zLzMyLW91dGRhdGVkLnBuZyIsInJvb3RfaGFzaCI6IkJWS0gtbnEyMlB5UDdLZl9lQXFYeDdVM1M5ZzMyRi1wLWxxVVE1NnBGbDAifSx7InBhdGgiOiJpY29ucy8zMi1wcm9kdWN0aW9uLnBuZyIsInJvb3RfaGFzaCI6Il9Fdzc5ODc4bGRYWlVSUGlaemw5NjhPelA5NURURmpNT3l1TlhqejdpUWsifSx7InBhdGgiOiJpY29ucy8zMi11bm1pbmlmaWVkLnBuZyIsInJvb3RfaGFzaCI6Ijk5WjZZZEtfbEw5aVFZeU1VSElwT1ZSU1dKNm5ZQUQ2Mmx4UkNrMF9kU0kifSx7InBhdGgiOiJpY29ucy80OC1kZWFkY29kZS5wbmciLCJyb290X2hhc2giOiJnR3JxVnJhTkl4N2J6M0labTN0MUJxb3BYSFRUQU9td0ZTeHpxdFhoZkI4In0seyJwYXRoIjoiaWNvbnMvNDgtZGV2ZWxvcG1lbnQucG5nIiwicm9vdF9oYXNoIjoiZ0dycVZyYU5JeDdiejNJWm0zdDFCcW9wWEhUVEFPbXdGU3h6cXRYaGZCOCJ9LHsicGF0aCI6Imljb25zLzQ4LWRpc2FibGVkLnBuZyIsInJvb3RfaGFzaCI6InZXMkZBNXlWRzhDRGtNcjBRekVsS1lfQmxTdWxURnB5YkpDdmlIOFplU00ifSx7InBhdGgiOiJpY29ucy80OC1vdXRkYXRlZC5wbmciLCJyb290X2hhc2giOiJ4dFY4U1RBVm42VzUyWXA5aDJxdHdHckdyVzl4LTcxR0U0UUZnMjZ6Rm9vIn0seyJwYXRoIjoiaWNvbnMvNDgtcHJvZHVjdGlvbi5wbmciLCJyb290X2hhc2giOiJHUzczNkQ5TXp3UUhzRW5JOTU4UGxNVnp4RkdGaF92TEt2MFN2VGVTdkdVIn0seyJwYXRoIjoiaWNvbnMvNDgtdW5taW5pZmllZC5wbmciLCJyb290X2hhc2giOiJnR3JxVnJhTkl4N2J6M0labTN0MUJxb3BYSFRUQU9td0ZTeHpxdFhoZkI4In0seyJwYXRoIjoiaWNvbnMvZGVhZGNvZGUuc3ZnIiwicm9vdF9oYXNoIjoick1abk15VkR6VWtRbDdLQl9UVzlTYjlEVjJqVXl5cTQ5WGwwQUhKMVl4TSJ9LHsicGF0aCI6Imljb25zL2RldmVsb3BtZW50LnN2ZyIsInJvb3RfaGFzaCI6InJNWm5NeVZEelVrUWw3S0JfVFc5U2I5RFYyalV5eXE0OVhsMEFISjFZeE0ifSx7InBhdGgiOiJpY29ucy9kaXNhYmxlZC5zdmciLCJyb290X2hhc2giOiJKNU1Rd3Rfb2NmUDJxSFh2UFZ6N2lTTFRmNjdybkJKLXd4S3U2LUhGSE5NIn0seyJwYXRoIjoiaWNvbnMvb3V0ZGF0ZWQuc3ZnIiwicm9vdF9oYXNoIjoiMTkzazMzdmpTTE5CMU5nTXFINGktUjc2YXhHeXktVW1VVFNJYmhadlNKSSJ9LHsicGF0aCI6Imljb25zL3Byb2R1Y3Rpb24uc3ZnIiwicm9vdF9oYXNoIjoiRVB4cHFIQU9IRzlwUUtHMXJYelRJZmN2cV9qTUYxU0xRR3g1b1RkYmFQOCJ9LHsicGF0aCI6Im1haW4uaHRtbCIsInJvb3RfaGFzaCI6InM3OURqWERtdng3bWdySFZNcmpod3JnNFk3SUYyd2JuUUxEcnVDS2hUWU0ifSx7InBhdGgiOiJtYW5pZmVzdC5qc29uIiwicm9vdF9oYXNoIjoicEQyS2s5TF8wM1JwdEg3RHRxWnZIaTdaSmJKdzVlUTNadXc1Zm5oMTJVTSJ9LHsicGF0aCI6InBhbmVsLmh0bWwiLCJyb290X2hhc2giOiJJQk9KT3JEeGtBMkFGdUlIT0IyQTJlLThoMUVoV1ZHNUZPVVdwSzNUSUg0In0seyJwYXRoIjoicG9wdXBzL2RlYWRjb2RlLmh0bWwiLCJyb290X2hhc2giOiJzSHBuSUVZeDh5SFoycDk4ejdkclc4dkRTQm1SUWFpd3hqOHJhN3Q0OUpvIn0seyJwYXRoIjoicG9wdXBzL2RldmVsb3BtZW50Lmh0bWwiLCJyb290X2hhc2giOiJMOTQ5M0ptdjVyclRPYmZDWUlObDJiWHJJNEdxandOcXFEbEx5YWpsX3lzIn0seyJwYXRoIjoicG9wdXBzL2Rpc2FibGVkLmh0bWwiLCJyb290X2hhc2giOiJka3FZLXNTZC1Gem85cURpX203WjRsbGdDT3lLRUdQZlRKejBGdjdwRENJIn0seyJwYXRoIjoicG9wdXBzL291dGRhdGVkLmh0bWwiLCJyb290X2hhc2giOiJEY1VNcXRVb0gyYzR5Rjl5QXl2VERwcXc4TVhLdFk0QUo4VVRiSXdkRDNnIn0seyJwYXRoIjoicG9wdXBzL3Byb2R1Y3Rpb24uaHRtbCIsInJvb3RfaGFzaCI6Ikt1UXdjbVQ5dnA4R0ozS3RtQkRjdHlrdDg5ZFMtZW5pMV9SS0ZBdmx3TDgifSx7InBhdGgiOiJwb3B1cHMvc2hhcmVkLmpzIiwicm9vdF9oYXNoIjoiaXIwWkhXM0toUWktRVU3NG03Z3JvdzE5bmYxWk8xZmczeFRjbmZLUnp1SSJ9LHsicGF0aCI6InBvcHVwcy91bm1pbmlmaWVkLmh0bWwiLCJyb290X2hhc2giOiJjb0U5c3ZkeDJZcDgwMFl3a012YVpWRmxvMVV1M2dhcGQ4ZnRZOUhuVWpjIn1dLCJmb3JtYXQiOiJ0cmVlaGFzaCIsImhhc2hfYmxvY2tfc2l6ZSI6NDA5Nn1dLCJpdGVtX2lkIjoiZm1rYWRtYXBnb2ZhZG9wbGpiamZrYXBka29pZW5paGkiLCJpdGVtX3ZlcnNpb24iOiIzLjIuMyIsInByb3RvY29sX3ZlcnNpb24iOjF9","signatures":[{"header":{"kid":"publisher"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"cvO16uI0bG-8fxv-EbPwkJhca5MRc7V1USRcEd9CmjCLucbr-52FCSa9U5DXOspP0w1AIEqOE_I3Td4CZx3b5Xo4ug9BDc6o1B5aYWpQZOfYtkXjFv2J1hV1hPjGlkRnYXm3k0haPc5O_DdguyjAjObp-30r07KiEllOoK1R6NzdpbixmlBl8V8Nad5hEJot-VHgYpZRiaim-VqWXGv0qk-VZy6st6ff_bBHs6AKJ3owydp2LhGdm1gsoePB-njON_QUoa7pfX-zG0TEJvuLc8kk9o_mBxTvD5aCxDTYbfXHrSfNBliKOMwXH8UVQJ9DhnCedyNFyBw3iyeHTkWNLg"},{"header":{"kid":"webstore"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"Ul_8GckWm31_0fJm8npyzym_Pkl_RiGiqjOrkPuUCwfHckV5790j4GmQlYVQLQYyrAtPQm0XDRdEKJg23U6x5eU02oCUOUlNUc0Nx1aEZOStJSmBMl99znMgcRMtqDzgMIEy_lOEhj05zqi3cncrho6H_ZK29OgJEvjF4xDhXtHzQ2RxKnXedhfvGW1pjm6Xn7XxzAhosZ5pz4SVnK7i908x55eCh3Zylu-qaehhZpapMNYAjPnfSwlTJ09ykrNuU41gB_06TVDr1vyYMXIBep0Hy1qVbU0WQy-BV5dOTNf_t5S91gUxl7SvKzWp5SGjwWKSNgR2km3LyjYu7Rpsgw"}]}}] \ No newline at end of file diff --git a/dev/react-dev-tools/build/backend.js b/dev/react-dev-tools/build/backend.js new file mode 100644 index 00000000..d4e49350 --- /dev/null +++ b/dev/react-dev-tools/build/backend.js @@ -0,0 +1,11101 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var Agent = __webpack_require__(1); + var TraceUpdatesBackendManager = __webpack_require__(11); + var Bridge = __webpack_require__(20); + var inject = __webpack_require__(45); + var setupRNStyle = __webpack_require__(59); + var setupHighlighter = __webpack_require__(61); + var setupRelay = __webpack_require__(66); + + window.addEventListener('message', welcome); + function welcome(evt) { + if (evt.source !== window || evt.data.source !== 'react-devtools-content-script') { + return; + } + + window.removeEventListener('message', welcome); + setup(window.__REACT_DEVTOOLS_GLOBAL_HOOK__); + } + + function setup(hook) { + var listeners = []; + + var wall = { + listen: function listen(fn) { + var listener = function listener(evt) { + if (evt.source !== window || !evt.data || evt.data.source !== 'react-devtools-content-script' || !evt.data.payload) { + return; + } + fn(evt.data.payload); + }; + listeners.push(listener); + window.addEventListener('message', listener); + }, + send: function send(data) { + window.postMessage({ + source: 'react-devtools-bridge', + payload: data + }, '*'); + } + }; + + // Note: this is only useful for react-native-web (and equivalents). + // They would have to set this field directly on the hook. + var isRNStyleEnabled = !!hook.resolveRNStyle; + + var bridge = new Bridge(wall); + var agent = new Agent(window, { + rnStyle: isRNStyleEnabled + }); + agent.addBridge(bridge); + + agent.once('connected', function () { + inject(hook, agent); + }); + + if (isRNStyleEnabled) { + setupRNStyle(bridge, agent, hook.resolveRNStyle); + } + + setupRelay(bridge, agent, hook); + + agent.on('shutdown', function () { + hook.emit('shutdown'); + listeners.forEach(function (fn) { + window.removeEventListener('message', fn); + }); + listeners = []; + }); + + setupHighlighter(agent); + TraceUpdatesBackendManager.init(agent); + } + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(__webpack_provided_Object_dot_create, Map, WeakMap, Set) {/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + 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; }; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = __webpack_provided_Object_dot_create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var _require = __webpack_require__(6), + EventEmitter = _require.EventEmitter; + + var assign = __webpack_require__(7); + var nullthrows = __webpack_require__(8).default; + var guid = __webpack_require__(9); + var getIn = __webpack_require__(10); + + /** + * The agent lives on the page in the same context as React, observes events + * from the `backend`, and communicates (via a `Bridge`) with the frontend. + * + * It is responsible for generating string IDs (ElementID) for each react + * element, maintaining a mapping of those IDs to elements, handling messages + * from the frontend, and translating between react elements and native + * handles. + * + * + * React + * | + * v + * backend + * | + * v + * ----------- + * | **Agent** | + * ----------- + * ^ + * | + * v + * (Bridge) + * ^ + * | + * serialization + * | + * v + * (Bridge) + * ^ + * | + * v + * ---------------- + * | Frontend Store | + * ---------------- + * + * + * Events from the `backend`: + * - root (got a root) + * - mount (a component mounted) + * - update (a component updated) + * - unmount (a component mounted) + * + * Events from the `frontend` Store: + * - see `addBridge` for subscriptions + * + * Events that Agent fires: + * - selected + * - hideHighlight + * - startInspecting + * - stopInspecting + * - shutdown + * - highlight /highlightMany + * - setSelection + * - root + * - mount + * - update + * - unmount + */ + var Agent = function (_EventEmitter) { + _inherits(Agent, _EventEmitter); + + // the window or global -> used to "make a value available in the console" + function Agent(global, capabilities) { + _classCallCheck(this, Agent); + + var _this = _possibleConstructorReturn(this, (Agent.__proto__ || Object.getPrototypeOf(Agent)).call(this)); + + _this.global = global; + _this.internalInstancesById = new Map(); + _this.idsByInternalInstances = new WeakMap(); + _this.renderers = new Map(); + _this.elementData = new Map(); + _this.roots = new Set(); + _this.reactInternals = {}; + var lastSelected; + _this.on('selected', function (id) { + var data = _this.elementData.get(id); + if (data && data.publicInstance && _this.global.$r === lastSelected) { + _this.global.$r = data.publicInstance; + lastSelected = data.publicInstance; + } + }); + _this._prevSelected = null; + _this._scrollUpdate = false; + var isReactDOM = window.document && typeof window.document.createElement === 'function'; + _this.capabilities = assign({ + scroll: isReactDOM && typeof window.document.body.scrollIntoView === 'function', + dom: isReactDOM, + editTextContent: false + }, capabilities); + + if (isReactDOM) { + _this._updateScroll = _this._updateScroll.bind(_this); + window.addEventListener('scroll', _this._onScroll.bind(_this), true); + window.addEventListener('click', _this._onClick.bind(_this), true); + window.addEventListener('mouseover', _this._onMouseOver.bind(_this), true); + window.addEventListener('resize', _this._onResize.bind(_this), true); + } + return _this; + } + + // returns an "unsubscribe" function + + + _createClass(Agent, [{ + key: 'sub', + value: function sub(ev, fn) { + var _this2 = this; + + this.on(ev, fn); + return function () { + _this2.removeListener(ev, fn); + }; + } + }, { + key: 'setReactInternals', + value: function setReactInternals(renderer, reactInternals) { + this.reactInternals[renderer] = reactInternals; + } + }, { + key: 'addBridge', + value: function addBridge(bridge) { + var _this3 = this; + + /** Events received from the frontend **/ + // the initial handshake + bridge.on('requestCapabilities', function () { + bridge.send('capabilities', _this3.capabilities); + _this3.emit('connected'); + }); + bridge.on('setState', this._setState.bind(this)); + bridge.on('setProps', this._setProps.bind(this)); + bridge.on('setContext', this._setContext.bind(this)); + bridge.on('makeGlobal', this._makeGlobal.bind(this)); + bridge.on('highlight', function (id) { + return _this3.highlight(id); + }); + bridge.on('highlightMany', function (id) { + return _this3.highlightMany(id); + }); + bridge.on('hideHighlight', function () { + return _this3.emit('hideHighlight'); + }); + bridge.on('startInspecting', function () { + return _this3.emit('startInspecting'); + }); + bridge.on('stopInspecting', function () { + return _this3.emit('stopInspecting'); + }); + bridge.on('selected', function (id) { + return _this3.emit('selected', id); + }); + bridge.on('setInspectEnabled', function (enabled) { + _this3._inspectEnabled = enabled; + _this3.emit('stopInspecting'); + }); + bridge.on('shutdown', function () { + return _this3.emit('shutdown'); + }); + bridge.on('changeTextContent', function (_ref) { + var id = _ref.id, + text = _ref.text; + + var node = _this3.getNodeForID(id); + if (!node) { + return; + } + node.textContent = text; + }); + // used to "inspect node in Elements pane" + bridge.on('putSelectedNode', function (id) { + window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$node = _this3.getNodeForID(id); + }); + // used to "view source in Sources pane" + bridge.on('putSelectedInstance', function (id) { + var node = _this3.elementData.get(id); + if (node) { + window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$type = node.type; + } else { + window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$type = null; + } + if (node && node.publicInstance) { + window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$inst = node.publicInstance; + } else { + window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$inst = null; + } + }); + // used to select the inspected node ($0) + bridge.on('checkSelection', function () { + var newSelected = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0; + if (newSelected !== _this3._prevSelected) { + _this3._prevSelected = newSelected; + var sentSelected = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$node; + if (newSelected !== sentSelected) { + _this3.selectFromDOMNode(newSelected, true); + } + } + }); + bridge.on('scrollToNode', function (id) { + return _this3.scrollToNode(id); + }); + bridge.on('traceupdatesstatechange', function (value) { + return _this3.emit('traceupdatesstatechange', value); + }); + bridge.on('colorizerchange', function (value) { + return _this3.emit('colorizerchange', value); + }); + + /** Events sent to the frontend **/ + this.on('root', function (id) { + return bridge.send('root', id); + }); + this.on('mount', function (data) { + return bridge.send('mount', data); + }); + this.on('update', function (data) { + return bridge.send('update', data); + }); + this.on('unmount', function (id) { + bridge.send('unmount', id); + // once an element has been unmounted, the bridge doesn't need to be + // able to inspect it anymore. + bridge.forget(id); + }); + this.on('setSelection', function (data) { + return bridge.send('select', data); + }); + this.on('setInspectEnabled', function (data) { + return bridge.send('setInspectEnabled', data); + }); + } + }, { + key: 'scrollToNode', + value: function scrollToNode(id) { + var node = this.getNodeForID(id); + if (!node) { + console.warn('unable to get the node for scrolling'); + return; + } + var domElement = node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement; + if (!domElement) { + console.warn('unable to get the domElement for scrolling'); + return; + } + + if (typeof domElement.scrollIntoViewIfNeeded === 'function') { + domElement.scrollIntoViewIfNeeded(); + } else if (typeof domElement.scrollIntoView === 'function') { + domElement.scrollIntoView(); + } + this.highlight(id); + } + }, { + key: 'highlight', + value: function highlight(id) { + var data = this.elementData.get(id); + var node = this.getNodeForID(id); + if (data && node) { + this.emit('highlight', { node: node, name: data.name, props: data.props }); + } + } + }, { + key: 'highlightMany', + value: function highlightMany(ids) { + var _this4 = this; + + var nodes = []; + ids.forEach(function (id) { + var node = _this4.getNodeForID(id); + if (node) { + nodes.push(node); + } + }); + if (nodes.length) { + this.emit('highlightMany', nodes); + } + } + }, { + key: 'getNodeForID', + value: function getNodeForID(id) { + var component = this.internalInstancesById.get(id); + if (!component) { + return null; + } + var renderer = this.renderers.get(id); + if (renderer && this.reactInternals[renderer].getNativeFromReactElement) { + return this.reactInternals[renderer].getNativeFromReactElement(component); + } + return null; + } + }, { + key: 'selectFromDOMNode', + value: function selectFromDOMNode(node, quiet) { + var offsetFromLeaf = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + + var id = this.getIDForNode(node); + if (!id) { + return; + } + this.emit('setSelection', { id: id, quiet: quiet, offsetFromLeaf: offsetFromLeaf }); + } + + // TODO: remove this method because it's breaking encapsulation. + // It was used by RN inspector but this required leaking Fibers to it. + // RN inspector will use selectFromDOMNode() instead now. + // Remove this method in a few months after this comment was added. + + }, { + key: 'selectFromReactInstance', + value: function selectFromReactInstance(instance, quiet) { + var id = this.getId(instance); + if (!id) { + console.log('no instance id', instance); + return; + } + this.emit('setSelection', { id: id, quiet: quiet }); + } + }, { + key: 'getIDForNode', + value: function getIDForNode(node) { + if (!this.reactInternals) { + return null; + } + var component; + for (var renderer in this.reactInternals) { + // If a renderer doesn't know about a reactId, it will throw an error. + try { + // $FlowFixMe possibly null - it's not null + component = this.reactInternals[renderer].getReactElementFromNative(node); + } catch (e) {} + if (component) { + return this.getId(component); + } + } + return null; + } + }, { + key: '_setProps', + value: function _setProps(_ref2) { + var id = _ref2.id, + path = _ref2.path, + value = _ref2.value; + + var data = this.elementData.get(id); + if (data && data.updater && typeof data.updater.setInProps === 'function') { + data.updater.setInProps(path, value); + } else { + console.warn("trying to set props on a component that doesn't support it"); + } + } + }, { + key: '_setState', + value: function _setState(_ref3) { + var id = _ref3.id, + path = _ref3.path, + value = _ref3.value; + + var data = this.elementData.get(id); + if (data && data.updater && typeof data.updater.setInState === 'function') { + data.updater.setInState(path, value); + } else { + console.warn("trying to set state on a component that doesn't support it"); + } + } + }, { + key: '_setContext', + value: function _setContext(_ref4) { + var id = _ref4.id, + path = _ref4.path, + value = _ref4.value; + + var data = this.elementData.get(id); + if (data && data.updater && typeof data.updater.setInContext === 'function') { + // $FlowFixMe + data.updater.setInContext(path, value); + } else { + console.warn("trying to set context on a component that doesn't support it"); + } + } + }, { + key: '_makeGlobal', + value: function _makeGlobal(_ref5) { + var id = _ref5.id, + path = _ref5.path; + + var data = this.elementData.get(id); + if (!data) { + return; + } + var value; + if (path === 'instance') { + value = data.publicInstance; + } else { + value = getIn(data, path); + } + this.global.$tmp = value; + console.log('$tmp =', value); + } + }, { + key: 'getId', + value: function getId(internalInstance) { + if ((typeof internalInstance === 'undefined' ? 'undefined' : _typeof(internalInstance)) !== 'object' || !internalInstance) { + return internalInstance; + } + if (!this.idsByInternalInstances.has(internalInstance)) { + this.idsByInternalInstances.set(internalInstance, guid()); + this.internalInstancesById.set(nullthrows(this.idsByInternalInstances.get(internalInstance)), internalInstance); + } + return nullthrows(this.idsByInternalInstances.get(internalInstance)); + } + }, { + key: 'addRoot', + value: function addRoot(renderer, internalInstance) { + var id = this.getId(internalInstance); + this.roots.add(id); + this.emit('root', id); + } + }, { + key: 'onMounted', + value: function onMounted(renderer, component, data) { + var _this5 = this; + + var id = this.getId(component); + this.renderers.set(id, renderer); + this.elementData.set(id, data); + + var send = assign({}, data); + if (send.children && send.children.map) { + send.children = send.children.map(function (c) { + return _this5.getId(c); + }); + } + send.id = id; + send.canUpdate = send.updater && !!send.updater.forceUpdate; + delete send.type; + delete send.updater; + this.emit('mount', send); + } + }, { + key: 'onUpdated', + value: function onUpdated(component, data) { + var _this6 = this; + + var id = this.getId(component); + this.elementData.set(id, data); + + var send = assign({}, data); + if (send.children && send.children.map) { + send.children = send.children.map(function (c) { + return _this6.getId(c); + }); + } + send.id = id; + send.canUpdate = send.updater && !!send.updater.forceUpdate; + delete send.type; + delete send.updater; + this.emit('update', send); + } + }, { + key: 'onUnmounted', + value: function onUnmounted(component) { + var id = this.getId(component); + this.elementData.delete(id); + this.roots.delete(id); + this.renderers.delete(id); + this.emit('unmount', id); + this.idsByInternalInstances.delete(component); + } + }, { + key: '_onScroll', + value: function _onScroll() { + if (!this._scrollUpdate) { + this._scrollUpdate = true; + window.requestAnimationFrame(this._updateScroll); + } + } + }, { + key: '_updateScroll', + value: function _updateScroll() { + this.emit('refreshMultiOverlay'); + this.emit('stopInspecting'); + this._scrollUpdate = false; + } + }, { + key: '_onClick', + value: function _onClick(event) { + if (!this._inspectEnabled) { + return; + } + + var id = this.getIDForNode(event.target); + if (!id) { + return; + } + + event.stopPropagation(); + event.preventDefault(); + + this.emit('setSelection', { id: id }); + this.emit('setInspectEnabled', false); + } + }, { + key: '_onMouseOver', + value: function _onMouseOver(event) { + if (this._inspectEnabled) { + var id = this.getIDForNode(event.target); + if (!id) { + return; + } + + this.highlight(id); + } + } + }, { + key: '_onResize', + value: function _onResize(event) { + this.emit('stopInspecting'); + } + }]); + + return Agent; + }(EventEmitter); + + module.exports = Agent; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(3), __webpack_require__(4), __webpack_require__(5))) + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + module.exports = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeObjectCreate; + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + 'use strict'; + + module.exports = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeMap; + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + 'use strict'; + + module.exports = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeWeakMap; + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + 'use strict'; + + module.exports = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeSet; + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + // Copyright Joyent, Inc. and other Node contributors. + // + // Permission is hereby granted, free of charge, to any person obtaining a + // copy of this software and associated documentation files (the + // "Software"), to deal in the Software without restriction, including + // without limitation the rights to use, copy, modify, merge, publish, + // distribute, sublicense, and/or sell copies of the Software, and to permit + // persons to whom the Software is furnished to do so, subject to the + // following conditions: + // + // The above copyright notice and this permission notice shall be included + // in all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + function EventEmitter() { + this._events = this._events || {}; + this._maxListeners = this._maxListeners || undefined; + } + module.exports = EventEmitter; + + // Backwards-compat with node 0.10.x + EventEmitter.EventEmitter = EventEmitter; + + EventEmitter.prototype._events = undefined; + EventEmitter.prototype._maxListeners = undefined; + + // By default EventEmitters will print a warning if more than 10 listeners are + // added to it. This is a useful default which helps finding memory leaks. + EventEmitter.defaultMaxListeners = 10; + + // Obviously not all Emitters should be limited to 10. This function allows + // that to be increased. Set to zero for unlimited. + EventEmitter.prototype.setMaxListeners = function(n) { + if (!isNumber(n) || n < 0 || isNaN(n)) + throw TypeError('n must be a positive number'); + this._maxListeners = n; + return this; + }; + + EventEmitter.prototype.emit = function(type) { + var er, handler, len, args, i, listeners; + + if (!this._events) + this._events = {}; + + // If there is no 'error' event listener then throw. + if (type === 'error') { + if (!this._events.error || + (isObject(this._events.error) && !this._events.error.length)) { + er = arguments[1]; + if (er instanceof Error) { + throw er; // Unhandled 'error' event + } else { + // At least give some kind of context to the user + var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); + err.context = er; + throw err; + } + } + } + + handler = this._events[type]; + + if (isUndefined(handler)) + return false; + + if (isFunction(handler)) { + switch (arguments.length) { + // fast cases + case 1: + handler.call(this); + break; + case 2: + handler.call(this, arguments[1]); + break; + case 3: + handler.call(this, arguments[1], arguments[2]); + break; + // slower + default: + args = Array.prototype.slice.call(arguments, 1); + handler.apply(this, args); + } + } else if (isObject(handler)) { + args = Array.prototype.slice.call(arguments, 1); + listeners = handler.slice(); + len = listeners.length; + for (i = 0; i < len; i++) + listeners[i].apply(this, args); + } + + return true; + }; + + EventEmitter.prototype.addListener = function(type, listener) { + var m; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events) + this._events = {}; + + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (this._events.newListener) + this.emit('newListener', type, + isFunction(listener.listener) ? + listener.listener : listener); + + if (!this._events[type]) + // Optimize the case of one listener. Don't need the extra array object. + this._events[type] = listener; + else if (isObject(this._events[type])) + // If we've already got an array, just append. + this._events[type].push(listener); + else + // Adding the second element, need to change to array. + this._events[type] = [this._events[type], listener]; + + // Check for listener leak + if (isObject(this._events[type]) && !this._events[type].warned) { + if (!isUndefined(this._maxListeners)) { + m = this._maxListeners; + } else { + m = EventEmitter.defaultMaxListeners; + } + + if (m && m > 0 && this._events[type].length > m) { + this._events[type].warned = true; + console.error('(node) warning: possible EventEmitter memory ' + + 'leak detected. %d listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit.', + this._events[type].length); + if (typeof console.trace === 'function') { + // not supported in IE 10 + console.trace(); + } + } + } + + return this; + }; + + EventEmitter.prototype.on = EventEmitter.prototype.addListener; + + EventEmitter.prototype.once = function(type, listener) { + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + var fired = false; + + function g() { + this.removeListener(type, g); + + if (!fired) { + fired = true; + listener.apply(this, arguments); + } + } + + g.listener = listener; + this.on(type, g); + + return this; + }; + + // emits a 'removeListener' event iff the listener was removed + EventEmitter.prototype.removeListener = function(type, listener) { + var list, position, length, i; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events || !this._events[type]) + return this; + + list = this._events[type]; + length = list.length; + position = -1; + + if (list === listener || + (isFunction(list.listener) && list.listener === listener)) { + delete this._events[type]; + if (this._events.removeListener) + this.emit('removeListener', type, listener); + + } else if (isObject(list)) { + for (i = length; i-- > 0;) { + if (list[i] === listener || + (list[i].listener && list[i].listener === listener)) { + position = i; + break; + } + } + + if (position < 0) + return this; + + if (list.length === 1) { + list.length = 0; + delete this._events[type]; + } else { + list.splice(position, 1); + } + + if (this._events.removeListener) + this.emit('removeListener', type, listener); + } + + return this; + }; + + EventEmitter.prototype.removeAllListeners = function(type) { + var key, listeners; + + if (!this._events) + return this; + + // not listening for removeListener, no need to emit + if (!this._events.removeListener) { + if (arguments.length === 0) + this._events = {}; + else if (this._events[type]) + delete this._events[type]; + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + for (key in this._events) { + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = {}; + return this; + } + + listeners = this._events[type]; + + if (isFunction(listeners)) { + this.removeListener(type, listeners); + } else if (listeners) { + // LIFO order + while (listeners.length) + this.removeListener(type, listeners[listeners.length - 1]); + } + delete this._events[type]; + + return this; + }; + + EventEmitter.prototype.listeners = function(type) { + var ret; + if (!this._events || !this._events[type]) + ret = []; + else if (isFunction(this._events[type])) + ret = [this._events[type]]; + else + ret = this._events[type].slice(); + return ret; + }; + + EventEmitter.prototype.listenerCount = function(type) { + if (this._events) { + var evlistener = this._events[type]; + + if (isFunction(evlistener)) + return 1; + else if (evlistener) + return evlistener.length; + } + return 0; + }; + + EventEmitter.listenerCount = function(emitter, type) { + return emitter.listenerCount(type); + }; + + function isFunction(arg) { + return typeof arg === 'function'; + } + + function isNumber(arg) { + return typeof arg === 'number'; + } + + function isObject(arg) { + return typeof arg === 'object' && arg !== null; + } + + function isUndefined(arg) { + return arg === void 0; + } + + +/***/ }, +/* 7 */ +/***/ function(module, exports) { + + /* eslint-disable no-unused-vars */ + 'use strict'; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + + function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); + } + + module.exports = Object.assign || function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (Object.getOwnPropertySymbols) { + symbols = Object.getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; + }; + + +/***/ }, +/* 8 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', {value: true}); + + exports.default = function nullthrows(x) { + if (x != null) { + return x; + } + throw new Error('Got unexpected null or undefined'); + }; + + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + function guid() { + return 'g' + Math.random().toString(16).substr(2); + } + + module.exports = guid; + +/***/ }, +/* 10 */ +/***/ function(module, exports) { + + 'use strict'; + + function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + /** + * Retrieves the value from the path of nested objects + * @param {Object} base Base or root object for path + * @param {Array} path nested path + * @return {any} Value at end of path or `mull` + */ + function getIn(base, path) { + return path.reduce(function (obj, attr) { + if (obj) { + if (obj.hasOwnProperty(attr)) { + return obj[attr]; + } + if (typeof obj[Symbol.iterator] === 'function') { + // Convert iterable to array and return array[index] + return [].concat(_toConsumableArray(obj))[attr]; + } + } + + return null; + }, base); + } + + module.exports = getIn; + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + 'use strict'; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var TraceUpdatesAbstractNodeMeasurer = __webpack_require__(12); + var TraceUpdatesAbstractNodePresenter = __webpack_require__(17); + var TraceUpdatesWebNodeMeasurer = __webpack_require__(18); + var TraceUpdatesWebNodePresenter = __webpack_require__(19); + + var NODE_TYPE_COMPOSITE = 'Composite'; + var NODE_TYPE_SPECIAL = 'Special'; + + var TraceUpdatesBackendManager = function () { + function TraceUpdatesBackendManager(agent) { + _classCallCheck(this, TraceUpdatesBackendManager); + + this._onMeasureNode = this._onMeasureNode.bind(this); + + var useDOM = agent.capabilities.dom; + + this._measurer = useDOM ? new TraceUpdatesWebNodeMeasurer() : new TraceUpdatesAbstractNodeMeasurer(); + + this._presenter = useDOM ? new TraceUpdatesWebNodePresenter() : new TraceUpdatesAbstractNodePresenter(); + + this._isActive = false; + agent.on('traceupdatesstatechange', this._onTraceUpdatesStateChange.bind(this)); + agent.on('update', this._onUpdate.bind(this, agent)); + agent.on('shutdown', this._shutdown.bind(this)); + } + + _createClass(TraceUpdatesBackendManager, [{ + key: '_onUpdate', + value: function _onUpdate(agent, obj) { + if (!this._isActive || !obj.id) { + return; + } + + // Highlighting every host node would be too noisy. + // We highlight user components and context consumers + // (without consumers, a context update that renders + // only host nodes directly wouldn't highlight at all). + var shouldHighlight = obj.nodeType === NODE_TYPE_COMPOSITE || obj.nodeType === NODE_TYPE_SPECIAL && obj.name === 'Context.Consumer'; + if (!shouldHighlight) { + return; + } + + var node = agent.getNodeForID(obj.id); + if (!node) { + return; + } + + this._measurer.request(node, this._onMeasureNode); + } + }, { + key: '_onMeasureNode', + value: function _onMeasureNode(measurement) { + this._presenter.present(measurement); + } + }, { + key: '_onTraceUpdatesStateChange', + value: function _onTraceUpdatesStateChange(state) { + this._isActive = state.enabled; + this._presenter.setEnabled(state.enabled); + } + }, { + key: '_shutdown', + value: function _shutdown() { + this._isActive = false; + this._presenter.setEnabled(false); + } + }]); + + return TraceUpdatesBackendManager; + }(); + + function init(agent) { + return new TraceUpdatesBackendManager(agent); + } + + module.exports = { + init: init + }; + +/***/ }, +/* 12 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var requestAnimationFrame = __webpack_require__(13); + var immutable = __webpack_require__(16); + + // How long the measurement can be cached in ms. + var DURATION = 800; + + var Record = immutable.Record, + Map = immutable.Map, + Set = immutable.Set; + + + var MeasurementRecord = Record({ + bottom: 0, + expiration: 0, + height: 0, + id: '', + left: 0, + right: 0, + scrollX: 0, + scrollY: 0, + top: 0, + width: 0 + }); + + var _id = 100; + + var TraceUpdatesAbstractNodeMeasurer = function () { + function TraceUpdatesAbstractNodeMeasurer() { + _classCallCheck(this, TraceUpdatesAbstractNodeMeasurer); + + // pending nodes to measure. + this._nodes = new Map(); + + // ids of pending nodes. + this._ids = new Map(); + + // cached measurements. + this._measurements = new Map(); + + // callbacks for pending nodes. + this._callbacks = new Map(); + + this._isRequesting = false; + + // non-auto-binds. + this._measureNodes = this._measureNodes.bind(this); + } + + _createClass(TraceUpdatesAbstractNodeMeasurer, [{ + key: 'request', + value: function request(node, callback) { + var requestID = this._nodes.has(node) ? this._nodes.get(node) : String(_id++); + + this._nodes = this._nodes.set(node, requestID); + this._ids = this._ids.set(requestID, node); + + var callbacks = this._callbacks.has(node) ? this._callbacks.get(node) : new Set(); + + callbacks = callbacks.add(callback); + this._callbacks = this._callbacks.set(node, callbacks); + + if (this._isRequesting) { + return requestID; + } + + this._isRequesting = true; + requestAnimationFrame(this._measureNodes); + return requestID; + } + }, { + key: 'cancel', + value: function cancel(requestID) { + if (this._ids.has(requestID)) { + var node = this._ids.get(requestID); + this._ids = this._ids.delete(requestID); + this._nodes = this._nodes.delete(node); + this._callbacks = this._callbacks.delete(node); + } + } + }, { + key: 'measureImpl', + value: function measureImpl(node) { + // sub-class must overwrite this. + return new MeasurementRecord(); + } + }, { + key: '_measureNodes', + value: function _measureNodes() { + var _this = this; + + var now = Date.now(); + + this._measurements = this._measurements.withMutations(function (_measurements) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = _this._nodes.keys()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var node = _step.value; + + var measurement = _this._measureNode(now, node); + // cache measurement. + _measurements.set(node, measurement); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + }); + + // execute callbacks. + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + var _loop = function _loop() { + var node = _step2.value; + + var measurement = _this._measurements.get(node); + _this._callbacks.get(node).forEach(function (callback) { + return callback(measurement); + }); + }; + + for (var _iterator2 = this._nodes.keys()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + _loop(); + } + + // clear stale measurement. + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + this._measurements = this._measurements.withMutations(function (_measurements) { + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = _measurements.entries()[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var _step3$value = _slicedToArray(_step3.value, 2), + node = _step3$value[0], + measurement = _step3$value[1]; + + if (measurement.expiration < now) { + _measurements.delete(node); + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + }); + + this._ids = this._ids.clear(); + this._nodes = this._nodes.clear(); + this._callbacks = this._callbacks.clear(); + this._isRequesting = false; + } + }, { + key: '_measureNode', + value: function _measureNode(timestamp, node) { + var measurement; + var data; + + if (this._measurements.has(node)) { + measurement = this._measurements.get(node); + if (measurement.expiration < timestamp) { + // measurement expires. measure again. + data = this.measureImpl(node); + measurement = measurement.merge(_extends({}, data, { + expiration: timestamp + DURATION + })); + } + } else { + data = this.measureImpl(node); + measurement = new MeasurementRecord(_extends({}, data, { + expiration: timestamp + DURATION, + id: 'm_' + String(_id++) + })); + } + return measurement; + } + }]); + + return TraceUpdatesAbstractNodeMeasurer; + }(); + + module.exports = TraceUpdatesAbstractNodeMeasurer; + +/***/ }, +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(global) {/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule requestAnimationFrame + */ + + 'use strict'; + + var emptyFunction = __webpack_require__(14); + var nativeRequestAnimationFrame = __webpack_require__(15); + + var lastTime = 0; + + var requestAnimationFrame = nativeRequestAnimationFrame || function (callback) { + var currTime = Date.now(); + var timeDelay = Math.max(0, 16 - (currTime - lastTime)); + lastTime = currTime + timeDelay; + return global.setTimeout(function () { + callback(Date.now()); + }, timeDelay); + }; + + // Works around a rare bug in Safari 6 where the first request is never invoked. + requestAnimationFrame(emptyFunction); + + module.exports = requestAnimationFrame; + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 14 */ +/***/ function(module, exports) { + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule emptyFunction + */ + + "use strict"; + + function makeEmptyFunction(arg) { + return function () { + return arg; + }; + } + + /** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ + function emptyFunction() {} + + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function () { + return this; + }; + emptyFunction.thatReturnsArgument = function (arg) { + return arg; + }; + + module.exports = emptyFunction; + +/***/ }, +/* 15 */ +/***/ function(module, exports) { + + /* WEBPACK VAR INJECTION */(function(global) {/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule nativeRequestAnimationFrame + */ + + "use strict"; + + var nativeRequestAnimationFrame = global.requestAnimationFrame || global.webkitRequestAnimationFrame || global.mozRequestAnimationFrame || global.oRequestAnimationFrame || global.msRequestAnimationFrame; + + module.exports = nativeRequestAnimationFrame; + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(__webpack_provided_Object_dot_create, WeakMap, Map, Set) {/** + * Copyright (c) 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + + (function (global, factory) { + true ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + global.Immutable = factory(); + }(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice; + + function createClass(ctor, superClass) { + if (superClass) { + ctor.prototype = __webpack_provided_Object_dot_create(superClass.prototype); + } + ctor.prototype.constructor = ctor; + } + + function Iterable(value) { + return isIterable(value) ? value : Seq(value); + } + + + createClass(KeyedIterable, Iterable); + function KeyedIterable(value) { + return isKeyed(value) ? value : KeyedSeq(value); + } + + + createClass(IndexedIterable, Iterable); + function IndexedIterable(value) { + return isIndexed(value) ? value : IndexedSeq(value); + } + + + createClass(SetIterable, Iterable); + function SetIterable(value) { + return isIterable(value) && !isAssociative(value) ? value : SetSeq(value); + } + + + + function isIterable(maybeIterable) { + return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]); + } + + function isKeyed(maybeKeyed) { + return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]); + } + + function isIndexed(maybeIndexed) { + return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]); + } + + function isAssociative(maybeAssociative) { + return isKeyed(maybeAssociative) || isIndexed(maybeAssociative); + } + + function isOrdered(maybeOrdered) { + return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]); + } + + Iterable.isIterable = isIterable; + Iterable.isKeyed = isKeyed; + Iterable.isIndexed = isIndexed; + Iterable.isAssociative = isAssociative; + Iterable.isOrdered = isOrdered; + + Iterable.Keyed = KeyedIterable; + Iterable.Indexed = IndexedIterable; + Iterable.Set = SetIterable; + + + var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@'; + var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'; + var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@'; + var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'; + + // Used for setting prototype methods that IE8 chokes on. + var DELETE = 'delete'; + + // Constants describing the size of trie nodes. + var SHIFT = 5; // Resulted in best performance after ______? + var SIZE = 1 << SHIFT; + var MASK = SIZE - 1; + + // A consistent shared value representing "not set" which equals nothing other + // than itself, and nothing that could be provided externally. + var NOT_SET = {}; + + // Boolean references, Rough equivalent of `bool &`. + var CHANGE_LENGTH = { value: false }; + var DID_ALTER = { value: false }; + + function MakeRef(ref) { + ref.value = false; + return ref; + } + + function SetRef(ref) { + ref && (ref.value = true); + } + + // A function which returns a value representing an "owner" for transient writes + // to tries. The return value will only ever equal itself, and will not equal + // the return of any subsequent call of this function. + function OwnerID() {} + + // http://jsperf.com/copy-array-inline + function arrCopy(arr, offset) { + offset = offset || 0; + var len = Math.max(0, arr.length - offset); + var newArr = new Array(len); + for (var ii = 0; ii < len; ii++) { + newArr[ii] = arr[ii + offset]; + } + return newArr; + } + + function ensureSize(iter) { + if (iter.size === undefined) { + iter.size = iter.__iterate(returnTrue); + } + return iter.size; + } + + function wrapIndex(iter, index) { + // This implements "is array index" which the ECMAString spec defines as: + // + // A String property name P is an array index if and only if + // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal + // to 2^32−1. + // + // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects + if (typeof index !== 'number') { + var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32 + if ('' + uint32Index !== index || uint32Index === 4294967295) { + return NaN; + } + index = uint32Index; + } + return index < 0 ? ensureSize(iter) + index : index; + } + + function returnTrue() { + return true; + } + + function wholeSlice(begin, end, size) { + return (begin === 0 || (size !== undefined && begin <= -size)) && + (end === undefined || (size !== undefined && end >= size)); + } + + function resolveBegin(begin, size) { + return resolveIndex(begin, size, 0); + } + + function resolveEnd(end, size) { + return resolveIndex(end, size, size); + } + + function resolveIndex(index, size, defaultIndex) { + return index === undefined ? + defaultIndex : + index < 0 ? + Math.max(0, size + index) : + size === undefined ? + index : + Math.min(size, index); + } + + /* global Symbol */ + + var ITERATE_KEYS = 0; + var ITERATE_VALUES = 1; + var ITERATE_ENTRIES = 2; + + var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; + + var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL; + + + function Iterator(next) { + this.next = next; + } + + Iterator.prototype.toString = function() { + return '[Iterator]'; + }; + + + Iterator.KEYS = ITERATE_KEYS; + Iterator.VALUES = ITERATE_VALUES; + Iterator.ENTRIES = ITERATE_ENTRIES; + + Iterator.prototype.inspect = + Iterator.prototype.toSource = function () { return this.toString(); } + Iterator.prototype[ITERATOR_SYMBOL] = function () { + return this; + }; + + + function iteratorValue(type, k, v, iteratorResult) { + var value = type === 0 ? k : type === 1 ? v : [k, v]; + iteratorResult ? (iteratorResult.value = value) : (iteratorResult = { + value: value, done: false + }); + return iteratorResult; + } + + function iteratorDone() { + return { value: undefined, done: true }; + } + + function hasIterator(maybeIterable) { + return !!getIteratorFn(maybeIterable); + } + + function isIterator(maybeIterator) { + return maybeIterator && typeof maybeIterator.next === 'function'; + } + + function getIterator(iterable) { + var iteratorFn = getIteratorFn(iterable); + return iteratorFn && iteratorFn.call(iterable); + } + + function getIteratorFn(iterable) { + var iteratorFn = iterable && ( + (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || + iterable[FAUX_ITERATOR_SYMBOL] + ); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + function isArrayLike(value) { + return value && typeof value.length === 'number'; + } + + createClass(Seq, Iterable); + function Seq(value) { + return value === null || value === undefined ? emptySequence() : + isIterable(value) ? value.toSeq() : seqFromValue(value); + } + + Seq.of = function(/*...values*/) { + return Seq(arguments); + }; + + Seq.prototype.toSeq = function() { + return this; + }; + + Seq.prototype.toString = function() { + return this.__toString('Seq {', '}'); + }; + + Seq.prototype.cacheResult = function() { + if (!this._cache && this.__iterateUncached) { + this._cache = this.entrySeq().toArray(); + this.size = this._cache.length; + } + return this; + }; + + // abstract __iterateUncached(fn, reverse) + + Seq.prototype.__iterate = function(fn, reverse) { + return seqIterate(this, fn, reverse, true); + }; + + // abstract __iteratorUncached(type, reverse) + + Seq.prototype.__iterator = function(type, reverse) { + return seqIterator(this, type, reverse, true); + }; + + + + createClass(KeyedSeq, Seq); + function KeyedSeq(value) { + return value === null || value === undefined ? + emptySequence().toKeyedSeq() : + isIterable(value) ? + (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) : + keyedSeqFromValue(value); + } + + KeyedSeq.prototype.toKeyedSeq = function() { + return this; + }; + + + + createClass(IndexedSeq, Seq); + function IndexedSeq(value) { + return value === null || value === undefined ? emptySequence() : + !isIterable(value) ? indexedSeqFromValue(value) : + isKeyed(value) ? value.entrySeq() : value.toIndexedSeq(); + } + + IndexedSeq.of = function(/*...values*/) { + return IndexedSeq(arguments); + }; + + IndexedSeq.prototype.toIndexedSeq = function() { + return this; + }; + + IndexedSeq.prototype.toString = function() { + return this.__toString('Seq [', ']'); + }; + + IndexedSeq.prototype.__iterate = function(fn, reverse) { + return seqIterate(this, fn, reverse, false); + }; + + IndexedSeq.prototype.__iterator = function(type, reverse) { + return seqIterator(this, type, reverse, false); + }; + + + + createClass(SetSeq, Seq); + function SetSeq(value) { + return ( + value === null || value === undefined ? emptySequence() : + !isIterable(value) ? indexedSeqFromValue(value) : + isKeyed(value) ? value.entrySeq() : value + ).toSetSeq(); + } + + SetSeq.of = function(/*...values*/) { + return SetSeq(arguments); + }; + + SetSeq.prototype.toSetSeq = function() { + return this; + }; + + + + Seq.isSeq = isSeq; + Seq.Keyed = KeyedSeq; + Seq.Set = SetSeq; + Seq.Indexed = IndexedSeq; + + var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@'; + + Seq.prototype[IS_SEQ_SENTINEL] = true; + + + + createClass(ArraySeq, IndexedSeq); + function ArraySeq(array) { + this._array = array; + this.size = array.length; + } + + ArraySeq.prototype.get = function(index, notSetValue) { + return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue; + }; + + ArraySeq.prototype.__iterate = function(fn, reverse) { + var array = this._array; + var maxIndex = array.length - 1; + for (var ii = 0; ii <= maxIndex; ii++) { + if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) { + return ii + 1; + } + } + return ii; + }; + + ArraySeq.prototype.__iterator = function(type, reverse) { + var array = this._array; + var maxIndex = array.length - 1; + var ii = 0; + return new Iterator(function() + {return ii > maxIndex ? + iteratorDone() : + iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])} + ); + }; + + + + createClass(ObjectSeq, KeyedSeq); + function ObjectSeq(object) { + var keys = Object.keys(object); + this._object = object; + this._keys = keys; + this.size = keys.length; + } + + ObjectSeq.prototype.get = function(key, notSetValue) { + if (notSetValue !== undefined && !this.has(key)) { + return notSetValue; + } + return this._object[key]; + }; + + ObjectSeq.prototype.has = function(key) { + return this._object.hasOwnProperty(key); + }; + + ObjectSeq.prototype.__iterate = function(fn, reverse) { + var object = this._object; + var keys = this._keys; + var maxIndex = keys.length - 1; + for (var ii = 0; ii <= maxIndex; ii++) { + var key = keys[reverse ? maxIndex - ii : ii]; + if (fn(object[key], key, this) === false) { + return ii + 1; + } + } + return ii; + }; + + ObjectSeq.prototype.__iterator = function(type, reverse) { + var object = this._object; + var keys = this._keys; + var maxIndex = keys.length - 1; + var ii = 0; + return new Iterator(function() { + var key = keys[reverse ? maxIndex - ii : ii]; + return ii++ > maxIndex ? + iteratorDone() : + iteratorValue(type, key, object[key]); + }); + }; + + ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true; + + + createClass(IterableSeq, IndexedSeq); + function IterableSeq(iterable) { + this._iterable = iterable; + this.size = iterable.length || iterable.size; + } + + IterableSeq.prototype.__iterateUncached = function(fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterable = this._iterable; + var iterator = getIterator(iterable); + var iterations = 0; + if (isIterator(iterator)) { + var step; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + } + return iterations; + }; + + IterableSeq.prototype.__iteratorUncached = function(type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterable = this._iterable; + var iterator = getIterator(iterable); + if (!isIterator(iterator)) { + return new Iterator(iteratorDone); + } + var iterations = 0; + return new Iterator(function() { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, iterations++, step.value); + }); + }; + + + + createClass(IteratorSeq, IndexedSeq); + function IteratorSeq(iterator) { + this._iterator = iterator; + this._iteratorCache = []; + } + + IteratorSeq.prototype.__iterateUncached = function(fn, reverse) { + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterator = this._iterator; + var cache = this._iteratorCache; + var iterations = 0; + while (iterations < cache.length) { + if (fn(cache[iterations], iterations++, this) === false) { + return iterations; + } + } + var step; + while (!(step = iterator.next()).done) { + var val = step.value; + cache[iterations] = val; + if (fn(val, iterations++, this) === false) { + break; + } + } + return iterations; + }; + + IteratorSeq.prototype.__iteratorUncached = function(type, reverse) { + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = this._iterator; + var cache = this._iteratorCache; + var iterations = 0; + return new Iterator(function() { + if (iterations >= cache.length) { + var step = iterator.next(); + if (step.done) { + return step; + } + cache[iterations] = step.value; + } + return iteratorValue(type, iterations, cache[iterations++]); + }); + }; + + + + + // # pragma Helper functions + + function isSeq(maybeSeq) { + return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]); + } + + var EMPTY_SEQ; + + function emptySequence() { + return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([])); + } + + function keyedSeqFromValue(value) { + var seq = + Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() : + isIterator(value) ? new IteratorSeq(value).fromEntrySeq() : + hasIterator(value) ? new IterableSeq(value).fromEntrySeq() : + typeof value === 'object' ? new ObjectSeq(value) : + undefined; + if (!seq) { + throw new TypeError( + 'Expected Array or iterable object of [k, v] entries, '+ + 'or keyed object: ' + value + ); + } + return seq; + } + + function indexedSeqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (!seq) { + throw new TypeError( + 'Expected Array or iterable object of values: ' + value + ); + } + return seq; + } + + function seqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value) || + (typeof value === 'object' && new ObjectSeq(value)); + if (!seq) { + throw new TypeError( + 'Expected Array or iterable object of values, or keyed object: ' + value + ); + } + return seq; + } + + function maybeIndexedSeqFromValue(value) { + return ( + isArrayLike(value) ? new ArraySeq(value) : + isIterator(value) ? new IteratorSeq(value) : + hasIterator(value) ? new IterableSeq(value) : + undefined + ); + } + + function seqIterate(seq, fn, reverse, useKeys) { + var cache = seq._cache; + if (cache) { + var maxIndex = cache.length - 1; + for (var ii = 0; ii <= maxIndex; ii++) { + var entry = cache[reverse ? maxIndex - ii : ii]; + if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) { + return ii + 1; + } + } + return ii; + } + return seq.__iterateUncached(fn, reverse); + } + + function seqIterator(seq, type, reverse, useKeys) { + var cache = seq._cache; + if (cache) { + var maxIndex = cache.length - 1; + var ii = 0; + return new Iterator(function() { + var entry = cache[reverse ? maxIndex - ii : ii]; + return ii++ > maxIndex ? + iteratorDone() : + iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]); + }); + } + return seq.__iteratorUncached(type, reverse); + } + + function fromJS(json, converter) { + return converter ? + fromJSWith(converter, json, '', {'': json}) : + fromJSDefault(json); + } + + function fromJSWith(converter, json, key, parentJSON) { + if (Array.isArray(json)) { + return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)})); + } + if (isPlainObj(json)) { + return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)})); + } + return json; + } + + function fromJSDefault(json) { + if (Array.isArray(json)) { + return IndexedSeq(json).map(fromJSDefault).toList(); + } + if (isPlainObj(json)) { + return KeyedSeq(json).map(fromJSDefault).toMap(); + } + return json; + } + + function isPlainObj(value) { + return value && (value.constructor === Object || value.constructor === undefined); + } + + /** + * An extension of the "same-value" algorithm as [described for use by ES6 Map + * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality) + * + * NaN is considered the same as NaN, however -0 and 0 are considered the same + * value, which is different from the algorithm described by + * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * This is extended further to allow Objects to describe the values they + * represent, by way of `valueOf` or `equals` (and `hashCode`). + * + * Note: because of this extension, the key equality of Immutable.Map and the + * value equality of Immutable.Set will differ from ES6 Map and Set. + * + * ### Defining custom values + * + * The easiest way to describe the value an object represents is by implementing + * `valueOf`. For example, `Date` represents a value by returning a unix + * timestamp for `valueOf`: + * + * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ... + * var date2 = new Date(1234567890000); + * date1.valueOf(); // 1234567890000 + * assert( date1 !== date2 ); + * assert( Immutable.is( date1, date2 ) ); + * + * Note: overriding `valueOf` may have other implications if you use this object + * where JavaScript expects a primitive, such as implicit string coercion. + * + * For more complex types, especially collections, implementing `valueOf` may + * not be performant. An alternative is to implement `equals` and `hashCode`. + * + * `equals` takes another object, presumably of similar type, and returns true + * if the it is equal. Equality is symmetrical, so the same result should be + * returned if this and the argument are flipped. + * + * assert( a.equals(b) === b.equals(a) ); + * + * `hashCode` returns a 32bit integer number representing the object which will + * be used to determine how to store the value object in a Map or Set. You must + * provide both or neither methods, one must not exist without the other. + * + * Also, an important relationship between these methods must be upheld: if two + * values are equal, they *must* return the same hashCode. If the values are not + * equal, they might have the same hashCode; this is called a hash collision, + * and while undesirable for performance reasons, it is acceptable. + * + * if (a.equals(b)) { + * assert( a.hashCode() === b.hashCode() ); + * } + * + * All Immutable collections implement `equals` and `hashCode`. + * + */ + function is(valueA, valueB) { + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + if (typeof valueA.valueOf === 'function' && + typeof valueB.valueOf === 'function') { + valueA = valueA.valueOf(); + valueB = valueB.valueOf(); + if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { + return true; + } + if (!valueA || !valueB) { + return false; + } + } + if (typeof valueA.equals === 'function' && + typeof valueB.equals === 'function' && + valueA.equals(valueB)) { + return true; + } + return false; + } + + function deepEqual(a, b) { + if (a === b) { + return true; + } + + if ( + !isIterable(b) || + a.size !== undefined && b.size !== undefined && a.size !== b.size || + a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash || + isKeyed(a) !== isKeyed(b) || + isIndexed(a) !== isIndexed(b) || + isOrdered(a) !== isOrdered(b) + ) { + return false; + } + + if (a.size === 0 && b.size === 0) { + return true; + } + + var notAssociative = !isAssociative(a); + + if (isOrdered(a)) { + var entries = a.entries(); + return b.every(function(v, k) { + var entry = entries.next().value; + return entry && is(entry[1], v) && (notAssociative || is(entry[0], k)); + }) && entries.next().done; + } + + var flipped = false; + + if (a.size === undefined) { + if (b.size === undefined) { + if (typeof a.cacheResult === 'function') { + a.cacheResult(); + } + } else { + flipped = true; + var _ = a; + a = b; + b = _; + } + } + + var allEqual = true; + var bSize = b.__iterate(function(v, k) { + if (notAssociative ? !a.has(v) : + flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) { + allEqual = false; + return false; + } + }); + + return allEqual && a.size === bSize; + } + + createClass(Repeat, IndexedSeq); + + function Repeat(value, times) { + if (!(this instanceof Repeat)) { + return new Repeat(value, times); + } + this._value = value; + this.size = times === undefined ? Infinity : Math.max(0, times); + if (this.size === 0) { + if (EMPTY_REPEAT) { + return EMPTY_REPEAT; + } + EMPTY_REPEAT = this; + } + } + + Repeat.prototype.toString = function() { + if (this.size === 0) { + return 'Repeat []'; + } + return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]'; + }; + + Repeat.prototype.get = function(index, notSetValue) { + return this.has(index) ? this._value : notSetValue; + }; + + Repeat.prototype.includes = function(searchValue) { + return is(this._value, searchValue); + }; + + Repeat.prototype.slice = function(begin, end) { + var size = this.size; + return wholeSlice(begin, end, size) ? this : + new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size)); + }; + + Repeat.prototype.reverse = function() { + return this; + }; + + Repeat.prototype.indexOf = function(searchValue) { + if (is(this._value, searchValue)) { + return 0; + } + return -1; + }; + + Repeat.prototype.lastIndexOf = function(searchValue) { + if (is(this._value, searchValue)) { + return this.size; + } + return -1; + }; + + Repeat.prototype.__iterate = function(fn, reverse) { + for (var ii = 0; ii < this.size; ii++) { + if (fn(this._value, ii, this) === false) { + return ii + 1; + } + } + return ii; + }; + + Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this; + var ii = 0; + return new Iterator(function() + {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()} + ); + }; + + Repeat.prototype.equals = function(other) { + return other instanceof Repeat ? + is(this._value, other._value) : + deepEqual(other); + }; + + + var EMPTY_REPEAT; + + function invariant(condition, error) { + if (!condition) throw new Error(error); + } + + createClass(Range, IndexedSeq); + + function Range(start, end, step) { + if (!(this instanceof Range)) { + return new Range(start, end, step); + } + invariant(step !== 0, 'Cannot step a Range by 0'); + start = start || 0; + if (end === undefined) { + end = Infinity; + } + step = step === undefined ? 1 : Math.abs(step); + if (end < start) { + step = -step; + } + this._start = start; + this._end = end; + this._step = step; + this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1); + if (this.size === 0) { + if (EMPTY_RANGE) { + return EMPTY_RANGE; + } + EMPTY_RANGE = this; + } + } + + Range.prototype.toString = function() { + if (this.size === 0) { + return 'Range []'; + } + return 'Range [ ' + + this._start + '...' + this._end + + (this._step > 1 ? ' by ' + this._step : '') + + ' ]'; + }; + + Range.prototype.get = function(index, notSetValue) { + return this.has(index) ? + this._start + wrapIndex(this, index) * this._step : + notSetValue; + }; + + Range.prototype.includes = function(searchValue) { + var possibleIndex = (searchValue - this._start) / this._step; + return possibleIndex >= 0 && + possibleIndex < this.size && + possibleIndex === Math.floor(possibleIndex); + }; + + Range.prototype.slice = function(begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + begin = resolveBegin(begin, this.size); + end = resolveEnd(end, this.size); + if (end <= begin) { + return new Range(0, 0); + } + return new Range(this.get(begin, this._end), this.get(end, this._end), this._step); + }; + + Range.prototype.indexOf = function(searchValue) { + var offsetValue = searchValue - this._start; + if (offsetValue % this._step === 0) { + var index = offsetValue / this._step; + if (index >= 0 && index < this.size) { + return index + } + } + return -1; + }; + + Range.prototype.lastIndexOf = function(searchValue) { + return this.indexOf(searchValue); + }; + + Range.prototype.__iterate = function(fn, reverse) { + var maxIndex = this.size - 1; + var step = this._step; + var value = reverse ? this._start + maxIndex * step : this._start; + for (var ii = 0; ii <= maxIndex; ii++) { + if (fn(value, ii, this) === false) { + return ii + 1; + } + value += reverse ? -step : step; + } + return ii; + }; + + Range.prototype.__iterator = function(type, reverse) { + var maxIndex = this.size - 1; + var step = this._step; + var value = reverse ? this._start + maxIndex * step : this._start; + var ii = 0; + return new Iterator(function() { + var v = value; + value += reverse ? -step : step; + return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v); + }); + }; + + Range.prototype.equals = function(other) { + return other instanceof Range ? + this._start === other._start && + this._end === other._end && + this._step === other._step : + deepEqual(this, other); + }; + + + var EMPTY_RANGE; + + createClass(Collection, Iterable); + function Collection() { + throw TypeError('Abstract'); + } + + + createClass(KeyedCollection, Collection);function KeyedCollection() {} + + createClass(IndexedCollection, Collection);function IndexedCollection() {} + + createClass(SetCollection, Collection);function SetCollection() {} + + + Collection.Keyed = KeyedCollection; + Collection.Indexed = IndexedCollection; + Collection.Set = SetCollection; + + var imul = + typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ? + Math.imul : + function imul(a, b) { + a = a | 0; // int + b = b | 0; // int + var c = a & 0xffff; + var d = b & 0xffff; + // Shift by 0 fixes the sign on the high part. + return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int + }; + + // v8 has an optimization for storing 31-bit signed numbers. + // Values which have either 00 or 11 as the high order bits qualify. + // This function drops the highest order bit in a signed number, maintaining + // the sign bit. + function smi(i32) { + return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF); + } + + function hash(o) { + if (o === false || o === null || o === undefined) { + return 0; + } + if (typeof o.valueOf === 'function') { + o = o.valueOf(); + if (o === false || o === null || o === undefined) { + return 0; + } + } + if (o === true) { + return 1; + } + var type = typeof o; + if (type === 'number') { + var h = o | 0; + if (h !== o) { + h ^= o * 0xFFFFFFFF; + } + while (o > 0xFFFFFFFF) { + o /= 0xFFFFFFFF; + h ^= o; + } + return smi(h); + } + if (type === 'string') { + return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o); + } + if (typeof o.hashCode === 'function') { + return o.hashCode(); + } + if (type === 'object') { + return hashJSObj(o); + } + if (typeof o.toString === 'function') { + return hashString(o.toString()); + } + throw new Error('Value type ' + type + ' cannot be hashed.'); + } + + function cachedHashString(string) { + var hash = stringHashCache[string]; + if (hash === undefined) { + hash = hashString(string); + if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) { + STRING_HASH_CACHE_SIZE = 0; + stringHashCache = {}; + } + STRING_HASH_CACHE_SIZE++; + stringHashCache[string] = hash; + } + return hash; + } + + // http://jsperf.com/hashing-strings + function hashString(string) { + // This is the hash from JVM + // The hash code for a string is computed as + // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1], + // where s[i] is the ith character of the string and n is the length of + // the string. We "mod" the result to make it between 0 (inclusive) and 2^31 + // (exclusive) by dropping high bits. + var hash = 0; + for (var ii = 0; ii < string.length; ii++) { + hash = 31 * hash + string.charCodeAt(ii) | 0; + } + return smi(hash); + } + + function hashJSObj(obj) { + var hash; + if (usingWeakMap) { + hash = weakMap.get(obj); + if (hash !== undefined) { + return hash; + } + } + + hash = obj[UID_HASH_KEY]; + if (hash !== undefined) { + return hash; + } + + if (!canDefineProperty) { + hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY]; + if (hash !== undefined) { + return hash; + } + + hash = getIENodeHash(obj); + if (hash !== undefined) { + return hash; + } + } + + hash = ++objHashUID; + if (objHashUID & 0x40000000) { + objHashUID = 0; + } + + if (usingWeakMap) { + weakMap.set(obj, hash); + } else if (isExtensible !== undefined && isExtensible(obj) === false) { + throw new Error('Non-extensible objects are not allowed as keys.'); + } else if (canDefineProperty) { + Object.defineProperty(obj, UID_HASH_KEY, { + 'enumerable': false, + 'configurable': false, + 'writable': false, + 'value': hash + }); + } else if (obj.propertyIsEnumerable !== undefined && + obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) { + // Since we can't define a non-enumerable property on the object + // we'll hijack one of the less-used non-enumerable properties to + // save our hash on it. Since this is a function it will not show up in + // `JSON.stringify` which is what we want. + obj.propertyIsEnumerable = function() { + return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments); + }; + obj.propertyIsEnumerable[UID_HASH_KEY] = hash; + } else if (obj.nodeType !== undefined) { + // At this point we couldn't get the IE `uniqueID` to use as a hash + // and we couldn't use a non-enumerable property to exploit the + // dontEnum bug so we simply add the `UID_HASH_KEY` on the node + // itself. + obj[UID_HASH_KEY] = hash; + } else { + throw new Error('Unable to set a non-enumerable property on object.'); + } + + return hash; + } + + // Get references to ES5 object methods. + var isExtensible = Object.isExtensible; + + // True if Object.defineProperty works as expected. IE8 fails this test. + var canDefineProperty = (function() { + try { + Object.defineProperty({}, '@', {}); + return true; + } catch (e) { + return false; + } + }()); + + // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it + // and avoid memory leaks from the IE cloneNode bug. + function getIENodeHash(node) { + if (node && node.nodeType > 0) { + switch (node.nodeType) { + case 1: // Element + return node.uniqueID; + case 9: // Document + return node.documentElement && node.documentElement.uniqueID; + } + } + } + + // If possible, use a WeakMap. + var usingWeakMap = typeof WeakMap === 'function'; + var weakMap; + if (usingWeakMap) { + weakMap = new WeakMap(); + } + + var objHashUID = 0; + + var UID_HASH_KEY = '__immutablehash__'; + if (typeof Symbol === 'function') { + UID_HASH_KEY = Symbol(UID_HASH_KEY); + } + + var STRING_HASH_CACHE_MIN_STRLEN = 16; + var STRING_HASH_CACHE_MAX_SIZE = 255; + var STRING_HASH_CACHE_SIZE = 0; + var stringHashCache = {}; + + function assertNotInfinite(size) { + invariant( + size !== Infinity, + 'Cannot perform this action with an infinite size.' + ); + } + + createClass(Map, KeyedCollection); + + // @pragma Construction + + function Map(value) { + return value === null || value === undefined ? emptyMap() : + isMap(value) && !isOrdered(value) ? value : + emptyMap().withMutations(function(map ) { + var iter = KeyedIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function(v, k) {return map.set(k, v)}); + }); + } + + Map.prototype.toString = function() { + return this.__toString('Map {', '}'); + }; + + // @pragma Access + + Map.prototype.get = function(k, notSetValue) { + return this._root ? + this._root.get(0, undefined, k, notSetValue) : + notSetValue; + }; + + // @pragma Modification + + Map.prototype.set = function(k, v) { + return updateMap(this, k, v); + }; + + Map.prototype.setIn = function(keyPath, v) { + return this.updateIn(keyPath, NOT_SET, function() {return v}); + }; + + Map.prototype.remove = function(k) { + return updateMap(this, k, NOT_SET); + }; + + Map.prototype.deleteIn = function(keyPath) { + return this.updateIn(keyPath, function() {return NOT_SET}); + }; + + Map.prototype.update = function(k, notSetValue, updater) { + return arguments.length === 1 ? + k(this) : + this.updateIn([k], notSetValue, updater); + }; + + Map.prototype.updateIn = function(keyPath, notSetValue, updater) { + if (!updater) { + updater = notSetValue; + notSetValue = undefined; + } + var updatedValue = updateInDeepMap( + this, + forceIterator(keyPath), + notSetValue, + updater + ); + return updatedValue === NOT_SET ? undefined : updatedValue; + }; + + Map.prototype.clear = function() { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._root = null; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyMap(); + }; + + // @pragma Composition + + Map.prototype.merge = function(/*...iters*/) { + return mergeIntoMapWith(this, undefined, arguments); + }; + + Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1); + return mergeIntoMapWith(this, merger, iters); + }; + + Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1); + return this.updateIn( + keyPath, + emptyMap(), + function(m ) {return typeof m.merge === 'function' ? + m.merge.apply(m, iters) : + iters[iters.length - 1]} + ); + }; + + Map.prototype.mergeDeep = function(/*...iters*/) { + return mergeIntoMapWith(this, deepMerger, arguments); + }; + + Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1); + return mergeIntoMapWith(this, deepMergerWith(merger), iters); + }; + + Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1); + return this.updateIn( + keyPath, + emptyMap(), + function(m ) {return typeof m.mergeDeep === 'function' ? + m.mergeDeep.apply(m, iters) : + iters[iters.length - 1]} + ); + }; + + Map.prototype.sort = function(comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator)); + }; + + Map.prototype.sortBy = function(mapper, comparator) { + // Late binding + return OrderedMap(sortFactory(this, comparator, mapper)); + }; + + // @pragma Mutability + + Map.prototype.withMutations = function(fn) { + var mutable = this.asMutable(); + fn(mutable); + return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this; + }; + + Map.prototype.asMutable = function() { + return this.__ownerID ? this : this.__ensureOwner(new OwnerID()); + }; + + Map.prototype.asImmutable = function() { + return this.__ensureOwner(); + }; + + Map.prototype.wasAltered = function() { + return this.__altered; + }; + + Map.prototype.__iterator = function(type, reverse) { + return new MapIterator(this, type, reverse); + }; + + Map.prototype.__iterate = function(fn, reverse) {var this$0 = this; + var iterations = 0; + this._root && this._root.iterate(function(entry ) { + iterations++; + return fn(entry[1], entry[0], this$0); + }, reverse); + return iterations; + }; + + Map.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeMap(this.size, this._root, ownerID, this.__hash); + }; + + + function isMap(maybeMap) { + return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]); + } + + Map.isMap = isMap; + + var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@'; + + var MapPrototype = Map.prototype; + MapPrototype[IS_MAP_SENTINEL] = true; + MapPrototype[DELETE] = MapPrototype.remove; + MapPrototype.removeIn = MapPrototype.deleteIn; + + + // #pragma Trie Nodes + + + + function ArrayMapNode(ownerID, entries) { + this.ownerID = ownerID; + this.entries = entries; + } + + ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; + }; + + ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + + var entries = this.entries; + var idx = 0; + for (var len = entries.length; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && entries.length === 1) { + return; // undefined + } + + if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) { + return createNodes(ownerID, entries, key, value); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new ArrayMapNode(ownerID, newEntries); + }; + + + + + function BitmapIndexedNode(ownerID, bitmap, nodes) { + this.ownerID = ownerID; + this.bitmap = bitmap; + this.nodes = nodes; + } + + BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK)); + var bitmap = this.bitmap; + return (bitmap & bit) === 0 ? notSetValue : + this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue); + }; + + BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var bit = 1 << keyHashFrag; + var bitmap = this.bitmap; + var exists = (bitmap & bit) !== 0; + + if (!exists && value === NOT_SET) { + return this; + } + + var idx = popCount(bitmap & (bit - 1)); + var nodes = this.nodes; + var node = exists ? nodes[idx] : undefined; + var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter); + + if (newNode === node) { + return this; + } + + if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) { + return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode); + } + + if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) { + return nodes[idx ^ 1]; + } + + if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) { + return newNode; + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit; + var newNodes = exists ? newNode ? + setIn(nodes, idx, newNode, isEditable) : + spliceOut(nodes, idx, isEditable) : + spliceIn(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.bitmap = newBitmap; + this.nodes = newNodes; + return this; + } + + return new BitmapIndexedNode(ownerID, newBitmap, newNodes); + }; + + + + + function HashArrayMapNode(ownerID, count, nodes) { + this.ownerID = ownerID; + this.count = count; + this.nodes = nodes; + } + + HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var node = this.nodes[idx]; + return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue; + }; + + HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + var removed = value === NOT_SET; + var nodes = this.nodes; + var node = nodes[idx]; + + if (removed && !node) { + return this; + } + + var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter); + if (newNode === node) { + return this; + } + + var newCount = this.count; + if (!node) { + newCount++; + } else if (!newNode) { + newCount--; + if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { + return packNodes(ownerID, nodes, newCount, idx); + } + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newNodes = setIn(nodes, idx, newNode, isEditable); + + if (isEditable) { + this.count = newCount; + this.nodes = newNodes; + return this; + } + + return new HashArrayMapNode(ownerID, newCount, newNodes); + }; + + + + + function HashCollisionNode(ownerID, keyHash, entries) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entries = entries; + } + + HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) { + var entries = this.entries; + for (var ii = 0, len = entries.length; ii < len; ii++) { + if (is(key, entries[ii][0])) { + return entries[ii][1]; + } + } + return notSetValue; + }; + + HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (keyHash === undefined) { + keyHash = hash(key); + } + + var removed = value === NOT_SET; + + if (keyHash !== this.keyHash) { + if (removed) { + return this; + } + SetRef(didAlter); + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]); + } + + var entries = this.entries; + var idx = 0; + for (var len = entries.length; idx < len; idx++) { + if (is(key, entries[idx][0])) { + break; + } + } + var exists = idx < len; + + if (exists ? entries[idx][1] === value : removed) { + return this; + } + + SetRef(didAlter); + (removed || !exists) && SetRef(didChangeSize); + + if (removed && len === 2) { + return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]); + } + + var isEditable = ownerID && ownerID === this.ownerID; + var newEntries = isEditable ? entries : arrCopy(entries); + + if (exists) { + if (removed) { + idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop()); + } else { + newEntries[idx] = [key, value]; + } + } else { + newEntries.push([key, value]); + } + + if (isEditable) { + this.entries = newEntries; + return this; + } + + return new HashCollisionNode(ownerID, this.keyHash, newEntries); + }; + + + + + function ValueNode(ownerID, keyHash, entry) { + this.ownerID = ownerID; + this.keyHash = keyHash; + this.entry = entry; + } + + ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) { + return is(key, this.entry[0]) ? this.entry[1] : notSetValue; + }; + + ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET; + var keyMatch = is(key, this.entry[0]); + if (keyMatch ? value === this.entry[1] : removed) { + return this; + } + + SetRef(didAlter); + + if (removed) { + SetRef(didChangeSize); + return; // undefined + } + + if (keyMatch) { + if (ownerID && ownerID === this.ownerID) { + this.entry[1] = value; + return this; + } + return new ValueNode(ownerID, this.keyHash, [key, value]); + } + + SetRef(didChangeSize); + return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]); + }; + + + + // #pragma Iterators + + ArrayMapNode.prototype.iterate = + HashCollisionNode.prototype.iterate = function (fn, reverse) { + var entries = this.entries; + for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) { + if (fn(entries[reverse ? maxIndex - ii : ii]) === false) { + return false; + } + } + } + + BitmapIndexedNode.prototype.iterate = + HashArrayMapNode.prototype.iterate = function (fn, reverse) { + var nodes = this.nodes; + for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) { + var node = nodes[reverse ? maxIndex - ii : ii]; + if (node && node.iterate(fn, reverse) === false) { + return false; + } + } + } + + ValueNode.prototype.iterate = function (fn, reverse) { + return fn(this.entry); + } + + createClass(MapIterator, Iterator); + + function MapIterator(map, type, reverse) { + this._type = type; + this._reverse = reverse; + this._stack = map._root && mapIteratorFrame(map._root); + } + + MapIterator.prototype.next = function() { + var type = this._type; + var stack = this._stack; + while (stack) { + var node = stack.node; + var index = stack.index++; + var maxIndex; + if (node.entry) { + if (index === 0) { + return mapIteratorValue(type, node.entry); + } + } else if (node.entries) { + maxIndex = node.entries.length - 1; + if (index <= maxIndex) { + return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]); + } + } else { + maxIndex = node.nodes.length - 1; + if (index <= maxIndex) { + var subNode = node.nodes[this._reverse ? maxIndex - index : index]; + if (subNode) { + if (subNode.entry) { + return mapIteratorValue(type, subNode.entry); + } + stack = this._stack = mapIteratorFrame(subNode, stack); + } + continue; + } + } + stack = this._stack = this._stack.__prev; + } + return iteratorDone(); + }; + + + function mapIteratorValue(type, entry) { + return iteratorValue(type, entry[0], entry[1]); + } + + function mapIteratorFrame(node, prev) { + return { + node: node, + index: 0, + __prev: prev + }; + } + + function makeMap(size, root, ownerID, hash) { + var map = __webpack_provided_Object_dot_create(MapPrototype); + map.size = size; + map._root = root; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; + } + + var EMPTY_MAP; + function emptyMap() { + return EMPTY_MAP || (EMPTY_MAP = makeMap(0)); + } + + function updateMap(map, k, v) { + var newRoot; + var newSize; + if (!map._root) { + if (v === NOT_SET) { + return map; + } + newSize = 1; + newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]); + } else { + var didChangeSize = MakeRef(CHANGE_LENGTH); + var didAlter = MakeRef(DID_ALTER); + newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter); + if (!didAlter.value) { + return map; + } + newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0); + } + if (map.__ownerID) { + map.size = newSize; + map._root = newRoot; + map.__hash = undefined; + map.__altered = true; + return map; + } + return newRoot ? makeMap(newSize, newRoot) : emptyMap(); + } + + function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + if (!node) { + if (value === NOT_SET) { + return node; + } + SetRef(didAlter); + SetRef(didChangeSize); + return new ValueNode(ownerID, keyHash, [key, value]); + } + return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter); + } + + function isLeafNode(node) { + return node.constructor === ValueNode || node.constructor === HashCollisionNode; + } + + function mergeIntoNode(node, ownerID, shift, keyHash, entry) { + if (node.keyHash === keyHash) { + return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]); + } + + var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK; + var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; + + var newNode; + var nodes = idx1 === idx2 ? + [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] : + ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]); + + return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes); + } + + function createNodes(ownerID, entries, key, value) { + if (!ownerID) { + ownerID = new OwnerID(); + } + var node = new ValueNode(ownerID, hash(key), [key, value]); + for (var ii = 0; ii < entries.length; ii++) { + var entry = entries[ii]; + node = node.update(ownerID, 0, undefined, entry[0], entry[1]); + } + return node; + } + + function packNodes(ownerID, nodes, count, excluding) { + var bitmap = 0; + var packedII = 0; + var packedNodes = new Array(count); + for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) { + var node = nodes[ii]; + if (node !== undefined && ii !== excluding) { + bitmap |= bit; + packedNodes[packedII++] = node; + } + } + return new BitmapIndexedNode(ownerID, bitmap, packedNodes); + } + + function expandNodes(ownerID, nodes, bitmap, including, node) { + var count = 0; + var expandedNodes = new Array(SIZE); + for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) { + expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; + } + expandedNodes[including] = node; + return new HashArrayMapNode(ownerID, count + 1, expandedNodes); + } + + function mergeIntoMapWith(map, merger, iterables) { + var iters = []; + for (var ii = 0; ii < iterables.length; ii++) { + var value = iterables[ii]; + var iter = KeyedIterable(value); + if (!isIterable(value)) { + iter = iter.map(function(v ) {return fromJS(v)}); + } + iters.push(iter); + } + return mergeIntoCollectionWith(map, merger, iters); + } + + function deepMerger(existing, value, key) { + return existing && existing.mergeDeep && isIterable(value) ? + existing.mergeDeep(value) : + is(existing, value) ? existing : value; + } + + function deepMergerWith(merger) { + return function(existing, value, key) { + if (existing && existing.mergeDeepWith && isIterable(value)) { + return existing.mergeDeepWith(merger, value); + } + var nextValue = merger(existing, value, key); + return is(existing, nextValue) ? existing : nextValue; + }; + } + + function mergeIntoCollectionWith(collection, merger, iters) { + iters = iters.filter(function(x ) {return x.size !== 0}); + if (iters.length === 0) { + return collection; + } + if (collection.size === 0 && !collection.__ownerID && iters.length === 1) { + return collection.constructor(iters[0]); + } + return collection.withMutations(function(collection ) { + var mergeIntoMap = merger ? + function(value, key) { + collection.update(key, NOT_SET, function(existing ) + {return existing === NOT_SET ? value : merger(existing, value, key)} + ); + } : + function(value, key) { + collection.set(key, value); + } + for (var ii = 0; ii < iters.length; ii++) { + iters[ii].forEach(mergeIntoMap); + } + }); + } + + function updateInDeepMap(existing, keyPathIter, notSetValue, updater) { + var isNotSet = existing === NOT_SET; + var step = keyPathIter.next(); + if (step.done) { + var existingValue = isNotSet ? notSetValue : existing; + var newValue = updater(existingValue); + return newValue === existingValue ? existing : newValue; + } + invariant( + isNotSet || (existing && existing.set), + 'invalid keyPath' + ); + var key = step.value; + var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET); + var nextUpdated = updateInDeepMap( + nextExisting, + keyPathIter, + notSetValue, + updater + ); + return nextUpdated === nextExisting ? existing : + nextUpdated === NOT_SET ? existing.remove(key) : + (isNotSet ? emptyMap() : existing).set(key, nextUpdated); + } + + function popCount(x) { + x = x - ((x >> 1) & 0x55555555); + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + x = (x + (x >> 4)) & 0x0f0f0f0f; + x = x + (x >> 8); + x = x + (x >> 16); + return x & 0x7f; + } + + function setIn(array, idx, val, canEdit) { + var newArray = canEdit ? array : arrCopy(array); + newArray[idx] = val; + return newArray; + } + + function spliceIn(array, idx, val, canEdit) { + var newLen = array.length + 1; + if (canEdit && idx + 1 === newLen) { + array[idx] = val; + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + newArray[ii] = val; + after = -1; + } else { + newArray[ii] = array[ii + after]; + } + } + return newArray; + } + + function spliceOut(array, idx, canEdit) { + var newLen = array.length - 1; + if (canEdit && idx === newLen) { + array.pop(); + return array; + } + var newArray = new Array(newLen); + var after = 0; + for (var ii = 0; ii < newLen; ii++) { + if (ii === idx) { + after = 1; + } + newArray[ii] = array[ii + after]; + } + return newArray; + } + + var MAX_ARRAY_MAP_SIZE = SIZE / 4; + var MAX_BITMAP_INDEXED_SIZE = SIZE / 2; + var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; + + createClass(List, IndexedCollection); + + // @pragma Construction + + function List(value) { + var empty = emptyList(); + if (value === null || value === undefined) { + return empty; + } + if (isList(value)) { + return value; + } + var iter = IndexedIterable(value); + var size = iter.size; + if (size === 0) { + return empty; + } + assertNotInfinite(size); + if (size > 0 && size < SIZE) { + return makeList(0, size, SHIFT, null, new VNode(iter.toArray())); + } + return empty.withMutations(function(list ) { + list.setSize(size); + iter.forEach(function(v, i) {return list.set(i, v)}); + }); + } + + List.of = function(/*...values*/) { + return this(arguments); + }; + + List.prototype.toString = function() { + return this.__toString('List [', ']'); + }; + + // @pragma Access + + List.prototype.get = function(index, notSetValue) { + index = wrapIndex(this, index); + if (index >= 0 && index < this.size) { + index += this._origin; + var node = listNodeFor(this, index); + return node && node.array[index & MASK]; + } + return notSetValue; + }; + + // @pragma Modification + + List.prototype.set = function(index, value) { + return updateList(this, index, value); + }; + + List.prototype.remove = function(index) { + return !this.has(index) ? this : + index === 0 ? this.shift() : + index === this.size - 1 ? this.pop() : + this.splice(index, 1); + }; + + List.prototype.insert = function(index, value) { + return this.splice(index, 0, value); + }; + + List.prototype.clear = function() { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = this._origin = this._capacity = 0; + this._level = SHIFT; + this._root = this._tail = null; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyList(); + }; + + List.prototype.push = function(/*...values*/) { + var values = arguments; + var oldSize = this.size; + return this.withMutations(function(list ) { + setListBounds(list, 0, oldSize + values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(oldSize + ii, values[ii]); + } + }); + }; + + List.prototype.pop = function() { + return setListBounds(this, 0, -1); + }; + + List.prototype.unshift = function(/*...values*/) { + var values = arguments; + return this.withMutations(function(list ) { + setListBounds(list, -values.length); + for (var ii = 0; ii < values.length; ii++) { + list.set(ii, values[ii]); + } + }); + }; + + List.prototype.shift = function() { + return setListBounds(this, 1); + }; + + // @pragma Composition + + List.prototype.merge = function(/*...iters*/) { + return mergeIntoListWith(this, undefined, arguments); + }; + + List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1); + return mergeIntoListWith(this, merger, iters); + }; + + List.prototype.mergeDeep = function(/*...iters*/) { + return mergeIntoListWith(this, deepMerger, arguments); + }; + + List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1); + return mergeIntoListWith(this, deepMergerWith(merger), iters); + }; + + List.prototype.setSize = function(size) { + return setListBounds(this, 0, size); + }; + + // @pragma Iteration + + List.prototype.slice = function(begin, end) { + var size = this.size; + if (wholeSlice(begin, end, size)) { + return this; + } + return setListBounds( + this, + resolveBegin(begin, size), + resolveEnd(end, size) + ); + }; + + List.prototype.__iterator = function(type, reverse) { + var index = 0; + var values = iterateList(this, reverse); + return new Iterator(function() { + var value = values(); + return value === DONE ? + iteratorDone() : + iteratorValue(type, index++, value); + }); + }; + + List.prototype.__iterate = function(fn, reverse) { + var index = 0; + var values = iterateList(this, reverse); + var value; + while ((value = values()) !== DONE) { + if (fn(value, index++, this) === false) { + break; + } + } + return index; + }; + + List.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + this.__ownerID = ownerID; + return this; + } + return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash); + }; + + + function isList(maybeList) { + return !!(maybeList && maybeList[IS_LIST_SENTINEL]); + } + + List.isList = isList; + + var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@'; + + var ListPrototype = List.prototype; + ListPrototype[IS_LIST_SENTINEL] = true; + ListPrototype[DELETE] = ListPrototype.remove; + ListPrototype.setIn = MapPrototype.setIn; + ListPrototype.deleteIn = + ListPrototype.removeIn = MapPrototype.removeIn; + ListPrototype.update = MapPrototype.update; + ListPrototype.updateIn = MapPrototype.updateIn; + ListPrototype.mergeIn = MapPrototype.mergeIn; + ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn; + ListPrototype.withMutations = MapPrototype.withMutations; + ListPrototype.asMutable = MapPrototype.asMutable; + ListPrototype.asImmutable = MapPrototype.asImmutable; + ListPrototype.wasAltered = MapPrototype.wasAltered; + + + + function VNode(array, ownerID) { + this.array = array; + this.ownerID = ownerID; + } + + // TODO: seems like these methods are very similar + + VNode.prototype.removeBefore = function(ownerID, level, index) { + if (index === level ? 1 << level : 0 || this.array.length === 0) { + return this; + } + var originIndex = (index >>> level) & MASK; + if (originIndex >= this.array.length) { + return new VNode([], ownerID); + } + var removingFirst = originIndex === 0; + var newChild; + if (level > 0) { + var oldChild = this.array[originIndex]; + newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index); + if (newChild === oldChild && removingFirst) { + return this; + } + } + if (removingFirst && !newChild) { + return this; + } + var editable = editableVNode(this, ownerID); + if (!removingFirst) { + for (var ii = 0; ii < originIndex; ii++) { + editable.array[ii] = undefined; + } + } + if (newChild) { + editable.array[originIndex] = newChild; + } + return editable; + }; + + VNode.prototype.removeAfter = function(ownerID, level, index) { + if (index === (level ? 1 << level : 0) || this.array.length === 0) { + return this; + } + var sizeIndex = ((index - 1) >>> level) & MASK; + if (sizeIndex >= this.array.length) { + return this; + } + + var newChild; + if (level > 0) { + var oldChild = this.array[sizeIndex]; + newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index); + if (newChild === oldChild && sizeIndex === this.array.length - 1) { + return this; + } + } + + var editable = editableVNode(this, ownerID); + editable.array.splice(sizeIndex + 1); + if (newChild) { + editable.array[sizeIndex] = newChild; + } + return editable; + }; + + + + var DONE = {}; + + function iterateList(list, reverse) { + var left = list._origin; + var right = list._capacity; + var tailPos = getTailOffset(right); + var tail = list._tail; + + return iterateNodeOrLeaf(list._root, list._level, 0); + + function iterateNodeOrLeaf(node, level, offset) { + return level === 0 ? + iterateLeaf(node, offset) : + iterateNode(node, level, offset); + } + + function iterateLeaf(node, offset) { + var array = offset === tailPos ? tail && tail.array : node && node.array; + var from = offset > left ? 0 : left - offset; + var to = right - offset; + if (to > SIZE) { + to = SIZE; + } + return function() { + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + return array && array[idx]; + }; + } + + function iterateNode(node, level, offset) { + var values; + var array = node && node.array; + var from = offset > left ? 0 : (left - offset) >> level; + var to = ((right - offset) >> level) + 1; + if (to > SIZE) { + to = SIZE; + } + return function() { + do { + if (values) { + var value = values(); + if (value !== DONE) { + return value; + } + values = null; + } + if (from === to) { + return DONE; + } + var idx = reverse ? --to : from++; + values = iterateNodeOrLeaf( + array && array[idx], level - SHIFT, offset + (idx << level) + ); + } while (true); + }; + } + } + + function makeList(origin, capacity, level, root, tail, ownerID, hash) { + var list = __webpack_provided_Object_dot_create(ListPrototype); + list.size = capacity - origin; + list._origin = origin; + list._capacity = capacity; + list._level = level; + list._root = root; + list._tail = tail; + list.__ownerID = ownerID; + list.__hash = hash; + list.__altered = false; + return list; + } + + var EMPTY_LIST; + function emptyList() { + return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT)); + } + + function updateList(list, index, value) { + index = wrapIndex(list, index); + + if (index !== index) { + return list; + } + + if (index >= list.size || index < 0) { + return list.withMutations(function(list ) { + index < 0 ? + setListBounds(list, index).set(0, value) : + setListBounds(list, 0, index + 1).set(index, value) + }); + } + + index += list._origin; + + var newTail = list._tail; + var newRoot = list._root; + var didAlter = MakeRef(DID_ALTER); + if (index >= getTailOffset(list._capacity)) { + newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter); + } else { + newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter); + } + + if (!didAlter.value) { + return list; + } + + if (list.__ownerID) { + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(list._origin, list._capacity, list._level, newRoot, newTail); + } + + function updateVNode(node, ownerID, level, index, value, didAlter) { + var idx = (index >>> level) & MASK; + var nodeHas = node && idx < node.array.length; + if (!nodeHas && value === undefined) { + return node; + } + + var newNode; + + if (level > 0) { + var lowerNode = node && node.array[idx]; + var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter); + if (newLowerNode === lowerNode) { + return node; + } + newNode = editableVNode(node, ownerID); + newNode.array[idx] = newLowerNode; + return newNode; + } + + if (nodeHas && node.array[idx] === value) { + return node; + } + + SetRef(didAlter); + + newNode = editableVNode(node, ownerID); + if (value === undefined && idx === newNode.array.length - 1) { + newNode.array.pop(); + } else { + newNode.array[idx] = value; + } + return newNode; + } + + function editableVNode(node, ownerID) { + if (ownerID && node && ownerID === node.ownerID) { + return node; + } + return new VNode(node ? node.array.slice() : [], ownerID); + } + + function listNodeFor(list, rawIndex) { + if (rawIndex >= getTailOffset(list._capacity)) { + return list._tail; + } + if (rawIndex < 1 << (list._level + SHIFT)) { + var node = list._root; + var level = list._level; + while (node && level > 0) { + node = node.array[(rawIndex >>> level) & MASK]; + level -= SHIFT; + } + return node; + } + } + + function setListBounds(list, begin, end) { + // Sanitize begin & end using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + if (begin !== undefined) { + begin = begin | 0; + } + if (end !== undefined) { + end = end | 0; + } + var owner = list.__ownerID || new OwnerID(); + var oldOrigin = list._origin; + var oldCapacity = list._capacity; + var newOrigin = oldOrigin + begin; + var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end; + if (newOrigin === oldOrigin && newCapacity === oldCapacity) { + return list; + } + + // If it's going to end after it starts, it's empty. + if (newOrigin >= newCapacity) { + return list.clear(); + } + + var newLevel = list._level; + var newRoot = list._root; + + // New origin might need creating a higher root. + var offsetShift = 0; + while (newOrigin + offsetShift < 0) { + newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner); + newLevel += SHIFT; + offsetShift += 1 << newLevel; + } + if (offsetShift) { + newOrigin += offsetShift; + oldOrigin += offsetShift; + newCapacity += offsetShift; + oldCapacity += offsetShift; + } + + var oldTailOffset = getTailOffset(oldCapacity); + var newTailOffset = getTailOffset(newCapacity); + + // New size might need creating a higher root. + while (newTailOffset >= 1 << (newLevel + SHIFT)) { + newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner); + newLevel += SHIFT; + } + + // Locate or create the new tail. + var oldTail = list._tail; + var newTail = newTailOffset < oldTailOffset ? + listNodeFor(list, newCapacity - 1) : + newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail; + + // Merge Tail into tree. + if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) { + newRoot = editableVNode(newRoot, owner); + var node = newRoot; + for (var level = newLevel; level > SHIFT; level -= SHIFT) { + var idx = (oldTailOffset >>> level) & MASK; + node = node.array[idx] = editableVNode(node.array[idx], owner); + } + node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail; + } + + // If the size has been reduced, there's a chance the tail needs to be trimmed. + if (newCapacity < oldCapacity) { + newTail = newTail && newTail.removeAfter(owner, 0, newCapacity); + } + + // If the new origin is within the tail, then we do not need a root. + if (newOrigin >= newTailOffset) { + newOrigin -= newTailOffset; + newCapacity -= newTailOffset; + newLevel = SHIFT; + newRoot = null; + newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); + + // Otherwise, if the root has been trimmed, garbage collect. + } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) { + offsetShift = 0; + + // Identify the new top root node of the subtree of the old root. + while (newRoot) { + var beginIndex = (newOrigin >>> newLevel) & MASK; + if (beginIndex !== (newTailOffset >>> newLevel) & MASK) { + break; + } + if (beginIndex) { + offsetShift += (1 << newLevel) * beginIndex; + } + newLevel -= SHIFT; + newRoot = newRoot.array[beginIndex]; + } + + // Trim the new sides of the new root. + if (newRoot && newOrigin > oldOrigin) { + newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift); + } + if (newRoot && newTailOffset < oldTailOffset) { + newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift); + } + if (offsetShift) { + newOrigin -= offsetShift; + newCapacity -= offsetShift; + } + } + + if (list.__ownerID) { + list.size = newCapacity - newOrigin; + list._origin = newOrigin; + list._capacity = newCapacity; + list._level = newLevel; + list._root = newRoot; + list._tail = newTail; + list.__hash = undefined; + list.__altered = true; + return list; + } + return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail); + } + + function mergeIntoListWith(list, merger, iterables) { + var iters = []; + var maxSize = 0; + for (var ii = 0; ii < iterables.length; ii++) { + var value = iterables[ii]; + var iter = IndexedIterable(value); + if (iter.size > maxSize) { + maxSize = iter.size; + } + if (!isIterable(value)) { + iter = iter.map(function(v ) {return fromJS(v)}); + } + iters.push(iter); + } + if (maxSize > list.size) { + list = list.setSize(maxSize); + } + return mergeIntoCollectionWith(list, merger, iters); + } + + function getTailOffset(size) { + return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT); + } + + createClass(OrderedMap, Map); + + // @pragma Construction + + function OrderedMap(value) { + return value === null || value === undefined ? emptyOrderedMap() : + isOrderedMap(value) ? value : + emptyOrderedMap().withMutations(function(map ) { + var iter = KeyedIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function(v, k) {return map.set(k, v)}); + }); + } + + OrderedMap.of = function(/*...values*/) { + return this(arguments); + }; + + OrderedMap.prototype.toString = function() { + return this.__toString('OrderedMap {', '}'); + }; + + // @pragma Access + + OrderedMap.prototype.get = function(k, notSetValue) { + var index = this._map.get(k); + return index !== undefined ? this._list.get(index)[1] : notSetValue; + }; + + // @pragma Modification + + OrderedMap.prototype.clear = function() { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._map.clear(); + this._list.clear(); + return this; + } + return emptyOrderedMap(); + }; + + OrderedMap.prototype.set = function(k, v) { + return updateOrderedMap(this, k, v); + }; + + OrderedMap.prototype.remove = function(k) { + return updateOrderedMap(this, k, NOT_SET); + }; + + OrderedMap.prototype.wasAltered = function() { + return this._map.wasAltered() || this._list.wasAltered(); + }; + + OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this; + return this._list.__iterate( + function(entry ) {return entry && fn(entry[1], entry[0], this$0)}, + reverse + ); + }; + + OrderedMap.prototype.__iterator = function(type, reverse) { + return this._list.fromEntrySeq().__iterator(type, reverse); + }; + + OrderedMap.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + var newList = this._list.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._map = newMap; + this._list = newList; + return this; + } + return makeOrderedMap(newMap, newList, ownerID, this.__hash); + }; + + + function isOrderedMap(maybeOrderedMap) { + return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap); + } + + OrderedMap.isOrderedMap = isOrderedMap; + + OrderedMap.prototype[IS_ORDERED_SENTINEL] = true; + OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove; + + + + function makeOrderedMap(map, list, ownerID, hash) { + var omap = __webpack_provided_Object_dot_create(OrderedMap.prototype); + omap.size = map ? map.size : 0; + omap._map = map; + omap._list = list; + omap.__ownerID = ownerID; + omap.__hash = hash; + return omap; + } + + var EMPTY_ORDERED_MAP; + function emptyOrderedMap() { + return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList())); + } + + function updateOrderedMap(omap, k, v) { + var map = omap._map; + var list = omap._list; + var i = map.get(k); + var has = i !== undefined; + var newMap; + var newList; + if (v === NOT_SET) { // removed + if (!has) { + return omap; + } + if (list.size >= SIZE && list.size >= map.size * 2) { + newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx}); + newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap(); + if (omap.__ownerID) { + newMap.__ownerID = newList.__ownerID = omap.__ownerID; + } + } else { + newMap = map.remove(k); + newList = i === list.size - 1 ? list.pop() : list.set(i, undefined); + } + } else { + if (has) { + if (v === list.get(i)[1]) { + return omap; + } + newMap = map; + newList = list.set(i, [k, v]); + } else { + newMap = map.set(k, list.size); + newList = list.set(list.size, [k, v]); + } + } + if (omap.__ownerID) { + omap.size = newMap.size; + omap._map = newMap; + omap._list = newList; + omap.__hash = undefined; + return omap; + } + return makeOrderedMap(newMap, newList); + } + + createClass(ToKeyedSequence, KeyedSeq); + function ToKeyedSequence(indexed, useKeys) { + this._iter = indexed; + this._useKeys = useKeys; + this.size = indexed.size; + } + + ToKeyedSequence.prototype.get = function(key, notSetValue) { + return this._iter.get(key, notSetValue); + }; + + ToKeyedSequence.prototype.has = function(key) { + return this._iter.has(key); + }; + + ToKeyedSequence.prototype.valueSeq = function() { + return this._iter.valueSeq(); + }; + + ToKeyedSequence.prototype.reverse = function() {var this$0 = this; + var reversedSequence = reverseFactory(this, true); + if (!this._useKeys) { + reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()}; + } + return reversedSequence; + }; + + ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this; + var mappedSequence = mapFactory(this, mapper, context); + if (!this._useKeys) { + mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)}; + } + return mappedSequence; + }; + + ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; + var ii; + return this._iter.__iterate( + this._useKeys ? + function(v, k) {return fn(v, k, this$0)} : + ((ii = reverse ? resolveSize(this) : 0), + function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}), + reverse + ); + }; + + ToKeyedSequence.prototype.__iterator = function(type, reverse) { + if (this._useKeys) { + return this._iter.__iterator(type, reverse); + } + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + var ii = reverse ? resolveSize(this) : 0; + return new Iterator(function() { + var step = iterator.next(); + return step.done ? step : + iteratorValue(type, reverse ? --ii : ii++, step.value, step); + }); + }; + + ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true; + + + createClass(ToIndexedSequence, IndexedSeq); + function ToIndexedSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + ToIndexedSequence.prototype.includes = function(value) { + return this._iter.includes(value); + }; + + ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; + var iterations = 0; + return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse); + }; + + ToIndexedSequence.prototype.__iterator = function(type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + var iterations = 0; + return new Iterator(function() { + var step = iterator.next(); + return step.done ? step : + iteratorValue(type, iterations++, step.value, step) + }); + }; + + + + createClass(ToSetSequence, SetSeq); + function ToSetSequence(iter) { + this._iter = iter; + this.size = iter.size; + } + + ToSetSequence.prototype.has = function(key) { + return this._iter.includes(key); + }; + + ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; + return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse); + }; + + ToSetSequence.prototype.__iterator = function(type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function() { + var step = iterator.next(); + return step.done ? step : + iteratorValue(type, step.value, step.value, step); + }); + }; + + + + createClass(FromEntriesSequence, KeyedSeq); + function FromEntriesSequence(entries) { + this._iter = entries; + this.size = entries.size; + } + + FromEntriesSequence.prototype.entrySeq = function() { + return this._iter.toSeq(); + }; + + FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; + return this._iter.__iterate(function(entry ) { + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedIterable = isIterable(entry); + return fn( + indexedIterable ? entry.get(1) : entry[1], + indexedIterable ? entry.get(0) : entry[0], + this$0 + ); + } + }, reverse); + }; + + FromEntriesSequence.prototype.__iterator = function(type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function() { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + // Check if entry exists first so array access doesn't throw for holes + // in the parent iteration. + if (entry) { + validateEntry(entry); + var indexedIterable = isIterable(entry); + return iteratorValue( + type, + indexedIterable ? entry.get(0) : entry[0], + indexedIterable ? entry.get(1) : entry[1], + step + ); + } + } + }); + }; + + + ToIndexedSequence.prototype.cacheResult = + ToKeyedSequence.prototype.cacheResult = + ToSetSequence.prototype.cacheResult = + FromEntriesSequence.prototype.cacheResult = + cacheResultThrough; + + + function flipFactory(iterable) { + var flipSequence = makeSequence(iterable); + flipSequence._iter = iterable; + flipSequence.size = iterable.size; + flipSequence.flip = function() {return iterable}; + flipSequence.reverse = function () { + var reversedSequence = iterable.reverse.apply(this); // super.reverse() + reversedSequence.flip = function() {return iterable.reverse()}; + return reversedSequence; + }; + flipSequence.has = function(key ) {return iterable.includes(key)}; + flipSequence.includes = function(key ) {return iterable.has(key)}; + flipSequence.cacheResult = cacheResultThrough; + flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; + return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse); + } + flipSequence.__iteratorUncached = function(type, reverse) { + if (type === ITERATE_ENTRIES) { + var iterator = iterable.__iterator(type, reverse); + return new Iterator(function() { + var step = iterator.next(); + if (!step.done) { + var k = step.value[0]; + step.value[0] = step.value[1]; + step.value[1] = k; + } + return step; + }); + } + return iterable.__iterator( + type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, + reverse + ); + } + return flipSequence; + } + + + function mapFactory(iterable, mapper, context) { + var mappedSequence = makeSequence(iterable); + mappedSequence.size = iterable.size; + mappedSequence.has = function(key ) {return iterable.has(key)}; + mappedSequence.get = function(key, notSetValue) { + var v = iterable.get(key, NOT_SET); + return v === NOT_SET ? + notSetValue : + mapper.call(context, v, key, iterable); + }; + mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; + return iterable.__iterate( + function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false}, + reverse + ); + } + mappedSequence.__iteratorUncached = function (type, reverse) { + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + return new Iterator(function() { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + return iteratorValue( + type, + key, + mapper.call(context, entry[1], key, iterable), + step + ); + }); + } + return mappedSequence; + } + + + function reverseFactory(iterable, useKeys) { + var reversedSequence = makeSequence(iterable); + reversedSequence._iter = iterable; + reversedSequence.size = iterable.size; + reversedSequence.reverse = function() {return iterable}; + if (iterable.flip) { + reversedSequence.flip = function () { + var flipSequence = flipFactory(iterable); + flipSequence.reverse = function() {return iterable.flip()}; + return flipSequence; + }; + } + reversedSequence.get = function(key, notSetValue) + {return iterable.get(useKeys ? key : -1 - key, notSetValue)}; + reversedSequence.has = function(key ) + {return iterable.has(useKeys ? key : -1 - key)}; + reversedSequence.includes = function(value ) {return iterable.includes(value)}; + reversedSequence.cacheResult = cacheResultThrough; + reversedSequence.__iterate = function (fn, reverse) {var this$0 = this; + return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse); + }; + reversedSequence.__iterator = + function(type, reverse) {return iterable.__iterator(type, !reverse)}; + return reversedSequence; + } + + + function filterFactory(iterable, predicate, context, useKeys) { + var filterSequence = makeSequence(iterable); + if (useKeys) { + filterSequence.has = function(key ) { + var v = iterable.get(key, NOT_SET); + return v !== NOT_SET && !!predicate.call(context, v, key, iterable); + }; + filterSequence.get = function(key, notSetValue) { + var v = iterable.get(key, NOT_SET); + return v !== NOT_SET && predicate.call(context, v, key, iterable) ? + v : notSetValue; + }; + } + filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; + var iterations = 0; + iterable.__iterate(function(v, k, c) { + if (predicate.call(context, v, k, c)) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$0); + } + }, reverse); + return iterations; + }; + filterSequence.__iteratorUncached = function (type, reverse) { + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + var iterations = 0; + return new Iterator(function() { + while (true) { + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var key = entry[0]; + var value = entry[1]; + if (predicate.call(context, value, key, iterable)) { + return iteratorValue(type, useKeys ? key : iterations++, value, step); + } + } + }); + } + return filterSequence; + } + + + function countByFactory(iterable, grouper, context) { + var groups = Map().asMutable(); + iterable.__iterate(function(v, k) { + groups.update( + grouper.call(context, v, k, iterable), + 0, + function(a ) {return a + 1} + ); + }); + return groups.asImmutable(); + } + + + function groupByFactory(iterable, grouper, context) { + var isKeyedIter = isKeyed(iterable); + var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable(); + iterable.__iterate(function(v, k) { + groups.update( + grouper.call(context, v, k, iterable), + function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)} + ); + }); + var coerce = iterableClass(iterable); + return groups.map(function(arr ) {return reify(iterable, coerce(arr))}); + } + + + function sliceFactory(iterable, begin, end, useKeys) { + var originalSize = iterable.size; + + // Sanitize begin & end using this shorthand for ToInt32(argument) + // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 + if (begin !== undefined) { + begin = begin | 0; + } + if (end !== undefined) { + end = end | 0; + } + + if (wholeSlice(begin, end, originalSize)) { + return iterable; + } + + var resolvedBegin = resolveBegin(begin, originalSize); + var resolvedEnd = resolveEnd(end, originalSize); + + // begin or end will be NaN if they were provided as negative numbers and + // this iterable's size is unknown. In that case, cache first so there is + // a known size and these do not resolve to NaN. + if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) { + return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys); + } + + // Note: resolvedEnd is undefined when the original sequence's length is + // unknown and this slice did not supply an end and should contain all + // elements after resolvedBegin. + // In that case, resolvedSize will be NaN and sliceSize will remain undefined. + var resolvedSize = resolvedEnd - resolvedBegin; + var sliceSize; + if (resolvedSize === resolvedSize) { + sliceSize = resolvedSize < 0 ? 0 : resolvedSize; + } + + var sliceSeq = makeSequence(iterable); + + // If iterable.size is undefined, the size of the realized sliceSeq is + // unknown at this point unless the number of items to slice is 0 + sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined; + + if (!useKeys && isSeq(iterable) && sliceSize >= 0) { + sliceSeq.get = function (index, notSetValue) { + index = wrapIndex(this, index); + return index >= 0 && index < sliceSize ? + iterable.get(index + resolvedBegin, notSetValue) : + notSetValue; + } + } + + sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this; + if (sliceSize === 0) { + return 0; + } + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var skipped = 0; + var isSkipping = true; + var iterations = 0; + iterable.__iterate(function(v, k) { + if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$0) !== false && + iterations !== sliceSize; + } + }); + return iterations; + }; + + sliceSeq.__iteratorUncached = function(type, reverse) { + if (sliceSize !== 0 && reverse) { + return this.cacheResult().__iterator(type, reverse); + } + // Don't bother instantiating parent iterator if taking 0. + var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse); + var skipped = 0; + var iterations = 0; + return new Iterator(function() { + while (skipped++ < resolvedBegin) { + iterator.next(); + } + if (++iterations > sliceSize) { + return iteratorDone(); + } + var step = iterator.next(); + if (useKeys || type === ITERATE_VALUES) { + return step; + } else if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations - 1, undefined, step); + } else { + return iteratorValue(type, iterations - 1, step.value[1], step); + } + }); + } + + return sliceSeq; + } + + + function takeWhileFactory(iterable, predicate, context) { + var takeSequence = makeSequence(iterable); + takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this; + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var iterations = 0; + iterable.__iterate(function(v, k, c) + {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)} + ); + return iterations; + }; + takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this; + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + var iterating = true; + return new Iterator(function() { + if (!iterating) { + return iteratorDone(); + } + var step = iterator.next(); + if (step.done) { + return step; + } + var entry = step.value; + var k = entry[0]; + var v = entry[1]; + if (!predicate.call(context, v, k, this$0)) { + iterating = false; + return iteratorDone(); + } + return type === ITERATE_ENTRIES ? step : + iteratorValue(type, k, v, step); + }); + }; + return takeSequence; + } + + + function skipWhileFactory(iterable, predicate, context, useKeys) { + var skipSequence = makeSequence(iterable); + skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; + if (reverse) { + return this.cacheResult().__iterate(fn, reverse); + } + var isSkipping = true; + var iterations = 0; + iterable.__iterate(function(v, k, c) { + if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) { + iterations++; + return fn(v, useKeys ? k : iterations - 1, this$0); + } + }); + return iterations; + }; + skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this; + if (reverse) { + return this.cacheResult().__iterator(type, reverse); + } + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + var skipping = true; + var iterations = 0; + return new Iterator(function() { + var step, k, v; + do { + step = iterator.next(); + if (step.done) { + if (useKeys || type === ITERATE_VALUES) { + return step; + } else if (type === ITERATE_KEYS) { + return iteratorValue(type, iterations++, undefined, step); + } else { + return iteratorValue(type, iterations++, step.value[1], step); + } + } + var entry = step.value; + k = entry[0]; + v = entry[1]; + skipping && (skipping = predicate.call(context, v, k, this$0)); + } while (skipping); + return type === ITERATE_ENTRIES ? step : + iteratorValue(type, k, v, step); + }); + }; + return skipSequence; + } + + + function concatFactory(iterable, values) { + var isKeyedIterable = isKeyed(iterable); + var iters = [iterable].concat(values).map(function(v ) { + if (!isIterable(v)) { + v = isKeyedIterable ? + keyedSeqFromValue(v) : + indexedSeqFromValue(Array.isArray(v) ? v : [v]); + } else if (isKeyedIterable) { + v = KeyedIterable(v); + } + return v; + }).filter(function(v ) {return v.size !== 0}); + + if (iters.length === 0) { + return iterable; + } + + if (iters.length === 1) { + var singleton = iters[0]; + if (singleton === iterable || + isKeyedIterable && isKeyed(singleton) || + isIndexed(iterable) && isIndexed(singleton)) { + return singleton; + } + } + + var concatSeq = new ArraySeq(iters); + if (isKeyedIterable) { + concatSeq = concatSeq.toKeyedSeq(); + } else if (!isIndexed(iterable)) { + concatSeq = concatSeq.toSetSeq(); + } + concatSeq = concatSeq.flatten(true); + concatSeq.size = iters.reduce( + function(sum, seq) { + if (sum !== undefined) { + var size = seq.size; + if (size !== undefined) { + return sum + size; + } + } + }, + 0 + ); + return concatSeq; + } + + + function flattenFactory(iterable, depth, useKeys) { + var flatSequence = makeSequence(iterable); + flatSequence.__iterateUncached = function(fn, reverse) { + var iterations = 0; + var stopped = false; + function flatDeep(iter, currentDepth) {var this$0 = this; + iter.__iterate(function(v, k) { + if ((!depth || currentDepth < depth) && isIterable(v)) { + flatDeep(v, currentDepth + 1); + } else if (fn(v, useKeys ? k : iterations++, this$0) === false) { + stopped = true; + } + return !stopped; + }, reverse); + } + flatDeep(iterable, 0); + return iterations; + } + flatSequence.__iteratorUncached = function(type, reverse) { + var iterator = iterable.__iterator(type, reverse); + var stack = []; + var iterations = 0; + return new Iterator(function() { + while (iterator) { + var step = iterator.next(); + if (step.done !== false) { + iterator = stack.pop(); + continue; + } + var v = step.value; + if (type === ITERATE_ENTRIES) { + v = v[1]; + } + if ((!depth || stack.length < depth) && isIterable(v)) { + stack.push(iterator); + iterator = v.__iterator(type, reverse); + } else { + return useKeys ? step : iteratorValue(type, iterations++, v, step); + } + } + return iteratorDone(); + }); + } + return flatSequence; + } + + + function flatMapFactory(iterable, mapper, context) { + var coerce = iterableClass(iterable); + return iterable.toSeq().map( + function(v, k) {return coerce(mapper.call(context, v, k, iterable))} + ).flatten(true); + } + + + function interposeFactory(iterable, separator) { + var interposedSequence = makeSequence(iterable); + interposedSequence.size = iterable.size && iterable.size * 2 -1; + interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this; + var iterations = 0; + iterable.__iterate(function(v, k) + {return (!iterations || fn(separator, iterations++, this$0) !== false) && + fn(v, iterations++, this$0) !== false}, + reverse + ); + return iterations; + }; + interposedSequence.__iteratorUncached = function(type, reverse) { + var iterator = iterable.__iterator(ITERATE_VALUES, reverse); + var iterations = 0; + var step; + return new Iterator(function() { + if (!step || iterations % 2) { + step = iterator.next(); + if (step.done) { + return step; + } + } + return iterations % 2 ? + iteratorValue(type, iterations++, separator) : + iteratorValue(type, iterations++, step.value, step); + }); + }; + return interposedSequence; + } + + + function sortFactory(iterable, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + var isKeyedIterable = isKeyed(iterable); + var index = 0; + var entries = iterable.toSeq().map( + function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]} + ).toArray(); + entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach( + isKeyedIterable ? + function(v, i) { entries[i].length = 2; } : + function(v, i) { entries[i] = v[1]; } + ); + return isKeyedIterable ? KeyedSeq(entries) : + isIndexed(iterable) ? IndexedSeq(entries) : + SetSeq(entries); + } + + + function maxFactory(iterable, comparator, mapper) { + if (!comparator) { + comparator = defaultComparator; + } + if (mapper) { + var entry = iterable.toSeq() + .map(function(v, k) {return [v, mapper(v, k, iterable)]}) + .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a}); + return entry && entry[0]; + } else { + return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a}); + } + } + + function maxCompare(comparator, a, b) { + var comp = comparator(b, a); + // b is considered the new max if the comparator declares them equal, but + // they are not equal and b is in fact a nullish value. + return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0; + } + + + function zipWithFactory(keyIter, zipper, iters) { + var zipSequence = makeSequence(keyIter); + zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min(); + // Note: this a generic base implementation of __iterate in terms of + // __iterator which may be more generically useful in the future. + zipSequence.__iterate = function(fn, reverse) { + /* generic: + var iterator = this.__iterator(ITERATE_ENTRIES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + iterations++; + if (fn(step.value[1], step.value[0], this) === false) { + break; + } + } + return iterations; + */ + // indexed: + var iterator = this.__iterator(ITERATE_VALUES, reverse); + var step; + var iterations = 0; + while (!(step = iterator.next()).done) { + if (fn(step.value, iterations++, this) === false) { + break; + } + } + return iterations; + }; + zipSequence.__iteratorUncached = function(type, reverse) { + var iterators = iters.map(function(i ) + {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))} + ); + var iterations = 0; + var isDone = false; + return new Iterator(function() { + var steps; + if (!isDone) { + steps = iterators.map(function(i ) {return i.next()}); + isDone = steps.some(function(s ) {return s.done}); + } + if (isDone) { + return iteratorDone(); + } + return iteratorValue( + type, + iterations++, + zipper.apply(null, steps.map(function(s ) {return s.value})) + ); + }); + }; + return zipSequence + } + + + // #pragma Helper Functions + + function reify(iter, seq) { + return isSeq(iter) ? seq : iter.constructor(seq); + } + + function validateEntry(entry) { + if (entry !== Object(entry)) { + throw new TypeError('Expected [K, V] tuple: ' + entry); + } + } + + function resolveSize(iter) { + assertNotInfinite(iter.size); + return ensureSize(iter); + } + + function iterableClass(iterable) { + return isKeyed(iterable) ? KeyedIterable : + isIndexed(iterable) ? IndexedIterable : + SetIterable; + } + + function makeSequence(iterable) { + return __webpack_provided_Object_dot_create( + ( + isKeyed(iterable) ? KeyedSeq : + isIndexed(iterable) ? IndexedSeq : + SetSeq + ).prototype + ); + } + + function cacheResultThrough() { + if (this._iter.cacheResult) { + this._iter.cacheResult(); + this.size = this._iter.size; + return this; + } else { + return Seq.prototype.cacheResult.call(this); + } + } + + function defaultComparator(a, b) { + return a > b ? 1 : a < b ? -1 : 0; + } + + function forceIterator(keyPath) { + var iter = getIterator(keyPath); + if (!iter) { + // Array might not be iterable in this environment, so we need a fallback + // to our wrapped type. + if (!isArrayLike(keyPath)) { + throw new TypeError('Expected iterable or array-like: ' + keyPath); + } + iter = getIterator(Iterable(keyPath)); + } + return iter; + } + + createClass(Record, KeyedCollection); + + function Record(defaultValues, name) { + var hasInitialized; + + var RecordType = function Record(values) { + if (values instanceof RecordType) { + return values; + } + if (!(this instanceof RecordType)) { + return new RecordType(values); + } + if (!hasInitialized) { + hasInitialized = true; + var keys = Object.keys(defaultValues); + setProps(RecordTypePrototype, keys); + RecordTypePrototype.size = keys.length; + RecordTypePrototype._name = name; + RecordTypePrototype._keys = keys; + RecordTypePrototype._defaultValues = defaultValues; + } + this._map = Map(values); + }; + + var RecordTypePrototype = RecordType.prototype = __webpack_provided_Object_dot_create(RecordPrototype); + RecordTypePrototype.constructor = RecordType; + + return RecordType; + } + + Record.prototype.toString = function() { + return this.__toString(recordName(this) + ' {', '}'); + }; + + // @pragma Access + + Record.prototype.has = function(k) { + return this._defaultValues.hasOwnProperty(k); + }; + + Record.prototype.get = function(k, notSetValue) { + if (!this.has(k)) { + return notSetValue; + } + var defaultVal = this._defaultValues[k]; + return this._map ? this._map.get(k, defaultVal) : defaultVal; + }; + + // @pragma Modification + + Record.prototype.clear = function() { + if (this.__ownerID) { + this._map && this._map.clear(); + return this; + } + var RecordType = this.constructor; + return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap())); + }; + + Record.prototype.set = function(k, v) { + if (!this.has(k)) { + throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this)); + } + var newMap = this._map && this._map.set(k, v); + if (this.__ownerID || newMap === this._map) { + return this; + } + return makeRecord(this, newMap); + }; + + Record.prototype.remove = function(k) { + if (!this.has(k)) { + return this; + } + var newMap = this._map && this._map.remove(k); + if (this.__ownerID || newMap === this._map) { + return this; + } + return makeRecord(this, newMap); + }; + + Record.prototype.wasAltered = function() { + return this._map.wasAltered(); + }; + + Record.prototype.__iterator = function(type, reverse) {var this$0 = this; + return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse); + }; + + Record.prototype.__iterate = function(fn, reverse) {var this$0 = this; + return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse); + }; + + Record.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map && this._map.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._map = newMap; + return this; + } + return makeRecord(this, newMap, ownerID); + }; + + + var RecordPrototype = Record.prototype; + RecordPrototype[DELETE] = RecordPrototype.remove; + RecordPrototype.deleteIn = + RecordPrototype.removeIn = MapPrototype.removeIn; + RecordPrototype.merge = MapPrototype.merge; + RecordPrototype.mergeWith = MapPrototype.mergeWith; + RecordPrototype.mergeIn = MapPrototype.mergeIn; + RecordPrototype.mergeDeep = MapPrototype.mergeDeep; + RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith; + RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn; + RecordPrototype.setIn = MapPrototype.setIn; + RecordPrototype.update = MapPrototype.update; + RecordPrototype.updateIn = MapPrototype.updateIn; + RecordPrototype.withMutations = MapPrototype.withMutations; + RecordPrototype.asMutable = MapPrototype.asMutable; + RecordPrototype.asImmutable = MapPrototype.asImmutable; + + + function makeRecord(likeRecord, map, ownerID) { + var record = __webpack_provided_Object_dot_create(Object.getPrototypeOf(likeRecord)); + record._map = map; + record.__ownerID = ownerID; + return record; + } + + function recordName(record) { + return record._name || record.constructor.name || 'Record'; + } + + function setProps(prototype, names) { + try { + names.forEach(setProp.bind(undefined, prototype)); + } catch (error) { + // Object.defineProperty failed. Probably IE8. + } + } + + function setProp(prototype, name) { + Object.defineProperty(prototype, name, { + get: function() { + return this.get(name); + }, + set: function(value) { + invariant(this.__ownerID, 'Cannot set on an immutable record.'); + this.set(name, value); + } + }); + } + + createClass(Set, SetCollection); + + // @pragma Construction + + function Set(value) { + return value === null || value === undefined ? emptySet() : + isSet(value) && !isOrdered(value) ? value : + emptySet().withMutations(function(set ) { + var iter = SetIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function(v ) {return set.add(v)}); + }); + } + + Set.of = function(/*...values*/) { + return this(arguments); + }; + + Set.fromKeys = function(value) { + return this(KeyedIterable(value).keySeq()); + }; + + Set.prototype.toString = function() { + return this.__toString('Set {', '}'); + }; + + // @pragma Access + + Set.prototype.has = function(value) { + return this._map.has(value); + }; + + // @pragma Modification + + Set.prototype.add = function(value) { + return updateSet(this, this._map.set(value, true)); + }; + + Set.prototype.remove = function(value) { + return updateSet(this, this._map.remove(value)); + }; + + Set.prototype.clear = function() { + return updateSet(this, this._map.clear()); + }; + + // @pragma Composition + + Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0); + iters = iters.filter(function(x ) {return x.size !== 0}); + if (iters.length === 0) { + return this; + } + if (this.size === 0 && !this.__ownerID && iters.length === 1) { + return this.constructor(iters[0]); + } + return this.withMutations(function(set ) { + for (var ii = 0; ii < iters.length; ii++) { + SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)}); + } + }); + }; + + Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0); + if (iters.length === 0) { + return this; + } + iters = iters.map(function(iter ) {return SetIterable(iter)}); + var originalSet = this; + return this.withMutations(function(set ) { + originalSet.forEach(function(value ) { + if (!iters.every(function(iter ) {return iter.includes(value)})) { + set.remove(value); + } + }); + }); + }; + + Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0); + if (iters.length === 0) { + return this; + } + iters = iters.map(function(iter ) {return SetIterable(iter)}); + var originalSet = this; + return this.withMutations(function(set ) { + originalSet.forEach(function(value ) { + if (iters.some(function(iter ) {return iter.includes(value)})) { + set.remove(value); + } + }); + }); + }; + + Set.prototype.merge = function() { + return this.union.apply(this, arguments); + }; + + Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1); + return this.union.apply(this, iters); + }; + + Set.prototype.sort = function(comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator)); + }; + + Set.prototype.sortBy = function(mapper, comparator) { + // Late binding + return OrderedSet(sortFactory(this, comparator, mapper)); + }; + + Set.prototype.wasAltered = function() { + return this._map.wasAltered(); + }; + + Set.prototype.__iterate = function(fn, reverse) {var this$0 = this; + return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse); + }; + + Set.prototype.__iterator = function(type, reverse) { + return this._map.map(function(_, k) {return k}).__iterator(type, reverse); + }; + + Set.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + var newMap = this._map.__ensureOwner(ownerID); + if (!ownerID) { + this.__ownerID = ownerID; + this._map = newMap; + return this; + } + return this.__make(newMap, ownerID); + }; + + + function isSet(maybeSet) { + return !!(maybeSet && maybeSet[IS_SET_SENTINEL]); + } + + Set.isSet = isSet; + + var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@'; + + var SetPrototype = Set.prototype; + SetPrototype[IS_SET_SENTINEL] = true; + SetPrototype[DELETE] = SetPrototype.remove; + SetPrototype.mergeDeep = SetPrototype.merge; + SetPrototype.mergeDeepWith = SetPrototype.mergeWith; + SetPrototype.withMutations = MapPrototype.withMutations; + SetPrototype.asMutable = MapPrototype.asMutable; + SetPrototype.asImmutable = MapPrototype.asImmutable; + + SetPrototype.__empty = emptySet; + SetPrototype.__make = makeSet; + + function updateSet(set, newMap) { + if (set.__ownerID) { + set.size = newMap.size; + set._map = newMap; + return set; + } + return newMap === set._map ? set : + newMap.size === 0 ? set.__empty() : + set.__make(newMap); + } + + function makeSet(map, ownerID) { + var set = __webpack_provided_Object_dot_create(SetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; + } + + var EMPTY_SET; + function emptySet() { + return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap())); + } + + createClass(OrderedSet, Set); + + // @pragma Construction + + function OrderedSet(value) { + return value === null || value === undefined ? emptyOrderedSet() : + isOrderedSet(value) ? value : + emptyOrderedSet().withMutations(function(set ) { + var iter = SetIterable(value); + assertNotInfinite(iter.size); + iter.forEach(function(v ) {return set.add(v)}); + }); + } + + OrderedSet.of = function(/*...values*/) { + return this(arguments); + }; + + OrderedSet.fromKeys = function(value) { + return this(KeyedIterable(value).keySeq()); + }; + + OrderedSet.prototype.toString = function() { + return this.__toString('OrderedSet {', '}'); + }; + + + function isOrderedSet(maybeOrderedSet) { + return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet); + } + + OrderedSet.isOrderedSet = isOrderedSet; + + var OrderedSetPrototype = OrderedSet.prototype; + OrderedSetPrototype[IS_ORDERED_SENTINEL] = true; + + OrderedSetPrototype.__empty = emptyOrderedSet; + OrderedSetPrototype.__make = makeOrderedSet; + + function makeOrderedSet(map, ownerID) { + var set = __webpack_provided_Object_dot_create(OrderedSetPrototype); + set.size = map ? map.size : 0; + set._map = map; + set.__ownerID = ownerID; + return set; + } + + var EMPTY_ORDERED_SET; + function emptyOrderedSet() { + return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap())); + } + + createClass(Stack, IndexedCollection); + + // @pragma Construction + + function Stack(value) { + return value === null || value === undefined ? emptyStack() : + isStack(value) ? value : + emptyStack().unshiftAll(value); + } + + Stack.of = function(/*...values*/) { + return this(arguments); + }; + + Stack.prototype.toString = function() { + return this.__toString('Stack [', ']'); + }; + + // @pragma Access + + Stack.prototype.get = function(index, notSetValue) { + var head = this._head; + index = wrapIndex(this, index); + while (head && index--) { + head = head.next; + } + return head ? head.value : notSetValue; + }; + + Stack.prototype.peek = function() { + return this._head && this._head.value; + }; + + // @pragma Modification + + Stack.prototype.push = function(/*...values*/) { + if (arguments.length === 0) { + return this; + } + var newSize = this.size + arguments.length; + var head = this._head; + for (var ii = arguments.length - 1; ii >= 0; ii--) { + head = { + value: arguments[ii], + next: head + }; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pushAll = function(iter) { + iter = IndexedIterable(iter); + if (iter.size === 0) { + return this; + } + assertNotInfinite(iter.size); + var newSize = this.size; + var head = this._head; + iter.reverse().forEach(function(value ) { + newSize++; + head = { + value: value, + next: head + }; + }); + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + Stack.prototype.pop = function() { + return this.slice(1); + }; + + Stack.prototype.unshift = function(/*...values*/) { + return this.push.apply(this, arguments); + }; + + Stack.prototype.unshiftAll = function(iter) { + return this.pushAll(iter); + }; + + Stack.prototype.shift = function() { + return this.pop.apply(this, arguments); + }; + + Stack.prototype.clear = function() { + if (this.size === 0) { + return this; + } + if (this.__ownerID) { + this.size = 0; + this._head = undefined; + this.__hash = undefined; + this.__altered = true; + return this; + } + return emptyStack(); + }; + + Stack.prototype.slice = function(begin, end) { + if (wholeSlice(begin, end, this.size)) { + return this; + } + var resolvedBegin = resolveBegin(begin, this.size); + var resolvedEnd = resolveEnd(end, this.size); + if (resolvedEnd !== this.size) { + // super.slice(begin, end); + return IndexedCollection.prototype.slice.call(this, begin, end); + } + var newSize = this.size - resolvedBegin; + var head = this._head; + while (resolvedBegin--) { + head = head.next; + } + if (this.__ownerID) { + this.size = newSize; + this._head = head; + this.__hash = undefined; + this.__altered = true; + return this; + } + return makeStack(newSize, head); + }; + + // @pragma Mutability + + Stack.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) { + return this; + } + if (!ownerID) { + this.__ownerID = ownerID; + this.__altered = false; + return this; + } + return makeStack(this.size, this._head, ownerID, this.__hash); + }; + + // @pragma Iteration + + Stack.prototype.__iterate = function(fn, reverse) { + if (reverse) { + return this.reverse().__iterate(fn); + } + var iterations = 0; + var node = this._head; + while (node) { + if (fn(node.value, iterations++, this) === false) { + break; + } + node = node.next; + } + return iterations; + }; + + Stack.prototype.__iterator = function(type, reverse) { + if (reverse) { + return this.reverse().__iterator(type); + } + var iterations = 0; + var node = this._head; + return new Iterator(function() { + if (node) { + var value = node.value; + node = node.next; + return iteratorValue(type, iterations++, value); + } + return iteratorDone(); + }); + }; + + + function isStack(maybeStack) { + return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]); + } + + Stack.isStack = isStack; + + var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@'; + + var StackPrototype = Stack.prototype; + StackPrototype[IS_STACK_SENTINEL] = true; + StackPrototype.withMutations = MapPrototype.withMutations; + StackPrototype.asMutable = MapPrototype.asMutable; + StackPrototype.asImmutable = MapPrototype.asImmutable; + StackPrototype.wasAltered = MapPrototype.wasAltered; + + + function makeStack(size, head, ownerID, hash) { + var map = __webpack_provided_Object_dot_create(StackPrototype); + map.size = size; + map._head = head; + map.__ownerID = ownerID; + map.__hash = hash; + map.__altered = false; + return map; + } + + var EMPTY_STACK; + function emptyStack() { + return EMPTY_STACK || (EMPTY_STACK = makeStack(0)); + } + + /** + * Contributes additional methods to a constructor + */ + function mixin(ctor, methods) { + var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; }; + Object.keys(methods).forEach(keyCopier); + Object.getOwnPropertySymbols && + Object.getOwnPropertySymbols(methods).forEach(keyCopier); + return ctor; + } + + Iterable.Iterator = Iterator; + + mixin(Iterable, { + + // ### Conversion to other types + + toArray: function() { + assertNotInfinite(this.size); + var array = new Array(this.size || 0); + this.valueSeq().__iterate(function(v, i) { array[i] = v; }); + return array; + }, + + toIndexedSeq: function() { + return new ToIndexedSequence(this); + }, + + toJS: function() { + return this.toSeq().map( + function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value} + ).__toJS(); + }, + + toJSON: function() { + return this.toSeq().map( + function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value} + ).__toJS(); + }, + + toKeyedSeq: function() { + return new ToKeyedSequence(this, true); + }, + + toMap: function() { + // Use Late Binding here to solve the circular dependency. + return Map(this.toKeyedSeq()); + }, + + toObject: function() { + assertNotInfinite(this.size); + var object = {}; + this.__iterate(function(v, k) { object[k] = v; }); + return object; + }, + + toOrderedMap: function() { + // Use Late Binding here to solve the circular dependency. + return OrderedMap(this.toKeyedSeq()); + }, + + toOrderedSet: function() { + // Use Late Binding here to solve the circular dependency. + return OrderedSet(isKeyed(this) ? this.valueSeq() : this); + }, + + toSet: function() { + // Use Late Binding here to solve the circular dependency. + return Set(isKeyed(this) ? this.valueSeq() : this); + }, + + toSetSeq: function() { + return new ToSetSequence(this); + }, + + toSeq: function() { + return isIndexed(this) ? this.toIndexedSeq() : + isKeyed(this) ? this.toKeyedSeq() : + this.toSetSeq(); + }, + + toStack: function() { + // Use Late Binding here to solve the circular dependency. + return Stack(isKeyed(this) ? this.valueSeq() : this); + }, + + toList: function() { + // Use Late Binding here to solve the circular dependency. + return List(isKeyed(this) ? this.valueSeq() : this); + }, + + + // ### Common JavaScript methods and properties + + toString: function() { + return '[Iterable]'; + }, + + __toString: function(head, tail) { + if (this.size === 0) { + return head + tail; + } + return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail; + }, + + + // ### ES6 Collection methods (ES6 Array and Map) + + concat: function() {var values = SLICE$0.call(arguments, 0); + return reify(this, concatFactory(this, values)); + }, + + includes: function(searchValue) { + return this.some(function(value ) {return is(value, searchValue)}); + }, + + entries: function() { + return this.__iterator(ITERATE_ENTRIES); + }, + + every: function(predicate, context) { + assertNotInfinite(this.size); + var returnValue = true; + this.__iterate(function(v, k, c) { + if (!predicate.call(context, v, k, c)) { + returnValue = false; + return false; + } + }); + return returnValue; + }, + + filter: function(predicate, context) { + return reify(this, filterFactory(this, predicate, context, true)); + }, + + find: function(predicate, context, notSetValue) { + var entry = this.findEntry(predicate, context); + return entry ? entry[1] : notSetValue; + }, + + findEntry: function(predicate, context) { + var found; + this.__iterate(function(v, k, c) { + if (predicate.call(context, v, k, c)) { + found = [k, v]; + return false; + } + }); + return found; + }, + + findLastEntry: function(predicate, context) { + return this.toSeq().reverse().findEntry(predicate, context); + }, + + forEach: function(sideEffect, context) { + assertNotInfinite(this.size); + return this.__iterate(context ? sideEffect.bind(context) : sideEffect); + }, + + join: function(separator) { + assertNotInfinite(this.size); + separator = separator !== undefined ? '' + separator : ','; + var joined = ''; + var isFirst = true; + this.__iterate(function(v ) { + isFirst ? (isFirst = false) : (joined += separator); + joined += v !== null && v !== undefined ? v.toString() : ''; + }); + return joined; + }, + + keys: function() { + return this.__iterator(ITERATE_KEYS); + }, + + map: function(mapper, context) { + return reify(this, mapFactory(this, mapper, context)); + }, + + reduce: function(reducer, initialReduction, context) { + assertNotInfinite(this.size); + var reduction; + var useFirst; + if (arguments.length < 2) { + useFirst = true; + } else { + reduction = initialReduction; + } + this.__iterate(function(v, k, c) { + if (useFirst) { + useFirst = false; + reduction = v; + } else { + reduction = reducer.call(context, reduction, v, k, c); + } + }); + return reduction; + }, + + reduceRight: function(reducer, initialReduction, context) { + var reversed = this.toKeyedSeq().reverse(); + return reversed.reduce.apply(reversed, arguments); + }, + + reverse: function() { + return reify(this, reverseFactory(this, true)); + }, + + slice: function(begin, end) { + return reify(this, sliceFactory(this, begin, end, true)); + }, + + some: function(predicate, context) { + return !this.every(not(predicate), context); + }, + + sort: function(comparator) { + return reify(this, sortFactory(this, comparator)); + }, + + values: function() { + return this.__iterator(ITERATE_VALUES); + }, + + + // ### More sequential methods + + butLast: function() { + return this.slice(0, -1); + }, + + isEmpty: function() { + return this.size !== undefined ? this.size === 0 : !this.some(function() {return true}); + }, + + count: function(predicate, context) { + return ensureSize( + predicate ? this.toSeq().filter(predicate, context) : this + ); + }, + + countBy: function(grouper, context) { + return countByFactory(this, grouper, context); + }, + + equals: function(other) { + return deepEqual(this, other); + }, + + entrySeq: function() { + var iterable = this; + if (iterable._cache) { + // We cache as an entries array, so we can just return the cache! + return new ArraySeq(iterable._cache); + } + var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq(); + entriesSequence.fromEntrySeq = function() {return iterable.toSeq()}; + return entriesSequence; + }, + + filterNot: function(predicate, context) { + return this.filter(not(predicate), context); + }, + + findLast: function(predicate, context, notSetValue) { + return this.toKeyedSeq().reverse().find(predicate, context, notSetValue); + }, + + first: function() { + return this.find(returnTrue); + }, + + flatMap: function(mapper, context) { + return reify(this, flatMapFactory(this, mapper, context)); + }, + + flatten: function(depth) { + return reify(this, flattenFactory(this, depth, true)); + }, + + fromEntrySeq: function() { + return new FromEntriesSequence(this); + }, + + get: function(searchKey, notSetValue) { + return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue); + }, + + getIn: function(searchKeyPath, notSetValue) { + var nested = this; + // Note: in an ES6 environment, we would prefer: + // for (var key of searchKeyPath) { + var iter = forceIterator(searchKeyPath); + var step; + while (!(step = iter.next()).done) { + var key = step.value; + nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET; + if (nested === NOT_SET) { + return notSetValue; + } + } + return nested; + }, + + groupBy: function(grouper, context) { + return groupByFactory(this, grouper, context); + }, + + has: function(searchKey) { + return this.get(searchKey, NOT_SET) !== NOT_SET; + }, + + hasIn: function(searchKeyPath) { + return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET; + }, + + isSubset: function(iter) { + iter = typeof iter.includes === 'function' ? iter : Iterable(iter); + return this.every(function(value ) {return iter.includes(value)}); + }, + + isSuperset: function(iter) { + iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter); + return iter.isSubset(this); + }, + + keySeq: function() { + return this.toSeq().map(keyMapper).toIndexedSeq(); + }, + + last: function() { + return this.toSeq().reverse().first(); + }, + + max: function(comparator) { + return maxFactory(this, comparator); + }, + + maxBy: function(mapper, comparator) { + return maxFactory(this, comparator, mapper); + }, + + min: function(comparator) { + return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator); + }, + + minBy: function(mapper, comparator) { + return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper); + }, + + rest: function() { + return this.slice(1); + }, + + skip: function(amount) { + return this.slice(Math.max(0, amount)); + }, + + skipLast: function(amount) { + return reify(this, this.toSeq().reverse().skip(amount).reverse()); + }, + + skipWhile: function(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, true)); + }, + + skipUntil: function(predicate, context) { + return this.skipWhile(not(predicate), context); + }, + + sortBy: function(mapper, comparator) { + return reify(this, sortFactory(this, comparator, mapper)); + }, + + take: function(amount) { + return this.slice(0, Math.max(0, amount)); + }, + + takeLast: function(amount) { + return reify(this, this.toSeq().reverse().take(amount).reverse()); + }, + + takeWhile: function(predicate, context) { + return reify(this, takeWhileFactory(this, predicate, context)); + }, + + takeUntil: function(predicate, context) { + return this.takeWhile(not(predicate), context); + }, + + valueSeq: function() { + return this.toIndexedSeq(); + }, + + + // ### Hashable Object + + hashCode: function() { + return this.__hash || (this.__hash = hashIterable(this)); + } + + + // ### Internal + + // abstract __iterate(fn, reverse) + + // abstract __iterator(type, reverse) + }); + + // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@'; + // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'; + // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@'; + // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'; + + var IterablePrototype = Iterable.prototype; + IterablePrototype[IS_ITERABLE_SENTINEL] = true; + IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values; + IterablePrototype.__toJS = IterablePrototype.toArray; + IterablePrototype.__toStringMapper = quoteString; + IterablePrototype.inspect = + IterablePrototype.toSource = function() { return this.toString(); }; + IterablePrototype.chain = IterablePrototype.flatMap; + IterablePrototype.contains = IterablePrototype.includes; + + // Temporary warning about using length + (function () { + try { + Object.defineProperty(IterablePrototype, 'length', { + get: function () { + if (!Iterable.noLengthWarning) { + var stack; + try { + throw new Error(); + } catch (error) { + stack = error.stack; + } + if (stack.indexOf('_wrapObject') === -1) { + console && console.warn && console.warn( + 'iterable.length has been deprecated, '+ + 'use iterable.size or iterable.count(). '+ + 'This warning will become a silent error in a future version. ' + + stack + ); + return this.size; + } + } + } + }); + } catch (e) {} + })(); + + + + mixin(KeyedIterable, { + + // ### More sequential methods + + flip: function() { + return reify(this, flipFactory(this)); + }, + + findKey: function(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry && entry[0]; + }, + + findLastKey: function(predicate, context) { + return this.toSeq().reverse().findKey(predicate, context); + }, + + keyOf: function(searchValue) { + return this.findKey(function(value ) {return is(value, searchValue)}); + }, + + lastKeyOf: function(searchValue) { + return this.findLastKey(function(value ) {return is(value, searchValue)}); + }, + + mapEntries: function(mapper, context) {var this$0 = this; + var iterations = 0; + return reify(this, + this.toSeq().map( + function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)} + ).fromEntrySeq() + ); + }, + + mapKeys: function(mapper, context) {var this$0 = this; + return reify(this, + this.toSeq().flip().map( + function(k, v) {return mapper.call(context, k, v, this$0)} + ).flip() + ); + } + + }); + + var KeyedIterablePrototype = KeyedIterable.prototype; + KeyedIterablePrototype[IS_KEYED_SENTINEL] = true; + KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries; + KeyedIterablePrototype.__toJS = IterablePrototype.toObject; + KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)}; + + + + mixin(IndexedIterable, { + + // ### Conversion to other types + + toKeyedSeq: function() { + return new ToKeyedSequence(this, false); + }, + + + // ### ES6 Collection methods (ES6 Array and Map) + + filter: function(predicate, context) { + return reify(this, filterFactory(this, predicate, context, false)); + }, + + findIndex: function(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry ? entry[0] : -1; + }, + + indexOf: function(searchValue) { + var key = this.toKeyedSeq().keyOf(searchValue); + return key === undefined ? -1 : key; + }, + + lastIndexOf: function(searchValue) { + var key = this.toKeyedSeq().reverse().keyOf(searchValue); + return key === undefined ? -1 : key; + + // var index = + // return this.toSeq().reverse().indexOf(searchValue); + }, + + reverse: function() { + return reify(this, reverseFactory(this, false)); + }, + + slice: function(begin, end) { + return reify(this, sliceFactory(this, begin, end, false)); + }, + + splice: function(index, removeNum /*, ...values*/) { + var numArgs = arguments.length; + removeNum = Math.max(removeNum | 0, 0); + if (numArgs === 0 || (numArgs === 2 && !removeNum)) { + return this; + } + // If index is negative, it should resolve relative to the size of the + // collection. However size may be expensive to compute if not cached, so + // only call count() if the number is in fact negative. + index = resolveBegin(index, index < 0 ? this.count() : this.size); + var spliced = this.slice(0, index); + return reify( + this, + numArgs === 1 ? + spliced : + spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)) + ); + }, + + + // ### More collection methods + + findLastIndex: function(predicate, context) { + var key = this.toKeyedSeq().findLastKey(predicate, context); + return key === undefined ? -1 : key; + }, + + first: function() { + return this.get(0); + }, + + flatten: function(depth) { + return reify(this, flattenFactory(this, depth, false)); + }, + + get: function(index, notSetValue) { + index = wrapIndex(this, index); + return (index < 0 || (this.size === Infinity || + (this.size !== undefined && index > this.size))) ? + notSetValue : + this.find(function(_, key) {return key === index}, undefined, notSetValue); + }, + + has: function(index) { + index = wrapIndex(this, index); + return index >= 0 && (this.size !== undefined ? + this.size === Infinity || index < this.size : + this.indexOf(index) !== -1 + ); + }, + + interpose: function(separator) { + return reify(this, interposeFactory(this, separator)); + }, + + interleave: function(/*...iterables*/) { + var iterables = [this].concat(arrCopy(arguments)); + var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables); + var interleaved = zipped.flatten(true); + if (zipped.size) { + interleaved.size = zipped.size * iterables.length; + } + return reify(this, interleaved); + }, + + last: function() { + return this.get(-1); + }, + + skipWhile: function(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, false)); + }, + + zip: function(/*, ...iterables */) { + var iterables = [this].concat(arrCopy(arguments)); + return reify(this, zipWithFactory(this, defaultZipper, iterables)); + }, + + zipWith: function(zipper/*, ...iterables */) { + var iterables = arrCopy(arguments); + iterables[0] = this; + return reify(this, zipWithFactory(this, zipper, iterables)); + } + + }); + + IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true; + IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true; + + + + mixin(SetIterable, { + + // ### ES6 Collection methods (ES6 Array and Map) + + get: function(value, notSetValue) { + return this.has(value) ? value : notSetValue; + }, + + includes: function(value) { + return this.has(value); + }, + + + // ### More sequential methods + + keySeq: function() { + return this.valueSeq(); + } + + }); + + SetIterable.prototype.has = IterablePrototype.includes; + + + // Mixin subclasses + + mixin(KeyedSeq, KeyedIterable.prototype); + mixin(IndexedSeq, IndexedIterable.prototype); + mixin(SetSeq, SetIterable.prototype); + + mixin(KeyedCollection, KeyedIterable.prototype); + mixin(IndexedCollection, IndexedIterable.prototype); + mixin(SetCollection, SetIterable.prototype); + + + // #pragma Helper functions + + function keyMapper(v, k) { + return k; + } + + function entryMapper(v, k) { + return [k, v]; + } + + function not(predicate) { + return function() { + return !predicate.apply(this, arguments); + } + } + + function neg(predicate) { + return function() { + return -predicate.apply(this, arguments); + } + } + + function quoteString(value) { + return typeof value === 'string' ? JSON.stringify(value) : value; + } + + function defaultZipper() { + return arrCopy(arguments); + } + + function defaultNegComparator(a, b) { + return a < b ? 1 : a > b ? -1 : 0; + } + + function hashIterable(iterable) { + if (iterable.size === Infinity) { + return 0; + } + var ordered = isOrdered(iterable); + var keyed = isKeyed(iterable); + var h = ordered ? 1 : 0; + var size = iterable.__iterate( + keyed ? + ordered ? + function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } : + function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } : + ordered ? + function(v ) { h = 31 * h + hash(v) | 0; } : + function(v ) { h = h + hash(v) | 0; } + ); + return murmurHashOfSize(size, h); + } + + function murmurHashOfSize(size, h) { + h = imul(h, 0xCC9E2D51); + h = imul(h << 15 | h >>> -15, 0x1B873593); + h = imul(h << 13 | h >>> -13, 5); + h = (h + 0xE6546B64 | 0) ^ size; + h = imul(h ^ h >>> 16, 0x85EBCA6B); + h = imul(h ^ h >>> 13, 0xC2B2AE35); + h = smi(h ^ h >>> 16); + return h; + } + + function hashMerge(a, b) { + return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int + } + + var Immutable = { + + Iterable: Iterable, + + Seq: Seq, + Collection: Collection, + Map: Map, + OrderedMap: OrderedMap, + List: List, + Stack: Stack, + Set: Set, + OrderedSet: OrderedSet, + + Record: Record, + Range: Range, + Repeat: Repeat, + + is: is, + fromJS: fromJS + + }; + + return Immutable; + + })); + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(4), __webpack_require__(3), __webpack_require__(5))) + +/***/ }, +/* 17 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var immutable = __webpack_require__(16); + var requestAnimationFrame = __webpack_require__(13); + + // How long the measurement should be presented for. + var DURATION = 250; + + var Record = immutable.Record, + Map = immutable.Map; + + + var MetaData = Record({ + expiration: 0, + hit: 0 + }); + + var TraceUpdatesAbstractNodePresenter = function () { + // eslint shouldn't error on type positions. TODO: update eslint + // eslint-disable-next-line no-undef + function TraceUpdatesAbstractNodePresenter() { + _classCallCheck(this, TraceUpdatesAbstractNodePresenter); + + this._pool = new Map(); + this._drawing = false; + this._enabled = false; + this._clearTimer = null; + + this._draw = this._draw.bind(this); + this._redraw = this._redraw.bind(this); + } + + _createClass(TraceUpdatesAbstractNodePresenter, [{ + key: 'present', + value: function present(measurement) { + if (!this._enabled) { + return; + } + var data; + if (this._pool.has(measurement)) { + data = this._pool.get(measurement); + } else { + // $FlowIssue + data = new MetaData(); + } + + data = data.merge({ + expiration: Date.now() + DURATION, + hit: data.hit + 1 + }); + + this._pool = this._pool.set(measurement, data); + + if (this._drawing) { + return; + } + + this._drawing = true; + requestAnimationFrame(this._draw); + } + }, { + key: 'setEnabled', + value: function setEnabled(enabled) { + // console.log('setEnabled', enabled); + if (this._enabled === enabled) { + return; + } + + this._enabled = enabled; + + if (enabled) { + return; + } + + if (this._clearTimer) { + clearTimeout(this._clearTimer); + this._clearTimer = null; + } + + this._pool = this._pool.clear(); + this._drawing = false; + this.clearImpl(); + } + }, { + key: 'drawImpl', + value: function drawImpl(measurements) { + // sub-class should implement this. + } + }, { + key: 'clearImpl', + value: function clearImpl() { + // sub-class should implement this. + } + }, { + key: '_redraw', + value: function _redraw() { + this._clearTimer = null; + if (!this._drawing && this._pool.size > 0) { + this._drawing = true; + this._draw(); + } + } + }, { + key: '_draw', + value: function _draw() { + if (!this._enabled) { + this._drawing = false; + return; + } + + var now = Date.now(); + var minExpiration = Number.MAX_VALUE; + + this._pool = this._pool.withMutations(function (_pool) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = _pool.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _step$value = _slicedToArray(_step.value, 2), + measurement = _step$value[0], + data = _step$value[1]; + + if (data.expiration < now) { + // already passed the expiration time. + _pool.delete(measurement); + } else { + minExpiration = Math.min(data.expiration, minExpiration); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + }); + + this.drawImpl(this._pool); + + if (this._pool.size > 0) { + if (this._clearTimer != null) { + clearTimeout(this._clearTimer); + } + this._clearTimer = setTimeout(this._redraw, minExpiration - now); + } + + this._drawing = false; + } + }]); + + return TraceUpdatesAbstractNodePresenter; + }(); + + module.exports = TraceUpdatesAbstractNodePresenter; + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(__webpack_provided_Object_dot_create) {/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + 'use strict'; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = __webpack_provided_Object_dot_create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var TraceUpdatesAbstractNodeMeasurer = __webpack_require__(12); + + var DUMMY = { + bottom: 0, + expiration: 0, + height: 0, + id: '', + left: 0, + right: 0, + scrollX: 0, + scrollY: 0, + top: 0, + width: 0 + }; + + var TraceUpdatesWebNodeMeasurer = function (_TraceUpdatesAbstract) { + _inherits(TraceUpdatesWebNodeMeasurer, _TraceUpdatesAbstract); + + function TraceUpdatesWebNodeMeasurer() { + _classCallCheck(this, TraceUpdatesWebNodeMeasurer); + + return _possibleConstructorReturn(this, (TraceUpdatesWebNodeMeasurer.__proto__ || Object.getPrototypeOf(TraceUpdatesWebNodeMeasurer)).apply(this, arguments)); + } + + _createClass(TraceUpdatesWebNodeMeasurer, [{ + key: 'measureImpl', + value: function measureImpl(node) { + if (!node || typeof node.getBoundingClientRect !== 'function') { + return DUMMY; + } + + var rect = node.getBoundingClientRect(); + var scrollX = Math.max(document.body ? document.body.scrollLeft : 0, document.documentElement ? document.documentElement.scrollLeft : 0, window.pageXOffset || 0, window.scrollX || 0); + + var scrollY = Math.max(document.body ? document.body.scrollTop : 0, document.documentElement ? document.documentElement.scrollTop : 0, window.pageYOffset || 0, window.scrollY || 0); + + return { + bottom: rect.bottom, + expiration: 0, + height: rect.height, + id: '', + left: rect.left, + right: rect.right, + scrollX: scrollX, + scrollY: scrollY, + top: rect.top, + width: rect.width + }; + } + }]); + + return TraceUpdatesWebNodeMeasurer; + }(TraceUpdatesAbstractNodeMeasurer); + + module.exports = TraceUpdatesWebNodeMeasurer; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) + +/***/ }, +/* 19 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(__webpack_provided_Object_dot_create) {/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + 'use strict'; + + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = __webpack_provided_Object_dot_create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var TraceUpdatesAbstractNodePresenter = __webpack_require__(17); + + var OUTLINE_COLOR = '#f0f0f0'; + + var COLORS = [ + // coolest + '#55cef6', '#55f67b', '#a5f655', '#f4f655', '#f6a555', '#f66855', + // hottest + '#ff0000']; + + var HOTTEST_COLOR = COLORS[COLORS.length - 1]; + + function drawBorder(ctx, measurement, borderWidth, borderColor) { + // outline + ctx.lineWidth = 1; + ctx.strokeStyle = OUTLINE_COLOR; + + ctx.strokeRect(measurement.left - 1, measurement.top - 1, measurement.width + 2, measurement.height + 2); + + // inset + ctx.lineWidth = 1; + ctx.strokeStyle = OUTLINE_COLOR; + ctx.strokeRect(measurement.left + borderWidth, measurement.top + borderWidth, measurement.width - borderWidth, measurement.height - borderWidth); + ctx.strokeStyle = borderColor; + + if (measurement.should_update) { + ctx.setLineDash([2]); + } else { + ctx.setLineDash([0]); + } + + // border + ctx.lineWidth = '' + borderWidth; + ctx.strokeRect(measurement.left + Math.floor(borderWidth / 2), measurement.top + Math.floor(borderWidth / 2), measurement.width - borderWidth, measurement.height - borderWidth); + + ctx.setLineDash([0]); + } + + var CANVAS_NODE_ID = 'TraceUpdatesWebNodePresenter'; + + var TraceUpdatesWebNodePresenter = function (_TraceUpdatesAbstract) { + _inherits(TraceUpdatesWebNodePresenter, _TraceUpdatesAbstract); + + function TraceUpdatesWebNodePresenter() { + _classCallCheck(this, TraceUpdatesWebNodePresenter); + + var _this = _possibleConstructorReturn(this, (TraceUpdatesWebNodePresenter.__proto__ || Object.getPrototypeOf(TraceUpdatesWebNodePresenter)).call(this)); + + _this._canvas = null; + return _this; + } + + _createClass(TraceUpdatesWebNodePresenter, [{ + key: 'drawImpl', + value: function drawImpl(pool) { + this._ensureCanvas(); + var canvas = this._canvas; + var ctx = canvas.getContext('2d'); + ctx.clearRect(0, 0, canvas.width, canvas.height); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = pool.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _step$value = _slicedToArray(_step.value, 2), + measurement = _step$value[0], + data = _step$value[1]; + + var color = COLORS[data.hit - 1] || HOTTEST_COLOR; + drawBorder(ctx, measurement, 1, color); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + }, { + key: 'clearImpl', + value: function clearImpl() { + var canvas = this._canvas; + if (canvas === null) { + return; + } + + if (!canvas.parentNode) { + return; + } + + var ctx = canvas.getContext('2d'); + ctx.clearRect(0, 0, canvas.width, canvas.height); + + canvas.parentNode.removeChild(canvas); + this._canvas = null; + } + }, { + key: '_ensureCanvas', + value: function _ensureCanvas() { + var canvas = this._canvas; + if (canvas === null) { + canvas = window.document.getElementById(CANVAS_NODE_ID) || window.document.createElement('canvas'); + + canvas.id = CANVAS_NODE_ID; + canvas.width = window.screen.availWidth; + canvas.height = window.screen.availHeight; + canvas.style.cssText = '\n xx-background-color: red;\n xx-opacity: 0.5;\n bottom: 0;\n left: 0;\n pointer-events: none;\n position: fixed;\n right: 0;\n top: 0;\n z-index: 1000000000;\n '; + } + + if (!canvas.parentNode) { + var root = window.document.documentElement; + root.insertBefore(canvas, root.firstChild); + } + this._canvas = canvas; + } + }]); + + return TraceUpdatesWebNodePresenter; + }(TraceUpdatesAbstractNodePresenter); + + module.exports = TraceUpdatesWebNodePresenter; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) + +/***/ }, +/* 20 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(Map, __webpack_provided_Object_dot_create) {/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var consts = __webpack_require__(21); + var hydrate = __webpack_require__(40); + var dehydrate = __webpack_require__(41); + var getIn = __webpack_require__(10); + var performanceNow = __webpack_require__(42); + + // Use the polyfill if the function is not native implementation + function getWindowFunction(name, polyfill) { + if (String(window[name]).indexOf('[native code]') === -1) { + return polyfill; + } + return window[name]; + } + + // Custom polyfill that runs the queue with a backoff. + // If you change it, make sure it behaves reasonably well in Firefox. + var lastRunTimeMS = 5; + var cancelIdleCallback = getWindowFunction('cancelIdleCallback', clearTimeout); + var requestIdleCallback = getWindowFunction('requestIdleCallback', function (cb, options) { + // Magic numbers determined by tweaking in Firefox. + // There is no special meaning to them. + var delayMS = 3000 * lastRunTimeMS; + if (delayMS > 500) { + delayMS = 500; + } + + return setTimeout(function () { + var startTime = performanceNow(); + cb({ + didTimeout: false, + timeRemaining: function timeRemaining() { + return Infinity; + } + }); + var endTime = performanceNow(); + lastRunTimeMS = (endTime - startTime) / 1000; + }, delayMS); + }); + + /** + * The bridge is responsible for serializing requests between the Agent and + * the Frontend Store. It needs to be connected to a Wall object that can send + * JSONable data to the bridge on the other side. + * + * complex data + * | + * v + * [Bridge] + * | + * jsonable data + * | + * v + * [wall] + * | + * v + * ~ some barrier ~ + * | + * v + * [wall] + * | + * v + * [Bridge] + * | + * v + * "hydrated" data + * + * When an item is passed in that can't be serialized (anything other than a + * plain array, object, or literal value), the object is "cleaned", and + * rehydrated on the other side with `Symbol` attributes indicating that the + * object needs to be inspected for more detail. + * + * Example: + * + * bridge.send('evname', {id: 'someid', foo: MyCoolObjectInstance}) + * -> + * shows up, hydrated as + * { + * id: 'someid', + * foo: { + * [consts.name]: 'MyCoolObjectInstance', + * [consts.type]: 'object', + * [consts.meta]: {}, + * [consts.inspected]: false, + * } + * } + * + * The `consts` variables are Symbols, and as such are non-ennumerable. + * The front-end therefore needs to check for `consts.inspected` on received + * objects, and can thereby display object proxies and inspect them. + * + * Complex objects that are passed are expected to have a top-level `id` + * attribute, which is used for later lookup + inspection. Once it has been + * determined that an object is no longer needed, call `.forget(id)` to clean + * up. + */ + var Bridge = function () { + function Bridge(wall) { + _classCallCheck(this, Bridge); + + this._cbs = new Map(); + this._inspectables = new Map(); + this._cid = 0; + this._listeners = {}; + this._buffer = []; + this._flushHandle = null; + this._callers = {}; + this._paused = false; + this._wall = wall; + + wall.listen(this._handleMessage.bind(this)); + } + + _createClass(Bridge, [{ + key: 'inspect', + value: function inspect(id, path, cb) { + var _cid = this._cid++; + this._cbs.set(_cid, function (data, cleaned, proto, protoclean) { + if (cleaned.length) { + hydrate(data, cleaned); + } + if (proto && protoclean.length) { + hydrate(proto, protoclean); + } + if (proto) { + data[consts.proto] = proto; + } + cb(data); + }); + + this._wall.send({ + type: 'inspect', + callback: _cid, + path: path, + id: id + }); + } + }, { + key: 'call', + value: function call(name, args, cb) { + var _cid = this._cid++; + this._cbs.set(_cid, cb); + + this._wall.send({ + type: 'call', + callback: _cid, + args: args, + name: name + }); + } + }, { + key: 'onCall', + value: function onCall(name, handler) { + if (this._callers[name]) { + throw new Error('only one call handler per call name allowed'); + } + this._callers[name] = handler; + } + }, { + key: 'pause', + value: function pause() { + this._wall.send({ + type: 'pause' + }); + } + }, { + key: 'resume', + value: function resume() { + this._wall.send({ + type: 'resume' + }); + } + }, { + key: 'setInspectable', + value: function setInspectable(id, data) { + var prev = this._inspectables.get(id); + if (!prev) { + this._inspectables.set(id, data); + return; + } + this._inspectables.set(id, _extends({}, prev, data)); + } + }, { + key: 'send', + value: function send(evt, data) { + this._buffer.push({ evt: evt, data: data }); + this.scheduleFlush(); + } + }, { + key: 'scheduleFlush', + value: function scheduleFlush() { + if (!this._flushHandle && this._buffer.length) { + var timeout = this._paused ? 5000 : 500; + this._flushHandle = requestIdleCallback(this.flushBufferWhileIdle.bind(this), { timeout: timeout }); + } + } + }, { + key: 'cancelFlush', + value: function cancelFlush() { + if (this._flushHandle) { + cancelIdleCallback(this._flushHandle); + this._flushHandle = null; + } + } + }, { + key: 'flushBufferWhileIdle', + value: function flushBufferWhileIdle(deadline) { + this._flushHandle = null; + + // Magic numbers were determined by tweaking in a heavy UI and seeing + // what performs reasonably well both when DevTools are hidden and visible. + // The goal is that we try to catch up but avoid blocking the UI. + // When paused, it's okay to lag more, but not forever because otherwise + // when user activates React tab, it will freeze syncing. + var chunkCount = this._paused ? 20 : 10; + var chunkSize = Math.round(this._buffer.length / chunkCount); + var minChunkSize = this._paused ? 50 : 100; + + while (this._buffer.length && (deadline.timeRemaining() > 0 || deadline.didTimeout)) { + var take = Math.min(this._buffer.length, Math.max(minChunkSize, chunkSize)); + var currentBuffer = this._buffer.splice(0, take); + this.flushBufferSlice(currentBuffer); + } + + if (this._buffer.length) { + this.scheduleFlush(); + } + } + }, { + key: 'flushBufferSlice', + value: function flushBufferSlice(bufferSlice) { + var _this = this; + + var events = bufferSlice.map(function (_ref) { + var evt = _ref.evt, + data = _ref.data; + + var cleaned = []; + var san = dehydrate(data, cleaned); + if (cleaned.length) { + _this.setInspectable(data.id, data); + } + return { type: 'event', evt: evt, data: san, cleaned: cleaned }; + }); + this._wall.send({ type: 'many-events', events: events }); + } + }, { + key: 'forget', + value: function forget(id) { + this._inspectables.delete(id); + } + }, { + key: 'on', + value: function on(evt, fn) { + if (!this._listeners[evt]) { + this._listeners[evt] = [fn]; + } else { + this._listeners[evt].push(fn); + } + } + }, { + key: 'off', + value: function off(evt, fn) { + if (!this._listeners[evt]) { + return; + } + var ix = this._listeners[evt].indexOf(fn); + if (ix !== -1) { + this._listeners[evt].splice(ix, 1); + } + } + }, { + key: 'once', + value: function once(evt, fn) { + var self = this; + var listener = function listener() { + fn.apply(this, arguments); + self.off(evt, listener); + }; + this.on(evt, listener); + } + }, { + key: '_handleMessage', + value: function _handleMessage(payload) { + var _this2 = this; + + if (payload.type === 'resume') { + this._paused = false; + this.scheduleFlush(); + return; + } + + if (payload.type === 'pause') { + this._paused = true; + this.cancelFlush(); + return; + } + + if (payload.type === 'callback') { + var callback = this._cbs.get(payload.id); + if (callback) { + callback.apply(undefined, _toConsumableArray(payload.args)); + this._cbs.delete(payload.id); + } + return; + } + + if (payload.type === 'call') { + this._handleCall(payload.name, payload.args, payload.callback); + return; + } + + if (payload.type === 'inspect') { + this._inspectResponse(payload.id, payload.path, payload.callback); + return; + } + + if (payload.type === 'event') { + // console.log('[bridge<-]', payload.evt); + if (payload.cleaned) { + hydrate(payload.data, payload.cleaned); + } + var fns = this._listeners[payload.evt]; + var data = payload.data; + if (fns) { + fns.forEach(function (fn) { + return fn(data); + }); + } + } + + if (payload.type === 'many-events') { + payload.events.forEach(function (event) { + // console.log('[bridge<-]', payload.evt); + if (event.cleaned) { + hydrate(event.data, event.cleaned); + } + var handlers = _this2._listeners[event.evt]; + if (handlers) { + handlers.forEach(function (fn) { + return fn(event.data); + }); + } + }); + } + } + }, { + key: '_handleCall', + value: function _handleCall(name, args, callback) { + if (!this._callers[name]) { + console.warn('unknown call: "' + name + '"'); + return; + } + args = !Array.isArray(args) ? [args] : args; + var result; + try { + result = this._callers[name].apply(null, args); + } catch (e) { + console.error('Failed to call', e); + return; + } + this._wall.send({ + type: 'callback', + id: callback, + args: [result] + }); + } + }, { + key: '_inspectResponse', + value: function _inspectResponse(id, path, callback) { + var inspectable = this._inspectables.get(id); + var result = {}; + var cleaned = []; + var proto = null; + var protoclean = []; + + if (inspectable) { + var val = getIn(inspectable, path); + var protod = false; + var isFn = typeof val === 'function'; + + if (val && typeof val[Symbol.iterator] === 'function') { + var iterVal = __webpack_provided_Object_dot_create({}); // flow throws "object literal incompatible with object type" + var count = 0; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = val[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var entry = _step.value; + + if (count > 100) { + // TODO: replace this if block with better logic to handle large iterables + break; + } + iterVal[count] = entry; + count++; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + val = iterVal; + } + + Object.getOwnPropertyNames(val).forEach(function (name) { + if (name === '__proto__') { + protod = true; + } + if (isFn && (name === 'arguments' || name === 'callee' || name === 'caller')) { + return; + } + // $FlowIgnore This is intentional + result[name] = dehydrate(val[name], cleaned, [name]); + }); + + /* eslint-disable no-proto */ + if (!protod && val.__proto__ && val.constructor.name !== 'Object') { + var newProto = {}; + var pIsFn = typeof val.__proto__ === 'function'; + Object.getOwnPropertyNames(val.__proto__).forEach(function (name) { + if (pIsFn && (name === 'arguments' || name === 'callee' || name === 'caller')) { + return; + } + newProto[name] = dehydrate(val.__proto__[name], protoclean, [name]); + }); + proto = newProto; + } + /* eslint-enable no-proto */ + } + + this._wall.send({ + type: 'callback', + id: callback, + args: [result, cleaned, proto, protoclean] + }); + } + }]); + + return Bridge; + }(); + + module.exports = Bridge; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(2))) + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var _Symbol = __webpack_require__(22); + + module.exports = { + name: _Symbol('name'), + type: _Symbol('type'), + inspected: _Symbol('inspected'), + meta: _Symbol('meta'), + proto: _Symbol('proto') + }; + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + module.exports = __webpack_require__(23)() ? Symbol : __webpack_require__(24); + + +/***/ }, +/* 23 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = function () { + var symbol; + if (typeof Symbol !== 'function') return false; + symbol = Symbol('test symbol'); + try { String(symbol); } catch (e) { return false; } + if (typeof Symbol.iterator === 'symbol') return true; + + // Return 'true' for polyfills + if (typeof Symbol.isConcatSpreadable !== 'object') return false; + if (typeof Symbol.iterator !== 'object') return false; + if (typeof Symbol.toPrimitive !== 'object') return false; + if (typeof Symbol.toStringTag !== 'object') return false; + if (typeof Symbol.unscopables !== 'object') return false; + + return true; + }; + + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(__webpack_provided_Object_dot_create) {// ES2015 Symbol polyfill for environments that do not support it (or partially support it_ + + 'use strict'; + + var d = __webpack_require__(25) + , validateSymbol = __webpack_require__(38) + + , create = __webpack_provided_Object_dot_create, defineProperties = Object.defineProperties + , defineProperty = Object.defineProperty, objPrototype = Object.prototype + , NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create(null); + + if (typeof Symbol === 'function') NativeSymbol = Symbol; + + var generateName = (function () { + var created = create(null); + return function (desc) { + var postfix = 0, name, ie11BugWorkaround; + while (created[desc + (postfix || '')]) ++postfix; + desc += (postfix || ''); + created[desc] = true; + name = '@@' + desc; + defineProperty(objPrototype, name, d.gs(null, function (value) { + // For IE11 issue see: + // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/ + // ie11-broken-getters-on-dom-objects + // https://github.com/medikoo/es6-symbol/issues/12 + if (ie11BugWorkaround) return; + ie11BugWorkaround = true; + defineProperty(this, name, d(value)); + ie11BugWorkaround = false; + })); + return name; + }; + }()); + + // Internal constructor (not one exposed) for creating Symbol instances. + // This one is used to ensure that `someSymbol instanceof Symbol` always return false + HiddenSymbol = function Symbol(description) { + if (this instanceof HiddenSymbol) throw new TypeError('TypeError: Symbol is not a constructor'); + return SymbolPolyfill(description); + }; + + // Exposed `Symbol` constructor + // (returns instances of HiddenSymbol) + module.exports = SymbolPolyfill = function Symbol(description) { + var symbol; + if (this instanceof Symbol) throw new TypeError('TypeError: Symbol is not a constructor'); + symbol = create(HiddenSymbol.prototype); + description = (description === undefined ? '' : String(description)); + return defineProperties(symbol, { + __description__: d('', description), + __name__: d('', generateName(description)) + }); + }; + defineProperties(SymbolPolyfill, { + for: d(function (key) { + if (globalSymbols[key]) return globalSymbols[key]; + return (globalSymbols[key] = SymbolPolyfill(String(key))); + }), + keyFor: d(function (s) { + var key; + validateSymbol(s); + for (key in globalSymbols) if (globalSymbols[key] === s) return key; + }), + + // If there's native implementation of given symbol, let's fallback to it + // to ensure proper interoperability with other native functions e.g. Array.from + hasInstance: d('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')), + isConcatSpreadable: d('', (NativeSymbol && NativeSymbol.isConcatSpreadable) || + SymbolPolyfill('isConcatSpreadable')), + iterator: d('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')), + match: d('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')), + replace: d('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')), + search: d('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')), + species: d('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')), + split: d('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')), + toPrimitive: d('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')), + toStringTag: d('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')), + unscopables: d('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables')) + }); + + // Internal tweaks for real symbol producer + defineProperties(HiddenSymbol.prototype, { + constructor: d(SymbolPolyfill), + toString: d('', function () { return this.__name__; }) + }); + + // Proper implementation of methods exposed on Symbol.prototype + // They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype + defineProperties(SymbolPolyfill.prototype, { + toString: d(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }), + valueOf: d(function () { return validateSymbol(this); }) + }); + defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('', + function () { return validateSymbol(this); })); + defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol')); + + // Proper implementaton of toPrimitive and toStringTag for returned symbol instances + defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, + d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])); + + // Note: It's important to define `toPrimitive` as last one, as some implementations + // implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols) + // And that may invoke error in definition flow: + // See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149 + defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, + d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])); + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var assign = __webpack_require__(26) + , normalizeOpts = __webpack_require__(33) + , isCallable = __webpack_require__(34) + , contains = __webpack_require__(35) + + , d; + + d = module.exports = function (dscr, value/*, options*/) { + var c, e, w, options, desc; + if ((arguments.length < 2) || (typeof dscr !== 'string')) { + options = value; + value = dscr; + dscr = null; + } else { + options = arguments[2]; + } + if (dscr == null) { + c = w = true; + e = false; + } else { + c = contains.call(dscr, 'c'); + e = contains.call(dscr, 'e'); + w = contains.call(dscr, 'w'); + } + + desc = { value: value, configurable: c, enumerable: e, writable: w }; + return !options ? desc : assign(normalizeOpts(options), desc); + }; + + d.gs = function (dscr, get, set/*, options*/) { + var c, e, options, desc; + if (typeof dscr !== 'string') { + options = set; + set = get; + get = dscr; + dscr = null; + } else { + options = arguments[3]; + } + if (get == null) { + get = undefined; + } else if (!isCallable(get)) { + options = get; + get = set = undefined; + } else if (set == null) { + set = undefined; + } else if (!isCallable(set)) { + options = set; + set = undefined; + } + if (dscr == null) { + c = true; + e = false; + } else { + c = contains.call(dscr, 'c'); + e = contains.call(dscr, 'e'); + } + + desc = { get: get, set: set, configurable: c, enumerable: e }; + return !options ? desc : assign(normalizeOpts(options), desc); + }; + + +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + module.exports = __webpack_require__(27)() + ? Object.assign + : __webpack_require__(28); + + +/***/ }, +/* 27 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = function () { + var assign = Object.assign, obj; + if (typeof assign !== 'function') return false; + obj = { foo: 'raz' }; + assign(obj, { bar: 'dwa' }, { trzy: 'trzy' }); + return (obj.foo + obj.bar + obj.trzy) === 'razdwatrzy'; + }; + + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var keys = __webpack_require__(29) + , value = __webpack_require__(32) + + , max = Math.max; + + module.exports = function (dest, src/*, …srcn*/) { + var error, i, l = max(arguments.length, 2), assign; + dest = Object(value(dest)); + assign = function (key) { + try { dest[key] = src[key]; } catch (e) { + if (!error) error = e; + } + }; + for (i = 1; i < l; ++i) { + src = arguments[i]; + keys(src).forEach(assign); + } + if (error !== undefined) throw error; + return dest; + }; + + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + module.exports = __webpack_require__(30)() + ? Object.keys + : __webpack_require__(31); + + +/***/ }, +/* 30 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = function () { + try { + Object.keys('primitive'); + return true; + } catch (e) { return false; } + }; + + +/***/ }, +/* 31 */ +/***/ function(module, exports) { + + 'use strict'; + + var keys = Object.keys; + + module.exports = function (object) { + return keys(object == null ? object : Object(object)); + }; + + +/***/ }, +/* 32 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = function (value) { + if (value == null) throw new TypeError("Cannot use null or undefined"); + return value; + }; + + +/***/ }, +/* 33 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(__webpack_provided_Object_dot_create) {'use strict'; + + var forEach = Array.prototype.forEach, create = __webpack_provided_Object_dot_create; + + var process = function (src, obj) { + var key; + for (key in src) obj[key] = src[key]; + }; + + module.exports = function (options/*, …options*/) { + var result = create(null); + forEach.call(arguments, function (options) { + if (options == null) return; + process(Object(options), result); + }); + return result; + }; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) + +/***/ }, +/* 34 */ +/***/ function(module, exports) { + + // Deprecated + + 'use strict'; + + module.exports = function (obj) { return typeof obj === 'function'; }; + + +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + module.exports = __webpack_require__(36)() + ? String.prototype.contains + : __webpack_require__(37); + + +/***/ }, +/* 36 */ +/***/ function(module, exports) { + + 'use strict'; + + var str = 'razdwatrzy'; + + module.exports = function () { + if (typeof str.contains !== 'function') return false; + return ((str.contains('dwa') === true) && (str.contains('foo') === false)); + }; + + +/***/ }, +/* 37 */ +/***/ function(module, exports) { + + 'use strict'; + + var indexOf = String.prototype.indexOf; + + module.exports = function (searchString/*, position*/) { + return indexOf.call(this, searchString, arguments[1]) > -1; + }; + + +/***/ }, +/* 38 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var isSymbol = __webpack_require__(39); + + module.exports = function (value) { + if (!isSymbol(value)) throw new TypeError(value + " is not a symbol"); + return value; + }; + + +/***/ }, +/* 39 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = function (x) { + return (x && ((typeof x === 'symbol') || (x['@@toStringTag'] === 'Symbol'))) || false; + }; + + +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var consts = __webpack_require__(21); + + function hydrate(data, cleaned) { + cleaned.forEach(function (path) { + var last = path.pop(); + var obj = path.reduce(function (obj_, attr) { + return obj_ ? obj_[attr] : null; + }, data); + if (!obj || !obj[last]) { + return; + } + var replace = {}; + replace[consts.name] = obj[last].name; + replace[consts.type] = obj[last].type; + replace[consts.meta] = obj[last].meta; + replace[consts.inspected] = false; + obj[last] = replace; + }); + } + + module.exports = hydrate; + +/***/ }, +/* 41 */ +/***/ function(module, exports) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + /** + * Get a enhanced/artificial type string based on the object instance + */ + + 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; }; + + function getPropType(data) { + if (!data) { + return null; + } + var type = typeof data === 'undefined' ? 'undefined' : _typeof(data); + + if (type === 'object') { + if (data._reactFragment) { + return 'react_fragment'; + } + if (Array.isArray(data)) { + return 'array'; + } + if (ArrayBuffer.isView(data)) { + if (data instanceof DataView) { + return 'data_view'; + } + return 'typed_array'; + } + if (data instanceof ArrayBuffer) { + return 'array_buffer'; + } + if (typeof data[Symbol.iterator] === 'function') { + return 'iterator'; + } + if (Object.prototype.toString.call(data) === '[object Date]') { + return 'date'; + } + } + + return type; + } + + /** + * Generate the dehydrated metadata for complex object instances + */ + function createDehydrated(type, data, cleaned, path) { + var meta = {}; + + if (type === 'array' || type === 'typed_array') { + meta.length = data.length; + } + if (type === 'iterator' || type === 'typed_array') { + meta.readOnly = true; + } + + cleaned.push(path); + + return { + type: type, + meta: meta, + name: !data.constructor || data.constructor.name === 'Object' ? '' : data.constructor.name + }; + } + + /** + * Strip out complex data (instances, functions, and data nested > 2 levels + * deep). The paths of the stripped out objects are appended to the `cleaned` + * list. On the other side of the barrier, the cleaned list is used to + * "re-hydrate" the cleaned representation into an object with symbols as + * attributes, so that a sanitized object can be distinguished from a normal + * object. + * + * Input: {"some": {"attr": fn()}, "other": AnInstance} + * Output: { + * "some": { + * "attr": {"name": the fn.name, type: "function"} + * }, + * "other": { + * "name": "AnInstance", + * "type": "object", + * }, + * } + * and cleaned = [["some", "attr"], ["other"]] + */ + function dehydrate(data, cleaned) { + var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + var level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + + var type = getPropType(data); + + switch (type) { + + case 'function': + cleaned.push(path); + return { + name: data.name, + type: 'function' + }; + + case 'string': + return data.length <= 500 ? data : data.slice(0, 500) + '...'; + + // We have to do this assignment b/c Flow doesn't think "symbol" is + // something typeof would return. Error 'unexpected predicate "symbol"' + case 'symbol': + cleaned.push(path); + return { + type: 'symbol', + name: data.toString() + }; + + // React Fragments error if you try to inspect them. + case 'react_fragment': + return 'A React Fragment'; + + // ArrayBuffers error if you try to inspect them. + case 'array_buffer': + case 'data_view': + cleaned.push(path); + return { + type: type, + name: type === 'data_view' ? 'DataView' : 'ArrayBuffer', + meta: { + length: data.byteLength, + uninspectable: true + } + }; + + case 'array': + if (level > 2) { + return createDehydrated(type, data, cleaned, path); + } + return data.map(function (item, i) { + return dehydrate(item, cleaned, path.concat([i]), level + 1); + }); + + case 'typed_array': + case 'iterator': + return createDehydrated(type, data, cleaned, path); + case 'date': + cleaned.push(path); + return { + name: data.toString(), + type: 'date', + meta: { + uninspectable: true + } + }; + case 'object': + if (level > 2 || data.constructor && typeof data.constructor === 'function' && data.constructor.name !== 'Object') { + return createDehydrated(type, data, cleaned, path); + } else { + + var res = {}; + for (var name in data) { + res[name] = dehydrate(data[name], cleaned, path.concat([name]), level + 1); + } + return res; + } + + default: + return data; + } + } + + module.exports = dehydrate; + +/***/ }, +/* 42 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule performanceNow + * @typechecks + */ + + 'use strict'; + + var performance = __webpack_require__(43); + + var performanceNow; + + /** + * Detect if we can use `window.performance.now()` and gracefully fallback to + * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now + * because of Facebook's testing infrastructure. + */ + if (performance.now) { + performanceNow = function () { + return performance.now(); + }; + } else { + performanceNow = function () { + return Date.now(); + }; + } + + module.exports = performanceNow; + +/***/ }, +/* 43 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule performance + * @typechecks + */ + + 'use strict'; + + var ExecutionEnvironment = __webpack_require__(44); + + var performance; + + if (ExecutionEnvironment.canUseDOM) { + performance = window.performance || window.msPerformance || window.webkitPerformance; + } + + module.exports = performance || {}; + +/***/ }, +/* 44 */ +/***/ function(module, exports) { + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ExecutionEnvironment + */ + + 'use strict'; + + var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + + /** + * Simple, lightweight module assisting with the detection and context of + * Worker. Helps avoid circular dependencies and allows code to reason about + * whether or not they are in a Worker, even if they never include the main + * `ReactWorker` dependency. + */ + var ExecutionEnvironment = { + + canUseDOM: canUseDOM, + + canUseWorkers: typeof Worker !== 'undefined', + + canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), + + canUseViewport: canUseDOM && !!window.screen, + + isInWorker: !canUseDOM // For now, this is true - might change in the future. + + }; + + module.exports = ExecutionEnvironment; + +/***/ }, +/* 45 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var setupBackend = __webpack_require__(46); + + module.exports = function (hook, agent) { + var subs = [hook.sub('renderer-attached', function (_ref) { + var id = _ref.id, + renderer = _ref.renderer, + helpers = _ref.helpers; + + agent.setReactInternals(id, helpers); + helpers.walkTree(agent.onMounted.bind(agent, id), agent.addRoot.bind(agent, id)); + }), hook.sub('root', function (_ref2) { + var renderer = _ref2.renderer, + internalInstance = _ref2.internalInstance; + return agent.addRoot(renderer, internalInstance); + }), hook.sub('mount', function (_ref3) { + var renderer = _ref3.renderer, + internalInstance = _ref3.internalInstance, + data = _ref3.data; + return agent.onMounted(renderer, internalInstance, data); + }), hook.sub('update', function (_ref4) { + var renderer = _ref4.renderer, + internalInstance = _ref4.internalInstance, + data = _ref4.data; + return agent.onUpdated(internalInstance, data); + }), hook.sub('unmount', function (_ref5) { + var renderer = _ref5.renderer, + internalInstance = _ref5.internalInstance; + return agent.onUnmounted(internalInstance); + })]; + + var success = setupBackend(hook); + if (!success) { + return; + } + + hook.emit('react-devtools', agent); + hook.reactDevtoolsAgent = agent; + agent.on('shutdown', function () { + subs.forEach(function (fn) { + return fn(); + }); + hook.reactDevtoolsAgent = null; + }); + }; + +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + * + * This is the chrome devtools + * + * 1. Devtools sets the __REACT_DEVTOOLS_GLOBAL_HOOK__ global. + * 2. React (if present) calls .inject() with the internal renderer + * 3. Devtools sees the renderer, and then adds this backend, along with the Agent + * and whatever else is needed. + * 4. The agent then calls `.emit('react-devtools', agent)` + * + * Now things are hooked up. + * + * When devtools closes, it calls `cleanup()` to remove the listeners + * and any overhead caused by the backend. + */ + 'use strict'; + + var attachRenderer = __webpack_require__(47); + + module.exports = function setupBackend(hook) { + var oldReact = window.React && window.React.__internals; + if (oldReact && Object.keys(hook._renderers).length === 0) { + hook.inject(oldReact); + } + + for (var rid in hook._renderers) { + hook.helpers[rid] = attachRenderer(hook, rid, hook._renderers[rid]); + hook.emit('renderer-attached', { id: rid, renderer: hook._renderers[rid], helpers: hook.helpers[rid] }); + } + + hook.on('renderer', function (_ref) { + var id = _ref.id, + renderer = _ref.renderer; + + hook.helpers[id] = attachRenderer(hook, id, renderer); + hook.emit('renderer-attached', { id: id, renderer: renderer, helpers: hook.helpers[id] }); + }); + + var shutdown = function shutdown() { + for (var id in hook.helpers) { + hook.helpers[id].cleanup(); + } + hook.off('shutdown', shutdown); + }; + hook.on('shutdown', shutdown); + + return true; + }; + +/***/ }, +/* 47 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(Map) {/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var getData = __webpack_require__(48); + var getData012 = __webpack_require__(54); + var attachRendererFiber = __webpack_require__(55); + + /** + * This takes care of patching the renderer to emit events on the global + * `Hook`. The returned object has a `.cleanup` method to un-patch everything. + */ + function attachRenderer(hook, rid, renderer) { + var rootNodeIDMap = new Map(); + var extras = {}; + // Before 0.13 there was no Reconciler, so we patch Component.Mixin + var isPre013 = !renderer.Reconciler; + + // React Fiber + if (typeof renderer.findFiberByHostInstance === 'function') { + return attachRendererFiber(hook, rid, renderer); + } + + // React Native + if (renderer.Mount.findNodeHandle && renderer.Mount.nativeTagToRootNodeID) { + extras.getNativeFromReactElement = function (component) { + return renderer.Mount.findNodeHandle(component); + }; + + extras.getReactElementFromNative = function (nativeTag) { + var id = renderer.Mount.nativeTagToRootNodeID(nativeTag); + return rootNodeIDMap.get(id); + }; + // React DOM 15+ + } else if (renderer.ComponentTree) { + extras.getNativeFromReactElement = function (component) { + return renderer.ComponentTree.getNodeFromInstance(component); + }; + + extras.getReactElementFromNative = function (node) { + return renderer.ComponentTree.getClosestInstanceFromNode(node); + }; + // React DOM + } else if (renderer.Mount.getID && renderer.Mount.getNode) { + extras.getNativeFromReactElement = function (component) { + try { + return renderer.Mount.getNode(component._rootNodeID); + } catch (e) { + return undefined; + } + }; + + extras.getReactElementFromNative = function (node) { + // $FlowFixMe + var id = renderer.Mount.getID(node); + while (node && node.parentNode && !id) { + node = node.parentNode; + // $FlowFixMe + id = renderer.Mount.getID(node); + } + return rootNodeIDMap.get(id); + }; + } else { + console.warn('Unknown react version (does not have getID), probably an unshimmed React Native'); + } + + var oldMethods; + var oldRenderComponent; + var oldRenderRoot; + + // React DOM + if (renderer.Mount._renderNewRootComponent) { + oldRenderRoot = decorateResult(renderer.Mount, '_renderNewRootComponent', function (internalInstance) { + hook.emit('root', { renderer: rid, internalInstance: internalInstance }); + }); + // React Native + } else if (renderer.Mount.renderComponent) { + oldRenderComponent = decorateResult(renderer.Mount, 'renderComponent', function (internalInstance) { + hook.emit('root', { renderer: rid, internalInstance: internalInstance._reactInternalInstance }); + }); + } + + if (renderer.Component) { + console.error('You are using a version of React with limited support in this version of the devtools.\nPlease upgrade to use at least 0.13, or you can downgrade to use the old version of the devtools:\ninstructions here https://github.com/facebook/react-devtools/tree/devtools-next#how-do-i-use-this-for-react--013'); + // 0.11 - 0.12 + // $FlowFixMe renderer.Component is not "possibly undefined" + oldMethods = decorateMany(renderer.Component.Mixin, { + mountComponent: function mountComponent() { + var _this = this; + + rootNodeIDMap.set(this._rootNodeID, this); + // FIXME DOMComponent calls Component.Mixin, and sets up the + // `children` *after* that call, meaning we don't have access to the + // children at this point. Maybe we should find something else to shim + // (do we have access to DOMComponent here?) so that we don't have to + // setTimeout. + setTimeout(function () { + hook.emit('mount', { internalInstance: _this, data: getData012(_this), renderer: rid }); + }, 0); + }, + updateComponent: function updateComponent() { + var _this2 = this; + + setTimeout(function () { + hook.emit('update', { internalInstance: _this2, data: getData012(_this2), renderer: rid }); + }, 0); + }, + unmountComponent: function unmountComponent() { + hook.emit('unmount', { internalInstance: this, renderer: rid }); + rootNodeIDMap.delete(this._rootNodeID); + } + }); + } else if (renderer.Reconciler) { + oldMethods = decorateMany(renderer.Reconciler, { + mountComponent: function mountComponent(internalInstance, rootID, transaction, context) { + var data = getData(internalInstance); + rootNodeIDMap.set(internalInstance._rootNodeID, internalInstance); + hook.emit('mount', { internalInstance: internalInstance, data: data, renderer: rid }); + }, + performUpdateIfNecessary: function performUpdateIfNecessary(internalInstance, nextChild, transaction, context) { + hook.emit('update', { internalInstance: internalInstance, data: getData(internalInstance), renderer: rid }); + }, + receiveComponent: function receiveComponent(internalInstance, nextChild, transaction, context) { + hook.emit('update', { internalInstance: internalInstance, data: getData(internalInstance), renderer: rid }); + }, + unmountComponent: function unmountComponent(internalInstance) { + hook.emit('unmount', { internalInstance: internalInstance, renderer: rid }); + rootNodeIDMap.delete(internalInstance._rootNodeID); + } + }); + } + + extras.walkTree = function (visit, visitRoot) { + var onMount = function onMount(component, data) { + rootNodeIDMap.set(component._rootNodeID, component); + visit(component, data); + }; + walkRoots(renderer.Mount._instancesByReactRootID || renderer.Mount._instancesByContainerID, onMount, visitRoot, isPre013); + }; + + extras.cleanup = function () { + if (oldMethods) { + if (renderer.Component) { + restoreMany(renderer.Component.Mixin, oldMethods); + } else { + restoreMany(renderer.Reconciler, oldMethods); + } + } + if (oldRenderRoot) { + renderer.Mount._renderNewRootComponent = oldRenderRoot; + } + if (oldRenderComponent) { + renderer.Mount.renderComponent = oldRenderComponent; + } + oldMethods = null; + oldRenderRoot = null; + oldRenderComponent = null; + }; + + return extras; + } + + function walkRoots(roots, onMount, onRoot, isPre013) { + for (var name in roots) { + walkNode(roots[name], onMount, isPre013); + onRoot(roots[name]); + } + } + + function walkNode(internalInstance, onMount, isPre013) { + var data = isPre013 ? getData012(internalInstance) : getData(internalInstance); + if (data.children && Array.isArray(data.children)) { + data.children.forEach(function (child) { + return walkNode(child, onMount, isPre013); + }); + } + onMount(internalInstance, data); + } + + function decorateResult(obj, attr, fn) { + var old = obj[attr]; + obj[attr] = function (instance) { + var res = old.apply(this, arguments); + fn(res); + return res; + }; + return old; + } + + function decorate(obj, attr, fn) { + var old = obj[attr]; + obj[attr] = function (instance) { + var res = old.apply(this, arguments); + fn.apply(this, arguments); + return res; + }; + return old; + } + + function decorateMany(source, fns) { + var olds = {}; + for (var name in fns) { + olds[name] = decorate(source, name, fns[name]); + } + return olds; + } + + function restoreMany(source, olds) { + for (var name in olds) { + source[name] = olds[name]; + } + } + + module.exports = attachRenderer; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) + +/***/ }, +/* 48 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + 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; }; + + var copyWithSet = __webpack_require__(49); + var getDisplayName = __webpack_require__(50); + var traverseAllChildrenImpl = __webpack_require__(51); + + /** + * Convert a react internal instance to a sanitized data object. + */ + function getData(internalInstance) { + var children = null; + var props = null; + var state = null; + var context = null; + var updater = null; + var name = null; + var type = null; + var key = null; + var ref = null; + var source = null; + var text = null; + var publicInstance = null; + var nodeType = 'Native'; + // If the parent is a native node without rendered children, but with + // multiple string children, then the `element` that gets passed in here is + // a plain value -- a string or number. + if ((typeof internalInstance === 'undefined' ? 'undefined' : _typeof(internalInstance)) !== 'object') { + nodeType = 'Text'; + text = internalInstance + ''; + } else if (internalInstance._currentElement === null || internalInstance._currentElement === false) { + nodeType = 'Empty'; + } else if (internalInstance._renderedComponent) { + nodeType = 'NativeWrapper'; + children = [internalInstance._renderedComponent]; + props = internalInstance._instance.props; + state = internalInstance._instance.state; + context = internalInstance._instance.context; + if (context && Object.keys(context).length === 0) { + context = null; + } + } else if (internalInstance._renderedChildren) { + children = childrenList(internalInstance._renderedChildren); + } else if (internalInstance._currentElement && internalInstance._currentElement.props) { + // This is a native node without rendered children -- meaning the children + // prop is the unfiltered list of children. + // This may include 'null' or even other invalid values, so we need to + // filter it the same way that ReactDOM does. + // Instead of pulling in the whole React library, we just copied over the + // 'traverseAllChildrenImpl' method. + // https://github.com/facebook/react/blob/240b84ed8e1db715d759afaae85033718a0b24e1/src/isomorphic/children/ReactChildren.js#L112-L158 + var unfilteredChildren = internalInstance._currentElement.props.children; + var filteredChildren = []; + traverseAllChildrenImpl(unfilteredChildren, '', // nameSoFar + function (_traverseContext, child) { + var childType = typeof child === 'undefined' ? 'undefined' : _typeof(child); + if (childType === 'string' || childType === 'number') { + filteredChildren.push(child); + } + }); + if (filteredChildren.length <= 1) { + // children must be an array of nodes or a string or undefined + // can't be an empty array + children = filteredChildren.length ? String(filteredChildren[0]) : undefined; + } else { + children = filteredChildren; + } + } + + if (!props && internalInstance._currentElement && internalInstance._currentElement.props) { + props = internalInstance._currentElement.props; + } + + // != used deliberately here to catch undefined and null + if (internalInstance._currentElement != null) { + type = internalInstance._currentElement.type; + if (internalInstance._currentElement.key) { + key = String(internalInstance._currentElement.key); + } + source = internalInstance._currentElement._source; + ref = internalInstance._currentElement.ref; + if (typeof type === 'string') { + name = type; + if (internalInstance._nativeNode != null) { + publicInstance = internalInstance._nativeNode; + } + if (internalInstance._hostNode != null) { + publicInstance = internalInstance._hostNode; + } + } else if (typeof type === 'function') { + nodeType = 'Composite'; + name = getDisplayName(type); + // 0.14 top-level wrapper + // TODO(jared): The backend should just act as if these don't exist. + if (internalInstance._renderedComponent && (internalInstance._currentElement.props === internalInstance._renderedComponent._currentElement || internalInstance._currentElement.type.isReactTopLevelWrapper)) { + nodeType = 'Wrapper'; + } + if (name === null) { + name = 'No display name'; + } + } else if (typeof internalInstance._stringText === 'string') { + nodeType = 'Text'; + text = internalInstance._stringText; + } else { + name = getDisplayName(type); + } + } + + if (internalInstance._instance) { + var inst = internalInstance._instance; + + // A forceUpdate for stateless (functional) components. + var forceUpdate = inst.forceUpdate || inst.updater && inst.updater.enqueueForceUpdate && function (cb) { + inst.updater.enqueueForceUpdate(this, cb, 'forceUpdate'); + }; + updater = { + setState: inst.setState && inst.setState.bind(inst), + forceUpdate: forceUpdate && forceUpdate.bind(inst), + setInProps: forceUpdate && setInProps.bind(null, internalInstance, forceUpdate), + setInState: inst.forceUpdate && setInState.bind(null, inst), + setInContext: forceUpdate && setInContext.bind(null, inst, forceUpdate) + }; + if (typeof type === 'function') { + publicInstance = inst; + } + + // TODO: React ART currently falls in this bucket, but this doesn't + // actually make sense and we should clean this up after stabilizing our + // API for backends + if (inst._renderedChildren) { + children = childrenList(inst._renderedChildren); + } + } + + if (typeof internalInstance.setNativeProps === 'function') { + // For editing styles in RN + updater = { + setNativeProps: function setNativeProps(nativeProps) { + internalInstance.setNativeProps(nativeProps); + } + }; + } + + // $FlowFixMe + return { + nodeType: nodeType, + type: type, + key: key, + ref: ref, + source: source, + name: name, + props: props, + state: state, + context: context, + children: children, + text: text, + updater: updater, + publicInstance: publicInstance + }; + } + + function setInProps(internalInst, forceUpdate, path, value) { + var element = internalInst._currentElement; + internalInst._currentElement = _extends({}, element, { + props: copyWithSet(element.props, path, value) + }); + forceUpdate.call(internalInst._instance); + } + + function setInState(inst, path, value) { + setIn(inst.state, path, value); + inst.forceUpdate(); + } + + function setInContext(inst, forceUpdate, path, value) { + setIn(inst.context, path, value); + forceUpdate.call(inst); + } + + function setIn(obj, path, value) { + var last = path.pop(); + var parent = path.reduce(function (obj_, attr) { + return obj_ ? obj_[attr] : null; + }, obj); + if (parent) { + parent[last] = value; + } + } + + function childrenList(children) { + var res = []; + for (var name in children) { + res.push(children[name]); + } + return res; + } + + module.exports = getData; + +/***/ }, +/* 49 */ +/***/ function(module, exports) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function copyWithSetImpl(obj, path, idx, value) { + if (idx >= path.length) { + return value; + } + var key = path[idx]; + var updated = Array.isArray(obj) ? obj.slice() : _extends({}, obj); + // $FlowFixMe number or string is fine here + updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value); + return updated; + } + + function copyWithSet(obj, path, value) { + return copyWithSetImpl(obj, path, 0, value); + } + + module.exports = copyWithSet; + +/***/ }, +/* 50 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(WeakMap) {/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var FB_MODULE_RE = /^(.*) \[from (.*)\]$/; + var cachedDisplayNames = new WeakMap(); + + function getDisplayName(type) { + var fallbackName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Unknown'; + + var nameFromCache = cachedDisplayNames.get(type); + if (nameFromCache != null) { + return nameFromCache; + } + + var displayName = void 0; + + // The displayName property is not guaranteed to be a string. + // It's only safe to use for our purposes if it's a string. + // github.com/facebook/react-devtools/issues/803 + if (typeof type.displayName === 'string') { + displayName = type.displayName; + } + + if (!displayName) { + displayName = type.name || fallbackName; + } + + // Facebook-specific hack to turn "Image [from Image.react]" into just "Image". + // We need displayName with module name for error reports but it clutters the DevTools. + var match = displayName.match(FB_MODULE_RE); + if (match) { + var componentName = match[1]; + var moduleName = match[2]; + if (componentName && moduleName) { + if (moduleName === componentName || moduleName.startsWith(componentName + '.')) { + displayName = componentName; + } + } + } + + cachedDisplayNames.set(type, displayName); + return displayName; + } + + module.exports = getDisplayName; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) + +/***/ }, +/* 51 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + 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; }; + + var invariant = __webpack_require__(52); + + var SEPARATOR = '.'; + var SUBSEPARATOR = ':'; + + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + // The Symbol used to tag the ReactElement type. If there is no native Symbol + // nor polyfill, then a plain number is used for performance. + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element') || 0xeac7; + + /** + * Escape and wrap key so it is safe to use as a reactid + * + * @param {string} key to be escaped. + * @return {string} the escaped key. + */ + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + '=': '=0', + ':': '=2' + }; + var escapedString = ('' + key).replace(escapeRegex, function (match) { + return escaperLookup[match]; + }); + + return '$' + escapedString; + } + + /** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ + function getComponentKey(component, index) { + // Do some typechecking here since we call this blindly. We want to ensure + // that we don't block potential future ES APIs. + if ((typeof component === 'undefined' ? 'undefined' : _typeof(component)) === 'object' && component !== null && component.key != null) { + // Explicit key + return escape(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); + } + + /** + * We do a copied the 'traverseAllChildrenImpl' method from + * `React.Children` so that we don't pull in the whole React library. + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ + function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children === 'undefined' ? 'undefined' : _typeof(children); + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if (children === null || type === 'string' || type === 'number' || + // The following is inlined from ReactElement. This means we can optimize + // some checks. React Fiber also inlines this logic for similar purposes. + type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) { + callback(traverseContext, children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar); + return 1; + } + + var child; + var nextName; + var subtreeCount = 0; // Count of children found in the current subtree. + var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getComponentKey(child, i); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else { + var iteratorFn = ITERATOR_SYMBOL && children[ITERATOR_SYMBOL] || children[FAUX_ITERATOR_SYMBOL]; + if (typeof iteratorFn === 'function') { + var iterator = iteratorFn.call(children); + var step; + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getComponentKey(child, ii++); + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); + } + } else if (type === 'object') { + var addendum = ' If you meant to render a collection of children, use an array ' + 'instead.'; + var childrenString = '' + children; + invariant(false, 'The React Devtools cannot render an object as a child. (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum); + } + } + + return subtreeCount; + } + + module.exports = traverseAllChildrenImpl; + +/***/ }, +/* 52 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule invariant + */ + + 'use strict'; + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + function invariant(condition, format, a, b, c, d, e, f) { + if (process.env.NODE_ENV !== 'production') { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } + + module.exports = invariant; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(53))) + +/***/ }, +/* 53 */ +/***/ function(module, exports) { + + // shim for using process in browser + var process = module.exports = {}; + + // cached from whatever global is present so that test runners that stub it + // don't break things. But we need to wrap it in a try catch in case it is + // wrapped in strict mode code which doesn't define any globals. It's inside a + // function because try/catches deoptimize in certain engines. + + var cachedSetTimeout; + var cachedClearTimeout; + + function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); + } + function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); + } + (function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } + } ()) + function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + + } + function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + + } + var queue = []; + var draining = false; + var currentQueue; + var queueIndex = -1; + + function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } + } + + function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); + } + + process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } + }; + + // v8 likes predictible objects + function Item(fun, array) { + this.fun = fun; + this.array = array; + } + Item.prototype.run = function () { + this.fun.apply(null, this.array); + }; + process.title = 'browser'; + process.browser = true; + process.env = {}; + process.argv = []; + process.version = ''; // empty string to avoid regexp issues + process.versions = {}; + + function noop() {} + + process.on = noop; + process.addListener = noop; + process.once = noop; + process.off = noop; + process.removeListener = noop; + process.removeAllListeners = noop; + process.emit = noop; + + process.binding = function (name) { + throw new Error('process.binding is not supported'); + }; + + process.cwd = function () { return '/' }; + process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); + }; + process.umask = function() { return 0; }; + + +/***/ }, +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var copyWithSet = __webpack_require__(49); + + function getData012(internalInstance) { + var children = null; + var props = internalInstance.props; + var state = internalInstance.state; + var context = internalInstance.context; + var updater = null; + var name = null; + var type = null; + var key = null; + var ref = null; + var text = null; + var publicInstance = null; + var nodeType = 'Native'; + if (internalInstance._renderedComponent) { + nodeType = 'Wrapper'; + children = [internalInstance._renderedComponent]; + if (context && Object.keys(context).length === 0) { + context = null; + } + } else if (internalInstance._renderedChildren) { + name = internalInstance.constructor.displayName; + children = childrenList(internalInstance._renderedChildren); + } else if (typeof props.children === 'string') { + // string children + name = internalInstance.constructor.displayName; + children = props.children; + nodeType = 'Native'; + } + + if (!props && internalInstance._currentElement && internalInstance._currentElement.props) { + props = internalInstance._currentElement.props; + } + + if (internalInstance._currentElement) { + type = internalInstance._currentElement.type; + if (internalInstance._currentElement.key) { + key = String(internalInstance._currentElement.key); + } + ref = internalInstance._currentElement.ref; + if (typeof type === 'string') { + name = type; + } else { + nodeType = 'Composite'; + name = type.displayName; + if (!name) { + name = 'No display name'; + } + } + } + + if (!name) { + name = internalInstance.constructor.displayName || 'No display name'; + nodeType = 'Composite'; + } + + if (typeof props === 'string') { + nodeType = 'Text'; + text = props; + props = null; + name = null; + } + + if (internalInstance.forceUpdate) { + updater = { + setState: internalInstance.setState.bind(internalInstance), + forceUpdate: internalInstance.forceUpdate.bind(internalInstance), + setInProps: internalInstance.forceUpdate && setInProps.bind(null, internalInstance), + setInState: internalInstance.forceUpdate && setInState.bind(null, internalInstance), + setInContext: internalInstance.forceUpdate && setInContext.bind(null, internalInstance) + }; + publicInstance = internalInstance; + } + + // $FlowFixMe + return { + nodeType: nodeType, + type: type, + key: key, + ref: ref, + source: null, + name: name, + props: props, + state: state, + context: context, + children: children, + text: text, + updater: updater, + publicInstance: publicInstance + }; + } + + function setInProps(inst, path, value) { + inst.props = copyWithSet(inst.props, path, value); + inst.forceUpdate(); + } + + function setInState(inst, path, value) { + setIn(inst.state, path, value); + inst.forceUpdate(); + } + + function setInContext(inst, path, value) { + setIn(inst.context, path, value); + inst.forceUpdate(); + } + + function setIn(obj, path, value) { + var last = path.pop(); + var parent = path.reduce(function (obj_, attr) { + return obj_ ? obj_[attr] : null; + }, obj); + if (parent) { + parent[last] = value; + } + } + + function childrenList(children) { + var res = []; + for (var name in children) { + res.push(children[name]); + } + return res; + } + + module.exports = getData012; + +/***/ }, +/* 55 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(Set) {/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var getDataFiber = __webpack_require__(56); + + var _require = __webpack_require__(57), + ClassComponent = _require.ClassComponent, + FunctionalComponent = _require.FunctionalComponent, + ContextConsumer = _require.ContextConsumer, + HostRoot = _require.HostRoot; + + // Inlined from ReactTypeOfSideEffect + + + var PerformedWork = 1; + + function attachRendererFiber(hook, rid, renderer) { + // This is a slightly annoying indirection. + // It is currently necessary because DevTools wants + // to use unique objects as keys for instances. + // However fibers have two versions. + // We use this set to remember first encountered fiber for + // each conceptual instance. + var opaqueNodes = new Set(); + function getOpaqueNode(fiber) { + if (opaqueNodes.has(fiber)) { + return fiber; + } + var alternate = fiber.alternate; + + if (alternate != null && opaqueNodes.has(alternate)) { + return alternate; + } + opaqueNodes.add(fiber); + return fiber; + } + + function hasDataChanged(prevFiber, nextFiber) { + switch (nextFiber.tag) { + case ClassComponent: + case FunctionalComponent: + case ContextConsumer: + // For types that execute user code, we check PerformedWork effect. + // We don't reflect bailouts (either referential or sCU) in DevTools. + // eslint-disable-next-line no-bitwise + return (nextFiber.effectTag & PerformedWork) === PerformedWork; + // Note: ContextConsumer only gets PerformedWork effect in 16.3.3+ + // so it won't get highlighted with React 16.3.0 to 16.3.2. + default: + // For host components and other types, we compare inputs + // to determine whether something is an update. + return prevFiber.memoizedProps !== nextFiber.memoizedProps || prevFiber.memoizedState !== nextFiber.memoizedState || prevFiber.ref !== nextFiber.ref; + } + } + + var pendingEvents = []; + + function flushPendingEvents() { + var events = pendingEvents; + pendingEvents = []; + for (var i = 0; i < events.length; i++) { + var event = events[i]; + hook.emit(event.type, event); + } + } + + function enqueueMount(fiber) { + pendingEvents.push({ + internalInstance: getOpaqueNode(fiber), + data: getDataFiber(fiber, getOpaqueNode), + renderer: rid, + type: 'mount' + }); + + var isRoot = fiber.tag === HostRoot; + if (isRoot) { + pendingEvents.push({ + internalInstance: getOpaqueNode(fiber), + renderer: rid, + type: 'root' + }); + } + } + + function enqueueUpdateIfNecessary(fiber, hasChildOrderChanged) { + if (!hasChildOrderChanged && !hasDataChanged(fiber.alternate, fiber)) { + return; + } + pendingEvents.push({ + internalInstance: getOpaqueNode(fiber), + data: getDataFiber(fiber, getOpaqueNode), + renderer: rid, + type: 'update' + }); + } + + function enqueueUnmount(fiber) { + var isRoot = fiber.tag === HostRoot; + var opaqueNode = getOpaqueNode(fiber); + var event = { + internalInstance: opaqueNode, + renderer: rid, + type: 'unmount' + }; + if (isRoot) { + pendingEvents.push(event); + } else { + // Non-root fibers are deleted during the commit phase. + // They are deleted in the child-first order. However + // DevTools currently expects deletions to be parent-first. + // This is why we unshift deletions rather than push them. + pendingEvents.unshift(event); + } + opaqueNodes.delete(opaqueNode); + } + + function mountFiber(fiber) { + // Depth-first. + // Logs mounting of children first, parents later. + var node = fiber; + outer: while (true) { + if (node.child) { + node.child.return = node; + node = node.child; + continue; + } + enqueueMount(node); + if (node == fiber) { + return; + } + if (node.sibling) { + node.sibling.return = node.return; + node = node.sibling; + continue; + } + while (node.return) { + node = node.return; + enqueueMount(node); + if (node == fiber) { + return; + } + if (node.sibling) { + node.sibling.return = node.return; + node = node.sibling; + continue outer; + } + } + return; + } + } + + function updateFiber(nextFiber, prevFiber) { + var hasChildOrderChanged = false; + if (nextFiber.child !== prevFiber.child) { + // If the first child is different, we need to traverse them. + // Each next child will be either a new child (mount) or an alternate (update). + var nextChild = nextFiber.child; + var prevChildAtSameIndex = prevFiber.child; + while (nextChild) { + // We already know children will be referentially different because + // they are either new mounts or alternates of previous children. + // Schedule updates and mounts depending on whether alternates exist. + // We don't track deletions here because they are reported separately. + if (nextChild.alternate) { + var prevChild = nextChild.alternate; + updateFiber(nextChild, prevChild); + // However we also keep track if the order of the children matches + // the previous order. They are always different referentially, but + // if the instances line up conceptually we'll want to know that. + if (!hasChildOrderChanged && prevChild !== prevChildAtSameIndex) { + hasChildOrderChanged = true; + } + } else { + mountFiber(nextChild); + if (!hasChildOrderChanged) { + hasChildOrderChanged = true; + } + } + // Try the next child. + nextChild = nextChild.sibling; + // Advance the pointer in the previous list so that we can + // keep comparing if they line up. + if (!hasChildOrderChanged && prevChildAtSameIndex != null) { + prevChildAtSameIndex = prevChildAtSameIndex.sibling; + } + } + // If we have no more children, but used to, they don't line up. + if (!hasChildOrderChanged && prevChildAtSameIndex != null) { + hasChildOrderChanged = true; + } + } + enqueueUpdateIfNecessary(nextFiber, hasChildOrderChanged); + } + + function walkTree() { + hook.getFiberRoots(rid).forEach(function (root) { + // Hydrate all the roots for the first time. + mountFiber(root.current); + }); + flushPendingEvents(); + } + + function cleanup() { + // We don't patch any methods so there is no cleanup. + } + + function handleCommitFiberUnmount(fiber) { + // This is not recursive. + // We can't traverse fibers after unmounting so instead + // we rely on React telling us about each unmount. + // It will be flushed after the root is committed. + enqueueUnmount(fiber); + } + + function handleCommitFiberRoot(root) { + var current = root.current; + var alternate = current.alternate; + if (alternate) { + // TODO: relying on this seems a bit fishy. + var wasMounted = alternate.memoizedState != null && alternate.memoizedState.element != null; + var isMounted = current.memoizedState != null && current.memoizedState.element != null; + if (!wasMounted && isMounted) { + // Mount a new root. + mountFiber(current); + } else if (wasMounted && isMounted) { + // Update an existing root. + updateFiber(current, alternate); + } else if (wasMounted && !isMounted) { + // Unmount an existing root. + enqueueUnmount(current); + } + } else { + // Mount a new root. + mountFiber(current); + } + // We're done here. + flushPendingEvents(); + } + + // The naming is confusing. + // They deal with opaque nodes (fibers), not elements. + function getNativeFromReactElement(fiber) { + try { + var opaqueNode = fiber; + var hostInstance = renderer.findHostInstanceByFiber(opaqueNode); + return hostInstance; + } catch (err) { + // The fiber might have unmounted by now. + return null; + } + } + function getReactElementFromNative(hostInstance) { + var fiber = renderer.findFiberByHostInstance(hostInstance); + if (fiber != null) { + // TODO: type fibers. + var opaqueNode = getOpaqueNode(fiber); + return opaqueNode; + } + return null; + } + return { + getNativeFromReactElement: getNativeFromReactElement, + getReactElementFromNative: getReactElementFromNative, + handleCommitFiberRoot: handleCommitFiberRoot, + handleCommitFiberUnmount: handleCommitFiberUnmount, + cleanup: cleanup, + walkTree: walkTree + }; + } + + module.exports = attachRendererFiber; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) + +/***/ }, +/* 56 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + 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; }; + + var copyWithSet = __webpack_require__(49); + var getDisplayName = __webpack_require__(50); + + var _require = __webpack_require__(57), + FunctionalComponent = _require.FunctionalComponent, + ClassComponent = _require.ClassComponent, + HostRoot = _require.HostRoot, + HostPortal = _require.HostPortal, + HostComponent = _require.HostComponent, + HostText = _require.HostText, + Fragment = _require.Fragment; + + var _require2 = __webpack_require__(58), + ASYNC_MODE_NUMBER = _require2.ASYNC_MODE_NUMBER, + ASYNC_MODE_SYMBOL_STRING = _require2.ASYNC_MODE_SYMBOL_STRING, + CONTEXT_CONSUMER_NUMBER = _require2.CONTEXT_CONSUMER_NUMBER, + CONTEXT_CONSUMER_SYMBOL_STRING = _require2.CONTEXT_CONSUMER_SYMBOL_STRING, + CONTEXT_PROVIDER_NUMBER = _require2.CONTEXT_PROVIDER_NUMBER, + CONTEXT_PROVIDER_SYMBOL_STRING = _require2.CONTEXT_PROVIDER_SYMBOL_STRING, + FORWARD_REF_NUMBER = _require2.FORWARD_REF_NUMBER, + FORWARD_REF_SYMBOL_STRING = _require2.FORWARD_REF_SYMBOL_STRING, + PROFILER_NUMBER = _require2.PROFILER_NUMBER, + PROFILER_SYMBOL_STRING = _require2.PROFILER_SYMBOL_STRING, + STRICT_MODE_NUMBER = _require2.STRICT_MODE_NUMBER, + STRICT_MODE_SYMBOL_STRING = _require2.STRICT_MODE_SYMBOL_STRING, + TIMEOUT_NUMBER = _require2.TIMEOUT_NUMBER, + TIMEOUT_SYMBOL_STRING = _require2.TIMEOUT_SYMBOL_STRING; + + // TODO: we might want to change the data structure + // once we no longer suppport Stack versions of `getData`. + + + function getDataFiber(fiber, getOpaqueNode) { + var type = fiber.type; + var key = fiber.key; + var ref = fiber.ref; + var source = fiber._debugSource; + var publicInstance = null; + var props = null; + var state = null; + var children = null; + var context = null; + var updater = null; + var nodeType = null; + var name = null; + var text = null; + + switch (fiber.tag) { + case FunctionalComponent: + case ClassComponent: + nodeType = 'Composite'; + name = getDisplayName(fiber.type); + publicInstance = fiber.stateNode; + props = fiber.memoizedProps; + state = fiber.memoizedState; + if (publicInstance != null) { + context = publicInstance.context; + if (context && Object.keys(context).length === 0) { + context = null; + } + } + var inst = publicInstance; + if (inst) { + updater = { + setState: inst.setState && inst.setState.bind(inst), + forceUpdate: inst.forceUpdate && inst.forceUpdate.bind(inst), + setInProps: inst.forceUpdate && setInProps.bind(null, fiber), + setInState: inst.forceUpdate && setInState.bind(null, inst), + setInContext: inst.forceUpdate && setInContext.bind(null, inst) + }; + } + children = []; + break; + case HostRoot: + nodeType = 'Wrapper'; + children = []; + break; + case HostPortal: + nodeType = 'Portal'; + name = 'ReactPortal'; + props = { + target: fiber.stateNode.containerInfo + }; + children = []; + break; + case HostComponent: + nodeType = 'Native'; + name = fiber.type; + + // TODO (bvaughn) we plan to remove this prefix anyway. + // We can cut this special case out when it's gone. + name = name.replace('topsecret-', ''); + + publicInstance = fiber.stateNode; + props = fiber.memoizedProps; + if (typeof props.children === 'string' || typeof props.children === 'number') { + children = props.children.toString(); + } else { + children = []; + } + if (typeof fiber.stateNode.setNativeProps === 'function') { + // For editing styles in RN + updater = { + setNativeProps: function setNativeProps(nativeProps) { + fiber.stateNode.setNativeProps(nativeProps); + } + }; + } + break; + case HostText: + nodeType = 'Text'; + text = fiber.memoizedProps; + break; + case Fragment: + nodeType = 'Wrapper'; + children = []; + break; + default: + // Coroutines and yields + var symbolOrNumber = (typeof type === 'undefined' ? 'undefined' : _typeof(type)) === 'object' && type !== null ? type.$$typeof : type; + // $FlowFixMe facebook/flow/issues/2362 + var switchValue = (typeof symbolOrNumber === 'undefined' ? 'undefined' : _typeof(symbolOrNumber)) === 'symbol' ? symbolOrNumber.toString() : symbolOrNumber; + + switch (switchValue) { + case ASYNC_MODE_NUMBER: + case ASYNC_MODE_SYMBOL_STRING: + nodeType = 'Special'; + name = 'AsyncMode'; + children = []; + break; + case CONTEXT_PROVIDER_NUMBER: + case CONTEXT_PROVIDER_SYMBOL_STRING: + nodeType = 'Special'; + props = fiber.memoizedProps; + name = 'Context.Provider'; + children = []; + break; + case CONTEXT_CONSUMER_NUMBER: + case CONTEXT_CONSUMER_SYMBOL_STRING: + nodeType = 'Special'; + props = fiber.memoizedProps; + // TODO: TraceUpdatesBackendManager currently depends on this. + // If you change .name, figure out a more resilient way to detect it. + name = 'Context.Consumer'; + children = []; + break; + case STRICT_MODE_NUMBER: + case STRICT_MODE_SYMBOL_STRING: + nodeType = 'Special'; + name = 'StrictMode'; + children = []; + break; + case FORWARD_REF_NUMBER: + case FORWARD_REF_SYMBOL_STRING: + var functionName = getDisplayName(fiber.type.render, ''); + nodeType = 'Special'; + name = functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef'; + children = []; + break; + case TIMEOUT_NUMBER: + case TIMEOUT_SYMBOL_STRING: + nodeType = 'Special'; + name = 'Timeout'; + props = fiber.memoizedProps; + children = []; + break; + case PROFILER_NUMBER: + case PROFILER_SYMBOL_STRING: + nodeType = 'Special'; + props = fiber.memoizedProps; + name = 'Profiler'; + children = []; + break; + default: + nodeType = 'Native'; + props = fiber.memoizedProps; + name = 'TODO_NOT_IMPLEMENTED_YET'; + children = []; + break; + } + break; + } + + if (Array.isArray(children)) { + var child = fiber.child; + while (child) { + children.push(getOpaqueNode(child)); + child = child.sibling; + } + } + + // $FlowFixMe + return { + nodeType: nodeType, + type: type, + key: key, + ref: ref, + source: source, + name: name, + props: props, + state: state, + context: context, + children: children, + text: text, + updater: updater, + publicInstance: publicInstance + }; + } + + function setInProps(fiber, path, value) { + var inst = fiber.stateNode; + fiber.pendingProps = copyWithSet(inst.props, path, value); + if (fiber.alternate) { + // We don't know which fiber is the current one because DevTools may bail out of getDataFiber() call, + // and so the data object may refer to another version of the fiber. Therefore we update pendingProps + // on both. I hope that this is safe. + fiber.alternate.pendingProps = fiber.pendingProps; + } + fiber.stateNode.forceUpdate(); + } + + function setInState(inst, path, value) { + setIn(inst.state, path, value); + inst.forceUpdate(); + } + + function setInContext(inst, path, value) { + setIn(inst.context, path, value); + inst.forceUpdate(); + } + + function setIn(obj, path, value) { + var last = path.pop(); + var parent = path.reduce(function (obj_, attr) { + return obj_ ? obj_[attr] : null; + }, obj); + if (parent) { + parent[last] = value; + } + } + + module.exports = getDataFiber; + +/***/ }, +/* 57 */ +/***/ function(module, exports) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + // Copied from React repo. + + module.exports = { + IndeterminateComponent: 0, // Before we know whether it is functional or class + FunctionalComponent: 1, + ClassComponent: 2, + HostRoot: 3, // Root of a host tree. Could be nested inside another node. + HostPortal: 4, // A subtree. Could be an entry point to a different renderer. + HostComponent: 5, + HostText: 6, + CoroutineComponent: 7, + CoroutineHandlerPhase: 8, + YieldComponent: 9, + Fragment: 10, + Mode: 11, + ContextConsumer: 12, + ContextProvider: 13, + ForwardRef: 14 + }; + +/***/ }, +/* 58 */ +/***/ function(module, exports) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + // Based on the React repo. + + module.exports = { + ASYNC_MODE_NUMBER: 0xeacf, + ASYNC_MODE_SYMBOL_STRING: 'Symbol(react.async_mode)', + CONTEXT_CONSUMER_NUMBER: 0xeace, + CONTEXT_CONSUMER_SYMBOL_STRING: 'Symbol(react.context)', + CONTEXT_PROVIDER_NUMBER: 0xeacd, + CONTEXT_PROVIDER_SYMBOL_STRING: 'Symbol(react.provider)', + FORWARD_REF_NUMBER: 0xead0, + FORWARD_REF_SYMBOL_STRING: 'Symbol(react.forward_ref)', + PROFILER_NUMBER: 0xead2, + PROFILER_SYMBOL_STRING: 'Symbol(react.profiler)', + STRICT_MODE_NUMBER: 0xeacc, + STRICT_MODE_SYMBOL_STRING: 'Symbol(react.strict_mode)', + TIMEOUT_NUMBER: 0xead1, + TIMEOUT_SYMBOL_STRING: 'Symbol(react.timeout)' + }; + +/***/ }, +/* 59 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + 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; }; + + function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + var resolveBoxStyle = __webpack_require__(60); + + var styleOverridesByHostComponentId = {}; + + module.exports = function setupRNStyle(bridge, agent, resolveRNStyle) { + bridge.onCall('rn-style:get', function (id) { + var node = agent.elementData.get(id); + if (!node || !node.props) { + return null; + } + return resolveRNStyle(node.props.style); + }); + + bridge.on('rn-style:measure', function (id) { + measureStyle(agent, bridge, resolveRNStyle, id); + }); + + bridge.on('rn-style:rename', function (_ref) { + var id = _ref.id, + oldName = _ref.oldName, + newName = _ref.newName, + val = _ref.val; + + renameStyle(agent, id, oldName, newName, val); + setTimeout(function () { + return measureStyle(agent, bridge, resolveRNStyle, id); + }); + }); + + bridge.on('rn-style:set', function (_ref2) { + var id = _ref2.id, + attr = _ref2.attr, + val = _ref2.val; + + setStyle(agent, id, attr, val); + setTimeout(function () { + return measureStyle(agent, bridge, resolveRNStyle, id); + }); + }); + }; + + var blank = { + top: 0, + left: 0, + right: 0, + bottom: 0 + }; + + function measureStyle(agent, bridge, resolveRNStyle, id) { + var node = agent.elementData.get(id); + if (!node || !node.props) { + bridge.send('rn-style:measure', {}); + return; + } + + var style = resolveRNStyle(node.props.style); + // If it's a host component we edited before, amend styles. + if (styleOverridesByHostComponentId[id]) { + style = Object.assign({}, style, styleOverridesByHostComponentId[id]); + } + + var instance = node.publicInstance; + if (!instance || !instance.measure) { + bridge.send('rn-style:measure', { style: style }); + return; + } + + instance.measure(function (x, y, width, height, left, top) { + // RN Android sometimes returns undefined here. Don't send measurements in this case. + // https://github.com/jhen0409/react-native-debugger/issues/84#issuecomment-304611817 + if (typeof x !== 'number') { + bridge.send('rn-style:measure', { style: style }); + return; + } + var margin = style && resolveBoxStyle('margin', style) || blank; + var padding = style && resolveBoxStyle('padding', style) || blank; + bridge.send('rn-style:measure', { + style: style, + measuredLayout: { + x: x, + y: y, + width: width, + height: height, + left: left, + top: top, + margin: margin, + padding: padding + } + }); + }); + } + + function shallowClone(obj) { + var nobj = {}; + for (var n in obj) { + nobj[n] = obj[n]; + } + return nobj; + } + + function renameStyle(agent, id, oldName, newName, val) { + var _ref3; + + var data = agent.elementData.get(id); + var newStyle = newName ? (_ref3 = {}, _defineProperty(_ref3, oldName, undefined), _defineProperty(_ref3, newName, val), _ref3) : _defineProperty({}, oldName, undefined); + + if (data && data.updater && typeof data.updater.setInProps === 'function') { + // First attempt: use setInProps(). + // We do this for composite components, and it works relatively well. + var style = data && data.props && data.props.style; + var customStyle; + if (Array.isArray(style)) { + var lastLength = style.length - 1; + if (_typeof(style[lastLength]) === 'object' && !Array.isArray(style[lastLength])) { + customStyle = shallowClone(style[lastLength]); + delete customStyle[oldName]; + if (newName) { + customStyle[newName] = val; + } else { + customStyle[oldName] = undefined; + } + // $FlowFixMe we know that updater is not null here + data.updater.setInProps(['style', lastLength], customStyle); + } else { + style = style.concat([newStyle]); + // $FlowFixMe we know that updater is not null here + data.updater.setInProps(['style'], style); + } + } else { + if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) === 'object') { + customStyle = shallowClone(style); + delete customStyle[oldName]; + if (newName) { + customStyle[newName] = val; + } else { + customStyle[oldName] = undefined; + } + // $FlowFixMe we know that updater is not null here + data.updater.setInProps(['style'], customStyle); + } else { + style = [style, newStyle]; + data.updater.setInProps(['style'], style); + } + } + } else if (data && data.updater && typeof data.updater.setNativeProps === 'function') { + // Fallback: use setNativeProps(). We're dealing with a host component. + // Remember to "correct" resolved styles when we read them next time. + if (!styleOverridesByHostComponentId[id]) { + styleOverridesByHostComponentId[id] = newStyle; + } else { + Object.assign(styleOverridesByHostComponentId[id], newStyle); + } + data.updater.setNativeProps({ style: newStyle }); + } else { + return; + } + agent.emit('hideHighlight'); + } + + function setStyle(agent, id, attr, val) { + var data = agent.elementData.get(id); + var newStyle = _defineProperty({}, attr, val); + + if (data && data.updater && typeof data.updater.setInProps === 'function') { + // First attempt: use setInProps(). + // We do this for composite components, and it works relatively well. + var style = data.props && data.props.style; + if (Array.isArray(style)) { + var lastLength = style.length - 1; + if (_typeof(style[lastLength]) === 'object' && !Array.isArray(style[lastLength])) { + // $FlowFixMe we know that updater is not null here + data.updater.setInProps(['style', lastLength, attr], val); + } else { + style = style.concat([newStyle]); + // $FlowFixMe we know that updater is not null here + data.updater.setInProps(['style'], style); + } + } else { + style = [style, newStyle]; + data.updater.setInProps(['style'], style); + } + } else if (data && data.updater && typeof data.updater.setNativeProps === 'function') { + // Fallback: use setNativeProps(). We're dealing with a host component. + // Remember to "correct" resolved styles when we read them next time. + if (!styleOverridesByHostComponentId[id]) { + styleOverridesByHostComponentId[id] = newStyle; + } else { + Object.assign(styleOverridesByHostComponentId[id], newStyle); + } + data.updater.setNativeProps({ style: newStyle }); + } else { + return; + } + agent.emit('hideHighlight'); + } + +/***/ }, +/* 60 */ +/***/ function(module, exports) { + + 'use strict'; + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + /** + * This is mirror from + * https://github.com/facebook/react-native/blob/master/Libraries/Inspector/resolveBoxStyle.js + * + * Resolve a style property into it's component parts, e.g. + * + * resolveBoxStyle('margin', {margin: 5, marginBottom: 10}) + * -> + * {top: 5, left: 5, right: 5, bottom: 10} + * + * If none are set, returns false. + */ + function resolveBoxStyle(prefix, style) { + var res = {}; + var subs = ['top', 'left', 'bottom', 'right']; + var set = false; + subs.forEach(function (sub) { + res[sub] = style[prefix] || 0; + }); + if (style[prefix]) { + set = true; + } + if (style[prefix + 'Vertical']) { + res.top = res.bottom = style[prefix + 'Vertical']; + set = true; + } + if (style[prefix + 'Horizontal']) { + res.left = res.right = style[prefix + 'Horizontal']; + set = true; + } + subs.forEach(function (sub) { + var val = style[prefix + capFirst(sub)]; + if (val) { + res[sub] = val; + set = true; + } + }); + if (!set) { + return null; + } + return res; + } + + function capFirst(text) { + return text[0].toUpperCase() + text.slice(1); + } + + module.exports = resolveBoxStyle; + +/***/ }, +/* 61 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var Highlighter = __webpack_require__(62); + + module.exports = function setup(agent) { + var hl = new Highlighter(window, function (node) { + agent.selectFromDOMNode(node); + }); + agent.on('highlight', function (data) { + return hl.highlight(data.node, data.name); + }); + agent.on('highlightMany', function (nodes) { + return hl.highlightMany(nodes); + }); + agent.on('hideHighlight', function () { + return hl.hideHighlight(); + }); + agent.on('refreshMultiOverlay', function () { + return hl.refreshMultiOverlay(); + }); + agent.on('startInspecting', function () { + return hl.startInspecting(); + }); + agent.on('stopInspecting', function () { + return hl.stopInspecting(); + }); + agent.on('shutdown', function () { + hl.remove(); + }); + }; + +/***/ }, +/* 62 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var Overlay = __webpack_require__(63); + var MultiOverlay = __webpack_require__(65); + + /** + * Manages the highlighting of items on an html page, as well as + * hover-to-inspect. + */ + + var Highlighter = function () { + function Highlighter(win, onSelect) { + _classCallCheck(this, Highlighter); + + this._win = win; + this._onSelect = onSelect; + this._overlay = null; + this._multiOverlay = null; + this._subs = []; + } + + _createClass(Highlighter, [{ + key: 'startInspecting', + value: function startInspecting() { + this._inspecting = true; + this._subs = [captureSubscription(this._win, 'mouseover', this.onHover.bind(this)), captureSubscription(this._win, 'mousedown', this.onMouseDown.bind(this)), captureSubscription(this._win, 'click', this.onClick.bind(this))]; + } + }, { + key: 'stopInspecting', + value: function stopInspecting() { + this._subs.forEach(function (unsub) { + return unsub(); + }); + this.hideHighlight(); + } + }, { + key: 'remove', + value: function remove() { + this.stopInspecting(); + if (this._button && this._button.parentNode) { + this._button.parentNode.removeChild(this._button); + } + } + }, { + key: 'highlight', + value: function highlight(node, name) { + this.removeMultiOverlay(); + if (node.nodeType !== Node.COMMENT_NODE) { + if (!this._overlay) { + this._overlay = new Overlay(this._win); + } + this._overlay.inspect(node, name); + } + } + }, { + key: 'highlightMany', + value: function highlightMany(nodes) { + this.removeOverlay(); + if (!this._multiOverlay) { + this._multiOverlay = new MultiOverlay(this._win); + } + this._multiOverlay.highlightMany(nodes); + } + }, { + key: 'hideHighlight', + value: function hideHighlight() { + this._inspecting = false; + this.removeOverlay(); + this.removeMultiOverlay(); + } + }, { + key: 'refreshMultiOverlay', + value: function refreshMultiOverlay() { + if (!this._multiOverlay) { + return; + } + this._multiOverlay.refresh(); + } + }, { + key: 'removeOverlay', + value: function removeOverlay() { + if (!this._overlay) { + return; + } + this._overlay.remove(); + this._overlay = null; + } + }, { + key: 'removeMultiOverlay', + value: function removeMultiOverlay() { + if (!this._multiOverlay) { + return; + } + this._multiOverlay.remove(); + this._multiOverlay = null; + } + }, { + key: 'onMouseDown', + value: function onMouseDown(evt) { + if (!this._inspecting) { + return; + } + evt.preventDefault(); + evt.stopPropagation(); + evt.cancelBubble = true; + this._onSelect(evt.target); + } + }, { + key: 'onClick', + value: function onClick(evt) { + if (!this._inspecting) { + return; + } + this._subs.forEach(function (unsub) { + return unsub(); + }); + evt.preventDefault(); + evt.stopPropagation(); + evt.cancelBubble = true; + this.hideHighlight(); + } + }, { + key: 'onHover', + value: function onHover(evt) { + if (!this._inspecting) { + return; + } + evt.preventDefault(); + evt.stopPropagation(); + evt.cancelBubble = true; + this.highlight(evt.target); + } + }, { + key: 'injectButton', + value: function injectButton() { + this._button = makeMagnifier(); + this._button.onclick = this.startInspecting.bind(this); + this._win.document.body.appendChild(this._button); + } + }]); + + return Highlighter; + }(); + + function captureSubscription(obj, evt, cb) { + obj.addEventListener(evt, cb, true); + return function () { + return obj.removeEventListener(evt, cb, true); + }; + } + + function makeMagnifier() { + var button = window.document.createElement('button'); + button.innerHTML = '🔍'; + button.style.backgroundColor = 'transparent'; + button.style.border = 'none'; + button.style.outline = 'none'; + button.style.cursor = 'pointer'; + button.style.position = 'fixed'; + button.style.bottom = '10px'; + button.style.right = '10px'; + button.style.fontSize = '30px'; + button.style.zIndex = 10000000; + return button; + } + + module.exports = Highlighter; + +/***/ }, +/* 63 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var assign = __webpack_require__(7); + + var _require = __webpack_require__(64), + monospace = _require.monospace; + + /** + * Note that this component is not affected by the active Theme, + * Because it highlights elements in the main Chrome window (outside of devtools). + * The colors below were chosen to roughly match those used by Chrome devtools. + */ + var Overlay = function () { + function Overlay(window) { + _classCallCheck(this, Overlay); + + var doc = window.document; + this.win = window; + this.container = doc.createElement('div'); + this.node = doc.createElement('div'); + this.border = doc.createElement('div'); + this.padding = doc.createElement('div'); + this.content = doc.createElement('div'); + + this.border.style.borderColor = overlayStyles.border; + this.padding.style.borderColor = overlayStyles.padding; + this.content.style.backgroundColor = overlayStyles.background; + + assign(this.node.style, { + borderColor: overlayStyles.margin, + pointerEvents: 'none', + position: 'fixed' + }); + + this.tip = doc.createElement('div'); + assign(this.tip.style, { + backgroundColor: '#333740', + borderRadius: '2px', + fontFamily: monospace.family, + fontWeight: 'bold', + padding: '3px 5px', + position: 'fixed', + fontSize: monospace.sizes.normal + }); + + this.nameSpan = doc.createElement('span'); + this.tip.appendChild(this.nameSpan); + assign(this.nameSpan.style, { + color: '#ee78e6', + borderRight: '1px solid #aaaaaa', + paddingRight: '0.5rem', + marginRight: '0.5rem' + }); + this.dimSpan = doc.createElement('span'); + this.tip.appendChild(this.dimSpan); + assign(this.dimSpan.style, { + color: '#d7d7d7' + }); + + this.container.style.zIndex = 10000000; + this.node.style.zIndex = 10000000; + this.tip.style.zIndex = 10000000; + this.container.appendChild(this.node); + this.container.appendChild(this.tip); + this.node.appendChild(this.border); + this.border.appendChild(this.padding); + this.padding.appendChild(this.content); + doc.body.appendChild(this.container); + } + + _createClass(Overlay, [{ + key: 'remove', + value: function remove() { + if (this.container.parentNode) { + this.container.parentNode.removeChild(this.container); + } + } + }, { + key: 'inspect', + value: function inspect(node, name) { + // We can't get the size of text nodes or comment nodes. React as of v15 + // heavily uses comment nodes to delimit text. + if (node.nodeType !== Node.ELEMENT_NODE) { + return; + } + var box = getNestedBoundingClientRect(node, this.win); + var dims = getElementDimensions(node); + + boxWrap(dims, 'margin', this.node); + boxWrap(dims, 'border', this.border); + boxWrap(dims, 'padding', this.padding); + + assign(this.content.style, { + height: box.height - dims.borderTop - dims.borderBottom - dims.paddingTop - dims.paddingBottom + 'px', + width: box.width - dims.borderLeft - dims.borderRight - dims.paddingLeft - dims.paddingRight + 'px' + }); + + assign(this.node.style, { + top: box.top - dims.marginTop + 'px', + left: box.left - dims.marginLeft + 'px' + }); + + this.nameSpan.textContent = name || node.nodeName.toLowerCase(); + this.dimSpan.textContent = box.width + 'px × ' + box.height + 'px'; + + var tipPos = findTipPos({ + top: box.top - dims.marginTop, + left: box.left - dims.marginLeft, + height: box.height + dims.marginTop + dims.marginBottom, + width: box.width + dims.marginLeft + dims.marginRight + }, this.win); + assign(this.tip.style, tipPos); + } + }]); + + return Overlay; + }(); + + function findTipPos(dims, win) { + var tipHeight = 20; + var margin = 5; + var top; + if (dims.top + dims.height + tipHeight <= win.innerHeight) { + if (dims.top + dims.height < 0) { + top = margin; + } else { + top = dims.top + dims.height + margin; + } + } else if (dims.top - tipHeight <= win.innerHeight) { + if (dims.top - tipHeight - margin < margin) { + top = margin; + } else { + top = dims.top - tipHeight - margin; + } + } else { + top = win.innerHeight - tipHeight - margin; + } + + top += 'px'; + + if (dims.left < 0) { + return { top: top, left: margin }; + } + if (dims.left + 200 > win.innerWidth) { + return { top: top, right: margin }; + } + return { top: top, left: dims.left + margin + 'px' }; + } + + function getElementDimensions(domElement) { + var calculatedStyle = window.getComputedStyle(domElement); + + return { + borderLeft: +calculatedStyle.borderLeftWidth.match(/[0-9]*/)[0], + borderRight: +calculatedStyle.borderRightWidth.match(/[0-9]*/)[0], + borderTop: +calculatedStyle.borderTopWidth.match(/[0-9]*/)[0], + borderBottom: +calculatedStyle.borderBottomWidth.match(/[0-9]*/)[0], + marginLeft: +calculatedStyle.marginLeft.match(/[0-9]*/)[0], + marginRight: +calculatedStyle.marginRight.match(/[0-9]*/)[0], + marginTop: +calculatedStyle.marginTop.match(/[0-9]*/)[0], + marginBottom: +calculatedStyle.marginBottom.match(/[0-9]*/)[0], + paddingLeft: +calculatedStyle.paddingLeft.match(/[0-9]*/)[0], + paddingRight: +calculatedStyle.paddingRight.match(/[0-9]*/)[0], + paddingTop: +calculatedStyle.paddingTop.match(/[0-9]*/)[0], + paddingBottom: +calculatedStyle.paddingBottom.match(/[0-9]*/)[0] + }; + } + + // Get the window object for the document that a node belongs to, + // or return null if it cannot be found (node not attached to DOM, + // etc). + function getOwnerWindow(node) { + if (!node.ownerDocument) { + return null; + } + return node.ownerDocument.defaultView; + } + + // Get the iframe containing a node, or return null if it cannot + // be found (node not within iframe, etc). + function getOwnerIframe(node) { + var nodeWindow = getOwnerWindow(node); + if (nodeWindow) { + return nodeWindow.frameElement; + } + return null; + } + + // Get a bounding client rect for a node, with an + // offset added to compensate for its border. + function getBoundingClientRectWithBorderOffset(node) { + var dimensions = getElementDimensions(node); + + return mergeRectOffsets([node.getBoundingClientRect(), { + top: dimensions.borderTop, + left: dimensions.borderLeft, + bottom: dimensions.borderBottom, + right: dimensions.borderRight, + // This width and height won't get used by mergeRectOffsets (since this + // is not the first rect in the array), but we set them so that this + // object typechecks as a DOMRect. + width: 0, + height: 0 + }]); + } + + // Add together the top, left, bottom, and right properties of + // each DOMRect, but keep the width and height of the first one. + function mergeRectOffsets(rects) { + return rects.reduce(function (previousRect, rect) { + if (previousRect == null) { + return rect; + } + + return { + top: previousRect.top + rect.top, + left: previousRect.left + rect.left, + width: previousRect.width, + height: previousRect.height, + bottom: previousRect.bottom + rect.bottom, + right: previousRect.right + rect.right + }; + }); + } + + // Calculate a boundingClientRect for a node relative to boundaryWindow, + // taking into account any offsets caused by intermediate iframes. + function getNestedBoundingClientRect(node, boundaryWindow) { + var ownerIframe = getOwnerIframe(node); + if (ownerIframe && ownerIframe !== boundaryWindow) { + var rects = [node.getBoundingClientRect()]; + var currentIframe = ownerIframe; + var onlyOneMore = false; + while (currentIframe) { + var rect = getBoundingClientRectWithBorderOffset(currentIframe); + rects.push(rect); + currentIframe = getOwnerIframe(currentIframe); + + if (onlyOneMore) { + break; + } + // We don't want to calculate iframe offsets upwards beyond + // the iframe containing the boundaryWindow, but we + // need to calculate the offset relative to the boundaryWindow. + if (currentIframe && getOwnerWindow(currentIframe) === boundaryWindow) { + onlyOneMore = true; + } + } + + return mergeRectOffsets(rects); + } else { + return node.getBoundingClientRect(); + } + } + + function boxWrap(dims, what, node) { + assign(node.style, { + borderTopWidth: dims[what + 'Top'] + 'px', + borderLeftWidth: dims[what + 'Left'] + 'px', + borderRightWidth: dims[what + 'Right'] + 'px', + borderBottomWidth: dims[what + 'Bottom'] + 'px', + borderStyle: 'solid' + }); + } + + var overlayStyles = { + background: 'rgba(120, 170, 210, 0.7)', + padding: 'rgba(77, 200, 0, 0.3)', + margin: 'rgba(255, 155, 0, 0.3)', + border: 'rgba(255, 200, 50, 0.3)' + }; + + module.exports = Overlay; + +/***/ }, +/* 64 */ +/***/ function(module, exports) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + module.exports = { + monospace: { + family: 'Menlo, Consolas, monospace', + sizes: { + normal: 11, + large: 14 + } + }, + sansSerif: { + family: '"Helvetica Neue", "Lucida Grande", -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, sans-serif', + sizes: { + small: 10, + normal: 12, + large: 14 + } + } + }; + +/***/ }, +/* 65 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var assign = __webpack_require__(7); + + var MultiOverlay = function () { + function MultiOverlay(window) { + _classCallCheck(this, MultiOverlay); + + this.win = window; + var doc = window.document; + this.container = doc.createElement('div'); + doc.body.appendChild(this.container); + this._currentNodes = null; + } + + _createClass(MultiOverlay, [{ + key: 'highlightMany', + value: function highlightMany(nodes) { + var _this = this; + + this._currentNodes = nodes; + this.container.innerHTML = ''; + + nodes.forEach(function (node) { + var div = _this.win.document.createElement('div'); + if (typeof node.getBoundingClientRect !== 'function') { + return; + } + var box = node.getBoundingClientRect(); + if (box.bottom < 0 || box.top > window.innerHeight) { + return; + } + assign(div.style, { + top: box.top + 'px', + left: box.left + 'px', + width: box.width + 'px', + height: box.height + 'px', + border: '2px dotted rgba(200, 100, 100, .8)', + boxSizing: 'border-box', + backgroundColor: 'rgba(200, 100, 100, .2)', + position: 'fixed', + zIndex: 10000000, + pointerEvents: 'none' + }); + _this.container.appendChild(div); + }); + } + }, { + key: 'refresh', + value: function refresh() { + if (this._currentNodes) { + this.highlightMany(this._currentNodes); + } + } + }, { + key: 'remove', + value: function remove() { + if (this.container.parentNode) { + this.container.parentNode.removeChild(this.container); + this._currentNodes = null; + } + } + }]); + + return MultiOverlay; + }(); + + module.exports = MultiOverlay; + +/***/ }, +/* 66 */ +/***/ function(module, exports) { + + /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + function decorate(obj, attr, fn) { + var old = obj[attr]; + obj[attr] = function () { + var res = old.apply(this, arguments); + fn.apply(this, arguments); + return res; + }; + return function () { + obj[attr] = old; + }; + } + + var subscriptionEnabled = false; + + module.exports = function (bridge, agent, hook) { + var shouldEnable = !!hook._relayInternals; + + bridge.onCall('relay:check', function () { + return shouldEnable; + }); + if (!shouldEnable) { + return; + } + var _hook$_relayInternals = hook._relayInternals, + DefaultStoreData = _hook$_relayInternals.DefaultStoreData, + setRequestListener = _hook$_relayInternals.setRequestListener; + + + function sendStoreData() { + if (subscriptionEnabled) { + bridge.send('relay:store', { + id: 'relay:store', + nodes: DefaultStoreData.getNodeData() + }); + } + } + + bridge.onCall('relay:store:enable', function () { + subscriptionEnabled = true; + sendStoreData(); + }); + + bridge.onCall('relay:store:disable', function () { + subscriptionEnabled = false; + }); + + sendStoreData(); + decorate(DefaultStoreData, 'handleUpdatePayload', sendStoreData); + decorate(DefaultStoreData, 'handleQueryPayload', sendStoreData); + + var removeListener = setRequestListener(function (event, data) { + bridge.send(event, data); + }); + hook.on('shutdown', removeListener); + }; + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/dev/react-dev-tools/build/background.js b/dev/react-dev-tools/build/background.js new file mode 100644 index 00000000..69e1cf8a --- /dev/null +++ b/dev/react-dev-tools/build/background.js @@ -0,0 +1,70 @@ +!function(modules) { + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + exports: {}, + id: moduleId, + loaded: !1 + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.loaded = !0, module.exports; + } + var installedModules = {}; + return __webpack_require__.m = modules, __webpack_require__.c = installedModules, + __webpack_require__.p = "", __webpack_require__(0); +}([ function(module, exports) { + "use strict"; + function isNumeric(str) { + return +str + "" === str; + } + function installContentScript(tabId) { + chrome.tabs.executeScript(tabId, { + file: "/build/contentScript.js" + }, function() {}); + } + function doublePipe(one, two) { + function lOne(message) { + two.postMessage(message); + } + function lTwo(message) { + one.postMessage(message); + } + function shutdown() { + one.onMessage.removeListener(lOne), two.onMessage.removeListener(lTwo), one.disconnect(), + two.disconnect(); + } + one.onMessage.addListener(lOne), two.onMessage.addListener(lTwo), one.onDisconnect.addListener(shutdown), + two.onDisconnect.addListener(shutdown); + } + function setIconAndPopup(reactBuildType, tabId) { + chrome.browserAction.setIcon({ + tabId: tabId, + path: { + "16": "icons/16-" + reactBuildType + ".png", + "32": "icons/32-" + reactBuildType + ".png", + "48": "icons/48-" + reactBuildType + ".png", + "128": "icons/128-" + reactBuildType + ".png" + } + }), chrome.browserAction.setPopup({ + tabId: tabId, + popup: "popups/" + reactBuildType + ".html" + }); + } + var ports = {}, IS_FIREFOX = navigator.userAgent.indexOf("Firefox") >= 0; + chrome.runtime.onConnect.addListener(function(port) { + var tab = null, name = null; + isNumeric(port.name) ? (tab = port.name, name = "devtools", installContentScript(+port.name)) : (tab = port.sender.tab.id, + name = "content-script"), ports[tab] || (ports[tab] = { + devtools: null, + "content-script": null + }), ports[tab][name] = port, ports[tab].devtools && ports[tab]["content-script"] && doublePipe(ports[tab].devtools, ports[tab]["content-script"]); + }), IS_FIREFOX && chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { + tab.active && "loading" === changeInfo.status && setIconAndPopup("disabled", tabId); + }), chrome.runtime.onMessage.addListener(function(req, sender) { + if (req.hasDetectedReact && sender.tab) { + var reactBuildType = req.reactBuildType; + sender.url.indexOf("facebook.github.io/react") !== -1 && (reactBuildType = "production"), + setIconAndPopup(reactBuildType, sender.tab.id); + } + }); +} ]); \ No newline at end of file diff --git a/dev/react-dev-tools/build/contentScript.js b/dev/react-dev-tools/build/contentScript.js new file mode 100644 index 00000000..56ff9a3e --- /dev/null +++ b/dev/react-dev-tools/build/contentScript.js @@ -0,0 +1,43 @@ +!function(modules) { + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + exports: {}, + id: moduleId, + loaded: !1 + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.loaded = !0, module.exports; + } + var installedModules = {}; + return __webpack_require__.m = modules, __webpack_require__.c = installedModules, + __webpack_require__.p = "", __webpack_require__(0); +}([ function(module, exports) { + "use strict"; + function handleMessageFromDevtools(message) { + window.postMessage({ + source: "react-devtools-content-script", + payload: message + }, "*"); + } + function handleMessageFromPage(evt) { + evt.source === window && evt.data && "react-devtools-bridge" === evt.data.source && port.postMessage(evt.data.payload); + } + function handleDisconnect() { + window.removeEventListener("message", handleMessageFromPage), window.postMessage({ + source: "react-devtools-content-script", + payload: { + type: "event", + evt: "shutdown" + } + }, "*"); + } + var port = chrome.runtime.connect({ + name: "content-script" + }); + port.onMessage.addListener(handleMessageFromDevtools), port.onDisconnect.addListener(handleDisconnect), + window.addEventListener("message", handleMessageFromPage), window.postMessage({ + source: "react-devtools-content-script", + hello: !0 + }, "*"); +} ]); \ No newline at end of file diff --git a/dev/react-dev-tools/build/inject.js b/dev/react-dev-tools/build/inject.js new file mode 100644 index 00000000..357b1b19 --- /dev/null +++ b/dev/react-dev-tools/build/inject.js @@ -0,0 +1,202 @@ +!function(modules) { + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + exports: {}, + id: moduleId, + loaded: !1 + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.loaded = !0, module.exports; + } + var installedModules = {}; + return __webpack_require__.m = modules, __webpack_require__.c = installedModules, + __webpack_require__.p = "", __webpack_require__(0); +}([ function(module, exports, __webpack_require__) { + "use strict"; + var lastDetectionResult, installGlobalHook = __webpack_require__(1), installRelayHook = __webpack_require__(2), nullthrows = __webpack_require__(3)["default"]; + window.addEventListener("message", function(evt) { + evt.source === window && evt.data && "react-devtools-detector" === evt.data.source && (lastDetectionResult = { + hasDetectedReact: !0, + reactBuildType: evt.data.reactBuildType + }, chrome.runtime.sendMessage(lastDetectionResult)); + }), window.addEventListener("pageshow", function(evt) { + lastDetectionResult && evt.target === window.document && chrome.runtime.sendMessage(lastDetectionResult); + }); + var detectReact = "\nwindow.__REACT_DEVTOOLS_GLOBAL_HOOK__.on('renderer', function(evt) {\n window.postMessage({\n source: 'react-devtools-detector',\n reactBuildType: evt.reactBuildType,\n }, '*');\n});\n", saveNativeValues = "\nwindow.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeObjectCreate = Object.create;\nwindow.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeMap = Map;\nwindow.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeWeakMap = WeakMap;\nwindow.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeSet = Set;\n", js = ";(" + installGlobalHook.toString() + "(window));(" + installRelayHook.toString() + "(window))" + saveNativeValues + detectReact, script = document.createElement("script"); + script.textContent = js, nullthrows(document.documentElement).appendChild(script), + nullthrows(script.parentNode).removeChild(script); +}, function(module, exports) { + "use strict"; + function installGlobalHook(window) { + function detectReactBuildType(renderer) { + try { + if ("string" == typeof renderer.version) return renderer.bundleType > 0 ? "development" : "production"; + var toString = Function.prototype.toString; + if (renderer.Mount && renderer.Mount._renderNewRootComponent) { + var renderRootCode = toString.call(renderer.Mount._renderNewRootComponent); + return 0 !== renderRootCode.indexOf("function") ? "production" : renderRootCode.indexOf("storedMeasure") !== -1 ? "development" : renderRootCode.indexOf("should be a pure function") !== -1 ? renderRootCode.indexOf("NODE_ENV") !== -1 ? "development" : renderRootCode.indexOf("development") !== -1 ? "development" : renderRootCode.indexOf("true") !== -1 ? "development" : renderRootCode.indexOf("nextElement") !== -1 || renderRootCode.indexOf("nextComponent") !== -1 ? "unminified" : "development" : renderRootCode.indexOf("nextElement") !== -1 || renderRootCode.indexOf("nextComponent") !== -1 ? "unminified" : renderRootCode.indexOf("._registerComponent") !== -1 ? "outdated" : "production"; + } + } catch (err) {} + return "production"; + } + if (!window.__REACT_DEVTOOLS_GLOBAL_HOOK__) { + var hasDetectedBadDCE = !1, hook = { + _renderers: {}, + helpers: {}, + checkDCE: function(fn) { + try { + var toString = Function.prototype.toString, code = toString.call(fn); + code.indexOf("^_^") > -1 && (hasDetectedBadDCE = !0, setTimeout(function() { + throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://fb.me/react-perf-use-the-production-build"); + })); + } catch (err) {} + }, + inject: function(renderer) { + var id = Math.random().toString(16).slice(2); + hook._renderers[id] = renderer; + var reactBuildType = hasDetectedBadDCE ? "deadcode" : detectReactBuildType(renderer); + return hook.emit("renderer", { + id: id, + renderer: renderer, + reactBuildType: reactBuildType + }), id; + }, + _listeners: {}, + sub: function(evt, fn) { + return hook.on(evt, fn), function() { + return hook.off(evt, fn); + }; + }, + on: function(evt, fn) { + hook._listeners[evt] || (hook._listeners[evt] = []), hook._listeners[evt].push(fn); + }, + off: function(evt, fn) { + if (hook._listeners[evt]) { + var ix = hook._listeners[evt].indexOf(fn); + ix !== -1 && hook._listeners[evt].splice(ix, 1), hook._listeners[evt].length || (hook._listeners[evt] = null); + } + }, + emit: function(evt, data) { + hook._listeners[evt] && hook._listeners[evt].map(function(fn) { + return fn(data); + }); + }, + supportsFiber: !0, + _fiberRoots: {}, + getFiberRoots: function(rendererID) { + var roots = hook._fiberRoots; + return roots[rendererID] || (roots[rendererID] = new Set()), roots[rendererID]; + }, + onCommitFiberUnmount: function(rendererID, fiber) { + hook.helpers[rendererID] && hook.helpers[rendererID].handleCommitFiberUnmount(fiber); + }, + onCommitFiberRoot: function(rendererID, root) { + var mountedRoots = hook.getFiberRoots(rendererID), current = root.current, isKnownRoot = mountedRoots.has(root), isUnmounting = null == current.memoizedState || null == current.memoizedState.element; + isKnownRoot || isUnmounting ? isKnownRoot && isUnmounting && mountedRoots["delete"](root) : mountedRoots.add(root), + hook.helpers[rendererID] && hook.helpers[rendererID].handleCommitFiberRoot(root); + } + }; + Object.defineProperty(window, "__REACT_DEVTOOLS_GLOBAL_HOOK__", { + value: hook + }); + } + } + module.exports = installGlobalHook; +}, function(module, exports) { + "use strict"; + function installRelayHook(window) { + function decorate(obj, attr, fn) { + var old = obj[attr]; + obj[attr] = function() { + var res = old.apply(this, arguments); + return fn.apply(this, arguments), res; + }; + } + function emit(name, data) { + _eventQueue.push({ + name: name, + data: data + }), _listener && _listener(name, data); + } + function setRequestListener(listener) { + if (_listener) throw new Error("Relay Devtools: Called only call setRequestListener once."); + return _listener = listener, _eventQueue.forEach(function(_ref) { + var name = _ref.name, data = _ref.data; + listener(name, data); + }), function() { + _listener = null; + }; + } + function recordRequest(type, start, request, requestNumber) { + var id = Math.random().toString(16).substr(2); + request.then(function(response) { + emit("relay:success", { + id: id, + end: performanceNow(), + response: response.response + }); + }, function(error) { + emit("relay:failure", { + id: id, + end: performanceNow(), + error: error + }); + }); + for (var textChunks = [], text = request.getQueryString(); text.length > 0; ) textChunks.push(text.substr(0, TEXT_CHUNK_LENGTH)), + text = text.substr(TEXT_CHUNK_LENGTH); + return { + id: id, + name: request.getDebugName(), + requestNumber: requestNumber, + start: start, + text: textChunks, + type: type, + variables: request.getVariables() + }; + } + function instrumentRelayRequests(relayInternals) { + var NetworkLayer = relayInternals.NetworkLayer; + decorate(NetworkLayer, "sendMutation", function(mutation) { + requestNumber++, emit("relay:pending", [ recordRequest("mutation", performanceNow(), mutation, requestNumber) ]); + }), decorate(NetworkLayer, "sendQueries", function(queries) { + requestNumber++; + var start = performanceNow(); + emit("relay:pending", queries.map(function(query) { + return recordRequest("query", start, query, requestNumber); + })); + }); + var instrumented = {}; + for (var key in relayInternals) relayInternals.hasOwnProperty(key) && (instrumented[key] = relayInternals[key]); + return instrumented.setRequestListener = setRequestListener, instrumented; + } + var performanceNow, performance = window.performance; + performanceNow = performance && "function" == typeof performance.now ? function() { + return performance.now(); + } : function() { + return Date.now(); + }; + var TEXT_CHUNK_LENGTH = 500, hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__; + if (hook) { + var _eventQueue = [], _listener = null, requestNumber = 0, _relayInternals = null; + Object.defineProperty(hook, "_relayInternals", { + configurable: !0, + set: function(relayInternals) { + _relayInternals = instrumentRelayRequests(relayInternals); + }, + get: function() { + return _relayInternals; + } + }); + } + } + module.exports = installRelayHook; +}, function(module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports["default"] = function(x) { + if (null != x) return x; + throw new Error("Got unexpected null or undefined"); + }; +} ]); \ No newline at end of file diff --git a/dev/react-dev-tools/build/main.js b/dev/react-dev-tools/build/main.js new file mode 100644 index 00000000..3cc41232 --- /dev/null +++ b/dev/react-dev-tools/build/main.js @@ -0,0 +1,38 @@ +!function(modules) { + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + exports: {}, + id: moduleId, + loaded: !1 + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.loaded = !0, module.exports; + } + var installedModules = {}; + return __webpack_require__.m = modules, __webpack_require__.c = installedModules, + __webpack_require__.p = "", __webpack_require__(0); +}([ function(module, exports) { + "use strict"; + function createPanelIfReactLoaded() { + panelCreated || chrome.devtools.inspectedWindow.eval("!!(\n (window.__REACT_DEVTOOLS_GLOBAL_HOOK__ && Object.keys(window.__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers).length) || window.React\n )", function(pageHasReact, err) { + pageHasReact && !panelCreated && (clearInterval(loadCheckInterval), panelCreated = !0, + chrome.devtools.panels.create("React", "", "panel.html", function(panel) { + var reactPanel = null; + panel.onShown.addListener(function(window) { + window.panel.getNewSelection(), reactPanel = window.panel, reactPanel.resumeTransfer(); + }), panel.onHidden.addListener(function() { + reactPanel && (reactPanel.hideHighlight(), reactPanel.pauseTransfer()); + }); + })); + }); + } + var panelCreated = !1; + chrome.devtools.network.onNavigated.addListener(function() { + createPanelIfReactLoaded(); + }); + var loadCheckInterval = setInterval(function() { + createPanelIfReactLoaded(); + }, 1e3); + createPanelIfReactLoaded(); +} ]); \ No newline at end of file diff --git a/dev/react-dev-tools/build/panel.js b/dev/react-dev-tools/build/panel.js new file mode 100644 index 00000000..146948bf --- /dev/null +++ b/dev/react-dev-tools/build/panel.js @@ -0,0 +1,24953 @@ +!function(modules) { + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) return installedModules[moduleId].exports; + var module = installedModules[moduleId] = { + exports: {}, + id: moduleId, + loaded: !1 + }; + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.loaded = !0, module.exports; + } + var installedModules = {}; + return __webpack_require__.m = modules, __webpack_require__.c = installedModules, + __webpack_require__.p = "", __webpack_require__(0); +}([ function(module, exports, __webpack_require__) { + "use strict"; + function reload() { + setTimeout(function() { + ReactDOM.unmountComponentAtNode(node), node.innerHTML = "", ReactDOM.render(React.createElement(Panel, config), node); + }, 100); + } + var checkForReact = __webpack_require__(4), _inject = __webpack_require__(5), IS_CHROME = navigator.userAgent.indexOf("Firefox") < 0, browserName = void 0, themeName = void 0; + if (IS_CHROME) browserName = "Chrome", themeName = "dark" === chrome.devtools.panels.themeName ? "ChromeDark" : "ChromeDefault"; else if (browserName = "Firefox", + themeName = "FirefoxLight", chrome.devtools && chrome.devtools.panels) switch (chrome.devtools.panels.themeName) { + case "dark": + themeName = "FirefoxDark"; + break; + + case "firebug": + themeName = "FirefoxFirebug"; + } + var config = { + alreadyFoundReact: !1, + browserName: browserName, + checkForReact: checkForReact, + reload: reload, + themeName: themeName, + reloadSubscribe: function(reloadFn) { + return chrome.devtools.network.onNavigated.addListener(reloadFn), function() { + chrome.devtools.network.onNavigated.removeListener(reloadFn); + }; + }, + getNewSelection: function(bridge) { + chrome.devtools.inspectedWindow.eval("window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0 = $0"), + bridge.send("checkSelection"); + }, + selectElement: function(id, bridge) { + bridge.send("putSelectedNode", id), setTimeout(function() { + chrome.devtools.inspectedWindow.eval("inspect(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$node)"); + }, 100); + }, + showComponentSource: function(globalPathToInst, globalPathToType) { + var code = "\n if (\n window." + globalPathToType + " &&\n window." + globalPathToType + ".prototype &&\n window." + globalPathToType + ".prototype.isReactComponent\n ) {\n inspect(window." + globalPathToInst + ".render);\n } else {\n inspect(window." + globalPathToType + ");\n }\n "; + chrome.devtools.inspectedWindow.eval(code, function(res, err) { + err && console.error("Failed to inspect component", err); + }); + }, + showAttrSource: function(path) { + var attrs = "[" + path.map(function(m) { + return JSON.stringify(m); + }).join("][") + "]", code = "inspect(window.$r" + attrs + ")"; + chrome.devtools.inspectedWindow.eval(code, function(res, err) { + err && console.error("Failed to inspect source", err); + }); + }, + executeFn: function(path) { + var attrs = "[" + path.map(function(m) { + return JSON.stringify(m); + }).join("][") + "]", code = "window.$r" + attrs + "()"; + chrome.devtools.inspectedWindow.eval(code, function(res, err) { + err && console.error("Failed to call function", err); + }); + }, + inject: function(done) { + _inject(chrome.runtime.getURL("build/backend.js"), function() { + var port = chrome.runtime.connect({ + name: "" + chrome.devtools.inspectedWindow.tabId + }), disconnected = !1, wall = { + listen: function(fn) { + port.onMessage.addListener(function(message) { + return fn(message); + }); + }, + send: function(data) { + disconnected || port.postMessage(data); + } + }; + port.onDisconnect.addListener(function() { + disconnected = !0; + }), done(wall, function() { + return port.disconnect(); + }); + }); + } + }, Panel = __webpack_require__(6), React = __webpack_require__(7), ReactDOM = __webpack_require__(45), nullthrows = __webpack_require__(3)["default"], node = nullthrows(document.getElementById("container")); + ReactDOM.render(React.createElement(Panel, config), node); +}, , , function(module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports["default"] = function(x) { + if (null != x) return x; + throw new Error("Got unexpected null or undefined"); + }; +}, function(module, exports) { + "use strict"; + module.exports = function(done) { + chrome.devtools.inspectedWindow.eval("!!(\n (window.__REACT_DEVTOOLS_GLOBAL_HOOK__ && Object.keys(window.__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers).length) || window.React || (window.require && (require('react') || require('React')))\n )", function(pageHasReact, err) { + done(pageHasReact); + }); + }; +}, function(module, exports) { + "use strict"; + module.exports = function(scriptName, done) { + var src = "\n // the prototype stuff is in case document.createElement has been modified\n (function () {\n var script = document.constructor.prototype.createElement.call(document, 'script');\n script.src = \"" + scriptName + '";\n script.charset = "utf-8";\n document.documentElement.appendChild(script);\n script.parentNode.removeChild(script);\n })()\n '; + chrome.devtools.inspectedWindow.eval(src, function(res, err) { + err && console.log(err), done(); + }); + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + return arr2; + } + return Array.from(arr); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), Container = __webpack_require__(34), Store = __webpack_require__(480), keyboardNav = __webpack_require__(485), invariant = __webpack_require__(215), assign = __webpack_require__(38), Bridge = __webpack_require__(487), _require = __webpack_require__(36), sansSerif = _require.sansSerif, NativeStyler = __webpack_require__(494), RelayPlugin = __webpack_require__(498), Themes = __webpack_require__(474), ThemeStore = __webpack_require__(484), consts = __webpack_require__(189), Panel = function(_React$Component) { + function Panel(props) { + _classCallCheck(this, Panel); + var _this = _possibleConstructorReturn(this, (Panel.__proto__ || Object.getPrototypeOf(Panel)).call(this, props)); + return _this.state = { + loading: !0, + preferencesPanelShown: !1, + isReact: props.alreadyFoundReact, + themeKey: 0, + themeName: props.themeName + }, _this._unMounted = !1, window.panel = _this, _this.plugins = [], _this; + } + return _inherits(Panel, _React$Component), _createClass(Panel, [ { + key: "getChildContext", + value: function() { + return { + browserName: this.props.browserName || "", + defaultThemeName: this._themeStore && this._themeStore.defaultThemeName || "", + showHiddenThemes: !!this.props.showHiddenThemes, + showInspectButton: this.props.showInspectButton !== !1, + store: this._store, + theme: this._themeStore && this._themeStore.theme || Themes.ChromeDefault, + themeName: this._themeStore && this._themeStore.themeName || "", + themes: this._themeStore && this._themeStore.themes || {} + }; + } + }, { + key: "componentDidMount", + value: function() { + var _this2 = this; + this.props.alreadyFoundReact ? this.inject() : this.lookForReact(), this.props.reloadSubscribe && (this._unsub = this.props.reloadSubscribe(function() { + return _this2.reload(); + })); + } + }, { + key: "componentWillUnmount", + value: function() { + this._unMounted = !0, this._unsub && this._unsub(), this.teardown(); + } + }, { + key: "pauseTransfer", + value: function() { + this._bridge && this._bridge.pause(); + } + }, { + key: "resumeTransfer", + value: function() { + this._bridge && this._bridge.resume(); + } + }, { + key: "reload", + value: function() { + this._unsub && this._unsub(), this.teardown(), this._unMounted || this.setState({ + loading: !0 + }, this.props.reload); + } + }, { + key: "getNewSelection", + value: function() { + this._bridge && this.props.getNewSelection && this.props.getNewSelection(this._bridge); + } + }, { + key: "hideHighlight", + value: function() { + this._store.hideHighlight(); + } + }, { + key: "sendSelection", + value: function(id) { + this._bridge && (id || this._store.selected) && (invariant(this.props.selectElement, "cannot send selection if props.selectElement is not defined"), + this.props.selectElement(id || this._store.selected, this._bridge)); + } + }, { + key: "viewComponentSource", + value: function(id) { + var _this3 = this; + this._bridge && (this._bridge.send("putSelectedInstance", id), setTimeout(function() { + invariant(_this3.props.showComponentSource, "cannot view source if props.showComponentSource is not supplied"), + _this3.props.showComponentSource("__REACT_DEVTOOLS_GLOBAL_HOOK__.$inst", "__REACT_DEVTOOLS_GLOBAL_HOOK__.$type"); + }, 100)); + } + }, { + key: "viewElementSource", + value: function(id, source) { + var _this4 = this; + this._bridge && (this._bridge.send("putSelectedInstance", id), setTimeout(function() { + invariant(_this4.props.showElementSource, "cannot view source if props.showElementSource is not supplied"), + _this4.props.showElementSource(source); + }, 100)); + } + }, { + key: "teardown", + value: function() { + this.plugins.forEach(function(p) { + return p.teardown(); + }), this.plugins = [], this._keyListener && (window.removeEventListener("keydown", this._keyListener), + this._keyListener = null), this._bridge && this._bridge.send("shutdown"), this._teardownWall && (this._teardownWall(), + this._teardownWall = null); + } + }, { + key: "inject", + value: function() { + var _this5 = this; + this.props.inject(function(wall, teardown) { + _this5._teardownWall = teardown, _this5._bridge = new Bridge(wall), _this5._themeStore = new ThemeStore(_this5.state.themeName), + _this5._store = new Store(_this5._bridge, _this5._themeStore); + var refresh = function() { + return _this5.forceUpdate(); + }; + _this5.plugins = [ new RelayPlugin(_this5._store, _this5._bridge, refresh) ], _this5._keyListener = keyboardNav(_this5._store, window), + window.addEventListener("keydown", _this5._keyListener), _this5._store.on("connected", function() { + _this5.setState({ + loading: !1, + themeName: _this5._themeStore.themeName + }), _this5.getNewSelection(); + }), _this5._store.on("preferencesPanelShown", function() { + _this5.setState({ + preferencesPanelShown: _this5._store.preferencesPanelShown + }); + }), _this5._store.on("theme", function() { + _this5.setState(function(state) { + return { + themeKey: state.themeKey + 1, + themeName: _this5._themeStore.theme.displayName + }; + }); + }); + }); + } + }, { + key: "componentDidUpdate", + value: function() { + var _this6 = this; + this.state.isReact || this._checkTimeout || (this._checkTimeout = setTimeout(function() { + _this6._checkTimeout = null, _this6.lookForReact(); + }, 200)); + } + }, { + key: "lookForReact", + value: function() { + var _this7 = this; + "function" == typeof this.props.checkForReact && this.props.checkForReact(function(isReact) { + isReact ? (_this7.setState({ + isReact: !0, + loading: !0 + }), _this7.inject()) : (console.log("still looking..."), _this7.setState({ + isReact: !1, + loading: !1 + })); + }); + } + }, { + key: "render", + value: function() { + var _ref, _this8 = this, theme = this._store ? this._themeStore.theme : Themes.ChromeDefault; + if (this.state.loading) return React.createElement("div", { + style: loadingStyle(theme) + }, React.createElement("h2", null, "Connecting to React…")); + if (!this.state.isReact) return React.createElement("div", { + style: loadingStyle(theme) + }, React.createElement("h2", null, "Looking for React…")); + var extraTabs = assign.apply(null, [ {} ].concat(this.plugins.map(function(p) { + return p.tabs(); + }))), extraPanes = (_ref = []).concat.apply(_ref, _toConsumableArray(this.plugins.map(function(p) { + return p.panes(); + }))); + return this._store.capabilities.rnStyle && extraPanes.push(panelRNStyle(this._bridge, this._store.capabilities.rnStyleMeasure, theme)), + React.createElement(Container, { + key: this.state.themeKey, + reload: this.props.reload && this.reload.bind(this), + menuItems: { + attr: function(id, node, val, path) { + if (val && "Composite" === node.get("nodeType") && "function" === val[consts.type]) return [ _this8.props.showAttrSource && { + key: "showSource", + title: "Show function source", + action: function() { + return _this8.props.showAttrSource(path); + } + }, _this8.props.executeFn && { + key: "executeFunction", + title: "Execute function", + action: function() { + return _this8.props.executeFn(path); + } + } ]; + }, + tree: function(id, node) { + return [ _this8.props.selectElement && _this8._store.capabilities.dom && { + key: "findDOMNode", + title: "Find the DOM node", + action: function() { + return _this8.sendSelection(id); + } + }, _this8.props.showComponentSource && "Composite" === node.get("nodeType") && { + key: "showComponentSource", + title: "Show " + node.get("name") + " source", + action: function() { + return _this8.viewComponentSource(id); + } + }, _this8.props.showElementSource && node.get("source") && { + key: "showElementSource", + title: "Show <" + node.get("name") + " /> in source", + action: function() { + return _this8.viewElementSource(id, node.get("source")); + } + } ]; + } + }, + extraPanes: extraPanes, + extraTabs: extraTabs, + preferencesPanelShown: this.state.preferencesPanelShown, + theme: theme, + onViewElementSource: this.props.showElementSource ? this.viewElementSource.bind(this) : null + }); + } + } ]), Panel; + }(React.Component); + Panel.childContextTypes = { + browserName: React.PropTypes.string.isRequired, + defaultThemeName: React.PropTypes.string.isRequired, + showHiddenThemes: React.PropTypes.bool.isRequired, + showInspectButton: React.PropTypes.bool.isRequired, + store: React.PropTypes.object, + theme: React.PropTypes.object.isRequired, + themeName: React.PropTypes.string.isRequired, + themes: React.PropTypes.object.isRequired + }; + var panelRNStyle = function(bridge, supportsMeasure, theme) { + return function(node, id) { + var props = node.get("props"); + return props && props.style ? React.createElement("div", { + key: "rnstyle", + style: containerStyle(theme) + }, React.createElement("strong", null, "React Native Style Editor"), React.createElement(NativeStyler, { + id: id, + bridge: bridge, + supportsMeasure: supportsMeasure + })) : React.createElement("div", { + key: "rnstyle", + style: containerStyle(theme) + }, React.createElement("strong", null, "No style")); + }; + }, containerStyle = function(theme) { + return { + borderTop: "1px solid " + theme.base01, + padding: "0.25rem", + marginBottom: "0.25rem", + flexShrink: 0 + }; + }, loadingStyle = function(theme) { + return { + fontFamily: sansSerif.family, + fontSize: sansSerif.sizes.large, + textAlign: "center", + padding: 30, + flex: 1, + color: "#aaa" + }; + }; + module.exports = Panel; +}, function(module, exports, __webpack_require__) { + "use strict"; + module.exports = __webpack_require__(8); +}, function(module, exports, __webpack_require__) { + "use strict"; + var _assign = __webpack_require__(9), ReactChildren = __webpack_require__(10), ReactComponent = __webpack_require__(23), ReactPureComponent = __webpack_require__(26), ReactClass = __webpack_require__(27), ReactDOMFactories = __webpack_require__(29), ReactElement = __webpack_require__(14), ReactPropTypes = __webpack_require__(30), ReactVersion = __webpack_require__(32), onlyChild = __webpack_require__(33), createElement = (__webpack_require__(16), + ReactElement.createElement), createFactory = ReactElement.createFactory, cloneElement = ReactElement.cloneElement, __spread = _assign, React = { + Children: { + map: ReactChildren.map, + forEach: ReactChildren.forEach, + count: ReactChildren.count, + toArray: ReactChildren.toArray, + only: onlyChild + }, + Component: ReactComponent, + PureComponent: ReactPureComponent, + createElement: createElement, + cloneElement: cloneElement, + isValidElement: ReactElement.isValidElement, + PropTypes: ReactPropTypes, + createClass: ReactClass.createClass, + createFactory: createFactory, + createMixin: function(mixin) { + return mixin; + }, + DOM: ReactDOMFactories, + version: ReactVersion, + __spread: __spread + }; + module.exports = React; +}, function(module, exports) { + /* + object-assign + (c) Sindre Sorhus + @license MIT + */ + "use strict"; + function toObject(val) { + if (null === val || void 0 === val) throw new TypeError("Object.assign cannot be called with null or undefined"); + return Object(val); + } + function shouldUseNative() { + try { + if (!Object.assign) return !1; + var test1 = new String("abc"); + if (test1[5] = "de", "5" === Object.getOwnPropertyNames(test1)[0]) return !1; + for (var test2 = {}, i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i; + var order2 = Object.getOwnPropertyNames(test2).map(function(n) { + return test2[n]; + }); + if ("0123456789" !== order2.join("")) return !1; + var test3 = {}; + return "abcdefghijklmnopqrst".split("").forEach(function(letter) { + test3[letter] = letter; + }), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, test3)).join(""); + } catch (err) { + return !1; + } + } + var getOwnPropertySymbols = Object.getOwnPropertySymbols, hasOwnProperty = Object.prototype.hasOwnProperty, propIsEnumerable = Object.prototype.propertyIsEnumerable; + module.exports = shouldUseNative() ? Object.assign : function(target, source) { + for (var from, symbols, to = toObject(target), s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + for (var key in from) hasOwnProperty.call(from, key) && (to[key] = from[key]); + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) propIsEnumerable.call(from, symbols[i]) && (to[symbols[i]] = from[symbols[i]]); + } + } + return to; + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function escapeUserProvidedKey(text) { + return ("" + text).replace(userProvidedKeyEscapeRegex, "$&/"); + } + function ForEachBookKeeping(forEachFunction, forEachContext) { + this.func = forEachFunction, this.context = forEachContext, this.count = 0; + } + function forEachSingleChild(bookKeeping, child, name) { + var func = bookKeeping.func, context = bookKeeping.context; + func.call(context, child, bookKeeping.count++); + } + function forEachChildren(children, forEachFunc, forEachContext) { + if (null == children) return children; + var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext), ForEachBookKeeping.release(traverseContext); + } + function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) { + this.result = mapResult, this.keyPrefix = keyPrefix, this.func = mapFunction, this.context = mapContext, + this.count = 0; + } + function mapSingleChildIntoContext(bookKeeping, child, childKey) { + var result = bookKeeping.result, keyPrefix = bookKeeping.keyPrefix, func = bookKeeping.func, context = bookKeeping.context, mappedChild = func.call(context, child, bookKeeping.count++); + Array.isArray(mappedChild) ? mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument) : null != mappedChild && (ReactElement.isValidElement(mappedChild) && (mappedChild = ReactElement.cloneAndReplaceKey(mappedChild, keyPrefix + (!mappedChild.key || child && child.key === mappedChild.key ? "" : escapeUserProvidedKey(mappedChild.key) + "/") + childKey)), + result.push(mappedChild)); + } + function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) { + var escapedPrefix = ""; + null != prefix && (escapedPrefix = escapeUserProvidedKey(prefix) + "/"); + var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext), MapBookKeeping.release(traverseContext); + } + function mapChildren(children, func, context) { + if (null == children) return children; + var result = []; + return mapIntoWithKeyPrefixInternal(children, result, null, func, context), result; + } + function forEachSingleChildDummy(traverseContext, child, name) { + return null; + } + function countChildren(children, context) { + return traverseAllChildren(children, forEachSingleChildDummy, null); + } + function toArray(children) { + var result = []; + return mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument), + result; + } + var PooledClass = __webpack_require__(11), ReactElement = __webpack_require__(14), emptyFunction = __webpack_require__(17), traverseAllChildren = __webpack_require__(20), twoArgumentPooler = PooledClass.twoArgumentPooler, fourArgumentPooler = PooledClass.fourArgumentPooler, userProvidedKeyEscapeRegex = /\/+/g; + ForEachBookKeeping.prototype.destructor = function() { + this.func = null, this.context = null, this.count = 0; + }, PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler), MapBookKeeping.prototype.destructor = function() { + this.result = null, this.keyPrefix = null, this.func = null, this.context = null, + this.count = 0; + }, PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler); + var ReactChildren = { + forEach: forEachChildren, + map: mapChildren, + mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal, + count: countChildren, + toArray: toArray + }; + module.exports = ReactChildren; +}, function(module, exports, __webpack_require__) { + "use strict"; + var _prodInvariant = __webpack_require__(12), oneArgumentPooler = (__webpack_require__(13), + function(copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + return Klass.call(instance, copyFieldsFrom), instance; + } + return new Klass(copyFieldsFrom); + }), twoArgumentPooler = function(a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + return Klass.call(instance, a1, a2), instance; + } + return new Klass(a1, a2); + }, threeArgumentPooler = function(a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + return Klass.call(instance, a1, a2, a3), instance; + } + return new Klass(a1, a2, a3); + }, fourArgumentPooler = function(a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + return Klass.call(instance, a1, a2, a3, a4), instance; + } + return new Klass(a1, a2, a3, a4); + }, standardReleaser = function(instance) { + var Klass = this; + instance instanceof Klass ? void 0 : _prodInvariant("25"), instance.destructor(), + Klass.instancePool.length < Klass.poolSize && Klass.instancePool.push(instance); + }, DEFAULT_POOL_SIZE = 10, DEFAULT_POOLER = oneArgumentPooler, addPoolingTo = function(CopyConstructor, pooler) { + var NewKlass = CopyConstructor; + return NewKlass.instancePool = [], NewKlass.getPooled = pooler || DEFAULT_POOLER, + NewKlass.poolSize || (NewKlass.poolSize = DEFAULT_POOL_SIZE), NewKlass.release = standardReleaser, + NewKlass; + }, PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler + }; + module.exports = PooledClass; +}, function(module, exports) { + "use strict"; + function reactProdInvariant(code) { + for (var argCount = arguments.length - 1, message = "Minified React error #" + code + "; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=" + code, argIdx = 0; argIdx < argCount; argIdx++) message += "&args[]=" + encodeURIComponent(arguments[argIdx + 1]); + message += " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; + var error = new Error(message); + throw error.name = "Invariant Violation", error.framesToPop = 1, error; + } + module.exports = reactProdInvariant; +}, function(module, exports, __webpack_require__) { + "use strict"; + function invariant(condition, format, a, b, c, d, e, f) { + if (validateFormat(format), !condition) { + var error; + if (void 0 === format) error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else { + var args = [ a, b, c, d, e, f ], argIndex = 0; + error = new Error(format.replace(/%s/g, function() { + return args[argIndex++]; + })), error.name = "Invariant Violation"; + } + throw error.framesToPop = 1, error; + } + } + var validateFormat = function(format) {}; + module.exports = invariant; +}, function(module, exports, __webpack_require__) { + "use strict"; + function hasValidRef(config) { + return void 0 !== config.ref; + } + function hasValidKey(config) { + return void 0 !== config.key; + } + var _assign = __webpack_require__(9), ReactCurrentOwner = __webpack_require__(15), hasOwnProperty = (__webpack_require__(16), + __webpack_require__(18), Object.prototype.hasOwnProperty), REACT_ELEMENT_TYPE = __webpack_require__(19), RESERVED_PROPS = { + key: !0, + ref: !0, + __self: !0, + __source: !0 + }, ReactElement = function(type, key, ref, self, source, owner, props) { + var element = { + $$typeof: REACT_ELEMENT_TYPE, + type: type, + key: key, + ref: ref, + props: props, + _owner: owner + }; + return element; + }; + ReactElement.createElement = function(type, config, children) { + var propName, props = {}, key = null, ref = null, self = null, source = null; + if (null != config) { + hasValidRef(config) && (ref = config.ref), hasValidKey(config) && (key = "" + config.key), + self = void 0 === config.__self ? null : config.__self, source = void 0 === config.__source ? null : config.__source; + for (propName in config) hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName) && (props[propName] = config[propName]); + } + var childrenLength = arguments.length - 2; + if (1 === childrenLength) props.children = children; else if (childrenLength > 1) { + for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2]; + props.children = childArray; + } + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) void 0 === props[propName] && (props[propName] = defaultProps[propName]); + } + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); + }, ReactElement.createFactory = function(type) { + var factory = ReactElement.createElement.bind(null, type); + return factory.type = type, factory; + }, ReactElement.cloneAndReplaceKey = function(oldElement, newKey) { + var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + return newElement; + }, ReactElement.cloneElement = function(element, config, children) { + var propName, props = _assign({}, element.props), key = element.key, ref = element.ref, self = element._self, source = element._source, owner = element._owner; + if (null != config) { + hasValidRef(config) && (ref = config.ref, owner = ReactCurrentOwner.current), hasValidKey(config) && (key = "" + config.key); + var defaultProps; + element.type && element.type.defaultProps && (defaultProps = element.type.defaultProps); + for (propName in config) hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName) && (void 0 === config[propName] && void 0 !== defaultProps ? props[propName] = defaultProps[propName] : props[propName] = config[propName]); + } + var childrenLength = arguments.length - 2; + if (1 === childrenLength) props.children = children; else if (childrenLength > 1) { + for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2]; + props.children = childArray; + } + return ReactElement(element.type, key, ref, self, source, owner, props); + }, ReactElement.isValidElement = function(object) { + return "object" == typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE; + }, module.exports = ReactElement; +}, function(module, exports) { + "use strict"; + var ReactCurrentOwner = { + current: null + }; + module.exports = ReactCurrentOwner; +}, function(module, exports, __webpack_require__) { + "use strict"; + var emptyFunction = __webpack_require__(17), warning = emptyFunction; + module.exports = warning; +}, function(module, exports) { + "use strict"; + function makeEmptyFunction(arg) { + return function() { + return arg; + }; + } + var emptyFunction = function() {}; + emptyFunction.thatReturns = makeEmptyFunction, emptyFunction.thatReturnsFalse = makeEmptyFunction(!1), + emptyFunction.thatReturnsTrue = makeEmptyFunction(!0), emptyFunction.thatReturnsNull = makeEmptyFunction(null), + emptyFunction.thatReturnsThis = function() { + return this; + }, emptyFunction.thatReturnsArgument = function(arg) { + return arg; + }, module.exports = emptyFunction; +}, function(module, exports, __webpack_require__) { + "use strict"; + var canDefineProperty = !1; + module.exports = canDefineProperty; +}, function(module, exports) { + "use strict"; + var REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103; + module.exports = REACT_ELEMENT_TYPE; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getComponentKey(component, index) { + return component && "object" == typeof component && null != component.key ? KeyEscapeUtils.escape(component.key) : index.toString(36); + } + function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + if ("undefined" !== type && "boolean" !== type || (children = null), null === children || "string" === type || "number" === type || "object" === type && children.$$typeof === REACT_ELEMENT_TYPE) return callback(traverseContext, children, "" === nameSoFar ? SEPARATOR + getComponentKey(children, 0) : nameSoFar), + 1; + var child, nextName, subtreeCount = 0, nextNamePrefix = "" === nameSoFar ? SEPARATOR : nameSoFar + SUBSEPARATOR; + if (Array.isArray(children)) for (var i = 0; i < children.length; i++) child = children[i], + nextName = nextNamePrefix + getComponentKey(child, i), subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var step, iterator = iteratorFn.call(children); + if (iteratorFn !== children.entries) for (var ii = 0; !(step = iterator.next()).done; ) child = step.value, + nextName = nextNamePrefix + getComponentKey(child, ii++), subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); else for (;!(step = iterator.next()).done; ) { + var entry = step.value; + entry && (child = entry[1], nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0), + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext)); + } + } else if ("object" === type) { + var addendum = "", childrenString = String(children); + _prodInvariant("31", "[object Object]" === childrenString ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString, addendum); + } + } + return subtreeCount; + } + function traverseAllChildren(children, callback, traverseContext) { + return null == children ? 0 : traverseAllChildrenImpl(children, "", callback, traverseContext); + } + var _prodInvariant = __webpack_require__(12), REACT_ELEMENT_TYPE = (__webpack_require__(15), + __webpack_require__(19)), getIteratorFn = __webpack_require__(21), KeyEscapeUtils = (__webpack_require__(13), + __webpack_require__(22)), SEPARATOR = (__webpack_require__(16), "."), SUBSEPARATOR = ":"; + module.exports = traverseAllChildren; +}, function(module, exports) { + "use strict"; + function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if ("function" == typeof iteratorFn) return iteratorFn; + } + var ITERATOR_SYMBOL = "function" == typeof Symbol && Symbol.iterator, FAUX_ITERATOR_SYMBOL = "@@iterator"; + module.exports = getIteratorFn; +}, function(module, exports) { + "use strict"; + function escape(key) { + var escapeRegex = /[=:]/g, escaperLookup = { + "=": "=0", + ":": "=2" + }, escapedString = ("" + key).replace(escapeRegex, function(match) { + return escaperLookup[match]; + }); + return "$" + escapedString; + } + function unescape(key) { + var unescapeRegex = /(=0|=2)/g, unescaperLookup = { + "=0": "=", + "=2": ":" + }, keySubstring = "." === key[0] && "$" === key[1] ? key.substring(2) : key.substring(1); + return ("" + keySubstring).replace(unescapeRegex, function(match) { + return unescaperLookup[match]; + }); + } + var KeyEscapeUtils = { + escape: escape, + unescape: unescape + }; + module.exports = KeyEscapeUtils; +}, function(module, exports, __webpack_require__) { + "use strict"; + function ReactComponent(props, context, updater) { + this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue; + } + var _prodInvariant = __webpack_require__(12), ReactNoopUpdateQueue = __webpack_require__(24), emptyObject = (__webpack_require__(18), + __webpack_require__(25)); + __webpack_require__(13), __webpack_require__(16); + ReactComponent.prototype.isReactComponent = {}, ReactComponent.prototype.setState = function(partialState, callback) { + "object" != typeof partialState && "function" != typeof partialState && null != partialState ? _prodInvariant("85") : void 0, + this.updater.enqueueSetState(this, partialState), callback && this.updater.enqueueCallback(this, callback, "setState"); + }, ReactComponent.prototype.forceUpdate = function(callback) { + this.updater.enqueueForceUpdate(this), callback && this.updater.enqueueCallback(this, callback, "forceUpdate"); + }; + module.exports = ReactComponent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function warnNoop(publicInstance, callerName) { + } + var ReactNoopUpdateQueue = (__webpack_require__(16), { + isMounted: function(publicInstance) { + return !1; + }, + enqueueCallback: function(publicInstance, callback) {}, + enqueueForceUpdate: function(publicInstance) { + warnNoop(publicInstance, "forceUpdate"); + }, + enqueueReplaceState: function(publicInstance, completeState) { + warnNoop(publicInstance, "replaceState"); + }, + enqueueSetState: function(publicInstance, partialState) { + warnNoop(publicInstance, "setState"); + } + }); + module.exports = ReactNoopUpdateQueue; +}, function(module, exports, __webpack_require__) { + "use strict"; + var emptyObject = {}; + module.exports = emptyObject; +}, function(module, exports, __webpack_require__) { + "use strict"; + function ReactPureComponent(props, context, updater) { + this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue; + } + function ComponentDummy() {} + var _assign = __webpack_require__(9), ReactComponent = __webpack_require__(23), ReactNoopUpdateQueue = __webpack_require__(24), emptyObject = __webpack_require__(25); + ComponentDummy.prototype = ReactComponent.prototype, ReactPureComponent.prototype = new ComponentDummy(), + ReactPureComponent.prototype.constructor = ReactPureComponent, _assign(ReactPureComponent.prototype, ReactComponent.prototype), + ReactPureComponent.prototype.isPureReactComponent = !0, module.exports = ReactPureComponent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function identity(fn) { + return fn; + } + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; + ReactClassMixin.hasOwnProperty(name) && ("OVERRIDE_BASE" !== specPolicy ? _prodInvariant("73", name) : void 0), + isAlreadyDefined && ("DEFINE_MANY" !== specPolicy && "DEFINE_MANY_MERGED" !== specPolicy ? _prodInvariant("74", name) : void 0); + } + function mixSpecIntoComponent(Constructor, spec) { + if (spec) { + "function" == typeof spec ? _prodInvariant("75") : void 0, ReactElement.isValidElement(spec) ? _prodInvariant("76") : void 0; + var proto = Constructor.prototype, autoBindPairs = proto.__reactAutoBindPairs; + spec.hasOwnProperty(MIXINS_KEY) && RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + for (var name in spec) if (spec.hasOwnProperty(name) && name !== MIXINS_KEY) { + var property = spec[name], isAlreadyDefined = proto.hasOwnProperty(name); + if (validateMethodOverride(isAlreadyDefined, name), RESERVED_SPEC_KEYS.hasOwnProperty(name)) RESERVED_SPEC_KEYS[name](Constructor, property); else { + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name), isFunction = "function" == typeof property, shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== !1; + if (shouldAutoBind) autoBindPairs.push(name, property), proto[name] = property; else if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + !isReactClassMethod || "DEFINE_MANY_MERGED" !== specPolicy && "DEFINE_MANY" !== specPolicy ? _prodInvariant("77", specPolicy, name) : void 0, + "DEFINE_MANY_MERGED" === specPolicy ? proto[name] = createMergedResultFunction(proto[name], property) : "DEFINE_MANY" === specPolicy && (proto[name] = createChainedFunction(proto[name], property)); + } else proto[name] = property; + } + } + } else ; + } + function mixStaticSpecIntoComponent(Constructor, statics) { + if (statics) for (var name in statics) { + var property = statics[name]; + if (statics.hasOwnProperty(name)) { + var isReserved = name in RESERVED_SPEC_KEYS; + isReserved ? _prodInvariant("78", name) : void 0; + var isInherited = name in Constructor; + isInherited ? _prodInvariant("79", name) : void 0, Constructor[name] = property; + } + } + } + function mergeIntoWithNoDuplicateKeys(one, two) { + one && two && "object" == typeof one && "object" == typeof two ? void 0 : _prodInvariant("80"); + for (var key in two) two.hasOwnProperty(key) && (void 0 !== one[key] ? _prodInvariant("81", key) : void 0, + one[key] = two[key]); + return one; + } + function createMergedResultFunction(one, two) { + return function() { + var a = one.apply(this, arguments), b = two.apply(this, arguments); + if (null == a) return b; + if (null == b) return a; + var c = {}; + return mergeIntoWithNoDuplicateKeys(c, a), mergeIntoWithNoDuplicateKeys(c, b), c; + }; + } + function createChainedFunction(one, two) { + return function() { + one.apply(this, arguments), two.apply(this, arguments); + }; + } + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + return boundMethod; + } + function bindAutoBindMethods(component) { + for (var pairs = component.__reactAutoBindPairs, i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i], method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + var _prodInvariant = __webpack_require__(12), _assign = __webpack_require__(9), ReactComponent = __webpack_require__(23), ReactElement = __webpack_require__(14), ReactNoopUpdateQueue = (__webpack_require__(28), + __webpack_require__(24)), emptyObject = __webpack_require__(25), MIXINS_KEY = (__webpack_require__(13), + __webpack_require__(16), "mixins"), injectedMixins = [], ReactClassInterface = { + mixins: "DEFINE_MANY", + statics: "DEFINE_MANY", + propTypes: "DEFINE_MANY", + contextTypes: "DEFINE_MANY", + childContextTypes: "DEFINE_MANY", + getDefaultProps: "DEFINE_MANY_MERGED", + getInitialState: "DEFINE_MANY_MERGED", + getChildContext: "DEFINE_MANY_MERGED", + render: "DEFINE_ONCE", + componentWillMount: "DEFINE_MANY", + componentDidMount: "DEFINE_MANY", + componentWillReceiveProps: "DEFINE_MANY", + shouldComponentUpdate: "DEFINE_ONCE", + componentWillUpdate: "DEFINE_MANY", + componentDidUpdate: "DEFINE_MANY", + componentWillUnmount: "DEFINE_MANY", + updateComponent: "OVERRIDE_BASE" + }, RESERVED_SPEC_KEYS = { + displayName: function(Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function(Constructor, mixins) { + if (mixins) for (var i = 0; i < mixins.length; i++) mixSpecIntoComponent(Constructor, mixins[i]); + }, + childContextTypes: function(Constructor, childContextTypes) { + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); + }, + contextTypes: function(Constructor, contextTypes) { + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); + }, + getDefaultProps: function(Constructor, getDefaultProps) { + Constructor.getDefaultProps ? Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps) : Constructor.getDefaultProps = getDefaultProps; + }, + propTypes: function(Constructor, propTypes) { + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function(Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function() {} + }, ReactClassMixin = { + replaceState: function(newState, callback) { + this.updater.enqueueReplaceState(this, newState), callback && this.updater.enqueueCallback(this, callback, "replaceState"); + }, + isMounted: function() { + return this.updater.isMounted(this); + } + }, ReactClassComponent = function() {}; + _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + var ReactClass = { + createClass: function(spec) { + var Constructor = identity(function(props, context, updater) { + this.__reactAutoBindPairs.length && bindAutoBindMethods(this), this.props = props, + this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue, + this.state = null; + var initialState = this.getInitialState ? this.getInitialState() : null; + "object" != typeof initialState || Array.isArray(initialState) ? _prodInvariant("82", Constructor.displayName || "ReactCompositeComponent") : void 0, + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(), Constructor.prototype.constructor = Constructor, + Constructor.prototype.__reactAutoBindPairs = [], injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)), + mixSpecIntoComponent(Constructor, spec), Constructor.getDefaultProps && (Constructor.defaultProps = Constructor.getDefaultProps()), + Constructor.prototype.render ? void 0 : _prodInvariant("83"); + for (var methodName in ReactClassInterface) Constructor.prototype[methodName] || (Constructor.prototype[methodName] = null); + return Constructor; + }, + injection: { + injectMixin: function(mixin) { + injectedMixins.push(mixin); + } + } + }; + module.exports = ReactClass; +}, function(module, exports, __webpack_require__) { + "use strict"; + var ReactPropTypeLocationNames = {}; + module.exports = ReactPropTypeLocationNames; +}, function(module, exports, __webpack_require__) { + "use strict"; + var ReactElement = __webpack_require__(14), createDOMFactory = ReactElement.createFactory, ReactDOMFactories = { + a: createDOMFactory("a"), + abbr: createDOMFactory("abbr"), + address: createDOMFactory("address"), + area: createDOMFactory("area"), + article: createDOMFactory("article"), + aside: createDOMFactory("aside"), + audio: createDOMFactory("audio"), + b: createDOMFactory("b"), + base: createDOMFactory("base"), + bdi: createDOMFactory("bdi"), + bdo: createDOMFactory("bdo"), + big: createDOMFactory("big"), + blockquote: createDOMFactory("blockquote"), + body: createDOMFactory("body"), + br: createDOMFactory("br"), + button: createDOMFactory("button"), + canvas: createDOMFactory("canvas"), + caption: createDOMFactory("caption"), + cite: createDOMFactory("cite"), + code: createDOMFactory("code"), + col: createDOMFactory("col"), + colgroup: createDOMFactory("colgroup"), + data: createDOMFactory("data"), + datalist: createDOMFactory("datalist"), + dd: createDOMFactory("dd"), + del: createDOMFactory("del"), + details: createDOMFactory("details"), + dfn: createDOMFactory("dfn"), + dialog: createDOMFactory("dialog"), + div: createDOMFactory("div"), + dl: createDOMFactory("dl"), + dt: createDOMFactory("dt"), + em: createDOMFactory("em"), + embed: createDOMFactory("embed"), + fieldset: createDOMFactory("fieldset"), + figcaption: createDOMFactory("figcaption"), + figure: createDOMFactory("figure"), + footer: createDOMFactory("footer"), + form: createDOMFactory("form"), + h1: createDOMFactory("h1"), + h2: createDOMFactory("h2"), + h3: createDOMFactory("h3"), + h4: createDOMFactory("h4"), + h5: createDOMFactory("h5"), + h6: createDOMFactory("h6"), + head: createDOMFactory("head"), + header: createDOMFactory("header"), + hgroup: createDOMFactory("hgroup"), + hr: createDOMFactory("hr"), + html: createDOMFactory("html"), + i: createDOMFactory("i"), + iframe: createDOMFactory("iframe"), + img: createDOMFactory("img"), + input: createDOMFactory("input"), + ins: createDOMFactory("ins"), + kbd: createDOMFactory("kbd"), + keygen: createDOMFactory("keygen"), + label: createDOMFactory("label"), + legend: createDOMFactory("legend"), + li: createDOMFactory("li"), + link: createDOMFactory("link"), + main: createDOMFactory("main"), + map: createDOMFactory("map"), + mark: createDOMFactory("mark"), + menu: createDOMFactory("menu"), + menuitem: createDOMFactory("menuitem"), + meta: createDOMFactory("meta"), + meter: createDOMFactory("meter"), + nav: createDOMFactory("nav"), + noscript: createDOMFactory("noscript"), + object: createDOMFactory("object"), + ol: createDOMFactory("ol"), + optgroup: createDOMFactory("optgroup"), + option: createDOMFactory("option"), + output: createDOMFactory("output"), + p: createDOMFactory("p"), + param: createDOMFactory("param"), + picture: createDOMFactory("picture"), + pre: createDOMFactory("pre"), + progress: createDOMFactory("progress"), + q: createDOMFactory("q"), + rp: createDOMFactory("rp"), + rt: createDOMFactory("rt"), + ruby: createDOMFactory("ruby"), + s: createDOMFactory("s"), + samp: createDOMFactory("samp"), + script: createDOMFactory("script"), + section: createDOMFactory("section"), + select: createDOMFactory("select"), + small: createDOMFactory("small"), + source: createDOMFactory("source"), + span: createDOMFactory("span"), + strong: createDOMFactory("strong"), + style: createDOMFactory("style"), + sub: createDOMFactory("sub"), + summary: createDOMFactory("summary"), + sup: createDOMFactory("sup"), + table: createDOMFactory("table"), + tbody: createDOMFactory("tbody"), + td: createDOMFactory("td"), + textarea: createDOMFactory("textarea"), + tfoot: createDOMFactory("tfoot"), + th: createDOMFactory("th"), + thead: createDOMFactory("thead"), + time: createDOMFactory("time"), + title: createDOMFactory("title"), + tr: createDOMFactory("tr"), + track: createDOMFactory("track"), + u: createDOMFactory("u"), + ul: createDOMFactory("ul"), + "var": createDOMFactory("var"), + video: createDOMFactory("video"), + wbr: createDOMFactory("wbr"), + circle: createDOMFactory("circle"), + clipPath: createDOMFactory("clipPath"), + defs: createDOMFactory("defs"), + ellipse: createDOMFactory("ellipse"), + g: createDOMFactory("g"), + image: createDOMFactory("image"), + line: createDOMFactory("line"), + linearGradient: createDOMFactory("linearGradient"), + mask: createDOMFactory("mask"), + path: createDOMFactory("path"), + pattern: createDOMFactory("pattern"), + polygon: createDOMFactory("polygon"), + polyline: createDOMFactory("polyline"), + radialGradient: createDOMFactory("radialGradient"), + rect: createDOMFactory("rect"), + stop: createDOMFactory("stop"), + svg: createDOMFactory("svg"), + text: createDOMFactory("text"), + tspan: createDOMFactory("tspan") + }; + module.exports = ReactDOMFactories; +}, function(module, exports, __webpack_require__) { + "use strict"; + function is(x, y) { + return x === y ? 0 !== x || 1 / x === 1 / y : x !== x && y !== y; + } + function PropTypeError(message) { + this.message = message, this.stack = ""; + } + function createChainableTypeChecker(validate) { + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS, propFullName = propFullName || propName; + if (null == props[propName]) { + var locationName = ReactPropTypeLocationNames[location]; + return isRequired ? new PropTypeError(null === props[propName] ? "The " + locationName + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`.") : "The " + locationName + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`.")) : null; + } + return validate(props, propName, componentName, location, propFullName); + } + var chainedCheckType = checkType.bind(null, !1); + return chainedCheckType.isRequired = checkType.bind(null, !0), chainedCheckType; + } + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName], propType = getPropType(propValue); + if (propType !== expectedType) { + var locationName = ReactPropTypeLocationNames[location], preciseType = getPreciseType(propValue); + return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`.")); + } + return null; + } + return createChainableTypeChecker(validate); + } + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturns(null)); + } + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if ("function" != typeof typeChecker) return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf."); + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var locationName = ReactPropTypeLocationNames[location], propType = getPropType(propValue); + return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array.")); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret); + if (error instanceof Error) return error; + } + return null; + } + return createChainableTypeChecker(validate); + } + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!ReactElement.isValidElement(propValue)) { + var locationName = ReactPropTypeLocationNames[location], propType = getPropType(propValue); + return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement.")); + } + return null; + } + return createChainableTypeChecker(validate); + } + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var locationName = ReactPropTypeLocationNames[location], expectedClassName = expectedClass.name || ANONYMOUS, actualClassName = getClassName(props[propName]); + return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`.")); + } + return null; + } + return createChainableTypeChecker(validate); + } + function createEnumTypeChecker(expectedValues) { + function validate(props, propName, componentName, location, propFullName) { + for (var propValue = props[propName], i = 0; i < expectedValues.length; i++) if (is(propValue, expectedValues[i])) return null; + var locationName = ReactPropTypeLocationNames[location], valuesString = JSON.stringify(expectedValues); + return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of value `" + propValue + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + ".")); + } + return Array.isArray(expectedValues) ? createChainableTypeChecker(validate) : emptyFunction.thatReturnsNull; + } + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if ("function" != typeof typeChecker) return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf."); + var propValue = props[propName], propType = getPropType(propValue); + if ("object" !== propType) { + var locationName = ReactPropTypeLocationNames[location]; + return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object.")); + } + for (var key in propValue) if (propValue.hasOwnProperty(key)) { + var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); + if (error instanceof Error) return error; + } + return null; + } + return createChainableTypeChecker(validate); + } + function createUnionTypeChecker(arrayOfTypeCheckers) { + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (null == checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret)) return null; + } + var locationName = ReactPropTypeLocationNames[location]; + return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` supplied to " + ("`" + componentName + "`.")); + } + return Array.isArray(arrayOfTypeCheckers) ? createChainableTypeChecker(validate) : emptyFunction.thatReturnsNull; + } + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + var locationName = ReactPropTypeLocationNames[location]; + return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode.")); + } + return null; + } + return createChainableTypeChecker(validate); + } + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName], propType = getPropType(propValue); + if ("object" !== propType) { + var locationName = ReactPropTypeLocationNames[location]; + return new PropTypeError("Invalid " + locationName + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`.")); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (checker) { + var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); + if (error) return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + function isNode(propValue) { + switch (typeof propValue) { + case "number": + case "string": + case "undefined": + return !0; + + case "boolean": + return !propValue; + + case "object": + if (Array.isArray(propValue)) return propValue.every(isNode); + if (null === propValue || ReactElement.isValidElement(propValue)) return !0; + var iteratorFn = getIteratorFn(propValue); + if (!iteratorFn) return !1; + var step, iterator = iteratorFn.call(propValue); + if (iteratorFn !== propValue.entries) { + for (;!(step = iterator.next()).done; ) if (!isNode(step.value)) return !1; + } else for (;!(step = iterator.next()).done; ) { + var entry = step.value; + if (entry && !isNode(entry[1])) return !1; + } + return !0; + + default: + return !1; + } + } + function isSymbol(propType, propValue) { + return "symbol" === propType || ("Symbol" === propValue["@@toStringTag"] || "function" == typeof Symbol && propValue instanceof Symbol); + } + function getPropType(propValue) { + var propType = typeof propValue; + return Array.isArray(propValue) ? "array" : propValue instanceof RegExp ? "object" : isSymbol(propType, propValue) ? "symbol" : propType; + } + function getPreciseType(propValue) { + var propType = getPropType(propValue); + if ("object" === propType) { + if (propValue instanceof Date) return "date"; + if (propValue instanceof RegExp) return "regexp"; + } + return propType; + } + function getClassName(propValue) { + return propValue.constructor && propValue.constructor.name ? propValue.constructor.name : ANONYMOUS; + } + var ReactElement = __webpack_require__(14), ReactPropTypeLocationNames = __webpack_require__(28), ReactPropTypesSecret = __webpack_require__(31), emptyFunction = __webpack_require__(17), getIteratorFn = __webpack_require__(21), ANONYMOUS = (__webpack_require__(16), + "<>"), ReactPropTypes = { + array: createPrimitiveTypeChecker("array"), + bool: createPrimitiveTypeChecker("boolean"), + func: createPrimitiveTypeChecker("function"), + number: createPrimitiveTypeChecker("number"), + object: createPrimitiveTypeChecker("object"), + string: createPrimitiveTypeChecker("string"), + symbol: createPrimitiveTypeChecker("symbol"), + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker + }; + PropTypeError.prototype = Error.prototype, module.exports = ReactPropTypes; +}, function(module, exports) { + "use strict"; + var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; + module.exports = ReactPropTypesSecret; +}, function(module, exports) { + "use strict"; + module.exports = "15.4.2"; +}, function(module, exports, __webpack_require__) { + "use strict"; + function onlyChild(children) { + return ReactElement.isValidElement(children) ? void 0 : _prodInvariant("143"), children; + } + var _prodInvariant = __webpack_require__(12), ReactElement = __webpack_require__(14); + __webpack_require__(13); + module.exports = onlyChild; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + function shouldUseVerticalLayout(window) { + return window.innerWidth < IS_VERTICAL_BREAKPOINT; + } + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), ContextMenu = __webpack_require__(35), PropState = __webpack_require__(40), React = __webpack_require__(7), LeftPane = __webpack_require__(216), PreferencesPanel = __webpack_require__(230), SplitPane = __webpack_require__(477), TabbedPane = __webpack_require__(479), IS_VERTICAL_BREAKPOINT = 500, Container = function(_React$Component) { + function Container(props) { + _classCallCheck(this, Container); + var _this = _possibleConstructorReturn(this, (Container.__proto__ || Object.getPrototypeOf(Container)).call(this, props)); + return _this.handleResize = function(e) { + _this.resizeTimeout || (_this.resizeTimeout = setTimeout(_this.handleResizeTimeout, 50)); + }, _this.handleResizeTimeout = function() { + _this.resizeTimeout = null, _this.setState({ + isVertical: shouldUseVerticalLayout(window) + }); + }, _this.state = { + isVertical: shouldUseVerticalLayout(window) + }, _this; + } + return _inherits(Container, _React$Component), _createClass(Container, [ { + key: "componentDidMount", + value: function() { + window.addEventListener("resize", this.handleResize, !1), this.setState({ + isVertical: shouldUseVerticalLayout(window) + }); + } + }, { + key: "componentWillUnmount", + value: function() { + window.removeEventListener("resize", this.handleResize), null != this.resizeTimeout && clearTimeout(this.resizeTimeout); + } + }, { + key: "render", + value: function() { + var _this2 = this, _props = this.props, preferencesPanelShown = _props.preferencesPanelShown, theme = _props.theme, tabs = _extends({ + Elements: function() { + return React.createElement(SplitPane, { + initialWidth: 10, + initialHeight: 10, + left: function() { + return React.createElement(LeftPane, { + reload: _this2.props.reload + }); + }, + right: function() { + return React.createElement(PropState, { + onViewElementSource: _this2.props.onViewElementSource, + extraPanes: _this2.props.extraPanes + }); + }, + isVertical: _this2.state.isVertical + }); + } + }, this.props.extraTabs); + return React.createElement("div", { + style: containerStyle(preferencesPanelShown, theme) + }, React.createElement(TabbedPane, { + tabs: tabs + }), React.createElement(PreferencesPanel, null), React.createElement(ContextMenu, { + itemSources: [ DEFAULT_MENU_ITEMS, this.props.menuItems ] + })); + } + } ]), Container; + }(React.Component), DEFAULT_MENU_ITEMS = { + tree: function(id, node, store) { + var items = []; + node.get("name") && items.push({ + key: "showNodesOfType", + title: "Show all " + node.get("name"), + action: function() { + return store.changeSearch(node.get("name")); + } + }), store.capabilities.scroll && items.push({ + key: "scrollToNode", + title: "Scroll to node", + action: function() { + return store.scrollToNode(id); + } + }), "Composite" === node.get("nodeType") && node.get("name") && items.push({ + key: "copyNodeName", + title: "Copy element name", + action: function() { + return store.copyNodeName(node.get("name")); + } + }); + var props = node.get("props"); + if (props) { + var numKeys = Object.keys(props).filter(function(key) { + return "children" !== key; + }).length; + numKeys > 0 && items.push({ + key: "copyNodeProps", + title: "Copy element props", + action: function() { + return store.copyNodeProps(props); + } + }); + } + return items; + }, + attr: function(id, node, val, path, name, store) { + return [ { + key: "storeAsGlobal", + title: "Store as global variable", + action: function() { + return store.makeGlobal(id, path); + } + } ]; + } + }, containerStyle = function(preferencesPanelShown, theme) { + return { + backgroundColor: theme.base00, + color: theme.base05, + flex: 1, + display: "flex", + minWidth: 0, + position: preferencesPanelShown ? "relative" : null + }; + }; + module.exports = Container; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + return arr2; + } + return Array.from(arr); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), nullthrows = __webpack_require__(3)["default"], _require = __webpack_require__(36), sansSerif = _require.sansSerif, HighlightHover = __webpack_require__(37), decorate = __webpack_require__(39), ContextMenu = function(_React$Component) { + function ContextMenu(props) { + _classCallCheck(this, ContextMenu); + var _this = _possibleConstructorReturn(this, (ContextMenu.__proto__ || Object.getPrototypeOf(ContextMenu)).call(this, props)); + return _this.state = { + elementHeight: 0, + windowHeight: 0 + }, _this._setRef = function(element) { + if (element) { + var elementHeight = nullthrows(element.querySelector("ul")).clientHeight, windowHeight = window.innerHeight; + _this.state.elementHeight === elementHeight && _this.state.windowHeight === windowHeight || _this.setState({ + elementHeight: elementHeight, + windowHeight: windowHeight + }); + } + }, _this.handleBackdropClick = _this.handleBackdropClick.bind(_this), _this; + } + return _inherits(ContextMenu, _React$Component), _createClass(ContextMenu, [ { + key: "onClick", + value: function(i, evt) { + this.props.items[i].action(); + } + }, { + key: "handleBackdropClick", + value: function(evt) { + evt.preventDefault(), this.props.hideContextMenu(); + } + }, { + key: "render", + value: function() { + var _this2 = this, theme = this.context.theme, _props = this.props, items = _props.items, open = _props.open, pos = _props.pos, _state = this.state, elementHeight = _state.elementHeight, windowHeight = _state.windowHeight; + return pos && pos.y + elementHeight > windowHeight && (pos.y -= elementHeight), + open ? React.createElement("div", { + style: styles.backdrop, + onClick: this.handleBackdropClick, + ref: this._setRef + }, React.createElement("ul", { + style: containerStyle(pos.x, pos.y, theme) + }, !items.length && React.createElement("li", { + style: emptyStyle(theme) + }, "No actions"), items.map(function(item, i) { + return item && React.createElement("li", { + style: listItemStyle(theme), + key: item.key, + onClick: function(evt) { + return _this2.onClick(i, evt); + } + }, React.createElement(HighlightHover, { + style: styles.highlightHoverItem + }, item.title)); + }))) : React.createElement("div", { + style: styles.hidden + }); + } + } ]), ContextMenu; + }(React.Component); + ContextMenu.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var Wrapped = decorate({ + listeners: function() { + return [ "contextMenu" ]; + }, + props: function(store, _props2) { + if (!store.contextMenu) return { + open: !1 + }; + var _store$contextMenu = store.contextMenu, x = _store$contextMenu.x, y = _store$contextMenu.y, type = _store$contextMenu.type, args = _store$contextMenu.args, items = []; + return args.push(store), _props2.itemSources.forEach(function(source) { + if (source && source[type]) { + var newItems = source[type].apply(source, _toConsumableArray(args)); + newItems && (items = items.concat(newItems.filter(function(v) { + return !!v; + }))); + } + }), { + open: !0, + pos: { + x: x, + y: y + }, + hideContextMenu: function() { + return store.hideContextMenu(); + }, + items: items + }; + } + }, ContextMenu), containerStyle = function(xPos, yPos, theme) { + return { + top: yPos + "px", + left: xPos + "px", + position: "fixed", + listStyle: "none", + margin: 0, + padding: "0.25rem 0", + fontSize: sansSerif.sizes.large, + fontFamily: sansSerif.family, + borderRadius: "0.25rem", + overflow: "hidden", + zIndex: 1, + backgroundColor: theme.base01 + }; + }, emptyStyle = function(theme) { + return { + padding: "0.25rem 0.5rem", + color: theme.base03 + }; + }, listItemStyle = function(theme) { + return { + color: theme.base05 + }; + }, styles = { + hidden: { + display: "none" + }, + backdrop: { + position: "fixed", + left: 0, + right: 0, + top: 0, + bottom: 0, + zIndex: 1 + }, + highlightHoverItem: { + padding: "0.25rem 0.5rem", + cursor: "default", + WebkitUserSelect: "none", + MozUserSelect: "none", + userSelect: "none" + } + }; + module.exports = Wrapped; +}, function(module, exports) { + "use strict"; + module.exports = { + monospace: { + family: "Menlo, Consolas, monospace", + sizes: { + normal: 11, + large: 14 + } + }, + sansSerif: { + family: '"Helvetica Neue", "Lucida Grande", -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, sans-serif', + sizes: { + small: 10, + normal: 12, + large: 14 + } + } + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), assign = __webpack_require__(38), HighlightHover = function(_React$Component) { + function HighlightHover(props) { + _classCallCheck(this, HighlightHover); + var _this = _possibleConstructorReturn(this, (HighlightHover.__proto__ || Object.getPrototypeOf(HighlightHover)).call(this, props)); + return _this.state = { + hover: !1 + }, _this; + } + return _inherits(HighlightHover, _React$Component), _createClass(HighlightHover, [ { + key: "render", + value: function() { + var _this2 = this, theme = this.context.theme; + return React.createElement("div", { + onMouseOver: function() { + return !_this2.state.hover && _this2.setState({ + hover: !0 + }); + }, + onMouseOut: function() { + return _this2.state.hover && _this2.setState({ + hover: !1 + }); + }, + style: assign({}, this.props.style, { + backgroundColor: this.state.hover ? theme.base02 : "transparent" + }) + }, this.props.children); + } + } ]), HighlightHover; + }(React.Component); + HighlightHover.contextTypes = { + theme: React.PropTypes.object.isRequired + }, module.exports = HighlightHover; +}, function(module, exports) { + "use strict"; + function toObject(val) { + if (null === val || void 0 === val) throw new TypeError("Object.assign cannot be called with null or undefined"); + return Object(val); + } + var hasOwnProperty = Object.prototype.hasOwnProperty, propIsEnumerable = Object.prototype.propertyIsEnumerable; + module.exports = Object.assign || function(target, source) { + for (var from, symbols, to = toObject(target), s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + for (var key in from) hasOwnProperty.call(from, key) && (to[key] = from[key]); + if (Object.getOwnPropertySymbols) { + symbols = Object.getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) propIsEnumerable.call(from, symbols[i]) && (to[symbols[i]] = from[symbols[i]]); + } + } + return to; + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _defineProperty(obj, key, value) { + return key in obj ? Object.defineProperty(obj, key, { + value: value, + enumerable: !0, + configurable: !0, + writable: !0 + }) : obj[key] = value, obj; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + function arrayDiff(array, oldArray) { + for (var names = new Set(), missing = [], i = 0; i < array.length; i++) names.add(array[i]); + for (var j = 0; j < oldArray.length; j++) names.has(oldArray[j]) ? names["delete"](oldArray[j]) : missing.push(oldArray[j]); + return { + missing: missing, + newItems: setToArray(names) + }; + } + function setToArray(set) { + var res = [], _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0; + try { + for (var _step, _iterator = set[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) { + var val = _step.value; + res.push(val); + } + } catch (err) { + _didIteratorError = !0, _iteratorError = err; + } finally { + try { + !_iteratorNormalCompletion && _iterator["return"] && _iterator["return"](); + } finally { + if (_didIteratorError) throw _iteratorError; + } + } + return res; + } + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7); + module.exports = function(options, Component) { + var storeKey = options.store || "store", Wrapper = function(_React$Component) { + function Wrapper(props) { + _classCallCheck(this, Wrapper); + var _this = _possibleConstructorReturn(this, (Wrapper.__proto__ || Object.getPrototypeOf(Wrapper)).call(this, props)); + return _this.state = {}, _this; + } + return _inherits(Wrapper, _React$Component), _createClass(Wrapper, [ { + key: "componentWillMount", + value: function() { + var _this2 = this; + return this.context[storeKey] ? (this._update = function() { + return _this2.forceUpdate(); + }, void (options.listeners && (this._listeners = options.listeners(this.props, this.context[storeKey]), + this._listeners.forEach(function(evt) { + _this2.context[storeKey].on(evt, _this2._update); + })))) : void console.warn("no store on context..."); + } + }, { + key: "componentWillUnmount", + value: function() { + var _this3 = this; + return this.context[storeKey] ? void this._listeners.forEach(function(evt) { + _this3.context[storeKey].off(evt, _this3._update); + }) : void console.warn("no store on context..."); + } + }, { + key: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return nextState !== this.state || !!options.shouldUpdate && options.shouldUpdate(nextProps, this.props); + } + }, { + key: "componentWillUpdate", + value: function(nextProps, nextState) { + var _this4 = this; + if (!this.context[storeKey]) return void console.warn("no store on context..."); + if (options.listeners) { + var listeners = options.listeners(this.props, this.context[storeKey]), diff = arrayDiff(listeners, this._listeners); + diff.missing.forEach(function(name) { + _this4.context[storeKey].off(name, _this4._update); + }), diff.newItems.forEach(function(name) { + _this4.context[storeKey].on(name, _this4._update); + }), this._listeners = listeners; + } + } + }, { + key: "render", + value: function() { + var store = this.context[storeKey], props = store && options.props(store, this.props); + return React.createElement(Component, _extends({}, props, this.props)); + } + } ]), Wrapper; + }(React.Component); + return Wrapper.contextTypes = _defineProperty({}, storeKey, React.PropTypes.object), + Wrapper.displayName = "Wrapper(" + Component.name + ")", Wrapper; + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), BlurInput = __webpack_require__(41), DataView = __webpack_require__(43), DetailPane = __webpack_require__(209), DetailPaneSection = __webpack_require__(210), _require = __webpack_require__(36), sansSerif = _require.sansSerif, PropVal = __webpack_require__(211), React = __webpack_require__(7), decorate = __webpack_require__(39), invariant = __webpack_require__(215), PropState = function(_React$Component) { + function PropState() { + return _classCallCheck(this, PropState), _possibleConstructorReturn(this, (PropState.__proto__ || Object.getPrototypeOf(PropState)).apply(this, arguments)); + } + return _inherits(PropState, _React$Component), _createClass(PropState, [ { + key: "getChildContext", + value: function() { + var _this2 = this; + return { + onChange: function(path, val) { + _this2.props.onChange(path, val); + } + }; + } + }, { + key: "renderSource", + value: function() { + var theme = this.context.theme, _props = this.props, id = _props.id, node = _props.node, onViewElementSource = _props.onViewElementSource, source = node.get("source"); + if (!source) return null; + var onClick = void 0; + return onViewElementSource && (onClick = function() { + return onViewElementSource(id, source); + }), React.createElement("div", { + style: sourceStyle(!!onViewElementSource, theme), + onClick: onClick + }, source.fileName, React.createElement("span", { + style: sourcePosStyle(theme) + }, ":", source.lineNumber)); + } + }, { + key: "render", + value: function() { + var _this3 = this, theme = this.context.theme; + if (!this.props.node) return React.createElement("span", { + style: emptyStyle(theme) + }, "No selection"); + var nodeType = this.props.node.get("nodeType"); + if ("Text" === nodeType) return this.props.canEditTextContent ? React.createElement(DetailPane, null, React.createElement(BlurInput, { + value: this.props.node.get("text"), + onChange: this.props.onChangeText + })) : React.createElement(DetailPane, { + header: "Text Node" + }, React.createElement("span", { + style: noPropsStateStyle(theme) + }, "No props/state.")); + if ("Empty" === nodeType) return React.createElement(DetailPane, { + header: "Empty Node" + }, React.createElement("span", { + style: noPropsStateStyle(theme) + }, "No props/state.")); + var editTextContent = null; + this.props.canEditTextContent && "string" == typeof this.props.node.get("children") && (editTextContent = React.createElement(BlurInput, { + value: this.props.node.get("children"), + onChange: this.props.onChangeText + })); + var key = this.props.node.get("key"), ref = this.props.node.get("ref"), state = this.props.node.get("state"), context = this.props.node.get("context"), propsReadOnly = !this.props.node.get("canUpdate"); + return React.createElement(DetailPane, { + theme: theme + }, key && React.createElement(DetailPaneSection, { + title: "Key", + key: this.props.id + "-key" + }, React.createElement(PropVal, { + val: key + })), ref && React.createElement(DetailPaneSection, { + title: "Ref", + key: this.props.id + "-ref" + }, React.createElement(PropVal, { + val: ref + })), editTextContent, React.createElement(DetailPaneSection, { + hint: propsReadOnly ? "read-only" : null, + title: "Props" + }, React.createElement(DataView, { + path: [ "props" ], + readOnly: propsReadOnly, + inspect: this.props.inspect, + showMenu: this.props.showMenu, + key: this.props.id + "-props", + data: this.props.node.get("props") + })), state && React.createElement(DetailPaneSection, { + title: "State" + }, React.createElement(DataView, { + data: state, + path: [ "state" ], + inspect: this.props.inspect, + showMenu: this.props.showMenu, + key: this.props.id + "-state" + })), context && React.createElement(DetailPaneSection, { + title: "Context" + }, React.createElement(DataView, { + data: context, + path: [ "context" ], + inspect: this.props.inspect, + showMenu: this.props.showMenu, + key: this.props.id + "-context" + })), this.props.extraPanes && this.props.extraPanes.map(function(fn) { + return fn && fn(_this3.props.node, _this3.props.id); + }), React.createElement("div", { + style: { + flex: 1 + } + }), this.renderSource()); + } + } ]), PropState; + }(React.Component); + PropState.contextTypes = { + theme: React.PropTypes.object.isRequired + }, PropState.childContextTypes = { + onChange: React.PropTypes.func + }; + var WrappedPropState = decorate({ + listeners: function(props, store) { + return [ "selected", store.selected ]; + }, + props: function(store) { + var node = store.selected ? store.get(store.selected) : null; + return { + id: store.selected, + node: node, + canEditTextContent: store.capabilities.editTextContent, + onChangeText: function(text) { + store.changeTextContent(store.selected, text); + }, + onChange: function(path, val) { + "props" === path[0] ? store.setProps(store.selected, path.slice(1), val) : "state" === path[0] ? store.setState(store.selected, path.slice(1), val) : "context" === path[0] ? store.setContext(store.selected, path.slice(1), val) : invariant(!1, "the path to change() must start wth props, state, or context"); + }, + showMenu: function(e, val, path, name) { + store.showContextMenu("attr", e, store.selected, node, val, path, name); + }, + inspect: store.inspect.bind(store, store.selected) + }; + } + }, PropState), emptyStyle = function(theme) { + return { + fontFamily: sansSerif.family, + fontSize: sansSerif.sizes.large, + fontStyle: "italic", + margin: "auto", + color: theme.base04 + }; + }, sourceStyle = function(hasViewElementSource, theme) { + return { + padding: "0.25rem 0.5rem", + color: theme.base05, + overflowWrap: "break-word", + cursor: hasViewElementSource ? "pointer" : "default" + }; + }, sourcePosStyle = function(theme) { + return { + color: theme.base03 + }; + }, noPropsStateStyle = function(theme) { + return { + fontFamily: sansSerif.family, + fontSize: sansSerif.sizes.normal, + color: theme.base03, + textAlign: "center", + fontStyle: "italic", + padding: "0.5rem" + }; + }; + module.exports = WrappedPropState; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), Input = __webpack_require__(42), BlurInput = function(_React$Component) { + function BlurInput(props) { + _classCallCheck(this, BlurInput); + var _this = _possibleConstructorReturn(this, (BlurInput.__proto__ || Object.getPrototypeOf(BlurInput)).call(this, props)); + return _this.state = { + text: _this.props.value || "" + }, _this; + } + return _inherits(BlurInput, _React$Component), _createClass(BlurInput, [ { + key: "componentWillReceiveProps", + value: function(nextProps) { + nextProps.value !== this.props.value && this.setState({ + text: "" + nextProps.value + }); + } + }, { + key: "done", + value: function() { + this.state.text !== (this.props.value || "") && this.props.onChange(this.state.text); + } + }, { + key: "onKeyDown", + value: function(e) { + "Enter" === e.key && this.done(); + } + }, { + key: "render", + value: function() { + var _this2 = this; + return React.createElement(Input, { + value: this.state.text, + innerRef: function(i) { + return _this2.node = i; + }, + onChange: function(e) { + return _this2.setState({ + text: e.target.value + }); + }, + onBlur: this.done.bind(this), + onKeyDown: function(e) { + return _this2.onKeyDown(e); + } + }); + } + } ]), BlurInput; + }(React.Component); + module.exports = BlurInput; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _objectWithoutProperties(obj, keys) { + var target = {}; + for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]); + return target; + } + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, React = __webpack_require__(7), Input = function(props, context) { + var _props$style = props.style, style = void 0 === _props$style ? {} : _props$style, theme = props.theme, innerRef = props.innerRef, rest = _objectWithoutProperties(props, [ "style", "theme", "innerRef" ]), chosenTheme = theme ? theme : context.theme; + return React.createElement("input", _extends({ + style: _extends({}, inputStyle(chosenTheme), style), + ref: innerRef + }, rest)); + }; + Input.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var inputStyle = function(theme) { + return { + backgroundColor: theme.base00, + color: theme.base05 + }; + }; + module.exports = Input; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + function alphanumericSort(a, b) { + return "" + +a === a ? "" + +b !== b ? -1 : +a < +b ? -1 : 1 : a < b ? -1 : 1; + } + var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _require = __webpack_require__(36), sansSerif = _require.sansSerif, React = __webpack_require__(7), Simple = __webpack_require__(44), nullthrows = __webpack_require__(3)["default"], consts = __webpack_require__(189), previewComplex = __webpack_require__(208), DataView = function(_React$Component) { + function DataView() { + return _classCallCheck(this, DataView), _possibleConstructorReturn(this, (DataView.__proto__ || Object.getPrototypeOf(DataView)).apply(this, arguments)); + } + return _inherits(DataView, _React$Component), _createClass(DataView, [ { + key: "renderSparseArrayHole", + value: function(count, key) { + var theme = this.context.theme; + return React.createElement("li", { + key: key + }, React.createElement("div", { + style: styles.head + }, React.createElement("div", { + style: sparseArrayHoleStyle(theme) + }, "undefined × ", count))); + } + }, { + key: "renderItem", + value: function(name, key) { + var data = nullthrows(this.props.data); + return React.createElement(DataItem, { + key: key, + name: name, + path: this.props.path.concat([ name ]), + startOpen: this.props.startOpen, + inspect: this.props.inspect, + showMenu: this.props.showMenu, + readOnly: this.props.readOnly, + value: data[name] + }); + } + }, { + key: "render", + value: function() { + var _this2 = this, theme = this.context.theme, data = this.props.data; + if (!data) return React.createElement("div", { + style: missingStyle(theme) + }, "null"); + var isArray = Array.isArray(data), elements = []; + if (isArray) { + var lastIndex = -1; + if (data.forEach(function(item, i) { + if (lastIndex < i - 1) { + var holeCount = i - 1 - lastIndex; + elements.push(_this2.renderSparseArrayHole(holeCount, i + "-hole")); + } + elements.push(_this2.renderItem(i, i)), lastIndex = i; + }), lastIndex < data.length - 1) { + var holeCount = data.length - 1 - lastIndex; + elements.push(this.renderSparseArrayHole(holeCount, lastIndex + "-hole")); + } + } else { + var names = Object.keys(data); + this.props.noSort || names.sort(alphanumericSort), names.forEach(function(name, i) { + elements.push(_this2.renderItem(name, name)); + }); + } + return elements.length ? React.createElement("ul", { + style: styles.container + }, data[consts.proto] && React.createElement(DataItem, { + key: "__proto__", + name: "__proto__", + path: this.props.path.concat([ "__proto__" ]), + startOpen: this.props.startOpen, + inspect: this.props.inspect, + showMenu: this.props.showMenu, + readOnly: this.props.readOnly, + value: data[consts.proto] + }), elements) : React.createElement("div", { + style: emptyStyle(theme) + }, isArray ? "Empty array" : "Empty object"); + } + } ]), DataView; + }(React.Component); + DataView.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var DataItem = function(_React$Component2) { + function DataItem(props) { + _classCallCheck(this, DataItem); + var _this3 = _possibleConstructorReturn(this, (DataItem.__proto__ || Object.getPrototypeOf(DataItem)).call(this, props)); + return _this3.state = { + open: !!_this3.props.startOpen, + loading: !1 + }, _this3; + } + return _inherits(DataItem, _React$Component2), _createClass(DataItem, [ { + key: "componentDidMount", + value: function() { + this.state.open && this.props.value && this.props.value[consts.inspected] === !1 && this.inspect(); + } + }, { + key: "componentWillReceiveProps", + value: function(nextProps) { + this.state.open && nextProps.value && nextProps.value[consts.inspected] === !1 && this.inspect(); + } + }, { + key: "inspect", + value: function() { + var _this4 = this; + this.setState({ + loading: !0, + open: !0 + }), this.props.inspect(this.props.path, function() { + _this4.setState({ + loading: !1 + }); + }); + } + }, { + key: "toggleOpen", + value: function() { + if (!this.state.loading) return this.props.value && this.props.value[consts.inspected] === !1 ? void this.inspect() : void this.setState({ + open: !this.state.open + }); + } + }, { + key: "toggleBooleanValue", + value: function(e) { + this.context.onChange(this.props.path, e.target.checked); + } + }, { + key: "render", + value: function() { + var preview, _this5 = this, theme = this.context.theme, data = this.props.value, otype = "undefined" == typeof data ? "undefined" : _typeof(data), complex = !0; + "number" === otype || "string" === otype || null == data || "boolean" === otype ? (preview = React.createElement(Simple, { + readOnly: this.props.readOnly, + path: this.props.path, + data: data + }), complex = !1) : preview = previewComplex(data, theme); + var inspectable = !data || !data[consts.meta] || !data[consts.meta].uninspectable, open = inspectable && this.state.open && (!data || data[consts.inspected] !== !1), opener = null; + complex && inspectable ? opener = React.createElement("div", { + onClick: this.toggleOpen.bind(this), + style: styles.opener + }, open ? React.createElement("span", { + style: expandedArrowStyle(theme) + }) : React.createElement("span", { + style: collapsedArrowStyle(theme) + })) : "boolean" !== otype || this.props.readOnly || (opener = React.createElement("input", { + checked: data, + onChange: this.toggleBooleanValue.bind(this), + style: styles.toggler, + type: "checkbox" + })); + var children = null; + if (complex && open) { + var readOnly = this.props.readOnly || data[consts.meta] && data[consts.meta].readOnly; + children = React.createElement("div", { + style: styles.children + }, React.createElement(DataView, { + data: data, + path: this.props.path, + inspect: this.props.inspect, + showMenu: this.props.showMenu, + readOnly: readOnly + })); + } + var name = this.props.name; + return name.length > 50 && (name = name.slice(0, 50) + "…"), React.createElement("li", null, React.createElement("div", { + style: styles.head + }, opener, React.createElement("div", { + style: nameStyle(complex, theme), + onClick: inspectable && this.toggleOpen.bind(this) + }, name, ":"), React.createElement("div", { + onContextMenu: function(e) { + "function" == typeof _this5.props.showMenu && _this5.props.showMenu(e, _this5.props.value, _this5.props.path, name); + }, + style: previewStyle(theme) + }, preview)), children); + } + } ]), DataItem; + }(React.Component); + DataItem.contextTypes = { + onChange: React.PropTypes.func, + theme: React.PropTypes.object.isRequired + }; + var nameStyle = function(isComplex, theme) { + return { + cursor: isComplex ? "pointer" : "default", + color: theme.special03, + margin: "2px 3px" + }; + }, previewStyle = function(theme) { + return { + display: "flex", + margin: "2px 3px", + whiteSpace: "pre", + wordBreak: "break-word", + flex: 1, + color: theme.special01 + }; + }, emptyStyle = function(theme) { + return { + marginLeft: "0.75rem", + padding: "0 5px", + color: theme.base04, + fontFamily: sansSerif.family, + fontSize: sansSerif.sizes.normal, + fontStyle: "italic" + }; + }, missingStyle = function(theme) { + return { + fontSize: sansSerif.sizes.normal, + fontWeight: "bold", + marginLeft: "0.75rem", + padding: "2px 5px", + color: theme.base03 + }; + }, collapsedArrowStyle = function(theme) { + return { + borderColor: "transparent transparent transparent " + theme.base03, + borderStyle: "solid", + borderWidth: "4px 0 4px 7px", + display: "inline-block", + marginLeft: 1, + verticalAlign: "top" + }; + }, expandedArrowStyle = function(theme) { + return { + borderColor: theme.base03 + " transparent transparent transparent", + borderStyle: "solid", + borderWidth: "7px 4px 0 4px", + display: "inline-block", + marginTop: 1, + verticalAlign: "top" + }; + }, sparseArrayHoleStyle = function(theme) { + return { + fontStyle: "italic", + color: theme.base03, + margin: "2px 3px" + }; + }, styles = { + container: { + listStyle: "none", + margin: 0, + padding: 0, + marginLeft: "0.75rem" + }, + children: {}, + opener: { + cursor: "pointer", + marginLeft: -10, + paddingRight: 3, + position: "absolute", + top: 4 + }, + toggler: { + left: -15, + position: "absolute", + top: -1 + }, + head: { + display: "flex", + position: "relative" + }, + value: {} + }; + module.exports = DataView; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + function textToValue(txt) { + if (!txt.length) return BAD_INPUT; + if ("undefined" !== txt) try { + return JSON.parse(txt); + } catch (e) { + return BAD_INPUT; + } + } + function valueToText(value) { + return void 0 === value ? "undefined" : "number" == typeof value ? value.toString() : JSON.stringify(value); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), ReactDOM = __webpack_require__(45), Input = __webpack_require__(42), flash = __webpack_require__(188), _require = __webpack_require__(36), monospace = _require.monospace, Simple = function(_React$Component) { + function Simple(props) { + _classCallCheck(this, Simple); + var _this = _possibleConstructorReturn(this, (Simple.__proto__ || Object.getPrototypeOf(Simple)).call(this, props)); + return _this.state = { + text: "", + editing: !1 + }, _this; + } + return _inherits(Simple, _React$Component), _createClass(Simple, [ { + key: "onChange", + value: function(e) { + this.setState({ + text: e.target.value + }); + } + }, { + key: "onKeyDown", + value: function(e) { + "Enter" === e.key && (this.onSubmit(!0), this.setState({ + editing: !1 + })), "Escape" === e.key && this.setState({ + editing: !1 + }); + } + }, { + key: "onSubmit", + value: function(editing) { + if (this.state.text === valueToText(this.props.data)) return void this.setState({ + editing: editing + }); + var value = textToValue(this.state.text); + return value === BAD_INPUT ? void this.setState({ + text: valueToText(this.props.data), + editing: editing + }) : (this.context.onChange(this.props.path, value), void this.setState({ + editing: editing + })); + } + }, { + key: "startEditing", + value: function() { + this.props.readOnly || this.setState({ + editing: !0, + text: valueToText(this.props.data) + }); + } + }, { + key: "selectAll", + value: function() { + var input = this.input; + input.selectionStart = 0, input.selectionEnd = input.value.length; + } + }, { + key: "componentDidUpdate", + value: function(prevProps, prevState) { + this.state.editing && !prevState.editing && this.selectAll(), this.state.editing || this.props.data === prevProps.data || flash(ReactDOM.findDOMNode(this), this.context.theme.state04, "transparent", 1); + } + }, { + key: "render", + value: function() { + var _this2 = this, theme = this.context.theme, readOnly = this.props.readOnly, _state = this.state, editing = _state.editing, text = _state.text; + if (editing) return React.createElement(Input, { + autoFocus: !0, + innerRef: function(i) { + return _this2.input = i; + }, + style: inputStyle(theme), + onChange: function(e) { + return _this2.onChange(e); + }, + onBlur: function() { + return _this2.onSubmit(!1); + }, + onKeyDown: this.onKeyDown.bind(this), + value: text + }); + var data = this.props.data; + return "string" == typeof data && data.length > 200 && (data = data.slice(0, 200) + "…"), + React.createElement("div", { + onClick: this.startEditing.bind(this), + style: simpleStyle(readOnly, theme) + }, valueToText(data)); + } + } ]), Simple; + }(React.Component); + Simple.propTypes = { + data: React.PropTypes.any, + path: React.PropTypes.array, + readOnly: React.PropTypes.bool + }, Simple.contextTypes = { + onChange: React.PropTypes.func, + theme: React.PropTypes.object.isRequired + }; + var inputStyle = function(theme) { + return { + flex: 1, + minWidth: 50, + boxSizing: "border-box", + border: "none", + padding: 0, + outline: "none", + boxShadow: "0 0 3px " + theme.base02, + fontFamily: monospace.family, + fontSize: "inherit" + }; + }, simpleStyle = function(readOnly, theme) { + return { + display: "flex", + flex: 1, + whiteSpace: "pre-wrap", + cursor: readOnly ? "default" : "pointer" + }; + }, BAD_INPUT = Symbol("bad input"); + module.exports = Simple; +}, function(module, exports, __webpack_require__) { + "use strict"; + module.exports = __webpack_require__(46); +}, function(module, exports, __webpack_require__) { + "use strict"; + var ReactDOMComponentTree = __webpack_require__(47), ReactDefaultInjection = __webpack_require__(52), ReactMount = __webpack_require__(179), ReactReconciler = __webpack_require__(76), ReactUpdates = __webpack_require__(73), ReactVersion = __webpack_require__(184), findDOMNode = __webpack_require__(185), getHostComponentFromComposite = __webpack_require__(186), renderSubtreeIntoContainer = __webpack_require__(187); + __webpack_require__(60); + ReactDefaultInjection.inject(); + var ReactDOM = { + findDOMNode: findDOMNode, + render: ReactMount.render, + unmountComponentAtNode: ReactMount.unmountComponentAtNode, + version: ReactVersion, + unstable_batchedUpdates: ReactUpdates.batchedUpdates, + unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer + }; + "undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject && __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ + ComponentTree: { + getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode, + getNodeFromInstance: function(inst) { + return inst._renderedComponent && (inst = getHostComponentFromComposite(inst)), + inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null; + } + }, + Mount: ReactMount, + Reconciler: ReactReconciler + }); + module.exports = ReactDOM; +}, function(module, exports, __webpack_require__) { + "use strict"; + function shouldPrecacheNode(node, nodeID) { + return 1 === node.nodeType && node.getAttribute(ATTR_NAME) === String(nodeID) || 8 === node.nodeType && node.nodeValue === " react-text: " + nodeID + " " || 8 === node.nodeType && node.nodeValue === " react-empty: " + nodeID + " "; + } + function getRenderedHostOrTextFromComponent(component) { + for (var rendered; rendered = component._renderedComponent; ) component = rendered; + return component; + } + function precacheNode(inst, node) { + var hostInst = getRenderedHostOrTextFromComponent(inst); + hostInst._hostNode = node, node[internalInstanceKey] = hostInst; + } + function uncacheNode(inst) { + var node = inst._hostNode; + node && (delete node[internalInstanceKey], inst._hostNode = null); + } + function precacheChildNodes(inst, node) { + if (!(inst._flags & Flags.hasCachedChildNodes)) { + var children = inst._renderedChildren, childNode = node.firstChild; + outer: for (var name in children) if (children.hasOwnProperty(name)) { + var childInst = children[name], childID = getRenderedHostOrTextFromComponent(childInst)._domID; + if (0 !== childID) { + for (;null !== childNode; childNode = childNode.nextSibling) if (shouldPrecacheNode(childNode, childID)) { + precacheNode(childInst, childNode); + continue outer; + } + _prodInvariant("32", childID); + } + } + inst._flags |= Flags.hasCachedChildNodes; + } + } + function getClosestInstanceFromNode(node) { + if (node[internalInstanceKey]) return node[internalInstanceKey]; + for (var parents = []; !node[internalInstanceKey]; ) { + if (parents.push(node), !node.parentNode) return null; + node = node.parentNode; + } + for (var closest, inst; node && (inst = node[internalInstanceKey]); node = parents.pop()) closest = inst, + parents.length && precacheChildNodes(inst, node); + return closest; + } + function getInstanceFromNode(node) { + var inst = getClosestInstanceFromNode(node); + return null != inst && inst._hostNode === node ? inst : null; + } + function getNodeFromInstance(inst) { + if (void 0 === inst._hostNode ? _prodInvariant("33") : void 0, inst._hostNode) return inst._hostNode; + for (var parents = []; !inst._hostNode; ) parents.push(inst), inst._hostParent ? void 0 : _prodInvariant("34"), + inst = inst._hostParent; + for (;parents.length; inst = parents.pop()) precacheChildNodes(inst, inst._hostNode); + return inst._hostNode; + } + var _prodInvariant = __webpack_require__(48), DOMProperty = __webpack_require__(49), ReactDOMComponentFlags = __webpack_require__(51), ATTR_NAME = (__webpack_require__(50), + DOMProperty.ID_ATTRIBUTE_NAME), Flags = ReactDOMComponentFlags, internalInstanceKey = "__reactInternalInstance$" + Math.random().toString(36).slice(2), ReactDOMComponentTree = { + getClosestInstanceFromNode: getClosestInstanceFromNode, + getInstanceFromNode: getInstanceFromNode, + getNodeFromInstance: getNodeFromInstance, + precacheChildNodes: precacheChildNodes, + precacheNode: precacheNode, + uncacheNode: uncacheNode + }; + module.exports = ReactDOMComponentTree; +}, function(module, exports) { + "use strict"; + function reactProdInvariant(code) { + for (var argCount = arguments.length - 1, message = "Minified React error #" + code + "; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=" + code, argIdx = 0; argIdx < argCount; argIdx++) message += "&args[]=" + encodeURIComponent(arguments[argIdx + 1]); + message += " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; + var error = new Error(message); + throw error.name = "Invariant Violation", error.framesToPop = 1, error; + } + module.exports = reactProdInvariant; +}, function(module, exports, __webpack_require__) { + "use strict"; + function checkMask(value, bitmask) { + return (value & bitmask) === bitmask; + } + var _prodInvariant = __webpack_require__(48), DOMPropertyInjection = (__webpack_require__(50), + { + MUST_USE_PROPERTY: 1, + HAS_BOOLEAN_VALUE: 4, + HAS_NUMERIC_VALUE: 8, + HAS_POSITIVE_NUMERIC_VALUE: 24, + HAS_OVERLOADED_BOOLEAN_VALUE: 32, + injectDOMPropertyConfig: function(domPropertyConfig) { + var Injection = DOMPropertyInjection, Properties = domPropertyConfig.Properties || {}, DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {}, DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}, DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}, DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; + domPropertyConfig.isCustomAttribute && DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); + for (var propName in Properties) { + DOMProperty.properties.hasOwnProperty(propName) ? _prodInvariant("48", propName) : void 0; + var lowerCased = propName.toLowerCase(), propConfig = Properties[propName], propertyInfo = { + attributeName: lowerCased, + attributeNamespace: null, + propertyName: propName, + mutationMethod: null, + mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY), + hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE), + hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE), + hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE), + hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE) + }; + if (propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1 ? void 0 : _prodInvariant("50", propName), + DOMAttributeNames.hasOwnProperty(propName)) { + var attributeName = DOMAttributeNames[propName]; + propertyInfo.attributeName = attributeName; + } + DOMAttributeNamespaces.hasOwnProperty(propName) && (propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName]), + DOMPropertyNames.hasOwnProperty(propName) && (propertyInfo.propertyName = DOMPropertyNames[propName]), + DOMMutationMethods.hasOwnProperty(propName) && (propertyInfo.mutationMethod = DOMMutationMethods[propName]), + DOMProperty.properties[propName] = propertyInfo; + } + } + }), ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", DOMProperty = { + ID_ATTRIBUTE_NAME: "data-reactid", + ROOT_ATTRIBUTE_NAME: "data-reactroot", + ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR, + ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040", + properties: {}, + getPossibleStandardName: null, + _isCustomAttributeFunctions: [], + isCustomAttribute: function(attributeName) { + for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { + var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; + if (isCustomAttributeFn(attributeName)) return !0; + } + return !1; + }, + injection: DOMPropertyInjection + }; + module.exports = DOMProperty; +}, function(module, exports, __webpack_require__) { + "use strict"; + function invariant(condition, format, a, b, c, d, e, f) { + if (validateFormat(format), !condition) { + var error; + if (void 0 === format) error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else { + var args = [ a, b, c, d, e, f ], argIndex = 0; + error = new Error(format.replace(/%s/g, function() { + return args[argIndex++]; + })), error.name = "Invariant Violation"; + } + throw error.framesToPop = 1, error; + } + } + var validateFormat = function(format) {}; + module.exports = invariant; +}, function(module, exports) { + "use strict"; + var ReactDOMComponentFlags = { + hasCachedChildNodes: 1 + }; + module.exports = ReactDOMComponentFlags; +}, function(module, exports, __webpack_require__) { + "use strict"; + function inject() { + alreadyInjected || (alreadyInjected = !0, ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener), + ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder), ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree), + ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal), ReactInjection.EventPluginHub.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin + }), ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent), + ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent), ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig), + ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig), ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig), + ReactInjection.EmptyComponent.injectEmptyComponentFactory(function(instantiate) { + return new ReactDOMEmptyComponent(instantiate); + }), ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction), + ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy), ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment)); + } + var ARIADOMPropertyConfig = __webpack_require__(53), BeforeInputEventPlugin = __webpack_require__(54), ChangeEventPlugin = __webpack_require__(72), DefaultEventPluginOrder = __webpack_require__(84), EnterLeaveEventPlugin = __webpack_require__(85), HTMLDOMPropertyConfig = __webpack_require__(90), ReactComponentBrowserEnvironment = __webpack_require__(91), ReactDOMComponent = __webpack_require__(104), ReactDOMComponentTree = __webpack_require__(47), ReactDOMEmptyComponent = __webpack_require__(150), ReactDOMTreeTraversal = __webpack_require__(151), ReactDOMTextComponent = __webpack_require__(152), ReactDefaultBatchingStrategy = __webpack_require__(153), ReactEventListener = __webpack_require__(154), ReactInjection = __webpack_require__(157), ReactReconcileTransaction = __webpack_require__(158), SVGDOMPropertyConfig = __webpack_require__(166), SelectEventPlugin = __webpack_require__(167), SimpleEventPlugin = __webpack_require__(168), alreadyInjected = !1; + module.exports = { + inject: inject + }; +}, function(module, exports) { + "use strict"; + var ARIADOMPropertyConfig = { + Properties: { + "aria-current": 0, + "aria-details": 0, + "aria-disabled": 0, + "aria-hidden": 0, + "aria-invalid": 0, + "aria-keyshortcuts": 0, + "aria-label": 0, + "aria-roledescription": 0, + "aria-autocomplete": 0, + "aria-checked": 0, + "aria-expanded": 0, + "aria-haspopup": 0, + "aria-level": 0, + "aria-modal": 0, + "aria-multiline": 0, + "aria-multiselectable": 0, + "aria-orientation": 0, + "aria-placeholder": 0, + "aria-pressed": 0, + "aria-readonly": 0, + "aria-required": 0, + "aria-selected": 0, + "aria-sort": 0, + "aria-valuemax": 0, + "aria-valuemin": 0, + "aria-valuenow": 0, + "aria-valuetext": 0, + "aria-atomic": 0, + "aria-busy": 0, + "aria-live": 0, + "aria-relevant": 0, + "aria-dropeffect": 0, + "aria-grabbed": 0, + "aria-activedescendant": 0, + "aria-colcount": 0, + "aria-colindex": 0, + "aria-colspan": 0, + "aria-controls": 0, + "aria-describedby": 0, + "aria-errormessage": 0, + "aria-flowto": 0, + "aria-labelledby": 0, + "aria-owns": 0, + "aria-posinset": 0, + "aria-rowcount": 0, + "aria-rowindex": 0, + "aria-rowspan": 0, + "aria-setsize": 0 + }, + DOMAttributeNames: {}, + DOMPropertyNames: {} + }; + module.exports = ARIADOMPropertyConfig; +}, function(module, exports, __webpack_require__) { + "use strict"; + function isPresto() { + var opera = window.opera; + return "object" == typeof opera && "function" == typeof opera.version && parseInt(opera.version(), 10) <= 12; + } + function isKeypressCommand(nativeEvent) { + return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && !(nativeEvent.ctrlKey && nativeEvent.altKey); + } + function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case "topCompositionStart": + return eventTypes.compositionStart; + + case "topCompositionEnd": + return eventTypes.compositionEnd; + + case "topCompositionUpdate": + return eventTypes.compositionUpdate; + } + } + function isFallbackCompositionStart(topLevelType, nativeEvent) { + return "topKeyDown" === topLevelType && nativeEvent.keyCode === START_KEYCODE; + } + function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case "topKeyUp": + return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; + + case "topKeyDown": + return nativeEvent.keyCode !== START_KEYCODE; + + case "topKeyPress": + case "topMouseDown": + case "topBlur": + return !0; + + default: + return !1; + } + } + function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + return "object" == typeof detail && "data" in detail ? detail.data : null; + } + function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var eventType, fallbackData; + if (canUseCompositionEvent ? eventType = getCompositionEventType(topLevelType) : currentComposition ? isFallbackCompositionEnd(topLevelType, nativeEvent) && (eventType = eventTypes.compositionEnd) : isFallbackCompositionStart(topLevelType, nativeEvent) && (eventType = eventTypes.compositionStart), + !eventType) return null; + useFallbackCompositionData && (currentComposition || eventType !== eventTypes.compositionStart ? eventType === eventTypes.compositionEnd && currentComposition && (fallbackData = currentComposition.getData()) : currentComposition = FallbackCompositionState.getPooled(nativeEventTarget)); + var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget); + if (fallbackData) event.data = fallbackData; else { + var customData = getDataFromCustomEvent(nativeEvent); + null !== customData && (event.data = customData); + } + return EventPropagators.accumulateTwoPhaseDispatches(event), event; + } + function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case "topCompositionEnd": + return getDataFromCustomEvent(nativeEvent); + + case "topKeyPress": + var which = nativeEvent.which; + return which !== SPACEBAR_CODE ? null : (hasSpaceKeypress = !0, SPACEBAR_CHAR); + + case "topTextInput": + var chars = nativeEvent.data; + return chars === SPACEBAR_CHAR && hasSpaceKeypress ? null : chars; + + default: + return null; + } + } + function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + if (currentComposition) { + if ("topCompositionEnd" === topLevelType || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) { + var chars = currentComposition.getData(); + return FallbackCompositionState.release(currentComposition), currentComposition = null, + chars; + } + return null; + } + switch (topLevelType) { + case "topPaste": + return null; + + case "topKeyPress": + return nativeEvent.which && !isKeypressCommand(nativeEvent) ? String.fromCharCode(nativeEvent.which) : null; + + case "topCompositionEnd": + return useFallbackCompositionData ? null : nativeEvent.data; + + default: + return null; + } + } + function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var chars; + if (chars = canUseTextInputEvent ? getNativeBeforeInputChars(topLevelType, nativeEvent) : getFallbackBeforeInputChars(topLevelType, nativeEvent), + !chars) return null; + var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget); + return event.data = chars, EventPropagators.accumulateTwoPhaseDispatches(event), + event; + } + var EventPropagators = __webpack_require__(55), ExecutionEnvironment = __webpack_require__(64), FallbackCompositionState = __webpack_require__(65), SyntheticCompositionEvent = __webpack_require__(69), SyntheticInputEvent = __webpack_require__(71), END_KEYCODES = [ 9, 13, 27, 32 ], START_KEYCODE = 229, canUseCompositionEvent = ExecutionEnvironment.canUseDOM && "CompositionEvent" in window, documentMode = null; + ExecutionEnvironment.canUseDOM && "documentMode" in document && (documentMode = document.documentMode); + var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && "TextEvent" in window && !documentMode && !isPresto(), useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11), SPACEBAR_CODE = 32, SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE), eventTypes = { + beforeInput: { + phasedRegistrationNames: { + bubbled: "onBeforeInput", + captured: "onBeforeInputCapture" + }, + dependencies: [ "topCompositionEnd", "topKeyPress", "topTextInput", "topPaste" ] + }, + compositionEnd: { + phasedRegistrationNames: { + bubbled: "onCompositionEnd", + captured: "onCompositionEndCapture" + }, + dependencies: [ "topBlur", "topCompositionEnd", "topKeyDown", "topKeyPress", "topKeyUp", "topMouseDown" ] + }, + compositionStart: { + phasedRegistrationNames: { + bubbled: "onCompositionStart", + captured: "onCompositionStartCapture" + }, + dependencies: [ "topBlur", "topCompositionStart", "topKeyDown", "topKeyPress", "topKeyUp", "topMouseDown" ] + }, + compositionUpdate: { + phasedRegistrationNames: { + bubbled: "onCompositionUpdate", + captured: "onCompositionUpdateCapture" + }, + dependencies: [ "topBlur", "topCompositionUpdate", "topKeyDown", "topKeyPress", "topKeyUp", "topMouseDown" ] + } + }, hasSpaceKeypress = !1, currentComposition = null, BeforeInputEventPlugin = { + eventTypes: eventTypes, + extractEvents: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + return [ extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) ]; + } + }; + module.exports = BeforeInputEventPlugin; +}, function(module, exports, __webpack_require__) { + "use strict"; + function listenerAtPhase(inst, event, propagationPhase) { + var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(inst, registrationName); + } + function accumulateDirectionalDispatches(inst, phase, event) { + var listener = listenerAtPhase(inst, event, phase); + listener && (event._dispatchListeners = accumulateInto(event._dispatchListeners, listener), + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst)); + } + function accumulateTwoPhaseDispatchesSingle(event) { + event && event.dispatchConfig.phasedRegistrationNames && EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); + } + function accumulateTwoPhaseDispatchesSingleSkipTarget(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + var targetInst = event._targetInst, parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null; + EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event); + } + } + function accumulateDispatches(inst, ignoredDirection, event) { + if (event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName, listener = getListener(inst, registrationName); + listener && (event._dispatchListeners = accumulateInto(event._dispatchListeners, listener), + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst)); + } + } + function accumulateDirectDispatchesSingle(event) { + event && event.dispatchConfig.registrationName && accumulateDispatches(event._targetInst, null, event); + } + function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); + } + function accumulateTwoPhaseDispatchesSkipTarget(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget); + } + function accumulateEnterLeaveDispatches(leave, enter, from, to) { + EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter); + } + function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); + } + var EventPluginHub = __webpack_require__(56), EventPluginUtils = __webpack_require__(58), accumulateInto = __webpack_require__(62), forEachAccumulated = __webpack_require__(63), getListener = (__webpack_require__(60), + EventPluginHub.getListener), EventPropagators = { + accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, + accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget, + accumulateDirectDispatches: accumulateDirectDispatches, + accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches + }; + module.exports = EventPropagators; +}, function(module, exports, __webpack_require__) { + "use strict"; + function isInteractive(tag) { + return "button" === tag || "input" === tag || "select" === tag || "textarea" === tag; + } + function shouldPreventMouseEvent(name, type, props) { + switch (name) { + case "onClick": + case "onClickCapture": + case "onDoubleClick": + case "onDoubleClickCapture": + case "onMouseDown": + case "onMouseDownCapture": + case "onMouseMove": + case "onMouseMoveCapture": + case "onMouseUp": + case "onMouseUpCapture": + return !(!props.disabled || !isInteractive(type)); + + default: + return !1; + } + } + var _prodInvariant = __webpack_require__(48), EventPluginRegistry = __webpack_require__(57), EventPluginUtils = __webpack_require__(58), ReactErrorUtils = __webpack_require__(59), accumulateInto = __webpack_require__(62), forEachAccumulated = __webpack_require__(63), listenerBank = (__webpack_require__(50), + {}), eventQueue = null, executeDispatchesAndRelease = function(event, simulated) { + event && (EventPluginUtils.executeDispatchesInOrder(event, simulated), event.isPersistent() || event.constructor.release(event)); + }, executeDispatchesAndReleaseSimulated = function(e) { + return executeDispatchesAndRelease(e, !0); + }, executeDispatchesAndReleaseTopLevel = function(e) { + return executeDispatchesAndRelease(e, !1); + }, getDictionaryKey = function(inst) { + return "." + inst._rootNodeID; + }, EventPluginHub = { + injection: { + injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, + injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName + }, + putListener: function(inst, registrationName, listener) { + "function" != typeof listener ? _prodInvariant("94", registrationName, typeof listener) : void 0; + var key = getDictionaryKey(inst), bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {}); + bankForRegistrationName[key] = listener; + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + PluginModule && PluginModule.didPutListener && PluginModule.didPutListener(inst, registrationName, listener); + }, + getListener: function(inst, registrationName) { + var bankForRegistrationName = listenerBank[registrationName]; + if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) return null; + var key = getDictionaryKey(inst); + return bankForRegistrationName && bankForRegistrationName[key]; + }, + deleteListener: function(inst, registrationName) { + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + PluginModule && PluginModule.willDeleteListener && PluginModule.willDeleteListener(inst, registrationName); + var bankForRegistrationName = listenerBank[registrationName]; + if (bankForRegistrationName) { + var key = getDictionaryKey(inst); + delete bankForRegistrationName[key]; + } + }, + deleteAllListeners: function(inst) { + var key = getDictionaryKey(inst); + for (var registrationName in listenerBank) if (listenerBank.hasOwnProperty(registrationName) && listenerBank[registrationName][key]) { + var PluginModule = EventPluginRegistry.registrationNameModules[registrationName]; + PluginModule && PluginModule.willDeleteListener && PluginModule.willDeleteListener(inst, registrationName), + delete listenerBank[registrationName][key]; + } + }, + extractEvents: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + for (var events, plugins = EventPluginRegistry.plugins, i = 0; i < plugins.length; i++) { + var possiblePlugin = plugins[i]; + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); + extractedEvents && (events = accumulateInto(events, extractedEvents)); + } + } + return events; + }, + enqueueEvents: function(events) { + events && (eventQueue = accumulateInto(eventQueue, events)); + }, + processEventQueue: function(simulated) { + var processingEventQueue = eventQueue; + eventQueue = null, simulated ? forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated) : forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel), + eventQueue ? _prodInvariant("95") : void 0, ReactErrorUtils.rethrowCaughtError(); + }, + __purge: function() { + listenerBank = {}; + }, + __getListenerBank: function() { + return listenerBank; + } + }; + module.exports = EventPluginHub; +}, function(module, exports, __webpack_require__) { + "use strict"; + function recomputePluginOrdering() { + if (eventPluginOrder) for (var pluginName in namesToPlugins) { + var pluginModule = namesToPlugins[pluginName], pluginIndex = eventPluginOrder.indexOf(pluginName); + if (pluginIndex > -1 ? void 0 : _prodInvariant("96", pluginName), !EventPluginRegistry.plugins[pluginIndex]) { + pluginModule.extractEvents ? void 0 : _prodInvariant("97", pluginName), EventPluginRegistry.plugins[pluginIndex] = pluginModule; + var publishedEvents = pluginModule.eventTypes; + for (var eventName in publishedEvents) publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? void 0 : _prodInvariant("98", eventName, pluginName); + } + } + } + function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { + EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? _prodInvariant("99", eventName) : void 0, + EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName(phasedRegistrationName, pluginModule, eventName); + } + return !0; + } + return !!dispatchConfig.registrationName && (publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName), + !0); + } + function publishRegistrationName(registrationName, pluginModule, eventName) { + EventPluginRegistry.registrationNameModules[registrationName] ? _prodInvariant("100", registrationName) : void 0, + EventPluginRegistry.registrationNameModules[registrationName] = pluginModule, EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; + } + var _prodInvariant = __webpack_require__(48), eventPluginOrder = (__webpack_require__(50), + null), namesToPlugins = {}, EventPluginRegistry = { + plugins: [], + eventNameDispatchConfigs: {}, + registrationNameModules: {}, + registrationNameDependencies: {}, + possibleRegistrationNames: null, + injectEventPluginOrder: function(injectedEventPluginOrder) { + eventPluginOrder ? _prodInvariant("101") : void 0, eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder), + recomputePluginOrdering(); + }, + injectEventPluginsByName: function(injectedNamesToPlugins) { + var isOrderingDirty = !1; + for (var pluginName in injectedNamesToPlugins) if (injectedNamesToPlugins.hasOwnProperty(pluginName)) { + var pluginModule = injectedNamesToPlugins[pluginName]; + namesToPlugins.hasOwnProperty(pluginName) && namesToPlugins[pluginName] === pluginModule || (namesToPlugins[pluginName] ? _prodInvariant("102", pluginName) : void 0, + namesToPlugins[pluginName] = pluginModule, isOrderingDirty = !0); + } + isOrderingDirty && recomputePluginOrdering(); + }, + getPluginModuleForEvent: function(event) { + var dispatchConfig = event.dispatchConfig; + if (dispatchConfig.registrationName) return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null; + if (void 0 !== dispatchConfig.phasedRegistrationNames) { + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + for (var phase in phasedRegistrationNames) if (phasedRegistrationNames.hasOwnProperty(phase)) { + var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]]; + if (pluginModule) return pluginModule; + } + } + return null; + }, + _resetEventPlugins: function() { + eventPluginOrder = null; + for (var pluginName in namesToPlugins) namesToPlugins.hasOwnProperty(pluginName) && delete namesToPlugins[pluginName]; + EventPluginRegistry.plugins.length = 0; + var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs; + for (var eventName in eventNameDispatchConfigs) eventNameDispatchConfigs.hasOwnProperty(eventName) && delete eventNameDispatchConfigs[eventName]; + var registrationNameModules = EventPluginRegistry.registrationNameModules; + for (var registrationName in registrationNameModules) registrationNameModules.hasOwnProperty(registrationName) && delete registrationNameModules[registrationName]; + } + }; + module.exports = EventPluginRegistry; +}, function(module, exports, __webpack_require__) { + "use strict"; + function isEndish(topLevelType) { + return "topMouseUp" === topLevelType || "topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType; + } + function isMoveish(topLevelType) { + return "topMouseMove" === topLevelType || "topTouchMove" === topLevelType; + } + function isStartish(topLevelType) { + return "topMouseDown" === topLevelType || "topTouchStart" === topLevelType; + } + function executeDispatch(event, simulated, listener, inst) { + var type = event.type || "unknown-event"; + event.currentTarget = EventPluginUtils.getNodeFromInstance(inst), simulated ? ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event) : ReactErrorUtils.invokeGuardedCallback(type, listener, event), + event.currentTarget = null; + } + function executeDispatchesInOrder(event, simulated) { + var dispatchListeners = event._dispatchListeners, dispatchInstances = event._dispatchInstances; + if (Array.isArray(dispatchListeners)) for (var i = 0; i < dispatchListeners.length && !event.isPropagationStopped(); i++) executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); else dispatchListeners && executeDispatch(event, simulated, dispatchListeners, dispatchInstances); + event._dispatchListeners = null, event._dispatchInstances = null; + } + function executeDispatchesInOrderStopAtTrueImpl(event) { + var dispatchListeners = event._dispatchListeners, dispatchInstances = event._dispatchInstances; + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length && !event.isPropagationStopped(); i++) if (dispatchListeners[i](event, dispatchInstances[i])) return dispatchInstances[i]; + } else if (dispatchListeners && dispatchListeners(event, dispatchInstances)) return dispatchInstances; + return null; + } + function executeDispatchesInOrderStopAtTrue(event) { + var ret = executeDispatchesInOrderStopAtTrueImpl(event); + return event._dispatchInstances = null, event._dispatchListeners = null, ret; + } + function executeDirectDispatch(event) { + var dispatchListener = event._dispatchListeners, dispatchInstance = event._dispatchInstances; + Array.isArray(dispatchListener) ? _prodInvariant("103") : void 0, event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null; + var res = dispatchListener ? dispatchListener(event) : null; + return event.currentTarget = null, event._dispatchListeners = null, event._dispatchInstances = null, + res; + } + function hasDispatches(event) { + return !!event._dispatchListeners; + } + var ComponentTree, TreeTraversal, _prodInvariant = __webpack_require__(48), ReactErrorUtils = __webpack_require__(59), injection = (__webpack_require__(50), + __webpack_require__(60), { + injectComponentTree: function(Injected) { + ComponentTree = Injected; + }, + injectTreeTraversal: function(Injected) { + TreeTraversal = Injected; + } + }), EventPluginUtils = { + isEndish: isEndish, + isMoveish: isMoveish, + isStartish: isStartish, + executeDirectDispatch: executeDirectDispatch, + executeDispatchesInOrder: executeDispatchesInOrder, + executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue, + hasDispatches: hasDispatches, + getInstanceFromNode: function(node) { + return ComponentTree.getInstanceFromNode(node); + }, + getNodeFromInstance: function(node) { + return ComponentTree.getNodeFromInstance(node); + }, + isAncestor: function(a, b) { + return TreeTraversal.isAncestor(a, b); + }, + getLowestCommonAncestor: function(a, b) { + return TreeTraversal.getLowestCommonAncestor(a, b); + }, + getParentInstance: function(inst) { + return TreeTraversal.getParentInstance(inst); + }, + traverseTwoPhase: function(target, fn, arg) { + return TreeTraversal.traverseTwoPhase(target, fn, arg); + }, + traverseEnterLeave: function(from, to, fn, argFrom, argTo) { + return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo); + }, + injection: injection + }; + module.exports = EventPluginUtils; +}, function(module, exports, __webpack_require__) { + "use strict"; + function invokeGuardedCallback(name, func, a) { + try { + func(a); + } catch (x) { + null === caughtError && (caughtError = x); + } + } + var caughtError = null, ReactErrorUtils = { + invokeGuardedCallback: invokeGuardedCallback, + invokeGuardedCallbackWithCatch: invokeGuardedCallback, + rethrowCaughtError: function() { + if (caughtError) { + var error = caughtError; + throw caughtError = null, error; + } + } + }; + module.exports = ReactErrorUtils; +}, function(module, exports, __webpack_require__) { + "use strict"; + var emptyFunction = __webpack_require__(61), warning = emptyFunction; + module.exports = warning; +}, function(module, exports) { + "use strict"; + function makeEmptyFunction(arg) { + return function() { + return arg; + }; + } + var emptyFunction = function() {}; + emptyFunction.thatReturns = makeEmptyFunction, emptyFunction.thatReturnsFalse = makeEmptyFunction(!1), + emptyFunction.thatReturnsTrue = makeEmptyFunction(!0), emptyFunction.thatReturnsNull = makeEmptyFunction(null), + emptyFunction.thatReturnsThis = function() { + return this; + }, emptyFunction.thatReturnsArgument = function(arg) { + return arg; + }, module.exports = emptyFunction; +}, function(module, exports, __webpack_require__) { + "use strict"; + function accumulateInto(current, next) { + return null == next ? _prodInvariant("30") : void 0, null == current ? next : Array.isArray(current) ? Array.isArray(next) ? (current.push.apply(current, next), + current) : (current.push(next), current) : Array.isArray(next) ? [ current ].concat(next) : [ current, next ]; + } + var _prodInvariant = __webpack_require__(48); + __webpack_require__(50); + module.exports = accumulateInto; +}, function(module, exports) { + "use strict"; + function forEachAccumulated(arr, cb, scope) { + Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr); + } + module.exports = forEachAccumulated; +}, function(module, exports) { + "use strict"; + var canUseDOM = !("undefined" == typeof window || !window.document || !window.document.createElement), ExecutionEnvironment = { + canUseDOM: canUseDOM, + canUseWorkers: "undefined" != typeof Worker, + canUseEventListeners: canUseDOM && !(!window.addEventListener && !window.attachEvent), + canUseViewport: canUseDOM && !!window.screen, + isInWorker: !canUseDOM + }; + module.exports = ExecutionEnvironment; +}, function(module, exports, __webpack_require__) { + "use strict"; + function FallbackCompositionState(root) { + this._root = root, this._startText = this.getText(), this._fallbackText = null; + } + var _assign = __webpack_require__(66), PooledClass = __webpack_require__(67), getTextContentAccessor = __webpack_require__(68); + _assign(FallbackCompositionState.prototype, { + destructor: function() { + this._root = null, this._startText = null, this._fallbackText = null; + }, + getText: function() { + return "value" in this._root ? this._root.value : this._root[getTextContentAccessor()]; + }, + getData: function() { + if (this._fallbackText) return this._fallbackText; + var start, end, startValue = this._startText, startLength = startValue.length, endValue = this.getText(), endLength = endValue.length; + for (start = 0; start < startLength && startValue[start] === endValue[start]; start++) ; + var minEnd = startLength - start; + for (end = 1; end <= minEnd && startValue[startLength - end] === endValue[endLength - end]; end++) ; + var sliceTail = end > 1 ? 1 - end : void 0; + return this._fallbackText = endValue.slice(start, sliceTail), this._fallbackText; + } + }), PooledClass.addPoolingTo(FallbackCompositionState), module.exports = FallbackCompositionState; +}, function(module, exports) { + /* + object-assign + (c) Sindre Sorhus + @license MIT + */ + "use strict"; + function toObject(val) { + if (null === val || void 0 === val) throw new TypeError("Object.assign cannot be called with null or undefined"); + return Object(val); + } + function shouldUseNative() { + try { + if (!Object.assign) return !1; + var test1 = new String("abc"); + if (test1[5] = "de", "5" === Object.getOwnPropertyNames(test1)[0]) return !1; + for (var test2 = {}, i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i; + var order2 = Object.getOwnPropertyNames(test2).map(function(n) { + return test2[n]; + }); + if ("0123456789" !== order2.join("")) return !1; + var test3 = {}; + return "abcdefghijklmnopqrst".split("").forEach(function(letter) { + test3[letter] = letter; + }), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, test3)).join(""); + } catch (err) { + return !1; + } + } + var getOwnPropertySymbols = Object.getOwnPropertySymbols, hasOwnProperty = Object.prototype.hasOwnProperty, propIsEnumerable = Object.prototype.propertyIsEnumerable; + module.exports = shouldUseNative() ? Object.assign : function(target, source) { + for (var from, symbols, to = toObject(target), s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + for (var key in from) hasOwnProperty.call(from, key) && (to[key] = from[key]); + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) propIsEnumerable.call(from, symbols[i]) && (to[symbols[i]] = from[symbols[i]]); + } + } + return to; + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + var _prodInvariant = __webpack_require__(48), oneArgumentPooler = (__webpack_require__(50), + function(copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + return Klass.call(instance, copyFieldsFrom), instance; + } + return new Klass(copyFieldsFrom); + }), twoArgumentPooler = function(a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + return Klass.call(instance, a1, a2), instance; + } + return new Klass(a1, a2); + }, threeArgumentPooler = function(a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + return Klass.call(instance, a1, a2, a3), instance; + } + return new Klass(a1, a2, a3); + }, fourArgumentPooler = function(a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + return Klass.call(instance, a1, a2, a3, a4), instance; + } + return new Klass(a1, a2, a3, a4); + }, standardReleaser = function(instance) { + var Klass = this; + instance instanceof Klass ? void 0 : _prodInvariant("25"), instance.destructor(), + Klass.instancePool.length < Klass.poolSize && Klass.instancePool.push(instance); + }, DEFAULT_POOL_SIZE = 10, DEFAULT_POOLER = oneArgumentPooler, addPoolingTo = function(CopyConstructor, pooler) { + var NewKlass = CopyConstructor; + return NewKlass.instancePool = [], NewKlass.getPooled = pooler || DEFAULT_POOLER, + NewKlass.poolSize || (NewKlass.poolSize = DEFAULT_POOL_SIZE), NewKlass.release = standardReleaser, + NewKlass; + }, PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler + }; + module.exports = PooledClass; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getTextContentAccessor() { + return !contentKey && ExecutionEnvironment.canUseDOM && (contentKey = "textContent" in document.documentElement ? "textContent" : "innerText"), + contentKey; + } + var ExecutionEnvironment = __webpack_require__(64), contentKey = null; + module.exports = getTextContentAccessor; +}, function(module, exports, __webpack_require__) { + "use strict"; + function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + var SyntheticEvent = __webpack_require__(70), CompositionEventInterface = { + data: null + }; + SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface), + module.exports = SyntheticCompositionEvent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) { + this.dispatchConfig = dispatchConfig, this._targetInst = targetInst, this.nativeEvent = nativeEvent; + var Interface = this.constructor.Interface; + for (var propName in Interface) if (Interface.hasOwnProperty(propName)) { + var normalize = Interface[propName]; + normalize ? this[propName] = normalize(nativeEvent) : "target" === propName ? this.target = nativeEventTarget : this[propName] = nativeEvent[propName]; + } + var defaultPrevented = null != nativeEvent.defaultPrevented ? nativeEvent.defaultPrevented : nativeEvent.returnValue === !1; + return defaultPrevented ? this.isDefaultPrevented = emptyFunction.thatReturnsTrue : this.isDefaultPrevented = emptyFunction.thatReturnsFalse, + this.isPropagationStopped = emptyFunction.thatReturnsFalse, this; + } + var _assign = __webpack_require__(66), PooledClass = __webpack_require__(67), emptyFunction = __webpack_require__(61), shouldBeReleasedProperties = (__webpack_require__(60), + "function" == typeof Proxy, [ "dispatchConfig", "_targetInst", "nativeEvent", "isDefaultPrevented", "isPropagationStopped", "_dispatchListeners", "_dispatchInstances" ]), EventInterface = { + type: null, + target: null, + currentTarget: emptyFunction.thatReturnsNull, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function(event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null + }; + _assign(SyntheticEvent.prototype, { + preventDefault: function() { + this.defaultPrevented = !0; + var event = this.nativeEvent; + event && (event.preventDefault ? event.preventDefault() : "unknown" != typeof event.returnValue && (event.returnValue = !1), + this.isDefaultPrevented = emptyFunction.thatReturnsTrue); + }, + stopPropagation: function() { + var event = this.nativeEvent; + event && (event.stopPropagation ? event.stopPropagation() : "unknown" != typeof event.cancelBubble && (event.cancelBubble = !0), + this.isPropagationStopped = emptyFunction.thatReturnsTrue); + }, + persist: function() { + this.isPersistent = emptyFunction.thatReturnsTrue; + }, + isPersistent: emptyFunction.thatReturnsFalse, + destructor: function() { + var Interface = this.constructor.Interface; + for (var propName in Interface) this[propName] = null; + for (var i = 0; i < shouldBeReleasedProperties.length; i++) this[shouldBeReleasedProperties[i]] = null; + } + }), SyntheticEvent.Interface = EventInterface, SyntheticEvent.augmentClass = function(Class, Interface) { + var Super = this, E = function() {}; + E.prototype = Super.prototype; + var prototype = new E(); + _assign(prototype, Class.prototype), Class.prototype = prototype, Class.prototype.constructor = Class, + Class.Interface = _assign({}, Super.Interface, Interface), Class.augmentClass = Super.augmentClass, + PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler); + }, PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler), module.exports = SyntheticEvent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + var SyntheticEvent = __webpack_require__(70), InputEventInterface = { + data: null + }; + SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface), module.exports = SyntheticInputEvent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function shouldUseChangeEvent(elem) { + var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); + return "select" === nodeName || "input" === nodeName && "file" === elem.type; + } + function manualDispatchChangeEvent(nativeEvent) { + var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); + EventPropagators.accumulateTwoPhaseDispatches(event), ReactUpdates.batchedUpdates(runEventInBatch, event); + } + function runEventInBatch(event) { + EventPluginHub.enqueueEvents(event), EventPluginHub.processEventQueue(!1); + } + function startWatchingForChangeEventIE8(target, targetInst) { + activeElement = target, activeElementInst = targetInst, activeElement.attachEvent("onchange", manualDispatchChangeEvent); + } + function stopWatchingForChangeEventIE8() { + activeElement && (activeElement.detachEvent("onchange", manualDispatchChangeEvent), + activeElement = null, activeElementInst = null); + } + function getTargetInstForChangeEvent(topLevelType, targetInst) { + if ("topChange" === topLevelType) return targetInst; + } + function handleEventsForChangeEventIE8(topLevelType, target, targetInst) { + "topFocus" === topLevelType ? (stopWatchingForChangeEventIE8(), startWatchingForChangeEventIE8(target, targetInst)) : "topBlur" === topLevelType && stopWatchingForChangeEventIE8(); + } + function startWatchingForValueChange(target, targetInst) { + activeElement = target, activeElementInst = targetInst, activeElementValue = target.value, + activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, "value"), + Object.defineProperty(activeElement, "value", newValueProp), activeElement.attachEvent ? activeElement.attachEvent("onpropertychange", handlePropertyChange) : activeElement.addEventListener("propertychange", handlePropertyChange, !1); + } + function stopWatchingForValueChange() { + activeElement && (delete activeElement.value, activeElement.detachEvent ? activeElement.detachEvent("onpropertychange", handlePropertyChange) : activeElement.removeEventListener("propertychange", handlePropertyChange, !1), + activeElement = null, activeElementInst = null, activeElementValue = null, activeElementValueProp = null); + } + function handlePropertyChange(nativeEvent) { + if ("value" === nativeEvent.propertyName) { + var value = nativeEvent.srcElement.value; + value !== activeElementValue && (activeElementValue = value, manualDispatchChangeEvent(nativeEvent)); + } + } + function getTargetInstForInputEvent(topLevelType, targetInst) { + if ("topInput" === topLevelType) return targetInst; + } + function handleEventsForInputEventIE(topLevelType, target, targetInst) { + "topFocus" === topLevelType ? (stopWatchingForValueChange(), startWatchingForValueChange(target, targetInst)) : "topBlur" === topLevelType && stopWatchingForValueChange(); + } + function getTargetInstForInputEventIE(topLevelType, targetInst) { + if (("topSelectionChange" === topLevelType || "topKeyUp" === topLevelType || "topKeyDown" === topLevelType) && activeElement && activeElement.value !== activeElementValue) return activeElementValue = activeElement.value, + activeElementInst; + } + function shouldUseClickEvent(elem) { + return elem.nodeName && "input" === elem.nodeName.toLowerCase() && ("checkbox" === elem.type || "radio" === elem.type); + } + function getTargetInstForClickEvent(topLevelType, targetInst) { + if ("topClick" === topLevelType) return targetInst; + } + var EventPluginHub = __webpack_require__(56), EventPropagators = __webpack_require__(55), ExecutionEnvironment = __webpack_require__(64), ReactDOMComponentTree = __webpack_require__(47), ReactUpdates = __webpack_require__(73), SyntheticEvent = __webpack_require__(70), getEventTarget = __webpack_require__(81), isEventSupported = __webpack_require__(82), isTextInputElement = __webpack_require__(83), eventTypes = { + change: { + phasedRegistrationNames: { + bubbled: "onChange", + captured: "onChangeCapture" + }, + dependencies: [ "topBlur", "topChange", "topClick", "topFocus", "topInput", "topKeyDown", "topKeyUp", "topSelectionChange" ] + } + }, activeElement = null, activeElementInst = null, activeElementValue = null, activeElementValueProp = null, doesChangeEventBubble = !1; + ExecutionEnvironment.canUseDOM && (doesChangeEventBubble = isEventSupported("change") && (!document.documentMode || document.documentMode > 8)); + var isInputEventSupported = !1; + ExecutionEnvironment.canUseDOM && (isInputEventSupported = isEventSupported("input") && (!document.documentMode || document.documentMode > 11)); + var newValueProp = { + get: function() { + return activeElementValueProp.get.call(this); + }, + set: function(val) { + activeElementValue = "" + val, activeElementValueProp.set.call(this, val); + } + }, ChangeEventPlugin = { + eventTypes: eventTypes, + extractEvents: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var getTargetInstFunc, handleEventFunc, targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; + if (shouldUseChangeEvent(targetNode) ? doesChangeEventBubble ? getTargetInstFunc = getTargetInstForChangeEvent : handleEventFunc = handleEventsForChangeEventIE8 : isTextInputElement(targetNode) ? isInputEventSupported ? getTargetInstFunc = getTargetInstForInputEvent : (getTargetInstFunc = getTargetInstForInputEventIE, + handleEventFunc = handleEventsForInputEventIE) : shouldUseClickEvent(targetNode) && (getTargetInstFunc = getTargetInstForClickEvent), + getTargetInstFunc) { + var inst = getTargetInstFunc(topLevelType, targetInst); + if (inst) { + var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget); + return event.type = "change", EventPropagators.accumulateTwoPhaseDispatches(event), + event; + } + } + handleEventFunc && handleEventFunc(topLevelType, targetNode, targetInst); + } + }; + module.exports = ChangeEventPlugin; +}, function(module, exports, __webpack_require__) { + "use strict"; + function ensureInjected() { + ReactUpdates.ReactReconcileTransaction && batchingStrategy ? void 0 : _prodInvariant("123"); + } + function ReactUpdatesFlushTransaction() { + this.reinitializeTransaction(), this.dirtyComponentsLength = null, this.callbackQueue = CallbackQueue.getPooled(), + this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(!0); + } + function batchedUpdates(callback, a, b, c, d, e) { + return ensureInjected(), batchingStrategy.batchedUpdates(callback, a, b, c, d, e); + } + function mountOrderComparator(c1, c2) { + return c1._mountOrder - c2._mountOrder; + } + function runBatchedUpdates(transaction) { + var len = transaction.dirtyComponentsLength; + len !== dirtyComponents.length ? _prodInvariant("124", len, dirtyComponents.length) : void 0, + dirtyComponents.sort(mountOrderComparator), updateBatchNumber++; + for (var i = 0; i < len; i++) { + var component = dirtyComponents[i], callbacks = component._pendingCallbacks; + component._pendingCallbacks = null; + var markerName; + if (ReactFeatureFlags.logTopLevelRenders) { + var namedComponent = component; + component._currentElement.type.isReactTopLevelWrapper && (namedComponent = component._renderedComponent), + markerName = "React update: " + namedComponent.getName(), console.time(markerName); + } + if (ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber), + markerName && console.timeEnd(markerName), callbacks) for (var j = 0; j < callbacks.length; j++) transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance()); + } + } + function enqueueUpdate(component) { + return ensureInjected(), batchingStrategy.isBatchingUpdates ? (dirtyComponents.push(component), + void (null == component._updateBatchNumber && (component._updateBatchNumber = updateBatchNumber + 1))) : void batchingStrategy.batchedUpdates(enqueueUpdate, component); + } + function asap(callback, context) { + batchingStrategy.isBatchingUpdates ? void 0 : _prodInvariant("125"), asapCallbackQueue.enqueue(callback, context), + asapEnqueued = !0; + } + var _prodInvariant = __webpack_require__(48), _assign = __webpack_require__(66), CallbackQueue = __webpack_require__(74), PooledClass = __webpack_require__(67), ReactFeatureFlags = __webpack_require__(75), ReactReconciler = __webpack_require__(76), Transaction = __webpack_require__(80), dirtyComponents = (__webpack_require__(50), + []), updateBatchNumber = 0, asapCallbackQueue = CallbackQueue.getPooled(), asapEnqueued = !1, batchingStrategy = null, NESTED_UPDATES = { + initialize: function() { + this.dirtyComponentsLength = dirtyComponents.length; + }, + close: function() { + this.dirtyComponentsLength !== dirtyComponents.length ? (dirtyComponents.splice(0, this.dirtyComponentsLength), + flushBatchedUpdates()) : dirtyComponents.length = 0; + } + }, UPDATE_QUEUEING = { + initialize: function() { + this.callbackQueue.reset(); + }, + close: function() { + this.callbackQueue.notifyAll(); + } + }, TRANSACTION_WRAPPERS = [ NESTED_UPDATES, UPDATE_QUEUEING ]; + _assign(ReactUpdatesFlushTransaction.prototype, Transaction, { + getTransactionWrappers: function() { + return TRANSACTION_WRAPPERS; + }, + destructor: function() { + this.dirtyComponentsLength = null, CallbackQueue.release(this.callbackQueue), this.callbackQueue = null, + ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction), this.reconcileTransaction = null; + }, + perform: function(method, scope, a) { + return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a); + } + }), PooledClass.addPoolingTo(ReactUpdatesFlushTransaction); + var flushBatchedUpdates = function() { + for (;dirtyComponents.length || asapEnqueued; ) { + if (dirtyComponents.length) { + var transaction = ReactUpdatesFlushTransaction.getPooled(); + transaction.perform(runBatchedUpdates, null, transaction), ReactUpdatesFlushTransaction.release(transaction); + } + if (asapEnqueued) { + asapEnqueued = !1; + var queue = asapCallbackQueue; + asapCallbackQueue = CallbackQueue.getPooled(), queue.notifyAll(), CallbackQueue.release(queue); + } + } + }, ReactUpdatesInjection = { + injectReconcileTransaction: function(ReconcileTransaction) { + ReconcileTransaction ? void 0 : _prodInvariant("126"), ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; + }, + injectBatchingStrategy: function(_batchingStrategy) { + _batchingStrategy ? void 0 : _prodInvariant("127"), "function" != typeof _batchingStrategy.batchedUpdates ? _prodInvariant("128") : void 0, + "boolean" != typeof _batchingStrategy.isBatchingUpdates ? _prodInvariant("129") : void 0, + batchingStrategy = _batchingStrategy; + } + }, ReactUpdates = { + ReactReconcileTransaction: null, + batchedUpdates: batchedUpdates, + enqueueUpdate: enqueueUpdate, + flushBatchedUpdates: flushBatchedUpdates, + injection: ReactUpdatesInjection, + asap: asap + }; + module.exports = ReactUpdates; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + var _prodInvariant = __webpack_require__(48), PooledClass = __webpack_require__(67), CallbackQueue = (__webpack_require__(50), + function() { + function CallbackQueue(arg) { + _classCallCheck(this, CallbackQueue), this._callbacks = null, this._contexts = null, + this._arg = arg; + } + return CallbackQueue.prototype.enqueue = function(callback, context) { + this._callbacks = this._callbacks || [], this._callbacks.push(callback), this._contexts = this._contexts || [], + this._contexts.push(context); + }, CallbackQueue.prototype.notifyAll = function() { + var callbacks = this._callbacks, contexts = this._contexts, arg = this._arg; + if (callbacks && contexts) { + callbacks.length !== contexts.length ? _prodInvariant("24") : void 0, this._callbacks = null, + this._contexts = null; + for (var i = 0; i < callbacks.length; i++) callbacks[i].call(contexts[i], arg); + callbacks.length = 0, contexts.length = 0; + } + }, CallbackQueue.prototype.checkpoint = function() { + return this._callbacks ? this._callbacks.length : 0; + }, CallbackQueue.prototype.rollback = function(len) { + this._callbacks && this._contexts && (this._callbacks.length = len, this._contexts.length = len); + }, CallbackQueue.prototype.reset = function() { + this._callbacks = null, this._contexts = null; + }, CallbackQueue.prototype.destructor = function() { + this.reset(); + }, CallbackQueue; + }()); + module.exports = PooledClass.addPoolingTo(CallbackQueue); +}, function(module, exports) { + "use strict"; + var ReactFeatureFlags = { + logTopLevelRenders: !1 + }; + module.exports = ReactFeatureFlags; +}, function(module, exports, __webpack_require__) { + "use strict"; + function attachRefs() { + ReactRef.attachRefs(this, this._currentElement); + } + var ReactRef = __webpack_require__(77), ReactReconciler = (__webpack_require__(79), + __webpack_require__(60), { + mountComponent: function(internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) { + var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID); + return internalInstance._currentElement && null != internalInstance._currentElement.ref && transaction.getReactMountReady().enqueue(attachRefs, internalInstance), + markup; + }, + getHostNode: function(internalInstance) { + return internalInstance.getHostNode(); + }, + unmountComponent: function(internalInstance, safely) { + ReactRef.detachRefs(internalInstance, internalInstance._currentElement), internalInstance.unmountComponent(safely); + }, + receiveComponent: function(internalInstance, nextElement, transaction, context) { + var prevElement = internalInstance._currentElement; + if (nextElement !== prevElement || context !== internalInstance._context) { + var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); + refsChanged && ReactRef.detachRefs(internalInstance, prevElement), internalInstance.receiveComponent(nextElement, transaction, context), + refsChanged && internalInstance._currentElement && null != internalInstance._currentElement.ref && transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + }, + performUpdateIfNecessary: function(internalInstance, transaction, updateBatchNumber) { + internalInstance._updateBatchNumber === updateBatchNumber && internalInstance.performUpdateIfNecessary(transaction); + } + }); + module.exports = ReactReconciler; +}, function(module, exports, __webpack_require__) { + "use strict"; + function attachRef(ref, component, owner) { + "function" == typeof ref ? ref(component.getPublicInstance()) : ReactOwner.addComponentAsRefTo(component, ref, owner); + } + function detachRef(ref, component, owner) { + "function" == typeof ref ? ref(null) : ReactOwner.removeComponentAsRefFrom(component, ref, owner); + } + var ReactOwner = __webpack_require__(78), ReactRef = {}; + ReactRef.attachRefs = function(instance, element) { + if (null !== element && "object" == typeof element) { + var ref = element.ref; + null != ref && attachRef(ref, instance, element._owner); + } + }, ReactRef.shouldUpdateRefs = function(prevElement, nextElement) { + var prevRef = null, prevOwner = null; + null !== prevElement && "object" == typeof prevElement && (prevRef = prevElement.ref, + prevOwner = prevElement._owner); + var nextRef = null, nextOwner = null; + return null !== nextElement && "object" == typeof nextElement && (nextRef = nextElement.ref, + nextOwner = nextElement._owner), prevRef !== nextRef || "string" == typeof nextRef && nextOwner !== prevOwner; + }, ReactRef.detachRefs = function(instance, element) { + if (null !== element && "object" == typeof element) { + var ref = element.ref; + null != ref && detachRef(ref, instance, element._owner); + } + }, module.exports = ReactRef; +}, function(module, exports, __webpack_require__) { + "use strict"; + function isValidOwner(object) { + return !(!object || "function" != typeof object.attachRef || "function" != typeof object.detachRef); + } + var _prodInvariant = __webpack_require__(48), ReactOwner = (__webpack_require__(50), + { + addComponentAsRefTo: function(component, ref, owner) { + isValidOwner(owner) ? void 0 : _prodInvariant("119"), owner.attachRef(ref, component); + }, + removeComponentAsRefFrom: function(component, ref, owner) { + isValidOwner(owner) ? void 0 : _prodInvariant("120"); + var ownerPublicInstance = owner.getPublicInstance(); + ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance() && owner.detachRef(ref); + } + }); + module.exports = ReactOwner; +}, function(module, exports, __webpack_require__) { + "use strict"; + var debugTool = null; + module.exports = { + debugTool: debugTool + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + var _prodInvariant = __webpack_require__(48), OBSERVED_ERROR = (__webpack_require__(50), + {}), TransactionImpl = { + reinitializeTransaction: function() { + this.transactionWrappers = this.getTransactionWrappers(), this.wrapperInitData ? this.wrapperInitData.length = 0 : this.wrapperInitData = [], + this._isInTransaction = !1; + }, + _isInTransaction: !1, + getTransactionWrappers: null, + isInTransaction: function() { + return !!this._isInTransaction; + }, + perform: function(method, scope, a, b, c, d, e, f) { + this.isInTransaction() ? _prodInvariant("27") : void 0; + var errorThrown, ret; + try { + this._isInTransaction = !0, errorThrown = !0, this.initializeAll(0), ret = method.call(scope, a, b, c, d, e, f), + errorThrown = !1; + } finally { + try { + if (errorThrown) try { + this.closeAll(0); + } catch (err) {} else this.closeAll(0); + } finally { + this._isInTransaction = !1; + } + } + return ret; + }, + initializeAll: function(startIndex) { + for (var transactionWrappers = this.transactionWrappers, i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + try { + this.wrapperInitData[i] = OBSERVED_ERROR, this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; + } finally { + if (this.wrapperInitData[i] === OBSERVED_ERROR) try { + this.initializeAll(i + 1); + } catch (err) {} + } + } + }, + closeAll: function(startIndex) { + this.isInTransaction() ? void 0 : _prodInvariant("28"); + for (var transactionWrappers = this.transactionWrappers, i = startIndex; i < transactionWrappers.length; i++) { + var errorThrown, wrapper = transactionWrappers[i], initData = this.wrapperInitData[i]; + try { + errorThrown = !0, initData !== OBSERVED_ERROR && wrapper.close && wrapper.close.call(this, initData), + errorThrown = !1; + } finally { + if (errorThrown) try { + this.closeAll(i + 1); + } catch (e) {} + } + } + this.wrapperInitData.length = 0; + } + }; + module.exports = TransactionImpl; +}, function(module, exports) { + "use strict"; + function getEventTarget(nativeEvent) { + var target = nativeEvent.target || nativeEvent.srcElement || window; + return target.correspondingUseElement && (target = target.correspondingUseElement), + 3 === target.nodeType ? target.parentNode : target; + } + module.exports = getEventTarget; +}, function(module, exports, __webpack_require__) { + "use strict"; + /** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @param {?boolean} capture Check if the capture phase is supported. + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ + function isEventSupported(eventNameSuffix, capture) { + if (!ExecutionEnvironment.canUseDOM || capture && !("addEventListener" in document)) return !1; + var eventName = "on" + eventNameSuffix, isSupported = eventName in document; + if (!isSupported) { + var element = document.createElement("div"); + element.setAttribute(eventName, "return;"), isSupported = "function" == typeof element[eventName]; + } + return !isSupported && useHasFeature && "wheel" === eventNameSuffix && (isSupported = document.implementation.hasFeature("Events.wheel", "3.0")), + isSupported; + } + var useHasFeature, ExecutionEnvironment = __webpack_require__(64); + ExecutionEnvironment.canUseDOM && (useHasFeature = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0), + module.exports = isEventSupported; +}, function(module, exports) { + "use strict"; + function isTextInputElement(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return "input" === nodeName ? !!supportedInputTypes[elem.type] : "textarea" === nodeName; + } + var supportedInputTypes = { + 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 + }; + module.exports = isTextInputElement; +}, function(module, exports) { + "use strict"; + var DefaultEventPluginOrder = [ "ResponderEventPlugin", "SimpleEventPlugin", "TapEventPlugin", "EnterLeaveEventPlugin", "ChangeEventPlugin", "SelectEventPlugin", "BeforeInputEventPlugin" ]; + module.exports = DefaultEventPluginOrder; +}, function(module, exports, __webpack_require__) { + "use strict"; + var EventPropagators = __webpack_require__(55), ReactDOMComponentTree = __webpack_require__(47), SyntheticMouseEvent = __webpack_require__(86), eventTypes = { + mouseEnter: { + registrationName: "onMouseEnter", + dependencies: [ "topMouseOut", "topMouseOver" ] + }, + mouseLeave: { + registrationName: "onMouseLeave", + dependencies: [ "topMouseOut", "topMouseOver" ] + } + }, EnterLeaveEventPlugin = { + eventTypes: eventTypes, + extractEvents: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if ("topMouseOver" === topLevelType && (nativeEvent.relatedTarget || nativeEvent.fromElement)) return null; + if ("topMouseOut" !== topLevelType && "topMouseOver" !== topLevelType) return null; + var win; + if (nativeEventTarget.window === nativeEventTarget) win = nativeEventTarget; else { + var doc = nativeEventTarget.ownerDocument; + win = doc ? doc.defaultView || doc.parentWindow : window; + } + var from, to; + if ("topMouseOut" === topLevelType) { + from = targetInst; + var related = nativeEvent.relatedTarget || nativeEvent.toElement; + to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null; + } else from = null, to = targetInst; + if (from === to) return null; + var fromNode = null == from ? win : ReactDOMComponentTree.getNodeFromInstance(from), toNode = null == to ? win : ReactDOMComponentTree.getNodeFromInstance(to), leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget); + leave.type = "mouseleave", leave.target = fromNode, leave.relatedTarget = toNode; + var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget); + return enter.type = "mouseenter", enter.target = toNode, enter.relatedTarget = fromNode, + EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to), [ leave, enter ]; + } + }; + module.exports = EnterLeaveEventPlugin; +}, function(module, exports, __webpack_require__) { + "use strict"; + function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + var SyntheticUIEvent = __webpack_require__(87), ViewportMetrics = __webpack_require__(88), getEventModifierState = __webpack_require__(89), MouseEventInterface = { + screenX: null, + screenY: null, + clientX: null, + clientY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: function(event) { + var button = event.button; + return "which" in event ? button : 2 === button ? 2 : 4 === button ? 1 : 0; + }, + buttons: null, + relatedTarget: function(event) { + return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement); + }, + pageX: function(event) { + return "pageX" in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft; + }, + pageY: function(event) { + return "pageY" in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop; + } + }; + SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface), module.exports = SyntheticMouseEvent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + var SyntheticEvent = __webpack_require__(70), getEventTarget = __webpack_require__(81), UIEventInterface = { + view: function(event) { + if (event.view) return event.view; + var target = getEventTarget(event); + if (target.window === target) return target; + var doc = target.ownerDocument; + return doc ? doc.defaultView || doc.parentWindow : window; + }, + detail: function(event) { + return event.detail || 0; + } + }; + SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface), module.exports = SyntheticUIEvent; +}, function(module, exports) { + "use strict"; + var ViewportMetrics = { + currentScrollLeft: 0, + currentScrollTop: 0, + refreshScrollValues: function(scrollPosition) { + ViewportMetrics.currentScrollLeft = scrollPosition.x, ViewportMetrics.currentScrollTop = scrollPosition.y; + } + }; + module.exports = ViewportMetrics; +}, function(module, exports) { + "use strict"; + function modifierStateGetter(keyArg) { + var syntheticEvent = this, nativeEvent = syntheticEvent.nativeEvent; + if (nativeEvent.getModifierState) return nativeEvent.getModifierState(keyArg); + var keyProp = modifierKeyToProp[keyArg]; + return !!keyProp && !!nativeEvent[keyProp]; + } + function getEventModifierState(nativeEvent) { + return modifierStateGetter; + } + var modifierKeyToProp = { + Alt: "altKey", + Control: "ctrlKey", + Meta: "metaKey", + Shift: "shiftKey" + }; + module.exports = getEventModifierState; +}, function(module, exports, __webpack_require__) { + "use strict"; + var DOMProperty = __webpack_require__(49), MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY, HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE, HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE, HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE, HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE, HTMLDOMPropertyConfig = { + isCustomAttribute: RegExp.prototype.test.bind(new RegExp("^(data|aria)-[" + DOMProperty.ATTRIBUTE_NAME_CHAR + "]*$")), + Properties: { + accept: 0, + acceptCharset: 0, + accessKey: 0, + action: 0, + allowFullScreen: HAS_BOOLEAN_VALUE, + allowTransparency: 0, + alt: 0, + as: 0, + async: HAS_BOOLEAN_VALUE, + autoComplete: 0, + autoPlay: HAS_BOOLEAN_VALUE, + capture: HAS_BOOLEAN_VALUE, + cellPadding: 0, + cellSpacing: 0, + charSet: 0, + challenge: 0, + checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + cite: 0, + classID: 0, + className: 0, + cols: HAS_POSITIVE_NUMERIC_VALUE, + colSpan: 0, + content: 0, + contentEditable: 0, + contextMenu: 0, + controls: HAS_BOOLEAN_VALUE, + coords: 0, + crossOrigin: 0, + data: 0, + dateTime: 0, + "default": HAS_BOOLEAN_VALUE, + defer: HAS_BOOLEAN_VALUE, + dir: 0, + disabled: HAS_BOOLEAN_VALUE, + download: HAS_OVERLOADED_BOOLEAN_VALUE, + draggable: 0, + encType: 0, + form: 0, + formAction: 0, + formEncType: 0, + formMethod: 0, + formNoValidate: HAS_BOOLEAN_VALUE, + formTarget: 0, + frameBorder: 0, + headers: 0, + height: 0, + hidden: HAS_BOOLEAN_VALUE, + 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: HAS_BOOLEAN_VALUE, + low: 0, + manifest: 0, + marginHeight: 0, + marginWidth: 0, + max: 0, + maxLength: 0, + media: 0, + mediaGroup: 0, + method: 0, + min: 0, + minLength: 0, + multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + name: 0, + nonce: 0, + noValidate: HAS_BOOLEAN_VALUE, + open: HAS_BOOLEAN_VALUE, + optimum: 0, + pattern: 0, + placeholder: 0, + playsInline: HAS_BOOLEAN_VALUE, + poster: 0, + preload: 0, + profile: 0, + radioGroup: 0, + readOnly: HAS_BOOLEAN_VALUE, + referrerPolicy: 0, + rel: 0, + required: HAS_BOOLEAN_VALUE, + reversed: HAS_BOOLEAN_VALUE, + role: 0, + rows: HAS_POSITIVE_NUMERIC_VALUE, + rowSpan: HAS_NUMERIC_VALUE, + sandbox: 0, + scope: 0, + scoped: HAS_BOOLEAN_VALUE, + scrolling: 0, + seamless: HAS_BOOLEAN_VALUE, + selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + shape: 0, + size: HAS_POSITIVE_NUMERIC_VALUE, + sizes: 0, + span: HAS_POSITIVE_NUMERIC_VALUE, + spellCheck: 0, + src: 0, + srcDoc: 0, + srcLang: 0, + srcSet: 0, + start: HAS_NUMERIC_VALUE, + 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: HAS_BOOLEAN_VALUE, + itemType: 0, + itemID: 0, + itemRef: 0, + results: 0, + security: 0, + unselectable: 0 + }, + DOMAttributeNames: { + acceptCharset: "accept-charset", + className: "class", + htmlFor: "for", + httpEquiv: "http-equiv" + }, + DOMPropertyNames: {} + }; + module.exports = HTMLDOMPropertyConfig; +}, function(module, exports, __webpack_require__) { + "use strict"; + var DOMChildrenOperations = __webpack_require__(92), ReactDOMIDOperations = __webpack_require__(103), ReactComponentBrowserEnvironment = { + processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, + replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup + }; + module.exports = ReactComponentBrowserEnvironment; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getNodeAfter(parentNode, node) { + return Array.isArray(node) && (node = node[1]), node ? node.nextSibling : parentNode.firstChild; + } + function insertLazyTreeChildAt(parentNode, childTree, referenceNode) { + DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode); + } + function moveChild(parentNode, childNode, referenceNode) { + Array.isArray(childNode) ? moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode) : insertChildAt(parentNode, childNode, referenceNode); + } + function removeChild(parentNode, childNode) { + if (Array.isArray(childNode)) { + var closingComment = childNode[1]; + childNode = childNode[0], removeDelimitedText(parentNode, childNode, closingComment), + parentNode.removeChild(closingComment); + } + parentNode.removeChild(childNode); + } + function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) { + for (var node = openingComment; ;) { + var nextNode = node.nextSibling; + if (insertChildAt(parentNode, node, referenceNode), node === closingComment) break; + node = nextNode; + } + } + function removeDelimitedText(parentNode, startNode, closingComment) { + for (;;) { + var node = startNode.nextSibling; + if (node === closingComment) break; + parentNode.removeChild(node); + } + } + function replaceDelimitedText(openingComment, closingComment, stringText) { + var parentNode = openingComment.parentNode, nodeAfterComment = openingComment.nextSibling; + nodeAfterComment === closingComment ? stringText && insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment) : stringText ? (setTextContent(nodeAfterComment, stringText), + removeDelimitedText(parentNode, nodeAfterComment, closingComment)) : removeDelimitedText(parentNode, openingComment, closingComment); + } + var DOMLazyTree = __webpack_require__(93), Danger = __webpack_require__(99), createMicrosoftUnsafeLocalFunction = (__webpack_require__(47), + __webpack_require__(79), __webpack_require__(96)), setInnerHTML = __webpack_require__(95), setTextContent = __webpack_require__(97), insertChildAt = createMicrosoftUnsafeLocalFunction(function(parentNode, childNode, referenceNode) { + parentNode.insertBefore(childNode, referenceNode); + }), dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup, DOMChildrenOperations = { + dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup, + replaceDelimitedText: replaceDelimitedText, + processUpdates: function(parentNode, updates) { + for (var k = 0; k < updates.length; k++) { + var update = updates[k]; + switch (update.type) { + case "INSERT_MARKUP": + insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode)); + break; + + case "MOVE_EXISTING": + moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode)); + break; + + case "SET_MARKUP": + setInnerHTML(parentNode, update.content); + break; + + case "TEXT_CONTENT": + setTextContent(parentNode, update.content); + break; + + case "REMOVE_NODE": + removeChild(parentNode, update.fromNode); + } + } + } + }; + module.exports = DOMChildrenOperations; +}, function(module, exports, __webpack_require__) { + "use strict"; + function insertTreeChildren(tree) { + if (enableLazy) { + var node = tree.node, children = tree.children; + if (children.length) for (var i = 0; i < children.length; i++) insertTreeBefore(node, children[i], null); else null != tree.html ? setInnerHTML(node, tree.html) : null != tree.text && setTextContent(node, tree.text); + } + } + function replaceChildWithTree(oldNode, newTree) { + oldNode.parentNode.replaceChild(newTree.node, oldNode), insertTreeChildren(newTree); + } + function queueChild(parentTree, childTree) { + enableLazy ? parentTree.children.push(childTree) : parentTree.node.appendChild(childTree.node); + } + function queueHTML(tree, html) { + enableLazy ? tree.html = html : setInnerHTML(tree.node, html); + } + function queueText(tree, text) { + enableLazy ? tree.text = text : setTextContent(tree.node, text); + } + function toString() { + return this.node.nodeName; + } + function DOMLazyTree(node) { + return { + node: node, + children: [], + html: null, + text: null, + toString: toString + }; + } + var DOMNamespaces = __webpack_require__(94), setInnerHTML = __webpack_require__(95), createMicrosoftUnsafeLocalFunction = __webpack_require__(96), setTextContent = __webpack_require__(97), ELEMENT_NODE_TYPE = 1, DOCUMENT_FRAGMENT_NODE_TYPE = 11, enableLazy = "undefined" != typeof document && "number" == typeof document.documentMode || "undefined" != typeof navigator && "string" == typeof navigator.userAgent && /\bEdge\/\d/.test(navigator.userAgent), insertTreeBefore = createMicrosoftUnsafeLocalFunction(function(parentNode, tree, referenceNode) { + tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && "object" === tree.node.nodeName.toLowerCase() && (null == tree.node.namespaceURI || tree.node.namespaceURI === DOMNamespaces.html) ? (insertTreeChildren(tree), + parentNode.insertBefore(tree.node, referenceNode)) : (parentNode.insertBefore(tree.node, referenceNode), + insertTreeChildren(tree)); + }); + DOMLazyTree.insertTreeBefore = insertTreeBefore, DOMLazyTree.replaceChildWithTree = replaceChildWithTree, + DOMLazyTree.queueChild = queueChild, DOMLazyTree.queueHTML = queueHTML, DOMLazyTree.queueText = queueText, + module.exports = DOMLazyTree; +}, function(module, exports) { + "use strict"; + var DOMNamespaces = { + html: "http://www.w3.org/1999/xhtml", + mathml: "http://www.w3.org/1998/Math/MathML", + svg: "http://www.w3.org/2000/svg" + }; + module.exports = DOMNamespaces; +}, function(module, exports, __webpack_require__) { + "use strict"; + var reusableSVGContainer, ExecutionEnvironment = __webpack_require__(64), DOMNamespaces = __webpack_require__(94), WHITESPACE_TEST = /^[ \r\n\t\f]/, NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/, createMicrosoftUnsafeLocalFunction = __webpack_require__(96), setInnerHTML = createMicrosoftUnsafeLocalFunction(function(node, html) { + if (node.namespaceURI !== DOMNamespaces.svg || "innerHTML" in node) node.innerHTML = html; else { + reusableSVGContainer = reusableSVGContainer || document.createElement("div"), reusableSVGContainer.innerHTML = "" + html + ""; + for (var svgNode = reusableSVGContainer.firstChild; svgNode.firstChild; ) node.appendChild(svgNode.firstChild); + } + }); + if (ExecutionEnvironment.canUseDOM) { + var testElement = document.createElement("div"); + testElement.innerHTML = " ", "" === testElement.innerHTML && (setInnerHTML = function(node, html) { + if (node.parentNode && node.parentNode.replaceChild(node, node), WHITESPACE_TEST.test(html) || "<" === html[0] && NONVISIBLE_TEST.test(html)) { + node.innerHTML = String.fromCharCode(65279) + html; + var textNode = node.firstChild; + 1 === textNode.data.length ? node.removeChild(textNode) : textNode.deleteData(0, 1); + } else node.innerHTML = html; + }), testElement = null; + } + module.exports = setInnerHTML; +}, function(module, exports) { + "use strict"; + var createMicrosoftUnsafeLocalFunction = function(func) { + return "undefined" != typeof MSApp && MSApp.execUnsafeLocalFunction ? function(arg0, arg1, arg2, arg3) { + MSApp.execUnsafeLocalFunction(function() { + return func(arg0, arg1, arg2, arg3); + }); + } : func; + }; + module.exports = createMicrosoftUnsafeLocalFunction; +}, function(module, exports, __webpack_require__) { + "use strict"; + var ExecutionEnvironment = __webpack_require__(64), escapeTextContentForBrowser = __webpack_require__(98), setInnerHTML = __webpack_require__(95), setTextContent = function(node, text) { + if (text) { + var firstChild = node.firstChild; + if (firstChild && firstChild === node.lastChild && 3 === firstChild.nodeType) return void (firstChild.nodeValue = text); + } + node.textContent = text; + }; + ExecutionEnvironment.canUseDOM && ("textContent" in document.documentElement || (setTextContent = function(node, text) { + return 3 === node.nodeType ? void (node.nodeValue = text) : void setInnerHTML(node, escapeTextContentForBrowser(text)); + })), module.exports = setTextContent; +}, function(module, exports) { + "use strict"; + function escapeHtml(string) { + var str = "" + string, match = matchHtmlRegExp.exec(str); + if (!match) return str; + var escape, html = "", index = 0, lastIndex = 0; + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + escape = """; + break; + + case 38: + escape = "&"; + break; + + case 39: + escape = "'"; + break; + + case 60: + escape = "<"; + break; + + case 62: + escape = ">"; + break; + + default: + continue; + } + lastIndex !== index && (html += str.substring(lastIndex, index)), lastIndex = index + 1, + html += escape; + } + return lastIndex !== index ? html + str.substring(lastIndex, index) : html; + } + function escapeTextContentForBrowser(text) { + return "boolean" == typeof text || "number" == typeof text ? "" + text : escapeHtml(text); + } + var matchHtmlRegExp = /["'&<>]/; + module.exports = escapeTextContentForBrowser; +}, function(module, exports, __webpack_require__) { + "use strict"; + var _prodInvariant = __webpack_require__(48), DOMLazyTree = __webpack_require__(93), ExecutionEnvironment = __webpack_require__(64), createNodesFromMarkup = __webpack_require__(100), emptyFunction = __webpack_require__(61), Danger = (__webpack_require__(50), + { + dangerouslyReplaceNodeWithMarkup: function(oldChild, markup) { + if (ExecutionEnvironment.canUseDOM ? void 0 : _prodInvariant("56"), markup ? void 0 : _prodInvariant("57"), + "HTML" === oldChild.nodeName ? _prodInvariant("58") : void 0, "string" == typeof markup) { + var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; + oldChild.parentNode.replaceChild(newChild, oldChild); + } else DOMLazyTree.replaceChildWithTree(oldChild, markup); + } + }); + module.exports = Danger; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getNodeName(markup) { + var nodeNameMatch = markup.match(nodeNamePattern); + return nodeNameMatch && nodeNameMatch[1].toLowerCase(); + } + function createNodesFromMarkup(markup, handleScript) { + var node = dummyNode; + dummyNode ? void 0 : invariant(!1); + var nodeName = getNodeName(markup), wrap = nodeName && getMarkupWrap(nodeName); + if (wrap) { + node.innerHTML = wrap[1] + markup + wrap[2]; + for (var wrapDepth = wrap[0]; wrapDepth--; ) node = node.lastChild; + } else node.innerHTML = markup; + var scripts = node.getElementsByTagName("script"); + scripts.length && (handleScript ? void 0 : invariant(!1), createArrayFromMixed(scripts).forEach(handleScript)); + for (var nodes = Array.from(node.childNodes); node.lastChild; ) node.removeChild(node.lastChild); + return nodes; + } + var ExecutionEnvironment = __webpack_require__(64), createArrayFromMixed = __webpack_require__(101), getMarkupWrap = __webpack_require__(102), invariant = __webpack_require__(50), dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement("div") : null, nodeNamePattern = /^\s*<(\w+)/; + module.exports = createNodesFromMarkup; +}, function(module, exports, __webpack_require__) { + "use strict"; + function toArray(obj) { + var length = obj.length; + if (Array.isArray(obj) || "object" != typeof obj && "function" != typeof obj ? invariant(!1) : void 0, + "number" != typeof length ? invariant(!1) : void 0, 0 === length || length - 1 in obj ? void 0 : invariant(!1), + "function" == typeof obj.callee ? invariant(!1) : void 0, obj.hasOwnProperty) try { + return Array.prototype.slice.call(obj); + } catch (e) {} + for (var ret = Array(length), ii = 0; ii < length; ii++) ret[ii] = obj[ii]; + return ret; + } + function hasArrayNature(obj) { + return !!obj && ("object" == typeof obj || "function" == typeof obj) && "length" in obj && !("setInterval" in obj) && "number" != typeof obj.nodeType && (Array.isArray(obj) || "callee" in obj || "item" in obj); + } + function createArrayFromMixed(obj) { + return hasArrayNature(obj) ? Array.isArray(obj) ? obj.slice() : toArray(obj) : [ obj ]; + } + var invariant = __webpack_require__(50); + module.exports = createArrayFromMixed; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getMarkupWrap(nodeName) { + return dummyNode ? void 0 : invariant(!1), markupWrap.hasOwnProperty(nodeName) || (nodeName = "*"), + shouldWrap.hasOwnProperty(nodeName) || ("*" === nodeName ? dummyNode.innerHTML = "" : dummyNode.innerHTML = "<" + nodeName + ">", + shouldWrap[nodeName] = !dummyNode.firstChild), shouldWrap[nodeName] ? markupWrap[nodeName] : null; + } + var ExecutionEnvironment = __webpack_require__(64), invariant = __webpack_require__(50), dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement("div") : null, shouldWrap = {}, selectWrap = [ 1, '" ], tableWrap = [ 1, "", "
" ], trWrap = [ 3, "", "
" ], svgWrap = [ 1, '', "" ], markupWrap = { + "*": [ 1, "?
", "
" ], + area: [ 1, "", "" ], + col: [ 2, "", "
" ], + legend: [ 1, "
", "
" ], + param: [ 1, "", "" ], + tr: [ 2, "", "
" ], + optgroup: selectWrap, + option: selectWrap, + caption: tableWrap, + colgroup: tableWrap, + tbody: tableWrap, + tfoot: tableWrap, + thead: tableWrap, + td: trWrap, + th: trWrap + }, svgElements = [ "circle", "clipPath", "defs", "ellipse", "g", "image", "line", "linearGradient", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "text", "tspan" ]; + svgElements.forEach(function(nodeName) { + markupWrap[nodeName] = svgWrap, shouldWrap[nodeName] = !0; + }), module.exports = getMarkupWrap; +}, function(module, exports, __webpack_require__) { + "use strict"; + var DOMChildrenOperations = __webpack_require__(92), ReactDOMComponentTree = __webpack_require__(47), ReactDOMIDOperations = { + dangerouslyProcessChildrenUpdates: function(parentInst, updates) { + var node = ReactDOMComponentTree.getNodeFromInstance(parentInst); + DOMChildrenOperations.processUpdates(node, updates); + } + }; + module.exports = ReactDOMIDOperations; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getDeclarationErrorAddendum(internalInstance) { + if (internalInstance) { + var owner = internalInstance._currentElement._owner || null; + if (owner) { + var name = owner.getName(); + if (name) return " This DOM node was rendered by `" + name + "`."; + } + } + return ""; + } + function assertValidProps(component, props) { + props && (voidElementTags[component._tag] && (null != props.children || null != props.dangerouslySetInnerHTML ? _prodInvariant("137", component._tag, component._currentElement._owner ? " Check the render method of " + component._currentElement._owner.getName() + "." : "") : void 0), + null != props.dangerouslySetInnerHTML && (null != props.children ? _prodInvariant("60") : void 0, + "object" == typeof props.dangerouslySetInnerHTML && HTML in props.dangerouslySetInnerHTML ? void 0 : _prodInvariant("61")), + null != props.style && "object" != typeof props.style ? _prodInvariant("62", getDeclarationErrorAddendum(component)) : void 0); + } + function enqueuePutListener(inst, registrationName, listener, transaction) { + if (!(transaction instanceof ReactServerRenderingTransaction)) { + var containerInfo = inst._hostContainerInfo, isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE, doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument; + listenTo(registrationName, doc), transaction.getReactMountReady().enqueue(putListener, { + inst: inst, + registrationName: registrationName, + listener: listener + }); + } + } + function putListener() { + var listenerToPut = this; + EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener); + } + function inputPostMount() { + var inst = this; + ReactDOMInput.postMountWrapper(inst); + } + function textareaPostMount() { + var inst = this; + ReactDOMTextarea.postMountWrapper(inst); + } + function optionPostMount() { + var inst = this; + ReactDOMOption.postMountWrapper(inst); + } + function trapBubbledEventsLocal() { + var inst = this; + inst._rootNodeID ? void 0 : _prodInvariant("63"); + var node = getNode(inst); + switch (node ? void 0 : _prodInvariant("64"), inst._tag) { + case "iframe": + case "object": + inst._wrapperState.listeners = [ ReactBrowserEventEmitter.trapBubbledEvent("topLoad", "load", node) ]; + break; + + case "video": + case "audio": + inst._wrapperState.listeners = []; + for (var event in mediaEvents) mediaEvents.hasOwnProperty(event) && inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node)); + break; + + case "source": + inst._wrapperState.listeners = [ ReactBrowserEventEmitter.trapBubbledEvent("topError", "error", node) ]; + break; + + case "img": + inst._wrapperState.listeners = [ ReactBrowserEventEmitter.trapBubbledEvent("topError", "error", node), ReactBrowserEventEmitter.trapBubbledEvent("topLoad", "load", node) ]; + break; + + case "form": + inst._wrapperState.listeners = [ ReactBrowserEventEmitter.trapBubbledEvent("topReset", "reset", node), ReactBrowserEventEmitter.trapBubbledEvent("topSubmit", "submit", node) ]; + break; + + case "input": + case "select": + case "textarea": + inst._wrapperState.listeners = [ ReactBrowserEventEmitter.trapBubbledEvent("topInvalid", "invalid", node) ]; + } + } + function postUpdateSelectWrapper() { + ReactDOMSelect.postUpdateWrapper(this); + } + function validateDangerousTag(tag) { + hasOwnProperty.call(validatedTagCache, tag) || (VALID_TAG_REGEX.test(tag) ? void 0 : _prodInvariant("65", tag), + validatedTagCache[tag] = !0); + } + function isCustomComponent(tagName, props) { + return tagName.indexOf("-") >= 0 || null != props.is; + } + function ReactDOMComponent(element) { + var tag = element.type; + validateDangerousTag(tag), this._currentElement = element, this._tag = tag.toLowerCase(), + this._namespaceURI = null, this._renderedChildren = null, this._previousStyle = null, + this._previousStyleCopy = null, this._hostNode = null, this._hostParent = null, + this._rootNodeID = 0, this._domID = 0, this._hostContainerInfo = null, this._wrapperState = null, + this._topLevelWrapper = null, this._flags = 0; + } + var _prodInvariant = __webpack_require__(48), _assign = __webpack_require__(66), AutoFocusUtils = __webpack_require__(105), CSSPropertyOperations = __webpack_require__(107), DOMLazyTree = __webpack_require__(93), DOMNamespaces = __webpack_require__(94), DOMProperty = __webpack_require__(49), DOMPropertyOperations = __webpack_require__(115), EventPluginHub = __webpack_require__(56), EventPluginRegistry = __webpack_require__(57), ReactBrowserEventEmitter = __webpack_require__(117), ReactDOMComponentFlags = __webpack_require__(51), ReactDOMComponentTree = __webpack_require__(47), ReactDOMInput = __webpack_require__(120), ReactDOMOption = __webpack_require__(123), ReactDOMSelect = __webpack_require__(124), ReactDOMTextarea = __webpack_require__(125), ReactMultiChild = (__webpack_require__(79), + __webpack_require__(126)), ReactServerRenderingTransaction = __webpack_require__(146), escapeTextContentForBrowser = (__webpack_require__(61), + __webpack_require__(98)), Flags = (__webpack_require__(50), __webpack_require__(82), + __webpack_require__(135), __webpack_require__(149), __webpack_require__(60), ReactDOMComponentFlags), deleteListener = EventPluginHub.deleteListener, getNode = ReactDOMComponentTree.getNodeFromInstance, listenTo = ReactBrowserEventEmitter.listenTo, registrationNameModules = EventPluginRegistry.registrationNameModules, CONTENT_TYPES = { + string: !0, + number: !0 + }, STYLE = "style", HTML = "__html", RESERVED_PROPS = { + children: null, + dangerouslySetInnerHTML: null, + suppressContentEditableWarning: null + }, DOC_FRAGMENT_TYPE = 11, mediaEvents = { + 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" + }, omittedCloseTags = { + 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 + }, newlineEatingTags = { + listing: !0, + pre: !0, + textarea: !0 + }, voidElementTags = _assign({ + menuitem: !0 + }, omittedCloseTags), VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/, validatedTagCache = {}, hasOwnProperty = {}.hasOwnProperty, globalIdCounter = 1; + ReactDOMComponent.displayName = "ReactDOMComponent", ReactDOMComponent.Mixin = { + mountComponent: function(transaction, hostParent, hostContainerInfo, context) { + this._rootNodeID = globalIdCounter++, this._domID = hostContainerInfo._idCounter++, + this._hostParent = hostParent, this._hostContainerInfo = hostContainerInfo; + var props = 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 + }, transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + + case "input": + ReactDOMInput.mountWrapper(this, props, hostParent), props = ReactDOMInput.getHostProps(this, props), + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + + case "option": + ReactDOMOption.mountWrapper(this, props, hostParent), props = ReactDOMOption.getHostProps(this, props); + break; + + case "select": + ReactDOMSelect.mountWrapper(this, props, hostParent), props = ReactDOMSelect.getHostProps(this, props), + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + break; + + case "textarea": + ReactDOMTextarea.mountWrapper(this, props, hostParent), props = ReactDOMTextarea.getHostProps(this, props), + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); + } + assertValidProps(this, props); + var namespaceURI, parentTag; + null != hostParent ? (namespaceURI = hostParent._namespaceURI, parentTag = hostParent._tag) : hostContainerInfo._tag && (namespaceURI = hostContainerInfo._namespaceURI, + parentTag = hostContainerInfo._tag), (null == namespaceURI || namespaceURI === DOMNamespaces.svg && "foreignobject" === parentTag) && (namespaceURI = DOMNamespaces.html), + namespaceURI === DOMNamespaces.html && ("svg" === this._tag ? namespaceURI = DOMNamespaces.svg : "math" === this._tag && (namespaceURI = DOMNamespaces.mathml)), + this._namespaceURI = namespaceURI; + var mountImage; + if (transaction.useCreateElement) { + var el, ownerDocument = hostContainerInfo._ownerDocument; + if (namespaceURI === DOMNamespaces.html) if ("script" === this._tag) { + var div = ownerDocument.createElement("div"), type = this._currentElement.type; + div.innerHTML = "<" + type + ">", el = div.removeChild(div.firstChild); + } else el = props.is ? ownerDocument.createElement(this._currentElement.type, props.is) : ownerDocument.createElement(this._currentElement.type); else el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type); + ReactDOMComponentTree.precacheNode(this, el), this._flags |= Flags.hasCachedChildNodes, + this._hostParent || DOMPropertyOperations.setAttributeForRoot(el), this._updateDOMProperties(null, props, transaction); + var lazyTree = DOMLazyTree(el); + this._createInitialChildren(transaction, props, context, lazyTree), mountImage = lazyTree; + } else { + var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props), tagContent = this._createContentMarkup(transaction, props, context); + mountImage = !tagContent && omittedCloseTags[this._tag] ? tagOpen + "/>" : tagOpen + ">" + tagContent + ""; + } + switch (this._tag) { + case "input": + transaction.getReactMountReady().enqueue(inputPostMount, this), props.autoFocus && transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + break; + + case "textarea": + transaction.getReactMountReady().enqueue(textareaPostMount, this), props.autoFocus && transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + break; + + case "select": + props.autoFocus && transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + break; + + case "button": + props.autoFocus && transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this); + break; + + case "option": + transaction.getReactMountReady().enqueue(optionPostMount, this); + } + return mountImage; + }, + _createOpenTagMarkupAndPutListeners: function(transaction, props) { + var ret = "<" + this._currentElement.type; + for (var propKey in props) if (props.hasOwnProperty(propKey)) { + var propValue = props[propKey]; + if (null != propValue) if (registrationNameModules.hasOwnProperty(propKey)) propValue && enqueuePutListener(this, propKey, propValue, transaction); else { + propKey === STYLE && (propValue && (propValue = this._previousStyleCopy = _assign({}, props.style)), + propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this)); + var markup = null; + null != this._tag && isCustomComponent(this._tag, props) ? RESERVED_PROPS.hasOwnProperty(propKey) || (markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue)) : markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue), + markup && (ret += " " + markup); + } + } + return transaction.renderToStaticMarkup ? ret : (this._hostParent || (ret += " " + DOMPropertyOperations.createMarkupForRoot()), + ret += " " + DOMPropertyOperations.createMarkupForID(this._domID)); + }, + _createContentMarkup: function(transaction, props, context) { + var ret = "", innerHTML = props.dangerouslySetInnerHTML; + if (null != innerHTML) null != innerHTML.__html && (ret = innerHTML.__html); else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null, childrenToUse = null != contentToUse ? null : props.children; + if (null != contentToUse) ret = escapeTextContentForBrowser(contentToUse); else if (null != childrenToUse) { + var mountImages = this.mountChildren(childrenToUse, transaction, context); + ret = mountImages.join(""); + } + } + return newlineEatingTags[this._tag] && "\n" === ret.charAt(0) ? "\n" + ret : ret; + }, + _createInitialChildren: function(transaction, props, context, lazyTree) { + var innerHTML = props.dangerouslySetInnerHTML; + if (null != innerHTML) null != innerHTML.__html && DOMLazyTree.queueHTML(lazyTree, innerHTML.__html); else { + var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null, childrenToUse = null != contentToUse ? null : props.children; + if (null != contentToUse) "" !== contentToUse && DOMLazyTree.queueText(lazyTree, contentToUse); else if (null != childrenToUse) for (var mountImages = this.mountChildren(childrenToUse, transaction, context), i = 0; i < mountImages.length; i++) DOMLazyTree.queueChild(lazyTree, mountImages[i]); + } + }, + receiveComponent: function(nextElement, transaction, context) { + var prevElement = this._currentElement; + this._currentElement = nextElement, this.updateComponent(transaction, prevElement, nextElement, context); + }, + updateComponent: function(transaction, prevElement, nextElement, context) { + var lastProps = prevElement.props, nextProps = this._currentElement.props; + switch (this._tag) { + case "input": + lastProps = ReactDOMInput.getHostProps(this, lastProps), nextProps = ReactDOMInput.getHostProps(this, nextProps); + break; + + case "option": + lastProps = ReactDOMOption.getHostProps(this, lastProps), nextProps = ReactDOMOption.getHostProps(this, nextProps); + break; + + case "select": + lastProps = ReactDOMSelect.getHostProps(this, lastProps), nextProps = ReactDOMSelect.getHostProps(this, nextProps); + break; + + case "textarea": + lastProps = ReactDOMTextarea.getHostProps(this, lastProps), nextProps = ReactDOMTextarea.getHostProps(this, nextProps); + } + switch (assertValidProps(this, nextProps), this._updateDOMProperties(lastProps, nextProps, transaction), + this._updateDOMChildren(lastProps, nextProps, transaction, context), this._tag) { + case "input": + ReactDOMInput.updateWrapper(this); + break; + + case "textarea": + ReactDOMTextarea.updateWrapper(this); + break; + + case "select": + transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this); + } + }, + _updateDOMProperties: function(lastProps, nextProps, transaction) { + var propKey, styleName, styleUpdates; + for (propKey in lastProps) if (!nextProps.hasOwnProperty(propKey) && lastProps.hasOwnProperty(propKey) && null != lastProps[propKey]) if (propKey === STYLE) { + var lastStyle = this._previousStyleCopy; + for (styleName in lastStyle) lastStyle.hasOwnProperty(styleName) && (styleUpdates = styleUpdates || {}, + styleUpdates[styleName] = ""); + this._previousStyleCopy = null; + } else registrationNameModules.hasOwnProperty(propKey) ? lastProps[propKey] && deleteListener(this, propKey) : isCustomComponent(this._tag, lastProps) ? RESERVED_PROPS.hasOwnProperty(propKey) || DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey) : (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) && DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey); + for (propKey in nextProps) { + var nextProp = nextProps[propKey], lastProp = propKey === STYLE ? this._previousStyleCopy : null != lastProps ? lastProps[propKey] : void 0; + if (nextProps.hasOwnProperty(propKey) && nextProp !== lastProp && (null != nextProp || null != lastProp)) if (propKey === STYLE) if (nextProp ? nextProp = this._previousStyleCopy = _assign({}, nextProp) : this._previousStyleCopy = null, + lastProp) { + for (styleName in lastProp) !lastProp.hasOwnProperty(styleName) || nextProp && nextProp.hasOwnProperty(styleName) || (styleUpdates = styleUpdates || {}, + styleUpdates[styleName] = ""); + for (styleName in nextProp) nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName] && (styleUpdates = styleUpdates || {}, + styleUpdates[styleName] = nextProp[styleName]); + } else styleUpdates = nextProp; else if (registrationNameModules.hasOwnProperty(propKey)) nextProp ? enqueuePutListener(this, propKey, nextProp, transaction) : lastProp && deleteListener(this, propKey); else if (isCustomComponent(this._tag, nextProps)) RESERVED_PROPS.hasOwnProperty(propKey) || DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp); else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) { + var node = getNode(this); + null != nextProp ? DOMPropertyOperations.setValueForProperty(node, propKey, nextProp) : DOMPropertyOperations.deleteValueForProperty(node, propKey); + } + } + styleUpdates && CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this); + }, + _updateDOMChildren: function(lastProps, nextProps, transaction, context) { + var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null, nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null, lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html, nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html, lastChildren = null != lastContent ? null : lastProps.children, nextChildren = null != nextContent ? null : nextProps.children, lastHasContentOrHtml = null != lastContent || null != lastHtml, nextHasContentOrHtml = null != nextContent || null != nextHtml; + null != lastChildren && null == nextChildren ? this.updateChildren(null, transaction, context) : lastHasContentOrHtml && !nextHasContentOrHtml && this.updateTextContent(""), + null != nextContent ? lastContent !== nextContent && this.updateTextContent("" + nextContent) : null != nextHtml ? lastHtml !== nextHtml && this.updateMarkup("" + nextHtml) : null != nextChildren && this.updateChildren(nextChildren, transaction, context); + }, + getHostNode: function() { + return getNode(this); + }, + unmountComponent: function(safely) { + switch (this._tag) { + case "audio": + case "form": + case "iframe": + case "img": + case "link": + case "object": + case "source": + case "video": + var listeners = this._wrapperState.listeners; + if (listeners) for (var i = 0; i < listeners.length; i++) listeners[i].remove(); + break; + + case "html": + case "head": + case "body": + _prodInvariant("66", this._tag); + } + this.unmountChildren(safely), ReactDOMComponentTree.uncacheNode(this), EventPluginHub.deleteAllListeners(this), + this._rootNodeID = 0, this._domID = 0, this._wrapperState = null; + }, + getPublicInstance: function() { + return getNode(this); + } + }, _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin), + module.exports = ReactDOMComponent; +}, function(module, exports, __webpack_require__) { + "use strict"; + var ReactDOMComponentTree = __webpack_require__(47), focusNode = __webpack_require__(106), AutoFocusUtils = { + focusDOMComponent: function() { + focusNode(ReactDOMComponentTree.getNodeFromInstance(this)); + } + }; + module.exports = AutoFocusUtils; +}, function(module, exports) { + "use strict"; + function focusNode(node) { + try { + node.focus(); + } catch (e) {} + } + module.exports = focusNode; +}, function(module, exports, __webpack_require__) { + "use strict"; + var CSSProperty = __webpack_require__(108), ExecutionEnvironment = __webpack_require__(64), dangerousStyleValue = (__webpack_require__(79), + __webpack_require__(109), __webpack_require__(111)), hyphenateStyleName = __webpack_require__(112), memoizeStringOnly = __webpack_require__(114), processStyleName = (__webpack_require__(60), + memoizeStringOnly(function(styleName) { + return hyphenateStyleName(styleName); + })), hasShorthandPropertyBug = !1, styleFloatAccessor = "cssFloat"; + if (ExecutionEnvironment.canUseDOM) { + var tempStyle = document.createElement("div").style; + try { + tempStyle.font = ""; + } catch (e) { + hasShorthandPropertyBug = !0; + } + void 0 === document.documentElement.style.cssFloat && (styleFloatAccessor = "styleFloat"); + } + var CSSPropertyOperations = { + createMarkupForStyles: function(styles, component) { + var serialized = ""; + for (var styleName in styles) if (styles.hasOwnProperty(styleName)) { + var styleValue = styles[styleName]; + null != styleValue && (serialized += processStyleName(styleName) + ":", serialized += dangerousStyleValue(styleName, styleValue, component) + ";"); + } + return serialized || null; + }, + setValueForStyles: function(node, styles, component) { + var style = node.style; + for (var styleName in styles) if (styles.hasOwnProperty(styleName)) { + var styleValue = dangerousStyleValue(styleName, styles[styleName], component); + if ("float" !== styleName && "cssFloat" !== styleName || (styleName = styleFloatAccessor), + styleValue) style[styleName] = styleValue; else { + var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName]; + if (expansion) for (var individualStyleName in expansion) style[individualStyleName] = ""; else style[styleName] = ""; + } + } + } + }; + module.exports = CSSPropertyOperations; +}, function(module, exports) { + "use strict"; + function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); + } + var isUnitlessNumber = { + 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 + }, prefixes = [ "Webkit", "ms", "Moz", "O" ]; + Object.keys(isUnitlessNumber).forEach(function(prop) { + prefixes.forEach(function(prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); + }); + var shorthandPropertyExpansions = { + 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 + } + }, CSSProperty = { + isUnitlessNumber: isUnitlessNumber, + shorthandPropertyExpansions: shorthandPropertyExpansions + }; + module.exports = CSSProperty; +}, function(module, exports, __webpack_require__) { + "use strict"; + function camelizeStyleName(string) { + return camelize(string.replace(msPattern, "ms-")); + } + var camelize = __webpack_require__(110), msPattern = /^-ms-/; + module.exports = camelizeStyleName; +}, function(module, exports) { + "use strict"; + function camelize(string) { + return string.replace(_hyphenPattern, function(_, character) { + return character.toUpperCase(); + }); + } + var _hyphenPattern = /-(.)/g; + module.exports = camelize; +}, function(module, exports, __webpack_require__) { + "use strict"; + function dangerousStyleValue(name, value, component) { + var isEmpty = null == value || "boolean" == typeof value || "" === value; + if (isEmpty) return ""; + var isNonNumeric = isNaN(value); + if (isNonNumeric || 0 === value || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) return "" + value; + if ("string" == typeof value) { + value = value.trim(); + } + return value + "px"; + } + var CSSProperty = __webpack_require__(108), isUnitlessNumber = (__webpack_require__(60), + CSSProperty.isUnitlessNumber); + module.exports = dangerousStyleValue; +}, function(module, exports, __webpack_require__) { + "use strict"; + function hyphenateStyleName(string) { + return hyphenate(string).replace(msPattern, "-ms-"); + } + var hyphenate = __webpack_require__(113), msPattern = /^ms-/; + module.exports = hyphenateStyleName; +}, function(module, exports) { + "use strict"; + function hyphenate(string) { + return string.replace(_uppercasePattern, "-$1").toLowerCase(); + } + var _uppercasePattern = /([A-Z])/g; + module.exports = hyphenate; +}, function(module, exports) { + "use strict"; + function memoizeStringOnly(callback) { + var cache = {}; + return function(string) { + return cache.hasOwnProperty(string) || (cache[string] = callback.call(this, string)), + cache[string]; + }; + } + module.exports = memoizeStringOnly; +}, function(module, exports, __webpack_require__) { + "use strict"; + function isAttributeNameSafe(attributeName) { + return !!validatedAttributeNameCache.hasOwnProperty(attributeName) || !illegalAttributeNameCache.hasOwnProperty(attributeName) && (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName) ? (validatedAttributeNameCache[attributeName] = !0, + !0) : (illegalAttributeNameCache[attributeName] = !0, !1)); + } + function shouldIgnoreValue(propertyInfo, value) { + return null == value || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === !1; + } + var DOMProperty = __webpack_require__(49), quoteAttributeValueForBrowser = (__webpack_require__(47), + __webpack_require__(79), __webpack_require__(116)), VALID_ATTRIBUTE_NAME_REGEX = (__webpack_require__(60), + new RegExp("^[" + DOMProperty.ATTRIBUTE_NAME_START_CHAR + "][" + DOMProperty.ATTRIBUTE_NAME_CHAR + "]*$")), illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, DOMPropertyOperations = { + createMarkupForID: function(id) { + return DOMProperty.ID_ATTRIBUTE_NAME + "=" + quoteAttributeValueForBrowser(id); + }, + setAttributeForID: function(node, id) { + node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id); + }, + createMarkupForRoot: function() { + return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""'; + }, + setAttributeForRoot: function(node) { + node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, ""); + }, + createMarkupForProperty: function(name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + if (shouldIgnoreValue(propertyInfo, value)) return ""; + var attributeName = propertyInfo.attributeName; + return propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === !0 ? attributeName + '=""' : attributeName + "=" + quoteAttributeValueForBrowser(value); + } + return DOMProperty.isCustomAttribute(name) ? null == value ? "" : name + "=" + quoteAttributeValueForBrowser(value) : null; + }, + createMarkupForCustomAttribute: function(name, value) { + return isAttributeNameSafe(name) && null != value ? name + "=" + quoteAttributeValueForBrowser(value) : ""; + }, + setValueForProperty: function(node, name, value) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; + if (mutationMethod) mutationMethod(node, value); else { + if (shouldIgnoreValue(propertyInfo, value)) return void this.deleteValueForProperty(node, name); + if (propertyInfo.mustUseProperty) node[propertyInfo.propertyName] = value; else { + var attributeName = propertyInfo.attributeName, namespace = propertyInfo.attributeNamespace; + namespace ? node.setAttributeNS(namespace, attributeName, "" + value) : propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === !0 ? node.setAttribute(attributeName, "") : node.setAttribute(attributeName, "" + value); + } + } + } else if (DOMProperty.isCustomAttribute(name)) return void DOMPropertyOperations.setValueForAttribute(node, name, value); + }, + setValueForAttribute: function(node, name, value) { + if (isAttributeNameSafe(name)) { + null == value ? node.removeAttribute(name) : node.setAttribute(name, "" + value); + } + }, + deleteValueForAttribute: function(node, name) { + node.removeAttribute(name); + }, + deleteValueForProperty: function(node, name) { + var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null; + if (propertyInfo) { + var mutationMethod = propertyInfo.mutationMethod; + if (mutationMethod) mutationMethod(node, void 0); else if (propertyInfo.mustUseProperty) { + var propName = propertyInfo.propertyName; + propertyInfo.hasBooleanValue ? node[propName] = !1 : node[propName] = ""; + } else node.removeAttribute(propertyInfo.attributeName); + } else DOMProperty.isCustomAttribute(name) && node.removeAttribute(name); + } + }; + module.exports = DOMPropertyOperations; +}, function(module, exports, __webpack_require__) { + "use strict"; + function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextContentForBrowser(value) + '"'; + } + var escapeTextContentForBrowser = __webpack_require__(98); + module.exports = quoteAttributeValueForBrowser; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getListeningForDocument(mountAt) { + return Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey) || (mountAt[topListenersIDKey] = reactTopListenersCounter++, + alreadyListeningTo[mountAt[topListenersIDKey]] = {}), alreadyListeningTo[mountAt[topListenersIDKey]]; + } + var hasEventPageXY, _assign = __webpack_require__(66), EventPluginRegistry = __webpack_require__(57), ReactEventEmitterMixin = __webpack_require__(118), ViewportMetrics = __webpack_require__(88), getVendorPrefixedEventName = __webpack_require__(119), isEventSupported = __webpack_require__(82), alreadyListeningTo = {}, isMonitoringScrollValue = !1, reactTopListenersCounter = 0, topEventMapping = { + topAbort: "abort", + topAnimationEnd: getVendorPrefixedEventName("animationend") || "animationend", + topAnimationIteration: getVendorPrefixedEventName("animationiteration") || "animationiteration", + topAnimationStart: getVendorPrefixedEventName("animationstart") || "animationstart", + topBlur: "blur", + topCanPlay: "canplay", + topCanPlayThrough: "canplaythrough", + topChange: "change", + topClick: "click", + topCompositionEnd: "compositionend", + topCompositionStart: "compositionstart", + topCompositionUpdate: "compositionupdate", + topContextMenu: "contextmenu", + topCopy: "copy", + topCut: "cut", + topDoubleClick: "dblclick", + topDrag: "drag", + topDragEnd: "dragend", + topDragEnter: "dragenter", + topDragExit: "dragexit", + topDragLeave: "dragleave", + topDragOver: "dragover", + topDragStart: "dragstart", + topDrop: "drop", + topDurationChange: "durationchange", + topEmptied: "emptied", + topEncrypted: "encrypted", + topEnded: "ended", + topError: "error", + topFocus: "focus", + topInput: "input", + topKeyDown: "keydown", + topKeyPress: "keypress", + topKeyUp: "keyup", + topLoadedData: "loadeddata", + topLoadedMetadata: "loadedmetadata", + topLoadStart: "loadstart", + topMouseDown: "mousedown", + topMouseMove: "mousemove", + topMouseOut: "mouseout", + topMouseOver: "mouseover", + topMouseUp: "mouseup", + topPaste: "paste", + topPause: "pause", + topPlay: "play", + topPlaying: "playing", + topProgress: "progress", + topRateChange: "ratechange", + topScroll: "scroll", + topSeeked: "seeked", + topSeeking: "seeking", + topSelectionChange: "selectionchange", + topStalled: "stalled", + topSuspend: "suspend", + topTextInput: "textInput", + topTimeUpdate: "timeupdate", + topTouchCancel: "touchcancel", + topTouchEnd: "touchend", + topTouchMove: "touchmove", + topTouchStart: "touchstart", + topTransitionEnd: getVendorPrefixedEventName("transitionend") || "transitionend", + topVolumeChange: "volumechange", + topWaiting: "waiting", + topWheel: "wheel" + }, topListenersIDKey = "_reactListenersID" + String(Math.random()).slice(2), ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, { + ReactEventListener: null, + injection: { + injectReactEventListener: function(ReactEventListener) { + ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel), ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; + } + }, + setEnabled: function(enabled) { + ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); + }, + isEnabled: function() { + return !(!ReactBrowserEventEmitter.ReactEventListener || !ReactBrowserEventEmitter.ReactEventListener.isEnabled()); + }, + listenTo: function(registrationName, contentDocumentHandle) { + for (var mountAt = contentDocumentHandle, isListening = getListeningForDocument(mountAt), dependencies = EventPluginRegistry.registrationNameDependencies[registrationName], i = 0; i < dependencies.length; i++) { + var dependency = dependencies[i]; + isListening.hasOwnProperty(dependency) && isListening[dependency] || ("topWheel" === dependency ? isEventSupported("wheel") ? ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent("topWheel", "wheel", mountAt) : isEventSupported("mousewheel") ? ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent("topWheel", "mousewheel", mountAt) : ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent("topWheel", "DOMMouseScroll", mountAt) : "topScroll" === dependency ? isEventSupported("scroll", !0) ? ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent("topScroll", "scroll", mountAt) : ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent("topScroll", "scroll", ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE) : "topFocus" === dependency || "topBlur" === dependency ? (isEventSupported("focus", !0) ? (ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent("topFocus", "focus", mountAt), + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent("topBlur", "blur", mountAt)) : isEventSupported("focusin") && (ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent("topFocus", "focusin", mountAt), + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent("topBlur", "focusout", mountAt)), + isListening.topBlur = !0, isListening.topFocus = !0) : topEventMapping.hasOwnProperty(dependency) && ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt), + isListening[dependency] = !0); + } + }, + trapBubbledEvent: function(topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle); + }, + trapCapturedEvent: function(topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle); + }, + supportsEventPageXY: function() { + if (!document.createEvent) return !1; + var ev = document.createEvent("MouseEvent"); + return null != ev && "pageX" in ev; + }, + ensureScrollValueMonitoring: function() { + if (void 0 === hasEventPageXY && (hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY()), + !hasEventPageXY && !isMonitoringScrollValue) { + var refresh = ViewportMetrics.refreshScrollValues; + ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh), isMonitoringScrollValue = !0; + } + } + }); + module.exports = ReactBrowserEventEmitter; +}, function(module, exports, __webpack_require__) { + "use strict"; + function runEventQueueInBatch(events) { + EventPluginHub.enqueueEvents(events), EventPluginHub.processEventQueue(!1); + } + var EventPluginHub = __webpack_require__(56), ReactEventEmitterMixin = { + handleTopLevel: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); + runEventQueueInBatch(events); + } + }; + module.exports = ReactEventEmitterMixin; +}, function(module, exports, __webpack_require__) { + "use strict"; + function makePrefixMap(styleProp, eventName) { + var prefixes = {}; + return prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(), prefixes["Webkit" + styleProp] = "webkit" + eventName, + prefixes["Moz" + styleProp] = "moz" + eventName, prefixes["ms" + styleProp] = "MS" + eventName, + prefixes["O" + styleProp] = "o" + eventName.toLowerCase(), prefixes; + } + function getVendorPrefixedEventName(eventName) { + if (prefixedEventNames[eventName]) return prefixedEventNames[eventName]; + if (!vendorPrefixes[eventName]) return eventName; + var prefixMap = vendorPrefixes[eventName]; + for (var styleProp in prefixMap) if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) return prefixedEventNames[eventName] = prefixMap[styleProp]; + return ""; + } + var ExecutionEnvironment = __webpack_require__(64), vendorPrefixes = { + animationend: makePrefixMap("Animation", "AnimationEnd"), + animationiteration: makePrefixMap("Animation", "AnimationIteration"), + animationstart: makePrefixMap("Animation", "AnimationStart"), + transitionend: makePrefixMap("Transition", "TransitionEnd") + }, prefixedEventNames = {}, style = {}; + ExecutionEnvironment.canUseDOM && (style = document.createElement("div").style, + "AnimationEvent" in window || (delete vendorPrefixes.animationend.animation, delete vendorPrefixes.animationiteration.animation, + delete vendorPrefixes.animationstart.animation), "TransitionEvent" in window || delete vendorPrefixes.transitionend.transition), + module.exports = getVendorPrefixedEventName; +}, function(module, exports, __webpack_require__) { + "use strict"; + function forceUpdateIfMounted() { + this._rootNodeID && ReactDOMInput.updateWrapper(this); + } + function _handleChange(event) { + var props = this._currentElement.props, returnValue = LinkedValueUtils.executeOnChange(props, event); + ReactUpdates.asap(forceUpdateIfMounted, this); + var name = props.name; + if ("radio" === props.type && null != name) { + for (var rootNode = ReactDOMComponentTree.getNodeFromInstance(this), queryRoot = rootNode; queryRoot.parentNode; ) queryRoot = queryRoot.parentNode; + for (var group = queryRoot.querySelectorAll("input[name=" + JSON.stringify("" + name) + '][type="radio"]'), i = 0; i < group.length; i++) { + var otherNode = group[i]; + if (otherNode !== rootNode && otherNode.form === rootNode.form) { + var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode); + otherInstance ? void 0 : _prodInvariant("90"), ReactUpdates.asap(forceUpdateIfMounted, otherInstance); + } + } + } + return returnValue; + } + var _prodInvariant = __webpack_require__(48), _assign = __webpack_require__(66), DOMPropertyOperations = __webpack_require__(115), LinkedValueUtils = __webpack_require__(121), ReactDOMComponentTree = __webpack_require__(47), ReactUpdates = __webpack_require__(73), ReactDOMInput = (__webpack_require__(50), + __webpack_require__(60), { + getHostProps: function(inst, props) { + var value = LinkedValueUtils.getValue(props), checked = LinkedValueUtils.getChecked(props), hostProps = _assign({ + type: void 0, + step: void 0, + min: void 0, + max: void 0 + }, props, { + defaultChecked: void 0, + defaultValue: void 0, + value: null != value ? value : inst._wrapperState.initialValue, + checked: null != checked ? checked : inst._wrapperState.initialChecked, + onChange: inst._wrapperState.onChange + }); + return hostProps; + }, + mountWrapper: function(inst, props) { + var defaultValue = props.defaultValue; + inst._wrapperState = { + initialChecked: null != props.checked ? props.checked : props.defaultChecked, + initialValue: null != props.value ? props.value : defaultValue, + listeners: null, + onChange: _handleChange.bind(inst) + }; + }, + updateWrapper: function(inst) { + var props = inst._currentElement.props, checked = props.checked; + null != checked && DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), "checked", checked || !1); + var node = ReactDOMComponentTree.getNodeFromInstance(inst), value = LinkedValueUtils.getValue(props); + if (null != value) { + var newValue = "" + value; + newValue !== node.value && (node.value = newValue); + } else null == props.value && null != props.defaultValue && node.defaultValue !== "" + props.defaultValue && (node.defaultValue = "" + props.defaultValue), + null == props.checked && null != props.defaultChecked && (node.defaultChecked = !!props.defaultChecked); + }, + postMountWrapper: function(inst) { + var props = inst._currentElement.props, node = ReactDOMComponentTree.getNodeFromInstance(inst); + switch (props.type) { + case "submit": + case "reset": + break; + + case "color": + case "date": + case "datetime": + case "datetime-local": + case "month": + case "time": + case "week": + node.value = "", node.value = node.defaultValue; + break; + + default: + node.value = node.value; + } + var name = node.name; + "" !== name && (node.name = ""), node.defaultChecked = !node.defaultChecked, node.defaultChecked = !node.defaultChecked, + "" !== name && (node.name = name); + } + }); + module.exports = ReactDOMInput; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _assertSingleLink(inputProps) { + null != inputProps.checkedLink && null != inputProps.valueLink ? _prodInvariant("87") : void 0; + } + function _assertValueLink(inputProps) { + _assertSingleLink(inputProps), null != inputProps.value || null != inputProps.onChange ? _prodInvariant("88") : void 0; + } + function _assertCheckedLink(inputProps) { + _assertSingleLink(inputProps), null != inputProps.checked || null != inputProps.onChange ? _prodInvariant("89") : void 0; + } + function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) return " Check the render method of `" + name + "`."; + } + return ""; + } + var _prodInvariant = __webpack_require__(48), React = __webpack_require__(8), ReactPropTypesSecret = __webpack_require__(122), hasReadOnlyValue = (__webpack_require__(50), + __webpack_require__(60), { + button: !0, + checkbox: !0, + image: !0, + hidden: !0, + radio: !0, + reset: !0, + submit: !0 + }), propTypes = { + value: function(props, propName, componentName) { + return !props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.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(props, propName, componentName) { + return !props[propName] || props.onChange || props.readOnly || props.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: React.PropTypes.func + }, loggedTypeFailures = {}, LinkedValueUtils = { + checkPropTypes: function(tagName, props, owner) { + for (var propName in propTypes) { + if (propTypes.hasOwnProperty(propName)) var error = propTypes[propName](props, propName, tagName, "prop", null, ReactPropTypesSecret); + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + loggedTypeFailures[error.message] = !0; + getDeclarationErrorAddendum(owner); + } + } + }, + getValue: function(inputProps) { + return inputProps.valueLink ? (_assertValueLink(inputProps), inputProps.valueLink.value) : inputProps.value; + }, + getChecked: function(inputProps) { + return inputProps.checkedLink ? (_assertCheckedLink(inputProps), inputProps.checkedLink.value) : inputProps.checked; + }, + executeOnChange: function(inputProps, event) { + return inputProps.valueLink ? (_assertValueLink(inputProps), inputProps.valueLink.requestChange(event.target.value)) : inputProps.checkedLink ? (_assertCheckedLink(inputProps), + inputProps.checkedLink.requestChange(event.target.checked)) : inputProps.onChange ? inputProps.onChange.call(void 0, event) : void 0; + } + }; + module.exports = LinkedValueUtils; +}, function(module, exports) { + "use strict"; + var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; + module.exports = ReactPropTypesSecret; +}, function(module, exports, __webpack_require__) { + "use strict"; + function flattenChildren(children) { + var content = ""; + return React.Children.forEach(children, function(child) { + null != child && ("string" == typeof child || "number" == typeof child ? content += child : didWarnInvalidOptionChildren || (didWarnInvalidOptionChildren = !0)); + }), content; + } + var _assign = __webpack_require__(66), React = __webpack_require__(8), ReactDOMComponentTree = __webpack_require__(47), ReactDOMSelect = __webpack_require__(124), didWarnInvalidOptionChildren = (__webpack_require__(60), + !1), ReactDOMOption = { + mountWrapper: function(inst, props, hostParent) { + var selectValue = null; + if (null != hostParent) { + var selectParent = hostParent; + "optgroup" === selectParent._tag && (selectParent = selectParent._hostParent), null != selectParent && "select" === selectParent._tag && (selectValue = ReactDOMSelect.getSelectValueContext(selectParent)); + } + var selected = null; + if (null != selectValue) { + var value; + if (value = null != props.value ? props.value + "" : flattenChildren(props.children), + selected = !1, Array.isArray(selectValue)) { + for (var i = 0; i < selectValue.length; i++) if ("" + selectValue[i] === value) { + selected = !0; + break; + } + } else selected = "" + selectValue === value; + } + inst._wrapperState = { + selected: selected + }; + }, + postMountWrapper: function(inst) { + var props = inst._currentElement.props; + if (null != props.value) { + var node = ReactDOMComponentTree.getNodeFromInstance(inst); + node.setAttribute("value", props.value); + } + }, + getHostProps: function(inst, props) { + var hostProps = _assign({ + selected: void 0, + children: void 0 + }, props); + null != inst._wrapperState.selected && (hostProps.selected = inst._wrapperState.selected); + var content = flattenChildren(props.children); + return content && (hostProps.children = content), hostProps; + } + }; + module.exports = ReactDOMOption; +}, function(module, exports, __webpack_require__) { + "use strict"; + function updateOptionsIfPendingUpdateAndMounted() { + if (this._rootNodeID && this._wrapperState.pendingUpdate) { + this._wrapperState.pendingUpdate = !1; + var props = this._currentElement.props, value = LinkedValueUtils.getValue(props); + null != value && updateOptions(this, Boolean(props.multiple), value); + } + } + function updateOptions(inst, multiple, propValue) { + var selectedValue, i, options = ReactDOMComponentTree.getNodeFromInstance(inst).options; + if (multiple) { + for (selectedValue = {}, i = 0; i < propValue.length; i++) selectedValue["" + propValue[i]] = !0; + for (i = 0; i < options.length; i++) { + var selected = selectedValue.hasOwnProperty(options[i].value); + options[i].selected !== selected && (options[i].selected = selected); + } + } else { + for (selectedValue = "" + propValue, i = 0; i < options.length; i++) if (options[i].value === selectedValue) return void (options[i].selected = !0); + options.length && (options[0].selected = !0); + } + } + function _handleChange(event) { + var props = this._currentElement.props, returnValue = LinkedValueUtils.executeOnChange(props, event); + return this._rootNodeID && (this._wrapperState.pendingUpdate = !0), ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this), + returnValue; + } + var _assign = __webpack_require__(66), LinkedValueUtils = __webpack_require__(121), ReactDOMComponentTree = __webpack_require__(47), ReactUpdates = __webpack_require__(73), didWarnValueDefaultValue = (__webpack_require__(60), + !1), ReactDOMSelect = { + getHostProps: function(inst, props) { + return _assign({}, props, { + onChange: inst._wrapperState.onChange, + value: void 0 + }); + }, + mountWrapper: function(inst, props) { + var value = LinkedValueUtils.getValue(props); + inst._wrapperState = { + pendingUpdate: !1, + initialValue: null != value ? value : props.defaultValue, + listeners: null, + onChange: _handleChange.bind(inst), + wasMultiple: Boolean(props.multiple) + }, void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue || (didWarnValueDefaultValue = !0); + }, + getSelectValueContext: function(inst) { + return inst._wrapperState.initialValue; + }, + postUpdateWrapper: function(inst) { + var props = inst._currentElement.props; + inst._wrapperState.initialValue = void 0; + var wasMultiple = inst._wrapperState.wasMultiple; + inst._wrapperState.wasMultiple = Boolean(props.multiple); + var value = LinkedValueUtils.getValue(props); + null != value ? (inst._wrapperState.pendingUpdate = !1, updateOptions(inst, Boolean(props.multiple), value)) : wasMultiple !== Boolean(props.multiple) && (null != props.defaultValue ? updateOptions(inst, Boolean(props.multiple), props.defaultValue) : updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : "")); + } + }; + module.exports = ReactDOMSelect; +}, function(module, exports, __webpack_require__) { + "use strict"; + function forceUpdateIfMounted() { + this._rootNodeID && ReactDOMTextarea.updateWrapper(this); + } + function _handleChange(event) { + var props = this._currentElement.props, returnValue = LinkedValueUtils.executeOnChange(props, event); + return ReactUpdates.asap(forceUpdateIfMounted, this), returnValue; + } + var _prodInvariant = __webpack_require__(48), _assign = __webpack_require__(66), LinkedValueUtils = __webpack_require__(121), ReactDOMComponentTree = __webpack_require__(47), ReactUpdates = __webpack_require__(73), ReactDOMTextarea = (__webpack_require__(50), + __webpack_require__(60), { + getHostProps: function(inst, props) { + null != props.dangerouslySetInnerHTML ? _prodInvariant("91") : void 0; + var hostProps = _assign({}, props, { + value: void 0, + defaultValue: void 0, + children: "" + inst._wrapperState.initialValue, + onChange: inst._wrapperState.onChange + }); + return hostProps; + }, + mountWrapper: function(inst, props) { + var value = LinkedValueUtils.getValue(props), initialValue = value; + if (null == value) { + var defaultValue = props.defaultValue, children = props.children; + null != children && (null != defaultValue ? _prodInvariant("92") : void 0, Array.isArray(children) && (children.length <= 1 ? void 0 : _prodInvariant("93"), + children = children[0]), defaultValue = "" + children), null == defaultValue && (defaultValue = ""), + initialValue = defaultValue; + } + inst._wrapperState = { + initialValue: "" + initialValue, + listeners: null, + onChange: _handleChange.bind(inst) + }; + }, + updateWrapper: function(inst) { + var props = inst._currentElement.props, node = ReactDOMComponentTree.getNodeFromInstance(inst), value = LinkedValueUtils.getValue(props); + if (null != value) { + var newValue = "" + value; + newValue !== node.value && (node.value = newValue), null == props.defaultValue && (node.defaultValue = newValue); + } + null != props.defaultValue && (node.defaultValue = props.defaultValue); + }, + postMountWrapper: function(inst) { + var node = ReactDOMComponentTree.getNodeFromInstance(inst), textContent = node.textContent; + textContent === inst._wrapperState.initialValue && (node.value = textContent); + } + }); + module.exports = ReactDOMTextarea; +}, function(module, exports, __webpack_require__) { + "use strict"; + function makeInsertMarkup(markup, afterNode, toIndex) { + return { + type: "INSERT_MARKUP", + content: markup, + fromIndex: null, + fromNode: null, + toIndex: toIndex, + afterNode: afterNode + }; + } + function makeMove(child, afterNode, toIndex) { + return { + type: "MOVE_EXISTING", + content: null, + fromIndex: child._mountIndex, + fromNode: ReactReconciler.getHostNode(child), + toIndex: toIndex, + afterNode: afterNode + }; + } + function makeRemove(child, node) { + return { + type: "REMOVE_NODE", + content: null, + fromIndex: child._mountIndex, + fromNode: node, + toIndex: null, + afterNode: null + }; + } + function makeSetMarkup(markup) { + return { + type: "SET_MARKUP", + content: markup, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null + }; + } + function makeTextContent(textContent) { + return { + type: "TEXT_CONTENT", + content: textContent, + fromIndex: null, + fromNode: null, + toIndex: null, + afterNode: null + }; + } + function enqueue(queue, update) { + return update && (queue = queue || [], queue.push(update)), queue; + } + function processQueue(inst, updateQueue) { + ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue); + } + var _prodInvariant = __webpack_require__(48), ReactComponentEnvironment = __webpack_require__(127), ReactReconciler = (__webpack_require__(128), + __webpack_require__(79), __webpack_require__(15), __webpack_require__(76)), ReactChildReconciler = __webpack_require__(129), flattenChildren = (__webpack_require__(61), + __webpack_require__(145)), ReactMultiChild = (__webpack_require__(50), { + Mixin: { + _reconcilerInstantiateChildren: function(nestedChildren, transaction, context) { + return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context); + }, + _reconcilerUpdateChildren: function(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) { + var nextChildren, selfDebugID = 0; + return nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID), + ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID), + nextChildren; + }, + mountChildren: function(nestedChildren, transaction, context) { + var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context); + this._renderedChildren = children; + var mountImages = [], index = 0; + for (var name in children) if (children.hasOwnProperty(name)) { + var child = children[name], selfDebugID = 0, mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID); + child._mountIndex = index++, mountImages.push(mountImage); + } + return mountImages; + }, + updateTextContent: function(nextContent) { + var prevChildren = this._renderedChildren; + ReactChildReconciler.unmountChildren(prevChildren, !1); + for (var name in prevChildren) prevChildren.hasOwnProperty(name) && _prodInvariant("118"); + var updates = [ makeTextContent(nextContent) ]; + processQueue(this, updates); + }, + updateMarkup: function(nextMarkup) { + var prevChildren = this._renderedChildren; + ReactChildReconciler.unmountChildren(prevChildren, !1); + for (var name in prevChildren) prevChildren.hasOwnProperty(name) && _prodInvariant("118"); + var updates = [ makeSetMarkup(nextMarkup) ]; + processQueue(this, updates); + }, + updateChildren: function(nextNestedChildrenElements, transaction, context) { + this._updateChildren(nextNestedChildrenElements, transaction, context); + }, + _updateChildren: function(nextNestedChildrenElements, transaction, context) { + var prevChildren = this._renderedChildren, removedNodes = {}, mountImages = [], nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context); + if (nextChildren || prevChildren) { + var name, updates = null, nextIndex = 0, lastIndex = 0, nextMountIndex = 0, lastPlacedNode = null; + for (name in nextChildren) if (nextChildren.hasOwnProperty(name)) { + var prevChild = prevChildren && prevChildren[name], nextChild = nextChildren[name]; + prevChild === nextChild ? (updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex)), + lastIndex = Math.max(prevChild._mountIndex, lastIndex), prevChild._mountIndex = nextIndex) : (prevChild && (lastIndex = Math.max(prevChild._mountIndex, lastIndex)), + updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context)), + nextMountIndex++), nextIndex++, lastPlacedNode = ReactReconciler.getHostNode(nextChild); + } + for (name in removedNodes) removedNodes.hasOwnProperty(name) && (updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]))); + updates && processQueue(this, updates), this._renderedChildren = nextChildren; + } + }, + unmountChildren: function(safely) { + var renderedChildren = this._renderedChildren; + ReactChildReconciler.unmountChildren(renderedChildren, safely), this._renderedChildren = null; + }, + moveChild: function(child, afterNode, toIndex, lastIndex) { + if (child._mountIndex < lastIndex) return makeMove(child, afterNode, toIndex); + }, + createChild: function(child, afterNode, mountImage) { + return makeInsertMarkup(mountImage, afterNode, child._mountIndex); + }, + removeChild: function(child, node) { + return makeRemove(child, node); + }, + _mountChildAtIndex: function(child, mountImage, afterNode, index, transaction, context) { + return child._mountIndex = index, this.createChild(child, afterNode, mountImage); + }, + _unmountChild: function(child, node) { + var update = this.removeChild(child, node); + return child._mountIndex = null, update; + } + } + }); + module.exports = ReactMultiChild; +}, function(module, exports, __webpack_require__) { + "use strict"; + var _prodInvariant = __webpack_require__(48), injected = (__webpack_require__(50), + !1), ReactComponentEnvironment = { + replaceNodeWithMarkup: null, + processChildrenUpdates: null, + injection: { + injectEnvironment: function(environment) { + injected ? _prodInvariant("104") : void 0, ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup, + ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates, + injected = !0; + } + } + }; + module.exports = ReactComponentEnvironment; +}, function(module, exports) { + "use strict"; + var ReactInstanceMap = { + remove: function(key) { + key._reactInternalInstance = void 0; + }, + get: function(key) { + return key._reactInternalInstance; + }, + has: function(key) { + return void 0 !== key._reactInternalInstance; + }, + set: function(key, value) { + key._reactInternalInstance = value; + } + }; + module.exports = ReactInstanceMap; +}, function(module, exports, __webpack_require__) { + (function(process) { + "use strict"; + function instantiateChild(childInstances, child, name, selfDebugID) { + var keyUnique = void 0 === childInstances[name]; + null != child && keyUnique && (childInstances[name] = instantiateReactComponent(child, !0)); + } + var ReactReconciler = __webpack_require__(76), instantiateReactComponent = __webpack_require__(131), shouldUpdateReactComponent = (__webpack_require__(140), + __webpack_require__(136)), traverseAllChildren = __webpack_require__(141); + __webpack_require__(60); + "undefined" != typeof process && process.env, 1; + var ReactChildReconciler = { + instantiateChildren: function(nestedChildNodes, transaction, context, selfDebugID) { + if (null == nestedChildNodes) return null; + var childInstances = {}; + return traverseAllChildren(nestedChildNodes, instantiateChild, childInstances), + childInstances; + }, + updateChildren: function(prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) { + if (nextChildren || prevChildren) { + var name, prevChild; + for (name in nextChildren) if (nextChildren.hasOwnProperty(name)) { + prevChild = prevChildren && prevChildren[name]; + var prevElement = prevChild && prevChild._currentElement, nextElement = nextChildren[name]; + if (null != prevChild && shouldUpdateReactComponent(prevElement, nextElement)) ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context), + nextChildren[name] = prevChild; else { + prevChild && (removedNodes[name] = ReactReconciler.getHostNode(prevChild), ReactReconciler.unmountComponent(prevChild, !1)); + var nextChildInstance = instantiateReactComponent(nextElement, !0); + nextChildren[name] = nextChildInstance; + var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID); + mountImages.push(nextChildMountImage); + } + } + for (name in prevChildren) !prevChildren.hasOwnProperty(name) || nextChildren && nextChildren.hasOwnProperty(name) || (prevChild = prevChildren[name], + removedNodes[name] = ReactReconciler.getHostNode(prevChild), ReactReconciler.unmountComponent(prevChild, !1)); + } + }, + unmountChildren: function(renderedChildren, safely) { + for (var name in renderedChildren) if (renderedChildren.hasOwnProperty(name)) { + var renderedChild = renderedChildren[name]; + ReactReconciler.unmountComponent(renderedChild, safely); + } + } + }; + module.exports = ReactChildReconciler; + }).call(exports, __webpack_require__(130)); +}, function(module, exports) { + function defaultSetTimout() { + throw new Error("setTimeout has not been defined"); + } + function defaultClearTimeout() { + throw new Error("clearTimeout has not been defined"); + } + function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) return setTimeout(fun, 0); + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) return cachedSetTimeout = setTimeout, + setTimeout(fun, 0); + try { + return cachedSetTimeout(fun, 0); + } catch (e) { + try { + return cachedSetTimeout.call(null, fun, 0); + } catch (e) { + return cachedSetTimeout.call(this, fun, 0); + } + } + } + function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) return clearTimeout(marker); + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) return cachedClearTimeout = clearTimeout, + clearTimeout(marker); + try { + return cachedClearTimeout(marker); + } catch (e) { + try { + return cachedClearTimeout.call(null, marker); + } catch (e) { + return cachedClearTimeout.call(this, marker); + } + } + } + function cleanUpNextTick() { + draining && currentQueue && (draining = !1, currentQueue.length ? queue = currentQueue.concat(queue) : queueIndex = -1, + queue.length && drainQueue()); + } + function drainQueue() { + if (!draining) { + var timeout = runTimeout(cleanUpNextTick); + draining = !0; + for (var len = queue.length; len; ) { + for (currentQueue = queue, queue = []; ++queueIndex < len; ) currentQueue && currentQueue[queueIndex].run(); + queueIndex = -1, len = queue.length; + } + currentQueue = null, draining = !1, runClearTimeout(timeout); + } + } + function Item(fun, array) { + this.fun = fun, this.array = array; + } + function noop() {} + var cachedSetTimeout, cachedClearTimeout, process = module.exports = {}; + !function() { + try { + cachedSetTimeout = "function" == typeof setTimeout ? setTimeout : defaultSetTimout; + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + cachedClearTimeout = "function" == typeof clearTimeout ? clearTimeout : defaultClearTimeout; + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } + }(); + var currentQueue, queue = [], draining = !1, queueIndex = -1; + process.nextTick = function(fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) for (var i = 1; i < arguments.length; i++) args[i - 1] = arguments[i]; + queue.push(new Item(fun, args)), 1 !== queue.length || draining || runTimeout(drainQueue); + }, Item.prototype.run = function() { + this.fun.apply(null, this.array); + }, process.title = "browser", process.browser = !0, process.env = {}, process.argv = [], + process.version = "", process.versions = {}, process.on = noop, process.addListener = noop, + process.once = noop, process.off = noop, process.removeListener = noop, process.removeAllListeners = noop, + process.emit = noop, process.binding = function(name) { + throw new Error("process.binding is not supported"); + }, process.cwd = function() { + return "/"; + }, process.chdir = function(dir) { + throw new Error("process.chdir is not supported"); + }, process.umask = function() { + return 0; + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getDeclarationErrorAddendum(owner) { + if (owner) { + var name = owner.getName(); + if (name) return " Check the render method of `" + name + "`."; + } + return ""; + } + function isInternalComponentType(type) { + return "function" == typeof type && "undefined" != typeof type.prototype && "function" == typeof type.prototype.mountComponent && "function" == typeof type.prototype.receiveComponent; + } + function instantiateReactComponent(node, shouldHaveDebugID) { + var instance; + if (null === node || node === !1) instance = ReactEmptyComponent.create(instantiateReactComponent); else if ("object" == typeof node) { + var element = node, type = element.type; + if ("function" != typeof type && "string" != typeof type) { + var info = ""; + info += getDeclarationErrorAddendum(element._owner), _prodInvariant("130", null == type ? type : typeof type, info); + } + "string" == typeof element.type ? instance = ReactHostComponent.createInternalComponent(element) : isInternalComponentType(element.type) ? (instance = new element.type(element), + instance.getHostNode || (instance.getHostNode = instance.getNativeNode)) : instance = new ReactCompositeComponentWrapper(element); + } else "string" == typeof node || "number" == typeof node ? instance = ReactHostComponent.createInstanceForText(node) : _prodInvariant("131", typeof node); + return instance._mountIndex = 0, instance._mountImage = null, instance; + } + var _prodInvariant = __webpack_require__(48), _assign = __webpack_require__(66), ReactCompositeComponent = __webpack_require__(132), ReactEmptyComponent = __webpack_require__(137), ReactHostComponent = __webpack_require__(138), ReactCompositeComponentWrapper = (__webpack_require__(139), + __webpack_require__(50), __webpack_require__(60), function(element) { + this.construct(element); + }); + _assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, { + _instantiateReactComponent: instantiateReactComponent + }), module.exports = instantiateReactComponent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function StatelessComponent(Component) {} + function warnIfInvalidElement(Component, element) {} + function shouldConstruct(Component) { + return !(!Component.prototype || !Component.prototype.isReactComponent); + } + function isPureComponent(Component) { + return !(!Component.prototype || !Component.prototype.isPureReactComponent); + } + var _prodInvariant = __webpack_require__(48), _assign = __webpack_require__(66), React = __webpack_require__(8), ReactComponentEnvironment = __webpack_require__(127), ReactCurrentOwner = __webpack_require__(15), ReactErrorUtils = __webpack_require__(59), ReactInstanceMap = __webpack_require__(128), ReactNodeTypes = (__webpack_require__(79), + __webpack_require__(133)), ReactReconciler = __webpack_require__(76), emptyObject = __webpack_require__(134), shallowEqual = (__webpack_require__(50), + __webpack_require__(135)), shouldUpdateReactComponent = __webpack_require__(136), CompositeTypes = (__webpack_require__(60), + { + ImpureClass: 0, + PureClass: 1, + StatelessFunctional: 2 + }); + StatelessComponent.prototype.render = function() { + var Component = ReactInstanceMap.get(this)._currentElement.type, element = Component(this.props, this.context, this.updater); + return warnIfInvalidElement(Component, element), element; + }; + var nextMountID = 1, ReactCompositeComponent = { + construct: function(element) { + this._currentElement = element, this._rootNodeID = 0, this._compositeType = null, + this._instance = null, this._hostParent = null, this._hostContainerInfo = null, + this._updateBatchNumber = null, this._pendingElement = null, this._pendingStateQueue = null, + this._pendingReplaceState = !1, this._pendingForceUpdate = !1, this._renderedNodeType = null, + this._renderedComponent = null, this._context = null, this._mountOrder = 0, this._topLevelWrapper = null, + this._pendingCallbacks = null, this._calledComponentWillUnmount = !1; + }, + mountComponent: function(transaction, hostParent, hostContainerInfo, context) { + this._context = context, this._mountOrder = nextMountID++, this._hostParent = hostParent, + this._hostContainerInfo = hostContainerInfo; + var renderedElement, publicProps = this._currentElement.props, publicContext = this._processContext(context), Component = this._currentElement.type, updateQueue = transaction.getUpdateQueue(), doConstruct = shouldConstruct(Component), inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue); + doConstruct || null != inst && null != inst.render ? isPureComponent(Component) ? this._compositeType = CompositeTypes.PureClass : this._compositeType = CompositeTypes.ImpureClass : (renderedElement = inst, + warnIfInvalidElement(Component, renderedElement), null === inst || inst === !1 || React.isValidElement(inst) ? void 0 : _prodInvariant("105", Component.displayName || Component.name || "Component"), + inst = new StatelessComponent(Component), this._compositeType = CompositeTypes.StatelessFunctional); + inst.props = publicProps, inst.context = publicContext, inst.refs = emptyObject, + inst.updater = updateQueue, this._instance = inst, ReactInstanceMap.set(inst, this); + var initialState = inst.state; + void 0 === initialState && (inst.state = initialState = null), "object" != typeof initialState || Array.isArray(initialState) ? _prodInvariant("106", this.getName() || "ReactCompositeComponent") : void 0, + this._pendingStateQueue = null, this._pendingReplaceState = !1, this._pendingForceUpdate = !1; + var markup; + return markup = inst.unstable_handleError ? this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context) : this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context), + inst.componentDidMount && transaction.getReactMountReady().enqueue(inst.componentDidMount, inst), + markup; + }, + _constructComponent: function(doConstruct, publicProps, publicContext, updateQueue) { + return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue); + }, + _constructComponentWithoutOwner: function(doConstruct, publicProps, publicContext, updateQueue) { + var Component = this._currentElement.type; + return doConstruct ? new Component(publicProps, publicContext, updateQueue) : Component(publicProps, publicContext, updateQueue); + }, + performInitialMountWithErrorHandling: function(renderedElement, hostParent, hostContainerInfo, transaction, context) { + var markup, checkpoint = transaction.checkpoint(); + try { + markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); + } catch (e) { + transaction.rollback(checkpoint), this._instance.unstable_handleError(e), this._pendingStateQueue && (this._instance.state = this._processPendingState(this._instance.props, this._instance.context)), + checkpoint = transaction.checkpoint(), this._renderedComponent.unmountComponent(!0), + transaction.rollback(checkpoint), markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context); + } + return markup; + }, + performInitialMount: function(renderedElement, hostParent, hostContainerInfo, transaction, context) { + var inst = this._instance, debugID = 0; + inst.componentWillMount && (inst.componentWillMount(), this._pendingStateQueue && (inst.state = this._processPendingState(inst.props, inst.context))), + void 0 === renderedElement && (renderedElement = this._renderValidatedComponent()); + var nodeType = ReactNodeTypes.getType(renderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY); + this._renderedComponent = child; + var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID); + return markup; + }, + getHostNode: function() { + return ReactReconciler.getHostNode(this._renderedComponent); + }, + unmountComponent: function(safely) { + if (this._renderedComponent) { + var inst = this._instance; + if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) if (inst._calledComponentWillUnmount = !0, + safely) { + var name = this.getName() + ".componentWillUnmount()"; + ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst)); + } else inst.componentWillUnmount(); + this._renderedComponent && (ReactReconciler.unmountComponent(this._renderedComponent, safely), + this._renderedNodeType = null, this._renderedComponent = null, this._instance = null), + this._pendingStateQueue = null, this._pendingReplaceState = !1, this._pendingForceUpdate = !1, + this._pendingCallbacks = null, this._pendingElement = null, this._context = null, + this._rootNodeID = 0, this._topLevelWrapper = null, ReactInstanceMap.remove(inst); + } + }, + _maskContext: function(context) { + var Component = this._currentElement.type, contextTypes = Component.contextTypes; + if (!contextTypes) return emptyObject; + var maskedContext = {}; + for (var contextName in contextTypes) maskedContext[contextName] = context[contextName]; + return maskedContext; + }, + _processContext: function(context) { + var maskedContext = this._maskContext(context); + return maskedContext; + }, + _processChildContext: function(currentContext) { + var childContext, Component = this._currentElement.type, inst = this._instance; + if (inst.getChildContext && (childContext = inst.getChildContext()), childContext) { + "object" != typeof Component.childContextTypes ? _prodInvariant("107", this.getName() || "ReactCompositeComponent") : void 0; + for (var name in childContext) name in Component.childContextTypes ? void 0 : _prodInvariant("108", this.getName() || "ReactCompositeComponent", name); + return _assign({}, currentContext, childContext); + } + return currentContext; + }, + _checkContextTypes: function(typeSpecs, values, location) {}, + receiveComponent: function(nextElement, transaction, nextContext) { + var prevElement = this._currentElement, prevContext = this._context; + this._pendingElement = null, this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext); + }, + performUpdateIfNecessary: function(transaction) { + null != this._pendingElement ? ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context) : null !== this._pendingStateQueue || this._pendingForceUpdate ? this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context) : this._updateBatchNumber = null; + }, + updateComponent: function(transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) { + var inst = this._instance; + null == inst ? _prodInvariant("136", this.getName() || "ReactCompositeComponent") : void 0; + var nextContext, willReceive = !1; + this._context === nextUnmaskedContext ? nextContext = inst.context : (nextContext = this._processContext(nextUnmaskedContext), + willReceive = !0); + var prevProps = prevParentElement.props, nextProps = nextParentElement.props; + prevParentElement !== nextParentElement && (willReceive = !0), willReceive && inst.componentWillReceiveProps && inst.componentWillReceiveProps(nextProps, nextContext); + var nextState = this._processPendingState(nextProps, nextContext), shouldUpdate = !0; + this._pendingForceUpdate || (inst.shouldComponentUpdate ? shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext) : this._compositeType === CompositeTypes.PureClass && (shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState))), + this._updateBatchNumber = null, shouldUpdate ? (this._pendingForceUpdate = !1, this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext)) : (this._currentElement = nextParentElement, + this._context = nextUnmaskedContext, inst.props = nextProps, inst.state = nextState, + inst.context = nextContext); + }, + _processPendingState: function(props, context) { + var inst = this._instance, queue = this._pendingStateQueue, replace = this._pendingReplaceState; + if (this._pendingReplaceState = !1, this._pendingStateQueue = null, !queue) return inst.state; + if (replace && 1 === queue.length) return queue[0]; + for (var nextState = _assign({}, replace ? queue[0] : inst.state), i = replace ? 1 : 0; i < queue.length; i++) { + var partial = queue[i]; + _assign(nextState, "function" == typeof partial ? partial.call(inst, nextState, props, context) : partial); + } + return nextState; + }, + _performComponentUpdate: function(nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) { + var prevProps, prevState, prevContext, inst = this._instance, hasComponentDidUpdate = Boolean(inst.componentDidUpdate); + hasComponentDidUpdate && (prevProps = inst.props, prevState = inst.state, prevContext = inst.context), + inst.componentWillUpdate && inst.componentWillUpdate(nextProps, nextState, nextContext), + this._currentElement = nextElement, this._context = unmaskedContext, inst.props = nextProps, + inst.state = nextState, inst.context = nextContext, this._updateRenderedComponent(transaction, unmaskedContext), + hasComponentDidUpdate && transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); + }, + _updateRenderedComponent: function(transaction, context) { + var prevComponentInstance = this._renderedComponent, prevRenderedElement = prevComponentInstance._currentElement, nextRenderedElement = this._renderValidatedComponent(), debugID = 0; + if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context)); else { + var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance); + ReactReconciler.unmountComponent(prevComponentInstance, !1); + var nodeType = ReactNodeTypes.getType(nextRenderedElement); + this._renderedNodeType = nodeType; + var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY); + this._renderedComponent = child; + var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID); + this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance); + } + }, + _replaceNodeWithMarkup: function(oldHostNode, nextMarkup, prevInstance) { + ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance); + }, + _renderValidatedComponentWithoutOwnerOrContext: function() { + var renderedElement, inst = this._instance; + return renderedElement = inst.render(); + }, + _renderValidatedComponent: function() { + var renderedElement; + if (this._compositeType !== CompositeTypes.StatelessFunctional) { + ReactCurrentOwner.current = this; + try { + renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + } finally { + ReactCurrentOwner.current = null; + } + } else renderedElement = this._renderValidatedComponentWithoutOwnerOrContext(); + return null === renderedElement || renderedElement === !1 || React.isValidElement(renderedElement) ? void 0 : _prodInvariant("109", this.getName() || "ReactCompositeComponent"), + renderedElement; + }, + attachRef: function(ref, component) { + var inst = this.getPublicInstance(); + null == inst ? _prodInvariant("110") : void 0; + var publicComponentInstance = component.getPublicInstance(), refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs; + refs[ref] = publicComponentInstance; + }, + detachRef: function(ref) { + var refs = this.getPublicInstance().refs; + delete refs[ref]; + }, + getName: function() { + var type = this._currentElement.type, constructor = this._instance && this._instance.constructor; + return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null; + }, + getPublicInstance: function() { + var inst = this._instance; + return this._compositeType === CompositeTypes.StatelessFunctional ? null : inst; + }, + _instantiateReactComponent: null + }; + module.exports = ReactCompositeComponent; +}, function(module, exports, __webpack_require__) { + "use strict"; + var _prodInvariant = __webpack_require__(48), React = __webpack_require__(8), ReactNodeTypes = (__webpack_require__(50), + { + HOST: 0, + COMPOSITE: 1, + EMPTY: 2, + getType: function(node) { + return null === node || node === !1 ? ReactNodeTypes.EMPTY : React.isValidElement(node) ? "function" == typeof node.type ? ReactNodeTypes.COMPOSITE : ReactNodeTypes.HOST : void _prodInvariant("26", node); + } + }); + module.exports = ReactNodeTypes; +}, function(module, exports, __webpack_require__) { + "use strict"; + var emptyObject = {}; + module.exports = emptyObject; +}, function(module, exports) { + "use strict"; + function is(x, y) { + return x === y ? 0 !== x || 0 !== y || 1 / x === 1 / y : x !== x && y !== y; + } + function shallowEqual(objA, objB) { + if (is(objA, objB)) return !0; + if ("object" != typeof objA || null === objA || "object" != typeof objB || null === objB) return !1; + var keysA = Object.keys(objA), keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (var i = 0; i < keysA.length; i++) if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) return !1; + return !0; + } + var hasOwnProperty = Object.prototype.hasOwnProperty; + module.exports = shallowEqual; +}, function(module, exports) { + "use strict"; + function shouldUpdateReactComponent(prevElement, nextElement) { + var prevEmpty = null === prevElement || prevElement === !1, nextEmpty = null === nextElement || nextElement === !1; + if (prevEmpty || nextEmpty) return prevEmpty === nextEmpty; + var prevType = typeof prevElement, nextType = typeof nextElement; + return "string" === prevType || "number" === prevType ? "string" === nextType || "number" === nextType : "object" === nextType && prevElement.type === nextElement.type && prevElement.key === nextElement.key; + } + module.exports = shouldUpdateReactComponent; +}, function(module, exports) { + "use strict"; + var emptyComponentFactory, ReactEmptyComponentInjection = { + injectEmptyComponentFactory: function(factory) { + emptyComponentFactory = factory; + } + }, ReactEmptyComponent = { + create: function(instantiate) { + return emptyComponentFactory(instantiate); + } + }; + ReactEmptyComponent.injection = ReactEmptyComponentInjection, module.exports = ReactEmptyComponent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function createInternalComponent(element) { + return genericComponentClass ? void 0 : _prodInvariant("111", element.type), new genericComponentClass(element); + } + function createInstanceForText(text) { + return new textComponentClass(text); + } + function isTextComponent(component) { + return component instanceof textComponentClass; + } + var _prodInvariant = __webpack_require__(48), genericComponentClass = (__webpack_require__(50), + null), textComponentClass = null, ReactHostComponentInjection = { + injectGenericComponentClass: function(componentClass) { + genericComponentClass = componentClass; + }, + injectTextComponentClass: function(componentClass) { + textComponentClass = componentClass; + } + }, ReactHostComponent = { + createInternalComponent: createInternalComponent, + createInstanceForText: createInstanceForText, + isTextComponent: isTextComponent, + injection: ReactHostComponentInjection + }; + module.exports = ReactHostComponent; +}, function(module, exports) { + "use strict"; + function getNextDebugID() { + return nextDebugID++; + } + var nextDebugID = 1; + module.exports = getNextDebugID; +}, function(module, exports) { + "use strict"; + function escape(key) { + var escapeRegex = /[=:]/g, escaperLookup = { + "=": "=0", + ":": "=2" + }, escapedString = ("" + key).replace(escapeRegex, function(match) { + return escaperLookup[match]; + }); + return "$" + escapedString; + } + function unescape(key) { + var unescapeRegex = /(=0|=2)/g, unescaperLookup = { + "=0": "=", + "=2": ":" + }, keySubstring = "." === key[0] && "$" === key[1] ? key.substring(2) : key.substring(1); + return ("" + keySubstring).replace(unescapeRegex, function(match) { + return unescaperLookup[match]; + }); + } + var KeyEscapeUtils = { + escape: escape, + unescape: unescape + }; + module.exports = KeyEscapeUtils; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getComponentKey(component, index) { + return component && "object" == typeof component && null != component.key ? KeyEscapeUtils.escape(component.key) : index.toString(36); + } + function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) { + var type = typeof children; + if ("undefined" !== type && "boolean" !== type || (children = null), null === children || "string" === type || "number" === type || "object" === type && children.$$typeof === REACT_ELEMENT_TYPE) return callback(traverseContext, children, "" === nameSoFar ? SEPARATOR + getComponentKey(children, 0) : nameSoFar), + 1; + var child, nextName, subtreeCount = 0, nextNamePrefix = "" === nameSoFar ? SEPARATOR : nameSoFar + SUBSEPARATOR; + if (Array.isArray(children)) for (var i = 0; i < children.length; i++) child = children[i], + nextName = nextNamePrefix + getComponentKey(child, i), subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var step, iterator = iteratorFn.call(children); + if (iteratorFn !== children.entries) for (var ii = 0; !(step = iterator.next()).done; ) child = step.value, + nextName = nextNamePrefix + getComponentKey(child, ii++), subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext); else for (;!(step = iterator.next()).done; ) { + var entry = step.value; + entry && (child = entry[1], nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0), + subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext)); + } + } else if ("object" === type) { + var addendum = "", childrenString = String(children); + _prodInvariant("31", "[object Object]" === childrenString ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString, addendum); + } + } + return subtreeCount; + } + function traverseAllChildren(children, callback, traverseContext) { + return null == children ? 0 : traverseAllChildrenImpl(children, "", callback, traverseContext); + } + var _prodInvariant = __webpack_require__(48), REACT_ELEMENT_TYPE = (__webpack_require__(15), + __webpack_require__(142)), getIteratorFn = __webpack_require__(143), KeyEscapeUtils = (__webpack_require__(50), + __webpack_require__(140)), SEPARATOR = (__webpack_require__(60), "."), SUBSEPARATOR = ":"; + module.exports = traverseAllChildren; +}, function(module, exports) { + "use strict"; + var REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103; + module.exports = REACT_ELEMENT_TYPE; +}, function(module, exports) { + "use strict"; + function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if ("function" == typeof iteratorFn) return iteratorFn; + } + var ITERATOR_SYMBOL = "function" == typeof Symbol && Symbol.iterator, FAUX_ITERATOR_SYMBOL = "@@iterator"; + module.exports = getIteratorFn; +}, function(module, exports, __webpack_require__) { + "use strict"; + function isNative(fn) { + var funcToString = Function.prototype.toString, hasOwnProperty = Object.prototype.hasOwnProperty, reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); + try { + var source = funcToString.call(fn); + return reIsNative.test(source); + } catch (err) { + return !1; + } + } + function purgeDeep(id) { + var item = getItem(id); + if (item) { + var childIDs = item.childIDs; + removeItem(id), childIDs.forEach(purgeDeep); + } + } + function describeComponentFrame(name, source, ownerName) { + return "\n in " + (name || "Unknown") + (source ? " (at " + source.fileName.replace(/^.*[\\\/]/, "") + ":" + source.lineNumber + ")" : ownerName ? " (created by " + ownerName + ")" : ""); + } + function getDisplayName(element) { + return null == element ? "#empty" : "string" == typeof element || "number" == typeof element ? "#text" : "string" == typeof element.type ? element.type : element.type.displayName || element.type.name || "Unknown"; + } + function describeID(id) { + var ownerName, name = ReactComponentTreeHook.getDisplayName(id), element = ReactComponentTreeHook.getElement(id), ownerID = ReactComponentTreeHook.getOwnerID(id); + return ownerID && (ownerName = ReactComponentTreeHook.getDisplayName(ownerID)), + describeComponentFrame(name, element && element._source, ownerName); + } + var setItem, getItem, removeItem, getItemIDs, addRoot, removeRoot, getRootIDs, _prodInvariant = __webpack_require__(12), ReactCurrentOwner = __webpack_require__(15), canUseCollections = (__webpack_require__(13), + __webpack_require__(16), "function" == typeof Array.from && "function" == typeof Map && isNative(Map) && null != Map.prototype && "function" == typeof Map.prototype.keys && isNative(Map.prototype.keys) && "function" == typeof Set && isNative(Set) && null != Set.prototype && "function" == typeof Set.prototype.keys && isNative(Set.prototype.keys)); + if (canUseCollections) { + var itemMap = new Map(), rootIDSet = new Set(); + setItem = function(id, item) { + itemMap.set(id, item); + }, getItem = function(id) { + return itemMap.get(id); + }, removeItem = function(id) { + itemMap["delete"](id); + }, getItemIDs = function() { + return Array.from(itemMap.keys()); + }, addRoot = function(id) { + rootIDSet.add(id); + }, removeRoot = function(id) { + rootIDSet["delete"](id); + }, getRootIDs = function() { + return Array.from(rootIDSet.keys()); + }; + } else { + var itemByKey = {}, rootByKey = {}, getKeyFromID = function(id) { + return "." + id; + }, getIDFromKey = function(key) { + return parseInt(key.substr(1), 10); + }; + setItem = function(id, item) { + var key = getKeyFromID(id); + itemByKey[key] = item; + }, getItem = function(id) { + var key = getKeyFromID(id); + return itemByKey[key]; + }, removeItem = function(id) { + var key = getKeyFromID(id); + delete itemByKey[key]; + }, getItemIDs = function() { + return Object.keys(itemByKey).map(getIDFromKey); + }, addRoot = function(id) { + var key = getKeyFromID(id); + rootByKey[key] = !0; + }, removeRoot = function(id) { + var key = getKeyFromID(id); + delete rootByKey[key]; + }, getRootIDs = function() { + return Object.keys(rootByKey).map(getIDFromKey); + }; + } + var unmountedIDs = [], ReactComponentTreeHook = { + onSetChildren: function(id, nextChildIDs) { + var item = getItem(id); + item ? void 0 : _prodInvariant("144"), item.childIDs = nextChildIDs; + for (var i = 0; i < nextChildIDs.length; i++) { + var nextChildID = nextChildIDs[i], nextChild = getItem(nextChildID); + nextChild ? void 0 : _prodInvariant("140"), null == nextChild.childIDs && "object" == typeof nextChild.element && null != nextChild.element ? _prodInvariant("141") : void 0, + nextChild.isMounted ? void 0 : _prodInvariant("71"), null == nextChild.parentID && (nextChild.parentID = id), + nextChild.parentID !== id ? _prodInvariant("142", nextChildID, nextChild.parentID, id) : void 0; + } + }, + onBeforeMountComponent: function(id, element, parentID) { + var item = { + element: element, + parentID: parentID, + text: null, + childIDs: [], + isMounted: !1, + updateCount: 0 + }; + setItem(id, item); + }, + onBeforeUpdateComponent: function(id, element) { + var item = getItem(id); + item && item.isMounted && (item.element = element); + }, + onMountComponent: function(id) { + var item = getItem(id); + item ? void 0 : _prodInvariant("144"), item.isMounted = !0; + var isRoot = 0 === item.parentID; + isRoot && addRoot(id); + }, + onUpdateComponent: function(id) { + var item = getItem(id); + item && item.isMounted && item.updateCount++; + }, + onUnmountComponent: function(id) { + var item = getItem(id); + if (item) { + item.isMounted = !1; + var isRoot = 0 === item.parentID; + isRoot && removeRoot(id); + } + unmountedIDs.push(id); + }, + purgeUnmountedComponents: function() { + if (!ReactComponentTreeHook._preventPurging) { + for (var i = 0; i < unmountedIDs.length; i++) { + var id = unmountedIDs[i]; + purgeDeep(id); + } + unmountedIDs.length = 0; + } + }, + isMounted: function(id) { + var item = getItem(id); + return !!item && item.isMounted; + }, + getCurrentStackAddendum: function(topElement) { + var info = ""; + if (topElement) { + var name = getDisplayName(topElement), owner = topElement._owner; + info += describeComponentFrame(name, topElement._source, owner && owner.getName()); + } + var currentOwner = ReactCurrentOwner.current, id = currentOwner && currentOwner._debugID; + return info += ReactComponentTreeHook.getStackAddendumByID(id); + }, + getStackAddendumByID: function(id) { + for (var info = ""; id; ) info += describeID(id), id = ReactComponentTreeHook.getParentID(id); + return info; + }, + getChildIDs: function(id) { + var item = getItem(id); + return item ? item.childIDs : []; + }, + getDisplayName: function(id) { + var element = ReactComponentTreeHook.getElement(id); + return element ? getDisplayName(element) : null; + }, + getElement: function(id) { + var item = getItem(id); + return item ? item.element : null; + }, + getOwnerID: function(id) { + var element = ReactComponentTreeHook.getElement(id); + return element && element._owner ? element._owner._debugID : null; + }, + getParentID: function(id) { + var item = getItem(id); + return item ? item.parentID : null; + }, + getSource: function(id) { + var item = getItem(id), element = item ? item.element : null, source = null != element ? element._source : null; + return source; + }, + getText: function(id) { + var element = ReactComponentTreeHook.getElement(id); + return "string" == typeof element ? element : "number" == typeof element ? "" + element : null; + }, + getUpdateCount: function(id) { + var item = getItem(id); + return item ? item.updateCount : 0; + }, + getRootIDs: getRootIDs, + getRegisteredIDs: getItemIDs + }; + module.exports = ReactComponentTreeHook; +}, function(module, exports, __webpack_require__) { + (function(process) { + "use strict"; + function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) { + if (traverseContext && "object" == typeof traverseContext) { + var result = traverseContext, keyUnique = void 0 === result[name]; + keyUnique && null != child && (result[name] = child); + } + } + function flattenChildren(children, selfDebugID) { + if (null == children) return children; + var result = {}; + return traverseAllChildren(children, flattenSingleChildIntoContext, result), result; + } + var traverseAllChildren = (__webpack_require__(140), __webpack_require__(141)); + __webpack_require__(60); + "undefined" != typeof process && process.env, 1, module.exports = flattenChildren; + }).call(exports, __webpack_require__(130)); +}, function(module, exports, __webpack_require__) { + "use strict"; + function ReactServerRenderingTransaction(renderToStaticMarkup) { + this.reinitializeTransaction(), this.renderToStaticMarkup = renderToStaticMarkup, + this.useCreateElement = !1, this.updateQueue = new ReactServerUpdateQueue(this); + } + var _assign = __webpack_require__(66), PooledClass = __webpack_require__(67), Transaction = __webpack_require__(80), ReactServerUpdateQueue = (__webpack_require__(79), + __webpack_require__(147)), TRANSACTION_WRAPPERS = [], noopCallbackQueue = { + enqueue: function() {} + }, Mixin = { + getTransactionWrappers: function() { + return TRANSACTION_WRAPPERS; + }, + getReactMountReady: function() { + return noopCallbackQueue; + }, + getUpdateQueue: function() { + return this.updateQueue; + }, + destructor: function() {}, + checkpoint: function() {}, + rollback: function() {} + }; + _assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin), PooledClass.addPoolingTo(ReactServerRenderingTransaction), + module.exports = ReactServerRenderingTransaction; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function warnNoop(publicInstance, callerName) { + } + var ReactUpdateQueue = __webpack_require__(148), ReactServerUpdateQueue = (__webpack_require__(60), + function() { + function ReactServerUpdateQueue(transaction) { + _classCallCheck(this, ReactServerUpdateQueue), this.transaction = transaction; + } + return ReactServerUpdateQueue.prototype.isMounted = function(publicInstance) { + return !1; + }, ReactServerUpdateQueue.prototype.enqueueCallback = function(publicInstance, callback, callerName) { + this.transaction.isInTransaction() && ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName); + }, ReactServerUpdateQueue.prototype.enqueueForceUpdate = function(publicInstance) { + this.transaction.isInTransaction() ? ReactUpdateQueue.enqueueForceUpdate(publicInstance) : warnNoop(publicInstance, "forceUpdate"); + }, ReactServerUpdateQueue.prototype.enqueueReplaceState = function(publicInstance, completeState) { + this.transaction.isInTransaction() ? ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState) : warnNoop(publicInstance, "replaceState"); + }, ReactServerUpdateQueue.prototype.enqueueSetState = function(publicInstance, partialState) { + this.transaction.isInTransaction() ? ReactUpdateQueue.enqueueSetState(publicInstance, partialState) : warnNoop(publicInstance, "setState"); + }, ReactServerUpdateQueue; + }()); + module.exports = ReactServerUpdateQueue; +}, function(module, exports, __webpack_require__) { + "use strict"; + function enqueueUpdate(internalInstance) { + ReactUpdates.enqueueUpdate(internalInstance); + } + function formatUnexpectedArgument(arg) { + var type = typeof arg; + if ("object" !== type) return type; + var displayName = arg.constructor && arg.constructor.name || type, keys = Object.keys(arg); + return keys.length > 0 && keys.length < 20 ? displayName + " (keys: " + keys.join(", ") + ")" : displayName; + } + function getInternalInstanceReadyForUpdate(publicInstance, callerName) { + var internalInstance = ReactInstanceMap.get(publicInstance); + if (!internalInstance) { + return null; + } + return internalInstance; + } + var _prodInvariant = __webpack_require__(48), ReactInstanceMap = (__webpack_require__(15), + __webpack_require__(128)), ReactUpdates = (__webpack_require__(79), __webpack_require__(73)), ReactUpdateQueue = (__webpack_require__(50), + __webpack_require__(60), { + isMounted: function(publicInstance) { + var internalInstance = ReactInstanceMap.get(publicInstance); + return !!internalInstance && !!internalInstance._renderedComponent; + }, + enqueueCallback: function(publicInstance, callback, callerName) { + ReactUpdateQueue.validateCallback(callback, callerName); + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); + return internalInstance ? (internalInstance._pendingCallbacks ? internalInstance._pendingCallbacks.push(callback) : internalInstance._pendingCallbacks = [ callback ], + void enqueueUpdate(internalInstance)) : null; + }, + enqueueCallbackInternal: function(internalInstance, callback) { + internalInstance._pendingCallbacks ? internalInstance._pendingCallbacks.push(callback) : internalInstance._pendingCallbacks = [ callback ], + enqueueUpdate(internalInstance); + }, + enqueueForceUpdate: function(publicInstance) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, "forceUpdate"); + internalInstance && (internalInstance._pendingForceUpdate = !0, enqueueUpdate(internalInstance)); + }, + enqueueReplaceState: function(publicInstance, completeState) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, "replaceState"); + internalInstance && (internalInstance._pendingStateQueue = [ completeState ], internalInstance._pendingReplaceState = !0, + enqueueUpdate(internalInstance)); + }, + enqueueSetState: function(publicInstance, partialState) { + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, "setState"); + if (internalInstance) { + var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []); + queue.push(partialState), enqueueUpdate(internalInstance); + } + }, + enqueueElementInternal: function(internalInstance, nextElement, nextContext) { + internalInstance._pendingElement = nextElement, internalInstance._context = nextContext, + enqueueUpdate(internalInstance); + }, + validateCallback: function(callback, callerName) { + callback && "function" != typeof callback ? _prodInvariant("122", callerName, formatUnexpectedArgument(callback)) : void 0; + } + }); + module.exports = ReactUpdateQueue; +}, function(module, exports, __webpack_require__) { + "use strict"; + var emptyFunction = (__webpack_require__(66), __webpack_require__(61)), validateDOMNesting = (__webpack_require__(60), + emptyFunction); + module.exports = validateDOMNesting; +}, function(module, exports, __webpack_require__) { + "use strict"; + var _assign = __webpack_require__(66), DOMLazyTree = __webpack_require__(93), ReactDOMComponentTree = __webpack_require__(47), ReactDOMEmptyComponent = function(instantiate) { + this._currentElement = null, this._hostNode = null, this._hostParent = null, this._hostContainerInfo = null, + this._domID = 0; + }; + _assign(ReactDOMEmptyComponent.prototype, { + mountComponent: function(transaction, hostParent, hostContainerInfo, context) { + var domID = hostContainerInfo._idCounter++; + this._domID = domID, this._hostParent = hostParent, this._hostContainerInfo = hostContainerInfo; + var nodeValue = " react-empty: " + this._domID + " "; + if (transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument, node = ownerDocument.createComment(nodeValue); + return ReactDOMComponentTree.precacheNode(this, node), DOMLazyTree(node); + } + return transaction.renderToStaticMarkup ? "" : ""; + }, + receiveComponent: function() {}, + getHostNode: function() { + return ReactDOMComponentTree.getNodeFromInstance(this); + }, + unmountComponent: function() { + ReactDOMComponentTree.uncacheNode(this); + } + }), module.exports = ReactDOMEmptyComponent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getLowestCommonAncestor(instA, instB) { + "_hostNode" in instA ? void 0 : _prodInvariant("33"), "_hostNode" in instB ? void 0 : _prodInvariant("33"); + for (var depthA = 0, tempA = instA; tempA; tempA = tempA._hostParent) depthA++; + for (var depthB = 0, tempB = instB; tempB; tempB = tempB._hostParent) depthB++; + for (;depthA - depthB > 0; ) instA = instA._hostParent, depthA--; + for (;depthB - depthA > 0; ) instB = instB._hostParent, depthB--; + for (var depth = depthA; depth--; ) { + if (instA === instB) return instA; + instA = instA._hostParent, instB = instB._hostParent; + } + return null; + } + function isAncestor(instA, instB) { + "_hostNode" in instA ? void 0 : _prodInvariant("35"), "_hostNode" in instB ? void 0 : _prodInvariant("35"); + for (;instB; ) { + if (instB === instA) return !0; + instB = instB._hostParent; + } + return !1; + } + function getParentInstance(inst) { + return "_hostNode" in inst ? void 0 : _prodInvariant("36"), inst._hostParent; + } + function traverseTwoPhase(inst, fn, arg) { + for (var path = []; inst; ) path.push(inst), inst = inst._hostParent; + var i; + for (i = path.length; i-- > 0; ) fn(path[i], "captured", arg); + for (i = 0; i < path.length; i++) fn(path[i], "bubbled", arg); + } + function traverseEnterLeave(from, to, fn, argFrom, argTo) { + for (var common = from && to ? getLowestCommonAncestor(from, to) : null, pathFrom = []; from && from !== common; ) pathFrom.push(from), + from = from._hostParent; + for (var pathTo = []; to && to !== common; ) pathTo.push(to), to = to._hostParent; + var i; + for (i = 0; i < pathFrom.length; i++) fn(pathFrom[i], "bubbled", argFrom); + for (i = pathTo.length; i-- > 0; ) fn(pathTo[i], "captured", argTo); + } + var _prodInvariant = __webpack_require__(48); + __webpack_require__(50); + module.exports = { + isAncestor: isAncestor, + getLowestCommonAncestor: getLowestCommonAncestor, + getParentInstance: getParentInstance, + traverseTwoPhase: traverseTwoPhase, + traverseEnterLeave: traverseEnterLeave + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + var _prodInvariant = __webpack_require__(48), _assign = __webpack_require__(66), DOMChildrenOperations = __webpack_require__(92), DOMLazyTree = __webpack_require__(93), ReactDOMComponentTree = __webpack_require__(47), escapeTextContentForBrowser = __webpack_require__(98), ReactDOMTextComponent = (__webpack_require__(50), + __webpack_require__(149), function(text) { + this._currentElement = text, this._stringText = "" + text, this._hostNode = null, + this._hostParent = null, this._domID = 0, this._mountIndex = 0, this._closingComment = null, + this._commentNodes = null; + }); + _assign(ReactDOMTextComponent.prototype, { + mountComponent: function(transaction, hostParent, hostContainerInfo, context) { + var domID = hostContainerInfo._idCounter++, openingValue = " react-text: " + domID + " ", closingValue = " /react-text "; + if (this._domID = domID, this._hostParent = hostParent, transaction.useCreateElement) { + var ownerDocument = hostContainerInfo._ownerDocument, openingComment = ownerDocument.createComment(openingValue), closingComment = ownerDocument.createComment(closingValue), lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment()); + return DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment)), this._stringText && DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText))), + DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment)), ReactDOMComponentTree.precacheNode(this, openingComment), + this._closingComment = closingComment, lazyTree; + } + var escapedText = escapeTextContentForBrowser(this._stringText); + return transaction.renderToStaticMarkup ? escapedText : "" + escapedText + ""; + }, + receiveComponent: function(nextText, transaction) { + if (nextText !== this._currentElement) { + this._currentElement = nextText; + var nextStringText = "" + nextText; + if (nextStringText !== this._stringText) { + this._stringText = nextStringText; + var commentNodes = this.getHostNode(); + DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText); + } + } + }, + getHostNode: function() { + var hostNode = this._commentNodes; + if (hostNode) return hostNode; + if (!this._closingComment) for (var openingComment = ReactDOMComponentTree.getNodeFromInstance(this), node = openingComment.nextSibling; ;) { + if (null == node ? _prodInvariant("67", this._domID) : void 0, 8 === node.nodeType && " /react-text " === node.nodeValue) { + this._closingComment = node; + break; + } + node = node.nextSibling; + } + return hostNode = [ this._hostNode, this._closingComment ], this._commentNodes = hostNode, + hostNode; + }, + unmountComponent: function() { + this._closingComment = null, this._commentNodes = null, ReactDOMComponentTree.uncacheNode(this); + } + }), module.exports = ReactDOMTextComponent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function ReactDefaultBatchingStrategyTransaction() { + this.reinitializeTransaction(); + } + var _assign = __webpack_require__(66), ReactUpdates = __webpack_require__(73), Transaction = __webpack_require__(80), emptyFunction = __webpack_require__(61), RESET_BATCHED_UPDATES = { + initialize: emptyFunction, + close: function() { + ReactDefaultBatchingStrategy.isBatchingUpdates = !1; + } + }, FLUSH_BATCHED_UPDATES = { + initialize: emptyFunction, + close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates) + }, TRANSACTION_WRAPPERS = [ FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES ]; + _assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, { + getTransactionWrappers: function() { + return TRANSACTION_WRAPPERS; + } + }); + var transaction = new ReactDefaultBatchingStrategyTransaction(), ReactDefaultBatchingStrategy = { + isBatchingUpdates: !1, + batchedUpdates: function(callback, a, b, c, d, e) { + var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; + return ReactDefaultBatchingStrategy.isBatchingUpdates = !0, alreadyBatchingUpdates ? callback(a, b, c, d, e) : transaction.perform(callback, null, a, b, c, d, e); + } + }; + module.exports = ReactDefaultBatchingStrategy; +}, function(module, exports, __webpack_require__) { + "use strict"; + function findParent(inst) { + for (;inst._hostParent; ) inst = inst._hostParent; + var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst), container = rootNode.parentNode; + return ReactDOMComponentTree.getClosestInstanceFromNode(container); + } + function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { + this.topLevelType = topLevelType, this.nativeEvent = nativeEvent, this.ancestors = []; + } + function handleTopLevelImpl(bookKeeping) { + var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent), targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget), ancestor = targetInst; + do bookKeeping.ancestors.push(ancestor), ancestor = ancestor && findParent(ancestor); while (ancestor); + for (var i = 0; i < bookKeeping.ancestors.length; i++) targetInst = bookKeeping.ancestors[i], + ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); + } + function scrollValueMonitor(cb) { + var scrollPosition = getUnboundedScrollPosition(window); + cb(scrollPosition); + } + var _assign = __webpack_require__(66), EventListener = __webpack_require__(155), ExecutionEnvironment = __webpack_require__(64), PooledClass = __webpack_require__(67), ReactDOMComponentTree = __webpack_require__(47), ReactUpdates = __webpack_require__(73), getEventTarget = __webpack_require__(81), getUnboundedScrollPosition = __webpack_require__(156); + _assign(TopLevelCallbackBookKeeping.prototype, { + destructor: function() { + this.topLevelType = null, this.nativeEvent = null, this.ancestors.length = 0; + } + }), PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler); + var ReactEventListener = { + _enabled: !0, + _handleTopLevel: null, + WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null, + setHandleTopLevel: function(handleTopLevel) { + ReactEventListener._handleTopLevel = handleTopLevel; + }, + setEnabled: function(enabled) { + ReactEventListener._enabled = !!enabled; + }, + isEnabled: function() { + return ReactEventListener._enabled; + }, + trapBubbledEvent: function(topLevelType, handlerBaseName, element) { + return element ? EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)) : null; + }, + trapCapturedEvent: function(topLevelType, handlerBaseName, element) { + return element ? EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)) : null; + }, + monitorScrollValue: function(refresh) { + var callback = scrollValueMonitor.bind(null, refresh); + EventListener.listen(window, "scroll", callback); + }, + dispatchEvent: function(topLevelType, nativeEvent) { + if (ReactEventListener._enabled) { + var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent); + try { + ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping); + } finally { + TopLevelCallbackBookKeeping.release(bookKeeping); + } + } + } + }; + module.exports = ReactEventListener; +}, function(module, exports, __webpack_require__) { + "use strict"; + var emptyFunction = __webpack_require__(61), EventListener = { + listen: function(target, eventType, callback) { + return target.addEventListener ? (target.addEventListener(eventType, callback, !1), + { + remove: function() { + target.removeEventListener(eventType, callback, !1); + } + }) : target.attachEvent ? (target.attachEvent("on" + eventType, callback), { + remove: function() { + target.detachEvent("on" + eventType, callback); + } + }) : void 0; + }, + capture: function(target, eventType, callback) { + return target.addEventListener ? (target.addEventListener(eventType, callback, !0), + { + remove: function() { + target.removeEventListener(eventType, callback, !0); + } + }) : { + remove: emptyFunction + }; + }, + registerDefault: function() {} + }; + module.exports = EventListener; +}, function(module, exports) { + "use strict"; + function getUnboundedScrollPosition(scrollable) { + return scrollable === window ? { + x: window.pageXOffset || document.documentElement.scrollLeft, + y: window.pageYOffset || document.documentElement.scrollTop + } : { + x: scrollable.scrollLeft, + y: scrollable.scrollTop + }; + } + module.exports = getUnboundedScrollPosition; +}, function(module, exports, __webpack_require__) { + "use strict"; + var DOMProperty = __webpack_require__(49), EventPluginHub = __webpack_require__(56), EventPluginUtils = __webpack_require__(58), ReactComponentEnvironment = __webpack_require__(127), ReactEmptyComponent = __webpack_require__(137), ReactBrowserEventEmitter = __webpack_require__(117), ReactHostComponent = __webpack_require__(138), ReactUpdates = __webpack_require__(73), ReactInjection = { + Component: ReactComponentEnvironment.injection, + DOMProperty: DOMProperty.injection, + EmptyComponent: ReactEmptyComponent.injection, + EventPluginHub: EventPluginHub.injection, + EventPluginUtils: EventPluginUtils.injection, + EventEmitter: ReactBrowserEventEmitter.injection, + HostComponent: ReactHostComponent.injection, + Updates: ReactUpdates.injection + }; + module.exports = ReactInjection; +}, function(module, exports, __webpack_require__) { + "use strict"; + function ReactReconcileTransaction(useCreateElement) { + this.reinitializeTransaction(), this.renderToStaticMarkup = !1, this.reactMountReady = CallbackQueue.getPooled(null), + this.useCreateElement = useCreateElement; + } + var _assign = __webpack_require__(66), CallbackQueue = __webpack_require__(74), PooledClass = __webpack_require__(67), ReactBrowserEventEmitter = __webpack_require__(117), ReactInputSelection = __webpack_require__(159), Transaction = (__webpack_require__(79), + __webpack_require__(80)), ReactUpdateQueue = __webpack_require__(148), SELECTION_RESTORATION = { + initialize: ReactInputSelection.getSelectionInformation, + close: ReactInputSelection.restoreSelection + }, EVENT_SUPPRESSION = { + initialize: function() { + var currentlyEnabled = ReactBrowserEventEmitter.isEnabled(); + return ReactBrowserEventEmitter.setEnabled(!1), currentlyEnabled; + }, + close: function(previouslyEnabled) { + ReactBrowserEventEmitter.setEnabled(previouslyEnabled); + } + }, ON_DOM_READY_QUEUEING = { + initialize: function() { + this.reactMountReady.reset(); + }, + close: function() { + this.reactMountReady.notifyAll(); + } + }, TRANSACTION_WRAPPERS = [ SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING ], Mixin = { + getTransactionWrappers: function() { + return TRANSACTION_WRAPPERS; + }, + getReactMountReady: function() { + return this.reactMountReady; + }, + getUpdateQueue: function() { + return ReactUpdateQueue; + }, + checkpoint: function() { + return this.reactMountReady.checkpoint(); + }, + rollback: function(checkpoint) { + this.reactMountReady.rollback(checkpoint); + }, + destructor: function() { + CallbackQueue.release(this.reactMountReady), this.reactMountReady = null; + } + }; + _assign(ReactReconcileTransaction.prototype, Transaction, Mixin), PooledClass.addPoolingTo(ReactReconcileTransaction), + module.exports = ReactReconcileTransaction; +}, function(module, exports, __webpack_require__) { + "use strict"; + function isInDocument(node) { + return containsNode(document.documentElement, node); + } + var ReactDOMSelection = __webpack_require__(160), containsNode = __webpack_require__(162), focusNode = __webpack_require__(106), getActiveElement = __webpack_require__(165), ReactInputSelection = { + hasSelectionCapabilities: function(elem) { + var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); + return nodeName && ("input" === nodeName && "text" === elem.type || "textarea" === nodeName || "true" === elem.contentEditable); + }, + getSelectionInformation: function() { + var focusedElem = getActiveElement(); + return { + focusedElem: focusedElem, + selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null + }; + }, + restoreSelection: function(priorSelectionInformation) { + var curFocusedElem = getActiveElement(), priorFocusedElem = priorSelectionInformation.focusedElem, priorSelectionRange = priorSelectionInformation.selectionRange; + curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem) && (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem) && ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange), + focusNode(priorFocusedElem)); + }, + getSelection: function(input) { + var selection; + if ("selectionStart" in input) selection = { + start: input.selectionStart, + end: input.selectionEnd + }; else if (document.selection && input.nodeName && "input" === input.nodeName.toLowerCase()) { + var range = document.selection.createRange(); + range.parentElement() === input && (selection = { + start: -range.moveStart("character", -input.value.length), + end: -range.moveEnd("character", -input.value.length) + }); + } else selection = ReactDOMSelection.getOffsets(input); + return selection || { + start: 0, + end: 0 + }; + }, + setSelection: function(input, offsets) { + var start = offsets.start, end = offsets.end; + if (void 0 === end && (end = start), "selectionStart" in input) input.selectionStart = start, + input.selectionEnd = Math.min(end, input.value.length); else if (document.selection && input.nodeName && "input" === input.nodeName.toLowerCase()) { + var range = input.createTextRange(); + range.collapse(!0), range.moveStart("character", start), range.moveEnd("character", end - start), + range.select(); + } else ReactDOMSelection.setOffsets(input, offsets); + } + }; + module.exports = ReactInputSelection; +}, function(module, exports, __webpack_require__) { + "use strict"; + function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { + return anchorNode === focusNode && anchorOffset === focusOffset; + } + function getIEOffsets(node) { + var selection = document.selection, selectedRange = selection.createRange(), selectedLength = selectedRange.text.length, fromStart = selectedRange.duplicate(); + fromStart.moveToElementText(node), fromStart.setEndPoint("EndToStart", selectedRange); + var startOffset = fromStart.text.length, endOffset = startOffset + selectedLength; + return { + start: startOffset, + end: endOffset + }; + } + function getModernOffsets(node) { + var selection = window.getSelection && window.getSelection(); + if (!selection || 0 === selection.rangeCount) return null; + var anchorNode = selection.anchorNode, anchorOffset = selection.anchorOffset, focusNode = selection.focusNode, focusOffset = selection.focusOffset, currentRange = selection.getRangeAt(0); + try { + currentRange.startContainer.nodeType, currentRange.endContainer.nodeType; + } catch (e) { + return null; + } + var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset), rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length, tempRange = currentRange.cloneRange(); + tempRange.selectNodeContents(node), tempRange.setEnd(currentRange.startContainer, currentRange.startOffset); + var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset), start = isTempRangeCollapsed ? 0 : tempRange.toString().length, end = start + rangeLength, detectionRange = document.createRange(); + detectionRange.setStart(anchorNode, anchorOffset), detectionRange.setEnd(focusNode, focusOffset); + var isBackward = detectionRange.collapsed; + return { + start: isBackward ? end : start, + end: isBackward ? start : end + }; + } + function setIEOffsets(node, offsets) { + var start, end, range = document.selection.createRange().duplicate(); + void 0 === offsets.end ? (start = offsets.start, end = start) : offsets.start > offsets.end ? (start = offsets.end, + end = offsets.start) : (start = offsets.start, end = offsets.end), range.moveToElementText(node), + range.moveStart("character", start), range.setEndPoint("EndToStart", range), range.moveEnd("character", end - start), + range.select(); + } + function setModernOffsets(node, offsets) { + if (window.getSelection) { + var selection = window.getSelection(), length = node[getTextContentAccessor()].length, start = Math.min(offsets.start, length), end = void 0 === offsets.end ? start : Math.min(offsets.end, length); + if (!selection.extend && start > end) { + var temp = end; + end = start, start = temp; + } + var startMarker = getNodeForCharacterOffset(node, start), endMarker = getNodeForCharacterOffset(node, end); + if (startMarker && endMarker) { + var range = document.createRange(); + range.setStart(startMarker.node, startMarker.offset), selection.removeAllRanges(), + start > end ? (selection.addRange(range), selection.extend(endMarker.node, endMarker.offset)) : (range.setEnd(endMarker.node, endMarker.offset), + selection.addRange(range)); + } + } + } + var ExecutionEnvironment = __webpack_require__(64), getNodeForCharacterOffset = __webpack_require__(161), getTextContentAccessor = __webpack_require__(68), useIEOffsets = ExecutionEnvironment.canUseDOM && "selection" in document && !("getSelection" in window), ReactDOMSelection = { + getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets, + setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets + }; + module.exports = ReactDOMSelection; +}, function(module, exports) { + "use strict"; + function getLeafNode(node) { + for (;node && node.firstChild; ) node = node.firstChild; + return node; + } + function getSiblingNode(node) { + for (;node; ) { + if (node.nextSibling) return node.nextSibling; + node = node.parentNode; + } + } + function getNodeForCharacterOffset(root, offset) { + for (var node = getLeafNode(root), nodeStart = 0, nodeEnd = 0; node; ) { + if (3 === node.nodeType) { + if (nodeEnd = nodeStart + node.textContent.length, nodeStart <= offset && nodeEnd >= offset) return { + node: node, + offset: offset - nodeStart + }; + nodeStart = nodeEnd; + } + node = getLeafNode(getSiblingNode(node)); + } + } + module.exports = getNodeForCharacterOffset; +}, function(module, exports, __webpack_require__) { + "use strict"; + function containsNode(outerNode, innerNode) { + return !(!outerNode || !innerNode) && (outerNode === innerNode || !isTextNode(outerNode) && (isTextNode(innerNode) ? containsNode(outerNode, innerNode.parentNode) : "contains" in outerNode ? outerNode.contains(innerNode) : !!outerNode.compareDocumentPosition && !!(16 & outerNode.compareDocumentPosition(innerNode)))); + } + var isTextNode = __webpack_require__(163); + module.exports = containsNode; +}, function(module, exports, __webpack_require__) { + "use strict"; + function isTextNode(object) { + return isNode(object) && 3 == object.nodeType; + } + var isNode = __webpack_require__(164); + module.exports = isTextNode; +}, function(module, exports) { + "use strict"; + function isNode(object) { + return !(!object || !("function" == typeof Node ? object instanceof Node : "object" == typeof object && "number" == typeof object.nodeType && "string" == typeof object.nodeName)); + } + module.exports = isNode; +}, function(module, exports) { + "use strict"; + function getActiveElement() { + if ("undefined" == typeof document) return null; + try { + return document.activeElement || document.body; + } catch (e) { + return document.body; + } + } + module.exports = getActiveElement; +}, function(module, exports) { + "use strict"; + var NS = { + xlink: "http://www.w3.org/1999/xlink", + xml: "http://www.w3.org/XML/1998/namespace" + }, ATTRS = { + accentHeight: "accent-height", + accumulate: 0, + additive: 0, + alignmentBaseline: "alignment-baseline", + allowReorder: "allowReorder", + alphabetic: 0, + amplitude: 0, + arabicForm: "arabic-form", + ascent: 0, + attributeName: "attributeName", + attributeType: "attributeType", + autoReverse: "autoReverse", + azimuth: 0, + baseFrequency: "baseFrequency", + baseProfile: "baseProfile", + baselineShift: "baseline-shift", + bbox: 0, + begin: 0, + bias: 0, + by: 0, + calcMode: "calcMode", + capHeight: "cap-height", + clip: 0, + clipPath: "clip-path", + clipRule: "clip-rule", + clipPathUnits: "clipPathUnits", + colorInterpolation: "color-interpolation", + colorInterpolationFilters: "color-interpolation-filters", + colorProfile: "color-profile", + colorRendering: "color-rendering", + contentScriptType: "contentScriptType", + contentStyleType: "contentStyleType", + cursor: 0, + cx: 0, + cy: 0, + d: 0, + decelerate: 0, + descent: 0, + diffuseConstant: "diffuseConstant", + direction: 0, + display: 0, + divisor: 0, + dominantBaseline: "dominant-baseline", + dur: 0, + dx: 0, + dy: 0, + edgeMode: "edgeMode", + elevation: 0, + enableBackground: "enable-background", + end: 0, + exponent: 0, + externalResourcesRequired: "externalResourcesRequired", + fill: 0, + fillOpacity: "fill-opacity", + fillRule: "fill-rule", + filter: 0, + filterRes: "filterRes", + filterUnits: "filterUnits", + floodColor: "flood-color", + floodOpacity: "flood-opacity", + focusable: 0, + fontFamily: "font-family", + fontSize: "font-size", + fontSizeAdjust: "font-size-adjust", + fontStretch: "font-stretch", + fontStyle: "font-style", + fontVariant: "font-variant", + fontWeight: "font-weight", + format: 0, + from: 0, + fx: 0, + fy: 0, + g1: 0, + g2: 0, + glyphName: "glyph-name", + glyphOrientationHorizontal: "glyph-orientation-horizontal", + glyphOrientationVertical: "glyph-orientation-vertical", + glyphRef: "glyphRef", + gradientTransform: "gradientTransform", + gradientUnits: "gradientUnits", + hanging: 0, + horizAdvX: "horiz-adv-x", + horizOriginX: "horiz-origin-x", + ideographic: 0, + imageRendering: "image-rendering", + "in": 0, + in2: 0, + intercept: 0, + k: 0, + k1: 0, + k2: 0, + k3: 0, + k4: 0, + kernelMatrix: "kernelMatrix", + kernelUnitLength: "kernelUnitLength", + kerning: 0, + keyPoints: "keyPoints", + keySplines: "keySplines", + keyTimes: "keyTimes", + lengthAdjust: "lengthAdjust", + letterSpacing: "letter-spacing", + lightingColor: "lighting-color", + limitingConeAngle: "limitingConeAngle", + local: 0, + markerEnd: "marker-end", + markerMid: "marker-mid", + markerStart: "marker-start", + markerHeight: "markerHeight", + markerUnits: "markerUnits", + markerWidth: "markerWidth", + mask: 0, + maskContentUnits: "maskContentUnits", + maskUnits: "maskUnits", + mathematical: 0, + mode: 0, + numOctaves: "numOctaves", + offset: 0, + opacity: 0, + operator: 0, + order: 0, + orient: 0, + orientation: 0, + origin: 0, + overflow: 0, + overlinePosition: "overline-position", + overlineThickness: "overline-thickness", + paintOrder: "paint-order", + panose1: "panose-1", + pathLength: "pathLength", + patternContentUnits: "patternContentUnits", + patternTransform: "patternTransform", + patternUnits: "patternUnits", + pointerEvents: "pointer-events", + points: 0, + pointsAtX: "pointsAtX", + pointsAtY: "pointsAtY", + pointsAtZ: "pointsAtZ", + preserveAlpha: "preserveAlpha", + preserveAspectRatio: "preserveAspectRatio", + primitiveUnits: "primitiveUnits", + r: 0, + radius: 0, + refX: "refX", + refY: "refY", + renderingIntent: "rendering-intent", + repeatCount: "repeatCount", + repeatDur: "repeatDur", + requiredExtensions: "requiredExtensions", + requiredFeatures: "requiredFeatures", + restart: 0, + result: 0, + rotate: 0, + rx: 0, + ry: 0, + scale: 0, + seed: 0, + shapeRendering: "shape-rendering", + slope: 0, + spacing: 0, + specularConstant: "specularConstant", + specularExponent: "specularExponent", + speed: 0, + spreadMethod: "spreadMethod", + startOffset: "startOffset", + stdDeviation: "stdDeviation", + stemh: 0, + stemv: 0, + stitchTiles: "stitchTiles", + stopColor: "stop-color", + stopOpacity: "stop-opacity", + strikethroughPosition: "strikethrough-position", + strikethroughThickness: "strikethrough-thickness", + string: 0, + stroke: 0, + strokeDasharray: "stroke-dasharray", + strokeDashoffset: "stroke-dashoffset", + strokeLinecap: "stroke-linecap", + strokeLinejoin: "stroke-linejoin", + strokeMiterlimit: "stroke-miterlimit", + strokeOpacity: "stroke-opacity", + strokeWidth: "stroke-width", + surfaceScale: "surfaceScale", + systemLanguage: "systemLanguage", + tableValues: "tableValues", + targetX: "targetX", + targetY: "targetY", + textAnchor: "text-anchor", + textDecoration: "text-decoration", + textRendering: "text-rendering", + textLength: "textLength", + to: 0, + transform: 0, + u1: 0, + u2: 0, + underlinePosition: "underline-position", + underlineThickness: "underline-thickness", + unicode: 0, + unicodeBidi: "unicode-bidi", + unicodeRange: "unicode-range", + unitsPerEm: "units-per-em", + vAlphabetic: "v-alphabetic", + vHanging: "v-hanging", + vIdeographic: "v-ideographic", + vMathematical: "v-mathematical", + values: 0, + vectorEffect: "vector-effect", + version: 0, + vertAdvY: "vert-adv-y", + vertOriginX: "vert-origin-x", + vertOriginY: "vert-origin-y", + viewBox: "viewBox", + viewTarget: "viewTarget", + visibility: 0, + widths: 0, + wordSpacing: "word-spacing", + writingMode: "writing-mode", + x: 0, + xHeight: "x-height", + x1: 0, + x2: 0, + xChannelSelector: "xChannelSelector", + xlinkActuate: "xlink:actuate", + xlinkArcrole: "xlink:arcrole", + xlinkHref: "xlink:href", + xlinkRole: "xlink:role", + xlinkShow: "xlink:show", + xlinkTitle: "xlink:title", + xlinkType: "xlink:type", + xmlBase: "xml:base", + xmlns: 0, + xmlnsXlink: "xmlns:xlink", + xmlLang: "xml:lang", + xmlSpace: "xml:space", + y: 0, + y1: 0, + y2: 0, + yChannelSelector: "yChannelSelector", + z: 0, + zoomAndPan: "zoomAndPan" + }, SVGDOMPropertyConfig = { + Properties: {}, + DOMAttributeNamespaces: { + xlinkActuate: NS.xlink, + xlinkArcrole: NS.xlink, + xlinkHref: NS.xlink, + xlinkRole: NS.xlink, + xlinkShow: NS.xlink, + xlinkTitle: NS.xlink, + xlinkType: NS.xlink, + xmlBase: NS.xml, + xmlLang: NS.xml, + xmlSpace: NS.xml + }, + DOMAttributeNames: {} + }; + Object.keys(ATTRS).forEach(function(key) { + SVGDOMPropertyConfig.Properties[key] = 0, ATTRS[key] && (SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key]); + }), module.exports = SVGDOMPropertyConfig; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getSelection(node) { + if ("selectionStart" in node && ReactInputSelection.hasSelectionCapabilities(node)) return { + start: node.selectionStart, + end: node.selectionEnd + }; + if (window.getSelection) { + var selection = window.getSelection(); + return { + anchorNode: selection.anchorNode, + anchorOffset: selection.anchorOffset, + focusNode: selection.focusNode, + focusOffset: selection.focusOffset + }; + } + if (document.selection) { + var range = document.selection.createRange(); + return { + parentElement: range.parentElement(), + text: range.text, + top: range.boundingTop, + left: range.boundingLeft + }; + } + } + function constructSelectEvent(nativeEvent, nativeEventTarget) { + if (mouseDown || null == activeElement || activeElement !== getActiveElement()) return null; + var currentSelection = getSelection(activeElement); + if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { + lastSelection = currentSelection; + var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget); + return syntheticEvent.type = "select", syntheticEvent.target = activeElement, EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent), + syntheticEvent; + } + return null; + } + var EventPropagators = __webpack_require__(55), ExecutionEnvironment = __webpack_require__(64), ReactDOMComponentTree = __webpack_require__(47), ReactInputSelection = __webpack_require__(159), SyntheticEvent = __webpack_require__(70), getActiveElement = __webpack_require__(165), isTextInputElement = __webpack_require__(83), shallowEqual = __webpack_require__(135), skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && "documentMode" in document && document.documentMode <= 11, eventTypes = { + select: { + phasedRegistrationNames: { + bubbled: "onSelect", + captured: "onSelectCapture" + }, + dependencies: [ "topBlur", "topContextMenu", "topFocus", "topKeyDown", "topKeyUp", "topMouseDown", "topMouseUp", "topSelectionChange" ] + } + }, activeElement = null, activeElementInst = null, lastSelection = null, mouseDown = !1, hasListener = !1, SelectEventPlugin = { + eventTypes: eventTypes, + extractEvents: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + if (!hasListener) return null; + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window; + switch (topLevelType) { + case "topFocus": + (isTextInputElement(targetNode) || "true" === targetNode.contentEditable) && (activeElement = targetNode, + activeElementInst = targetInst, lastSelection = null); + break; + + case "topBlur": + activeElement = null, activeElementInst = null, lastSelection = null; + break; + + case "topMouseDown": + mouseDown = !0; + break; + + case "topContextMenu": + case "topMouseUp": + return mouseDown = !1, constructSelectEvent(nativeEvent, nativeEventTarget); + + case "topSelectionChange": + if (skipSelectionChangeEvent) break; + + case "topKeyDown": + case "topKeyUp": + return constructSelectEvent(nativeEvent, nativeEventTarget); + } + return null; + }, + didPutListener: function(inst, registrationName, listener) { + "onSelect" === registrationName && (hasListener = !0); + } + }; + module.exports = SelectEventPlugin; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getDictionaryKey(inst) { + return "." + inst._rootNodeID; + } + function isInteractive(tag) { + return "button" === tag || "input" === tag || "select" === tag || "textarea" === tag; + } + var _prodInvariant = __webpack_require__(48), EventListener = __webpack_require__(155), EventPropagators = __webpack_require__(55), ReactDOMComponentTree = __webpack_require__(47), SyntheticAnimationEvent = __webpack_require__(169), SyntheticClipboardEvent = __webpack_require__(170), SyntheticEvent = __webpack_require__(70), SyntheticFocusEvent = __webpack_require__(171), SyntheticKeyboardEvent = __webpack_require__(172), SyntheticMouseEvent = __webpack_require__(86), SyntheticDragEvent = __webpack_require__(175), SyntheticTouchEvent = __webpack_require__(176), SyntheticTransitionEvent = __webpack_require__(177), SyntheticUIEvent = __webpack_require__(87), SyntheticWheelEvent = __webpack_require__(178), emptyFunction = __webpack_require__(61), getEventCharCode = __webpack_require__(173), eventTypes = (__webpack_require__(50), + {}), topLevelEventsToDispatchConfig = {}; + [ "abort", "animationEnd", "animationIteration", "animationStart", "blur", "canPlay", "canPlayThrough", "click", "contextMenu", "copy", "cut", "doubleClick", "drag", "dragEnd", "dragEnter", "dragExit", "dragLeave", "dragOver", "dragStart", "drop", "durationChange", "emptied", "encrypted", "ended", "error", "focus", "input", "invalid", "keyDown", "keyPress", "keyUp", "load", "loadedData", "loadedMetadata", "loadStart", "mouseDown", "mouseMove", "mouseOut", "mouseOver", "mouseUp", "paste", "pause", "play", "playing", "progress", "rateChange", "reset", "scroll", "seeked", "seeking", "stalled", "submit", "suspend", "timeUpdate", "touchCancel", "touchEnd", "touchMove", "touchStart", "transitionEnd", "volumeChange", "waiting", "wheel" ].forEach(function(event) { + var capitalizedEvent = event[0].toUpperCase() + event.slice(1), onEvent = "on" + capitalizedEvent, topEvent = "top" + capitalizedEvent, type = { + phasedRegistrationNames: { + bubbled: onEvent, + captured: onEvent + "Capture" + }, + dependencies: [ topEvent ] + }; + eventTypes[event] = type, topLevelEventsToDispatchConfig[topEvent] = type; + }); + var onClickListeners = {}, SimpleEventPlugin = { + eventTypes: eventTypes, + extractEvents: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) { + var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; + if (!dispatchConfig) return null; + var EventConstructor; + switch (topLevelType) { + case "topAbort": + case "topCanPlay": + case "topCanPlayThrough": + case "topDurationChange": + case "topEmptied": + case "topEncrypted": + case "topEnded": + case "topError": + case "topInput": + case "topInvalid": + case "topLoad": + case "topLoadedData": + case "topLoadedMetadata": + case "topLoadStart": + case "topPause": + case "topPlay": + case "topPlaying": + case "topProgress": + case "topRateChange": + case "topReset": + case "topSeeked": + case "topSeeking": + case "topStalled": + case "topSubmit": + case "topSuspend": + case "topTimeUpdate": + case "topVolumeChange": + case "topWaiting": + EventConstructor = SyntheticEvent; + break; + + case "topKeyPress": + if (0 === getEventCharCode(nativeEvent)) return null; + + case "topKeyDown": + case "topKeyUp": + EventConstructor = SyntheticKeyboardEvent; + break; + + case "topBlur": + case "topFocus": + EventConstructor = SyntheticFocusEvent; + break; + + case "topClick": + if (2 === nativeEvent.button) return null; + + case "topDoubleClick": + case "topMouseDown": + case "topMouseMove": + case "topMouseUp": + case "topMouseOut": + case "topMouseOver": + case "topContextMenu": + EventConstructor = SyntheticMouseEvent; + break; + + case "topDrag": + case "topDragEnd": + case "topDragEnter": + case "topDragExit": + case "topDragLeave": + case "topDragOver": + case "topDragStart": + case "topDrop": + EventConstructor = SyntheticDragEvent; + break; + + case "topTouchCancel": + case "topTouchEnd": + case "topTouchMove": + case "topTouchStart": + EventConstructor = SyntheticTouchEvent; + break; + + case "topAnimationEnd": + case "topAnimationIteration": + case "topAnimationStart": + EventConstructor = SyntheticAnimationEvent; + break; + + case "topTransitionEnd": + EventConstructor = SyntheticTransitionEvent; + break; + + case "topScroll": + EventConstructor = SyntheticUIEvent; + break; + + case "topWheel": + EventConstructor = SyntheticWheelEvent; + break; + + case "topCopy": + case "topCut": + case "topPaste": + EventConstructor = SyntheticClipboardEvent; + } + EventConstructor ? void 0 : _prodInvariant("86", topLevelType); + var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget); + return EventPropagators.accumulateTwoPhaseDispatches(event), event; + }, + didPutListener: function(inst, registrationName, listener) { + if ("onClick" === registrationName && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst), node = ReactDOMComponentTree.getNodeFromInstance(inst); + onClickListeners[key] || (onClickListeners[key] = EventListener.listen(node, "click", emptyFunction)); + } + }, + willDeleteListener: function(inst, registrationName) { + if ("onClick" === registrationName && !isInteractive(inst._tag)) { + var key = getDictionaryKey(inst); + onClickListeners[key].remove(), delete onClickListeners[key]; + } + } + }; + module.exports = SimpleEventPlugin; +}, function(module, exports, __webpack_require__) { + "use strict"; + function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + var SyntheticEvent = __webpack_require__(70), AnimationEventInterface = { + animationName: null, + elapsedTime: null, + pseudoElement: null + }; + SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface), module.exports = SyntheticAnimationEvent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + var SyntheticEvent = __webpack_require__(70), ClipboardEventInterface = { + clipboardData: function(event) { + return "clipboardData" in event ? event.clipboardData : window.clipboardData; + } + }; + SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface), module.exports = SyntheticClipboardEvent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + var SyntheticUIEvent = __webpack_require__(87), FocusEventInterface = { + relatedTarget: null + }; + SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface), module.exports = SyntheticFocusEvent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + var SyntheticUIEvent = __webpack_require__(87), getEventCharCode = __webpack_require__(173), getEventKey = __webpack_require__(174), getEventModifierState = __webpack_require__(89), KeyboardEventInterface = { + key: getEventKey, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: getEventModifierState, + charCode: function(event) { + return "keypress" === event.type ? getEventCharCode(event) : 0; + }, + keyCode: function(event) { + return "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0; + }, + which: function(event) { + return "keypress" === event.type ? getEventCharCode(event) : "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0; + } + }; + SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface), module.exports = SyntheticKeyboardEvent; +}, function(module, exports) { + "use strict"; + function getEventCharCode(nativeEvent) { + var charCode, keyCode = nativeEvent.keyCode; + return "charCode" in nativeEvent ? (charCode = nativeEvent.charCode, 0 === charCode && 13 === keyCode && (charCode = 13)) : charCode = keyCode, + charCode >= 32 || 13 === charCode ? charCode : 0; + } + module.exports = getEventCharCode; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getEventKey(nativeEvent) { + if (nativeEvent.key) { + var key = normalizeKey[nativeEvent.key] || nativeEvent.key; + if ("Unidentified" !== key) return key; + } + if ("keypress" === nativeEvent.type) { + var charCode = getEventCharCode(nativeEvent); + return 13 === charCode ? "Enter" : String.fromCharCode(charCode); + } + return "keydown" === nativeEvent.type || "keyup" === nativeEvent.type ? translateToKey[nativeEvent.keyCode] || "Unidentified" : ""; + } + var getEventCharCode = __webpack_require__(173), normalizeKey = { + Esc: "Escape", + Spacebar: " ", + Left: "ArrowLeft", + Up: "ArrowUp", + Right: "ArrowRight", + Down: "ArrowDown", + Del: "Delete", + Win: "OS", + Menu: "ContextMenu", + Apps: "ContextMenu", + Scroll: "ScrollLock", + MozPrintableKey: "Unidentified" + }, translateToKey = { + 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" + }; + module.exports = getEventKey; +}, function(module, exports, __webpack_require__) { + "use strict"; + function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + var SyntheticMouseEvent = __webpack_require__(86), DragEventInterface = { + dataTransfer: null + }; + SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface), module.exports = SyntheticDragEvent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + var SyntheticUIEvent = __webpack_require__(87), getEventModifierState = __webpack_require__(89), TouchEventInterface = { + touches: null, + targetTouches: null, + changedTouches: null, + altKey: null, + metaKey: null, + ctrlKey: null, + shiftKey: null, + getModifierState: getEventModifierState + }; + SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface), module.exports = SyntheticTouchEvent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + var SyntheticEvent = __webpack_require__(70), TransitionEventInterface = { + propertyName: null, + elapsedTime: null, + pseudoElement: null + }; + SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface), + module.exports = SyntheticTransitionEvent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) { + return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget); + } + var SyntheticMouseEvent = __webpack_require__(86), WheelEventInterface = { + deltaX: function(event) { + return "deltaX" in event ? event.deltaX : "wheelDeltaX" in event ? -event.wheelDeltaX : 0; + }, + deltaY: function(event) { + return "deltaY" in event ? event.deltaY : "wheelDeltaY" in event ? -event.wheelDeltaY : "wheelDelta" in event ? -event.wheelDelta : 0; + }, + deltaZ: null, + deltaMode: null + }; + SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface), module.exports = SyntheticWheelEvent; +}, function(module, exports, __webpack_require__) { + "use strict"; + function firstDifferenceIndex(string1, string2) { + for (var minLen = Math.min(string1.length, string2.length), i = 0; i < minLen; i++) if (string1.charAt(i) !== string2.charAt(i)) return i; + return string1.length === string2.length ? -1 : minLen; + } + function getReactRootElementInContainer(container) { + return container ? container.nodeType === DOC_NODE_TYPE ? container.documentElement : container.firstChild : null; + } + function internalGetID(node) { + return node.getAttribute && node.getAttribute(ATTR_NAME) || ""; + } + function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) { + var markerName; + if (ReactFeatureFlags.logTopLevelRenders) { + var wrappedElement = wrapperInstance._currentElement.props.child, type = wrappedElement.type; + markerName = "React mount: " + ("string" == typeof type ? type : type.displayName || type.name), + console.time(markerName); + } + var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0); + markerName && console.timeEnd(markerName), wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance, + ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction); + } + function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) { + var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(!shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement); + transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context), + ReactUpdates.ReactReconcileTransaction.release(transaction); + } + function unmountComponentFromNode(instance, container, safely) { + for (ReactReconciler.unmountComponent(instance, safely), container.nodeType === DOC_NODE_TYPE && (container = container.documentElement); container.lastChild; ) container.removeChild(container.lastChild); + } + function hasNonRootReactChild(container) { + var rootEl = getReactRootElementInContainer(container); + if (rootEl) { + var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl); + return !(!inst || !inst._hostParent); + } + } + function isValidContainer(node) { + return !(!node || node.nodeType !== ELEMENT_NODE_TYPE && node.nodeType !== DOC_NODE_TYPE && node.nodeType !== DOCUMENT_FRAGMENT_NODE_TYPE); + } + function getHostRootInstanceInContainer(container) { + var rootEl = getReactRootElementInContainer(container), prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl); + return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null; + } + function getTopLevelWrapperInContainer(container) { + var root = getHostRootInstanceInContainer(container); + return root ? root._hostContainerInfo._topLevelWrapper : null; + } + var _prodInvariant = __webpack_require__(48), DOMLazyTree = __webpack_require__(93), DOMProperty = __webpack_require__(49), React = __webpack_require__(8), ReactBrowserEventEmitter = __webpack_require__(117), ReactDOMComponentTree = (__webpack_require__(15), + __webpack_require__(47)), ReactDOMContainerInfo = __webpack_require__(180), ReactDOMFeatureFlags = __webpack_require__(181), ReactFeatureFlags = __webpack_require__(75), ReactInstanceMap = __webpack_require__(128), ReactMarkupChecksum = (__webpack_require__(79), + __webpack_require__(182)), ReactReconciler = __webpack_require__(76), ReactUpdateQueue = __webpack_require__(148), ReactUpdates = __webpack_require__(73), emptyObject = __webpack_require__(134), instantiateReactComponent = __webpack_require__(131), setInnerHTML = (__webpack_require__(50), + __webpack_require__(95)), shouldUpdateReactComponent = __webpack_require__(136), ATTR_NAME = (__webpack_require__(60), + DOMProperty.ID_ATTRIBUTE_NAME), ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME, ELEMENT_NODE_TYPE = 1, DOC_NODE_TYPE = 9, DOCUMENT_FRAGMENT_NODE_TYPE = 11, instancesByReactRootID = {}, topLevelRootCounter = 1, TopLevelWrapper = function() { + this.rootID = topLevelRootCounter++; + }; + TopLevelWrapper.prototype.isReactComponent = {}, TopLevelWrapper.prototype.render = function() { + return this.props.child; + }, TopLevelWrapper.isReactTopLevelWrapper = !0; + var ReactMount = { + TopLevelWrapper: TopLevelWrapper, + _instancesByReactRootID: instancesByReactRootID, + scrollMonitor: function(container, renderCallback) { + renderCallback(); + }, + _updateRootComponent: function(prevComponent, nextElement, nextContext, container, callback) { + return ReactMount.scrollMonitor(container, function() { + ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext), + callback && ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback); + }), prevComponent; + }, + _renderNewRootComponent: function(nextElement, container, shouldReuseMarkup, context) { + isValidContainer(container) ? void 0 : _prodInvariant("37"), ReactBrowserEventEmitter.ensureScrollValueMonitoring(); + var componentInstance = instantiateReactComponent(nextElement, !1); + ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context); + var wrapperID = componentInstance._instance.rootID; + return instancesByReactRootID[wrapperID] = componentInstance, componentInstance; + }, + renderSubtreeIntoContainer: function(parentComponent, nextElement, container, callback) { + return null != parentComponent && ReactInstanceMap.has(parentComponent) ? void 0 : _prodInvariant("38"), + ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback); + }, + _renderSubtreeIntoContainer: function(parentComponent, nextElement, container, callback) { + ReactUpdateQueue.validateCallback(callback, "ReactDOM.render"), React.isValidElement(nextElement) ? void 0 : _prodInvariant("39", "string" == typeof nextElement ? " Instead of passing a string like 'div', pass React.createElement('div') or
." : "function" == typeof nextElement ? " Instead of passing a class like Foo, pass React.createElement(Foo) or ." : null != nextElement && void 0 !== nextElement.props ? " This may be caused by unintentionally loading two independent copies of React." : ""); + var nextContext, nextWrappedElement = React.createElement(TopLevelWrapper, { + child: nextElement + }); + if (parentComponent) { + var parentInst = ReactInstanceMap.get(parentComponent); + nextContext = parentInst._processChildContext(parentInst._context); + } else nextContext = emptyObject; + var prevComponent = getTopLevelWrapperInContainer(container); + if (prevComponent) { + var prevWrappedElement = prevComponent._currentElement, prevElement = prevWrappedElement.props.child; + if (shouldUpdateReactComponent(prevElement, nextElement)) { + var publicInst = prevComponent._renderedComponent.getPublicInstance(), updatedCallback = callback && function() { + callback.call(publicInst); + }; + return ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback), + publicInst; + } + ReactMount.unmountComponentAtNode(container); + } + var reactRootElement = getReactRootElementInContainer(container), containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement), containerHasNonRootReactChild = hasNonRootReactChild(container), shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild, component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance(); + return callback && callback.call(component), component; + }, + render: function(nextElement, container, callback) { + return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback); + }, + unmountComponentAtNode: function(container) { + isValidContainer(container) ? void 0 : _prodInvariant("40"); + var prevComponent = getTopLevelWrapperInContainer(container); + if (!prevComponent) { + hasNonRootReactChild(container), 1 === container.nodeType && container.hasAttribute(ROOT_ATTR_NAME); + return !1; + } + return delete instancesByReactRootID[prevComponent._instance.rootID], ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, !1), + !0; + }, + _mountImageIntoNode: function(markup, container, instance, shouldReuseMarkup, transaction) { + if (isValidContainer(container) ? void 0 : _prodInvariant("41"), shouldReuseMarkup) { + var rootElement = getReactRootElementInContainer(container); + if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) return void ReactDOMComponentTree.precacheNode(instance, rootElement); + var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + var rootMarkup = rootElement.outerHTML; + rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum); + var normalizedMarkup = markup, diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup), difference = " (client) " + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + "\n (server) " + rootMarkup.substring(diffIndex - 20, diffIndex + 20); + container.nodeType === DOC_NODE_TYPE ? _prodInvariant("42", difference) : void 0; + } + if (container.nodeType === DOC_NODE_TYPE ? _prodInvariant("43") : void 0, transaction.useCreateElement) { + for (;container.lastChild; ) container.removeChild(container.lastChild); + DOMLazyTree.insertTreeBefore(container, markup, null); + } else setInnerHTML(container, markup), ReactDOMComponentTree.precacheNode(instance, container.firstChild); + } + }; + module.exports = ReactMount; +}, function(module, exports, __webpack_require__) { + "use strict"; + function ReactDOMContainerInfo(topLevelWrapper, node) { + var info = { + _topLevelWrapper: topLevelWrapper, + _idCounter: 1, + _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null, + _node: node, + _tag: node ? node.nodeName.toLowerCase() : null, + _namespaceURI: node ? node.namespaceURI : null + }; + return info; + } + var DOC_NODE_TYPE = (__webpack_require__(149), 9); + module.exports = ReactDOMContainerInfo; +}, function(module, exports) { + "use strict"; + var ReactDOMFeatureFlags = { + useCreateElement: !0, + useFiber: !1 + }; + module.exports = ReactDOMFeatureFlags; +}, function(module, exports, __webpack_require__) { + "use strict"; + var adler32 = __webpack_require__(183), TAG_END = /\/?>/, COMMENT_START = /^<\!\-\-/, ReactMarkupChecksum = { + CHECKSUM_ATTR_NAME: "data-react-checksum", + addChecksumToMarkup: function(markup) { + var checksum = adler32(markup); + return COMMENT_START.test(markup) ? markup : markup.replace(TAG_END, " " + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&'); + }, + canReuseMarkup: function(markup, element) { + var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + existingChecksum = existingChecksum && parseInt(existingChecksum, 10); + var markupChecksum = adler32(markup); + return markupChecksum === existingChecksum; + } + }; + module.exports = ReactMarkupChecksum; +}, function(module, exports) { + "use strict"; + function adler32(data) { + for (var a = 1, b = 0, i = 0, l = data.length, m = l & -4; i < m; ) { + for (var n = Math.min(i + 4096, m); i < n; i += 4) b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3)); + a %= MOD, b %= MOD; + } + for (;i < l; i++) b += a += data.charCodeAt(i); + return a %= MOD, b %= MOD, a | b << 16; + } + var MOD = 65521; + module.exports = adler32; +}, function(module, exports) { + "use strict"; + module.exports = "15.4.2"; +}, function(module, exports, __webpack_require__) { + "use strict"; + function findDOMNode(componentOrElement) { + if (null == componentOrElement) return null; + if (1 === componentOrElement.nodeType) return componentOrElement; + var inst = ReactInstanceMap.get(componentOrElement); + return inst ? (inst = getHostComponentFromComposite(inst), inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null) : void ("function" == typeof componentOrElement.render ? _prodInvariant("44") : _prodInvariant("45", Object.keys(componentOrElement))); + } + var _prodInvariant = __webpack_require__(48), ReactDOMComponentTree = (__webpack_require__(15), + __webpack_require__(47)), ReactInstanceMap = __webpack_require__(128), getHostComponentFromComposite = __webpack_require__(186); + __webpack_require__(50), __webpack_require__(60); + module.exports = findDOMNode; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getHostComponentFromComposite(inst) { + for (var type; (type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE; ) inst = inst._renderedComponent; + return type === ReactNodeTypes.HOST ? inst._renderedComponent : type === ReactNodeTypes.EMPTY ? null : void 0; + } + var ReactNodeTypes = __webpack_require__(133); + module.exports = getHostComponentFromComposite; +}, function(module, exports, __webpack_require__) { + "use strict"; + var ReactMount = __webpack_require__(179); + module.exports = ReactMount.renderSubtreeIntoContainer; +}, function(module, exports) { + "use strict"; + function flash(node, flashColor, baseColor, duration) { + node.style.transition = "none", node.style.backgroundColor = flashColor, void node.offsetTop, + node.style.transition = "background-color " + duration + "s ease", node.style.backgroundColor = baseColor; + } + module.exports = flash; +}, function(module, exports, __webpack_require__) { + "use strict"; + var _Symbol = __webpack_require__(190); + module.exports = { + name: _Symbol("name"), + type: _Symbol("type"), + inspected: _Symbol("inspected"), + meta: _Symbol("meta"), + proto: _Symbol("proto") + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + module.exports = __webpack_require__(191)() ? Symbol : __webpack_require__(192); +}, function(module, exports) { + "use strict"; + module.exports = function() { + var symbol; + if ("function" != typeof Symbol) return !1; + symbol = Symbol("test symbol"); + try { + String(symbol); + } catch (e) { + return !1; + } + return "symbol" == typeof Symbol.iterator || "object" == typeof Symbol.isConcatSpreadable && ("object" == typeof Symbol.iterator && ("object" == typeof Symbol.toPrimitive && ("object" == typeof Symbol.toStringTag && "object" == typeof Symbol.unscopables))); + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + var NativeSymbol, SymbolPolyfill, HiddenSymbol, d = __webpack_require__(193), validateSymbol = __webpack_require__(206), create = Object.create, defineProperties = Object.defineProperties, defineProperty = Object.defineProperty, objPrototype = Object.prototype, globalSymbols = create(null); + "function" == typeof Symbol && (NativeSymbol = Symbol); + var generateName = function() { + var created = create(null); + return function(desc) { + for (var name, ie11BugWorkaround, postfix = 0; created[desc + (postfix || "")]; ) ++postfix; + return desc += postfix || "", created[desc] = !0, name = "@@" + desc, defineProperty(objPrototype, name, d.gs(null, function(value) { + ie11BugWorkaround || (ie11BugWorkaround = !0, defineProperty(this, name, d(value)), + ie11BugWorkaround = !1); + })), name; + }; + }(); + HiddenSymbol = function(description) { + if (this instanceof HiddenSymbol) throw new TypeError("TypeError: Symbol is not a constructor"); + return SymbolPolyfill(description); + }, module.exports = SymbolPolyfill = function Symbol(description) { + var symbol; + if (this instanceof Symbol) throw new TypeError("TypeError: Symbol is not a constructor"); + return symbol = create(HiddenSymbol.prototype), description = void 0 === description ? "" : String(description), + defineProperties(symbol, { + __description__: d("", description), + __name__: d("", generateName(description)) + }); + }, defineProperties(SymbolPolyfill, { + "for": d(function(key) { + return globalSymbols[key] ? globalSymbols[key] : globalSymbols[key] = SymbolPolyfill(String(key)); + }), + keyFor: d(function(s) { + var key; + validateSymbol(s); + for (key in globalSymbols) if (globalSymbols[key] === s) return key; + }), + hasInstance: d("", NativeSymbol && NativeSymbol.hasInstance || SymbolPolyfill("hasInstance")), + isConcatSpreadable: d("", NativeSymbol && NativeSymbol.isConcatSpreadable || SymbolPolyfill("isConcatSpreadable")), + iterator: d("", NativeSymbol && NativeSymbol.iterator || SymbolPolyfill("iterator")), + match: d("", NativeSymbol && NativeSymbol.match || SymbolPolyfill("match")), + replace: d("", NativeSymbol && NativeSymbol.replace || SymbolPolyfill("replace")), + search: d("", NativeSymbol && NativeSymbol.search || SymbolPolyfill("search")), + species: d("", NativeSymbol && NativeSymbol.species || SymbolPolyfill("species")), + split: d("", NativeSymbol && NativeSymbol.split || SymbolPolyfill("split")), + toPrimitive: d("", NativeSymbol && NativeSymbol.toPrimitive || SymbolPolyfill("toPrimitive")), + toStringTag: d("", NativeSymbol && NativeSymbol.toStringTag || SymbolPolyfill("toStringTag")), + unscopables: d("", NativeSymbol && NativeSymbol.unscopables || SymbolPolyfill("unscopables")) + }), defineProperties(HiddenSymbol.prototype, { + constructor: d(SymbolPolyfill), + toString: d("", function() { + return this.__name__; + }) + }), defineProperties(SymbolPolyfill.prototype, { + toString: d(function() { + return "Symbol (" + validateSymbol(this).__description__ + ")"; + }), + valueOf: d(function() { + return validateSymbol(this); + }) + }), defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d("", function() { + return validateSymbol(this); + })), defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d("c", "Symbol")), + defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, d("c", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])), + defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, d("c", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])); +}, function(module, exports, __webpack_require__) { + "use strict"; + var d, assign = __webpack_require__(194), normalizeOpts = __webpack_require__(201), isCallable = __webpack_require__(202), contains = __webpack_require__(203); + d = module.exports = function(dscr, value) { + var c, e, w, options, desc; + return arguments.length < 2 || "string" != typeof dscr ? (options = value, value = dscr, + dscr = null) : options = arguments[2], null == dscr ? (c = w = !0, e = !1) : (c = contains.call(dscr, "c"), + e = contains.call(dscr, "e"), w = contains.call(dscr, "w")), desc = { + value: value, + configurable: c, + enumerable: e, + writable: w + }, options ? assign(normalizeOpts(options), desc) : desc; + }, d.gs = function(dscr, get, set) { + var c, e, options, desc; + return "string" != typeof dscr ? (options = set, set = get, get = dscr, dscr = null) : options = arguments[3], + null == get ? get = void 0 : isCallable(get) ? null == set ? set = void 0 : isCallable(set) || (options = set, + set = void 0) : (options = get, get = set = void 0), null == dscr ? (c = !0, e = !1) : (c = contains.call(dscr, "c"), + e = contains.call(dscr, "e")), desc = { + get: get, + set: set, + configurable: c, + enumerable: e + }, options ? assign(normalizeOpts(options), desc) : desc; + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + module.exports = __webpack_require__(195)() ? Object.assign : __webpack_require__(196); +}, function(module, exports) { + "use strict"; + module.exports = function() { + var obj, assign = Object.assign; + return "function" == typeof assign && (obj = { + foo: "raz" + }, assign(obj, { + bar: "dwa" + }, { + trzy: "trzy" + }), obj.foo + obj.bar + obj.trzy === "razdwatrzy"); + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + var keys = __webpack_require__(197), value = __webpack_require__(200), max = Math.max; + module.exports = function(dest, src) { + var error, i, assign, l = max(arguments.length, 2); + for (dest = Object(value(dest)), assign = function(key) { + try { + dest[key] = src[key]; + } catch (e) { + error || (error = e); + } + }, i = 1; i < l; ++i) src = arguments[i], keys(src).forEach(assign); + if (void 0 !== error) throw error; + return dest; + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + module.exports = __webpack_require__(198)() ? Object.keys : __webpack_require__(199); +}, function(module, exports) { + "use strict"; + module.exports = function() { + try { + return Object.keys("primitive"), !0; + } catch (e) { + return !1; + } + }; +}, function(module, exports) { + "use strict"; + var keys = Object.keys; + module.exports = function(object) { + return keys(null == object ? object : Object(object)); + }; +}, function(module, exports) { + "use strict"; + module.exports = function(value) { + if (null == value) throw new TypeError("Cannot use null or undefined"); + return value; + }; +}, function(module, exports) { + "use strict"; + var forEach = Array.prototype.forEach, create = Object.create, process = function(src, obj) { + var key; + for (key in src) obj[key] = src[key]; + }; + module.exports = function(options) { + var result = create(null); + return forEach.call(arguments, function(options) { + null != options && process(Object(options), result); + }), result; + }; +}, function(module, exports) { + "use strict"; + module.exports = function(obj) { + return "function" == typeof obj; + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + module.exports = __webpack_require__(204)() ? String.prototype.contains : __webpack_require__(205); +}, function(module, exports) { + "use strict"; + var str = "razdwatrzy"; + module.exports = function() { + return "function" == typeof str.contains && (str.contains("dwa") === !0 && str.contains("foo") === !1); + }; +}, function(module, exports) { + "use strict"; + var indexOf = String.prototype.indexOf; + module.exports = function(searchString) { + return indexOf.call(this, searchString, arguments[1]) > -1; + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + var isSymbol = __webpack_require__(207); + module.exports = function(value) { + if (!isSymbol(value)) throw new TypeError(value + " is not a symbol"); + return value; + }; +}, function(module, exports) { + "use strict"; + module.exports = function(x) { + return x && ("symbol" == typeof x || "Symbol" === x["@@toStringTag"]) || !1; + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function previewComplex(data, theme) { + var style = { + color: theme.special04 + }; + if (Array.isArray(data)) return React.createElement("span", { + style: style + }, "Array[", data.length, "]"); + switch (data[consts.type]) { + case "function": + return React.createElement("span", { + style: style + }, data[consts.name] || "fn", "()"); + + case "object": + return React.createElement("span", { + style: style + }, data[consts.name] + "{…}"); + + case "date": + return React.createElement("span", { + style: style + }, data[consts.name]); + + case "symbol": + return React.createElement("span", { + style: style + }, data[consts.name]); + + case "iterator": + return React.createElement("span", { + style: style + }, data[consts.name] + "(…)"); + + case "array_buffer": + case "data_view": + case "array": + case "typed_array": + return React.createElement("span", { + style: style + }, data[consts.name] + "[" + data[consts.meta].length + "]"); + + case void 0: + case null: + return "{…}"; + } + return null; + } + var React = __webpack_require__(7), consts = __webpack_require__(189); + module.exports = previewComplex; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _require = __webpack_require__(36), monospace = _require.monospace, React = __webpack_require__(7), DetailPane = function(_React$Component) { + function DetailPane() { + return _classCallCheck(this, DetailPane), _possibleConstructorReturn(this, (DetailPane.__proto__ || Object.getPrototypeOf(DetailPane)).apply(this, arguments)); + } + return _inherits(DetailPane, _React$Component), _createClass(DetailPane, [ { + key: "render", + value: function() { + return React.createElement("div", { + style: styles.container + }, this.props.children); + } + } ]), DetailPane; + }(React.Component), styles = { + container: { + fontSize: monospace.sizes.normal, + fontFamily: monospace.family, + overflow: "auto", + flex: 1, + display: "flex", + flexDirection: "column" + } + }; + module.exports = DetailPane; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), DetailPaneSection = function(_React$Component) { + function DetailPaneSection() { + return _classCallCheck(this, DetailPaneSection), _possibleConstructorReturn(this, (DetailPaneSection.__proto__ || Object.getPrototypeOf(DetailPaneSection)).apply(this, arguments)); + } + return _inherits(DetailPaneSection, _React$Component), _createClass(DetailPaneSection, [ { + key: "render", + value: function() { + var theme = this.context.theme, _props = this.props, children = _props.children, hint = _props.hint; + return React.createElement("div", { + style: sectionStyle(theme) + }, React.createElement("strong", { + style: styles.title + }, this.props.title), hint, children); + } + } ]), DetailPaneSection; + }(React.Component); + DetailPaneSection.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var sectionStyle = function(theme) { + return { + borderTop: "1px solid " + theme.base01, + padding: "0.25rem", + flexShrink: 0 + }; + }, styles = { + title: { + display: "inline-block", + marginRight: "0.25rem" + } + }; + module.exports = DetailPaneSection; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + function previewProp(val, nested, inverted, theme) { + var style = { + color: inverted ? getInvertedWeak(theme.state02) : theme.special01 + }; + if ("number" == typeof val) return React.createElement("span", { + style: style + }, val); + if ("string" == typeof val) return style = { + color: inverted ? getInvertedWeak(theme.state02) : theme.special02 + }, val.length > 50 && (val = val.slice(0, 50) + "…"), React.createElement("span", { + style: style + }, '"', val, '"'); + if ("boolean" == typeof val) return React.createElement("span", { + style: style + }, "" + val); + if (Array.isArray(val)) return style = { + color: inverted ? getInvertedWeak(theme.state02) : theme.special02 + }, nested ? React.createElement("span", { + style: style + }, "[(", val.length, ")]") : previewArray(val, inverted, theme); + if (!val) return style = { + color: inverted ? getInvertedWeak(theme.state02) : theme.base03 + }, React.createElement("span", { + style: style + }, "" + val); + if ("object" !== ("undefined" == typeof val ? "undefined" : _typeof(val))) return style = { + color: inverted ? getInvertedWeak(theme.state02) : theme.special04 + }, React.createElement("span", { + style: style + }, "…"); + switch (val[consts.type]) { + case "date": + return React.createElement("span", { + style: style + }, val[consts.name]); + + case "function": + return style = { + color: inverted ? getInvertedWeak(theme.state02) : theme.special04 + }, React.createElement("span", { + style: style + }, val[consts.name] || "fn", "()"); + + case "object": + return React.createElement("span", { + style: style + }, val[consts.name] + "{…}"); + + case "array": + return style = { + color: inverted ? getInvertedWeak(theme.state02) : theme.special02 + }, React.createElement("span", { + style: style + }, "Array[", val[consts.meta].length, "]"); + + case "typed_array": + case "array_buffer": + case "data_view": + return style = { + color: inverted ? getInvertedWeak(theme.state02) : theme.special02 + }, React.createElement("span", { + style: style + }, val[consts.name] + "[" + val[consts.meta].length + "]"); + + case "iterator": + return style = { + color: inverted ? getInvertedWeak(theme.state02) : theme.base05 + }, React.createElement("span", { + style: style + }, val[consts.name] + "(…)"); + + case "symbol": + return style = { + color: inverted ? getInvertedWeak(theme.state02) : theme.base05 + }, React.createElement("span", { + style: style + }, val[consts.name]); + } + return nested ? (style = { + color: inverted ? getInvertedWeak(theme.state02) : theme.base05 + }, React.createElement("span", { + style: style + }, "{…}")) : previewObject(val, inverted, theme); + } + function previewArray(val, inverted, theme) { + var items = {}; + val.slice(0, 3).forEach(function(item, i) { + items["n" + i] = React.createElement(PropVal, { + val: item, + nested: !0, + inverted: inverted, + theme: theme + }), items["c" + i] = ", "; + }), val.length > 3 ? items.last = "…" : delete items["c" + (val.length - 1)]; + var style = { + color: inverted ? theme.base03 : theme.special01 + }; + return React.createElement("span", { + style: style + }, "[", createFragment(items), "]"); + } + function previewObject(val, inverted, theme) { + var names = Object.keys(val), items = {}, attrStyle = { + color: inverted ? getInvertedWeak(theme.state02) : theme.special06 + }; + names.slice(0, 3).forEach(function(name, i) { + items["k" + i] = React.createElement("span", { + style: attrStyle + }, name), items["c" + i] = ": ", items["v" + i] = React.createElement(PropVal, { + val: val[name], + nested: !0, + inverted: inverted, + theme: theme + }), items["m" + i] = ", "; + }), names.length > 3 ? items.rest = "…" : delete items["m" + (names.length - 1)]; + var style = { + color: inverted ? getInvertedWeak(theme.state02) : theme.special01 + }; + return React.createElement("span", { + style: style + }, "{", createFragment(items), "}"); + } + var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), ReactDOM = __webpack_require__(45), consts = __webpack_require__(189), createFragment = __webpack_require__(212), _require = __webpack_require__(214), getInvertedWeak = _require.getInvertedWeak, flash = __webpack_require__(188), PropVal = function(_React$Component) { + function PropVal() { + return _classCallCheck(this, PropVal), _possibleConstructorReturn(this, (PropVal.__proto__ || Object.getPrototypeOf(PropVal)).apply(this, arguments)); + } + return _inherits(PropVal, _React$Component), _createClass(PropVal, [ { + key: "componentDidUpdate", + value: function(prevProps) { + if (!(this.props.val === prevProps.val || this.props.val && prevProps.val && "object" === _typeof(this.props.val) && "object" === _typeof(prevProps.val))) { + var node = ReactDOM.findDOMNode(this); + flash(node, this.context.theme.state04, "transparent", 1); + } + } + }, { + key: "render", + value: function() { + return previewProp(this.props.val, !!this.props.nested, !!this.props.inverted, this.context.theme); + } + } ]), PropVal; + }(React.Component); + PropVal.contextTypes = { + theme: React.PropTypes.object.isRequired + }, module.exports = PropVal; +}, function(module, exports, __webpack_require__) { + module.exports = __webpack_require__(213).create; +}, function(module, exports, __webpack_require__) { + "use strict"; + var _prodInvariant = __webpack_require__(12), ReactChildren = __webpack_require__(10), ReactElement = __webpack_require__(14), emptyFunction = __webpack_require__(17), ReactFragment = (__webpack_require__(13), + __webpack_require__(16), { + create: function(object) { + if ("object" != typeof object || !object || Array.isArray(object)) return object; + if (ReactElement.isValidElement(object)) return object; + 1 === object.nodeType ? _prodInvariant("0") : void 0; + var result = []; + for (var key in object) ReactChildren.mapIntoWithKeyPrefixInternal(object[key], result, key, emptyFunction.thatReturnsArgument); + return result; + } + }); + module.exports = ReactFragment; +}, function(module, exports) { + "use strict"; + function getBrightness(hex) { + var _getRgb = getRgb(hex), r = _getRgb.r, g = _getRgb.g, b = _getRgb.b; + return Math.round((299 * r + 587 * g + 114 * b) / 1e3); + } + function getInvertedMid(hex) { + return hexToRgba(hex, .8); + } + function getInvertedWeak(hex) { + return hexToRgba(hex, .65); + } + function getRgb() { + var hex = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ""; + hex = hex.replace("#", ""), 3 === hex.length && (hex = hex.charAt(0) + hex.charAt(0) + hex.charAt(1) + hex.charAt(1) + hex.charAt(2) + hex.charAt(2)); + var r = parseInt(hex.substring(0, 2), 16), g = parseInt(hex.substring(2, 4), 16), b = parseInt(hex.substring(4, 6), 16); + return { + r: r, + g: g, + b: b + }; + } + function hexToRgba(hex, alpha) { + var _getRgb2 = getRgb(hex), r = _getRgb2.r, g = _getRgb2.g, b = _getRgb2.b; + return "rgba(" + r + ", " + g + ", " + b + ", " + alpha + ")"; + } + function isBright(hex) { + return getBrightness(hex) > 125; + } + module.exports = { + getBrightness: getBrightness, + getInvertedMid: getInvertedMid, + getInvertedWeak: getInvertedWeak, + getRgb: getRgb, + hexToRgba: hexToRgba, + isBright: isBright + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + var __DEV__ = !1, invariant = function(condition, format, a, b, c, d, e, f) { + if (__DEV__ && void 0 === format) throw new Error("invariant requires an error message argument"); + if (!condition) { + var error; + if (void 0 === format) error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else { + var args = [ a, b, c, d, e, f ], argIndex = 0; + error = new Error("Invariant Violation: " + format.replace(/%s/g, function() { + return args[argIndex++]; + })); + } + throw error.framesToPop = 1, error; + } + }; + module.exports = invariant; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), SettingsPane = __webpack_require__(217), TreeView = __webpack_require__(226), PropTypes = React.PropTypes, LeftPane = function(_React$Component) { + function LeftPane() { + return _classCallCheck(this, LeftPane), _possibleConstructorReturn(this, (LeftPane.__proto__ || Object.getPrototypeOf(LeftPane)).apply(this, arguments)); + } + return _inherits(LeftPane, _React$Component), _createClass(LeftPane, [ { + key: "render", + value: function() { + return React.createElement("div", { + style: styles.container + }, React.createElement(SettingsPane, null), React.createElement(TreeView, { + reload: this.props.reload + })); + } + } ]), LeftPane; + }(React.Component); + LeftPane.propTypes = { + reload: PropTypes.func + }; + var styles = { + container: { + flex: 1, + display: "flex", + flexDirection: "column", + minWidth: 0 + } + }; + module.exports = LeftPane; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + function SearchIcon(_ref4) { + var theme = _ref4.theme; + return React.createElement(SvgIcon, { + style: searchIconStyle(theme), + path: Icons.SEARCH + }); + } + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), TraceUpdatesFrontendControl = __webpack_require__(218), ColorizerFrontendControl = __webpack_require__(221), React = __webpack_require__(7), ReactDOM = __webpack_require__(45), _require = __webpack_require__(36), sansSerif = _require.sansSerif, SearchUtils = __webpack_require__(222), SvgIcon = __webpack_require__(223), PropTypes = React.PropTypes, Icons = __webpack_require__(224), Input = __webpack_require__(42), Hoverable = __webpack_require__(225), decorate = __webpack_require__(39), _require2 = __webpack_require__(214), hexToRgba = _require2.hexToRgba, SettingsPane = function(_React$Component) { + function SettingsPane(props) { + _classCallCheck(this, SettingsPane); + var _this = _possibleConstructorReturn(this, (SettingsPane.__proto__ || Object.getPrototypeOf(SettingsPane)).call(this, props)); + return _this.state = { + focused: !1 + }, _this; + } + return _inherits(SettingsPane, _React$Component), _createClass(SettingsPane, [ { + key: "componentDidMount", + value: function() { + this._key = this.onDocumentKeyDown.bind(this); + var doc = ReactDOM.findDOMNode(this).ownerDocument; + doc.addEventListener("keydown", this._key, !0); + } + }, { + key: "componentWillUnmount", + value: function() { + var doc = ReactDOM.findDOMNode(this).ownerDocument; + doc.removeEventListener("keydown", this._key, !0); + } + }, { + key: "onDocumentKeyDown", + value: function(e) { + if (191 === e.keyCode && "INPUT" !== e.target.nodeName && !e.target.isContentEditable && this.input && (this.input.focus(), + e.preventDefault()), 27 === e.keyCode) { + if (!this.props.searchText && !this.state.focused) return; + e.stopPropagation(), e.preventDefault(), this.cancel(); + } + } + }, { + key: "cancel", + value: function() { + this.props.onChangeSearch(""), this.input && this.input.blur(); + } + }, { + key: "onKeyDown", + value: function(key) { + "Enter" === key && this.input && (this.input.blur(), this.props.selectFirstSearchResult()); + } + }, { + key: "render", + value: function() { + var inputStyle, _this2 = this, theme = this.context.theme, searchText = this.props.searchText; + return inputStyle = searchText && SearchUtils.shouldSearchUseRegex(searchText) && !SearchUtils.isValidRegex(searchText) ? errorInputStyle(theme) : searchText || this.state.focused ? highlightedInputStyle(theme) : baseInputStyle(theme), + React.createElement("div", { + style: settingsPaneStyle(theme) + }, this.context.showInspectButton && React.createElement(InspectMenuButton, { + isInspectEnabled: this.props.isInspectEnabled, + onClick: this.props.toggleInspectEnabled, + theme: theme + }), React.createElement(SettingsMenuButton, { + onClick: this.props.showPreferencesPanel, + theme: theme + }), React.createElement(TraceUpdatesFrontendControl, this.props), React.createElement("div", { + style: styles.growToFill + }, React.createElement(ColorizerFrontendControl, this.props)), React.createElement("div", { + style: styles.searchInputWrapper + }, React.createElement(Input, { + style: inputStyle, + innerRef: function(i) { + return _this2.input = i; + }, + value: searchText, + onFocus: function() { + return _this2.setState({ + focused: !0 + }); + }, + onBlur: function() { + return _this2.setState({ + focused: !1 + }); + }, + onKeyDown: function(e) { + return _this2.onKeyDown(e.key); + }, + placeholder: "Search (text or /regex/)", + onChange: function(e) { + return _this2.props.onChangeSearch(e.target.value); + }, + title: "Search by React component name or text" + }), React.createElement(SearchIcon, { + theme: theme + }), !!searchText && React.createElement(ClearSearchButton, { + onClick: this.cancel.bind(this), + theme: theme + }))); + } + } ]), SettingsPane; + }(React.Component); + SettingsPane.contextTypes = { + showInspectButton: React.PropTypes.bool.isRequired, + theme: React.PropTypes.object.isRequired + }, SettingsPane.propTypes = { + searchText: PropTypes.string, + selectFirstSearchResult: PropTypes.func, + onChangeSearch: PropTypes.func + }; + var Wrapped = decorate({ + listeners: function(props) { + return [ "isInspectEnabled", "searchText" ]; + }, + props: function(store) { + return { + isInspectEnabled: store.isInspectEnabled, + onChangeSearch: function(text) { + return store.changeSearch(text); + }, + searchText: store.searchText, + selectFirstSearchResult: store.selectFirstSearchResult.bind(store), + showPreferencesPanel: function() { + store.showPreferencesPanel(); + }, + toggleInspectEnabled: function() { + return store.setInspectEnabled(!store.isInspectEnabled); + } + }; + } + }, SettingsPane), ClearSearchButton = Hoverable(function(_ref) { + var isHovered = _ref.isHovered, onClick = _ref.onClick, onMouseEnter = _ref.onMouseEnter, onMouseLeave = _ref.onMouseLeave, theme = _ref.theme; + return React.createElement("div", { + onClick: onClick, + onMouseEnter: onMouseEnter, + onMouseLeave: onMouseLeave, + style: clearSearchButtonStyle(isHovered, theme) + }, "×"); + }), InspectMenuButton = Hoverable(function(_ref2) { + var isHovered = _ref2.isHovered, isInspectEnabled = _ref2.isInspectEnabled, onClick = _ref2.onClick, onMouseEnter = _ref2.onMouseEnter, onMouseLeave = _ref2.onMouseLeave, theme = _ref2.theme; + return React.createElement("button", { + onClick: onClick, + onMouseEnter: onMouseEnter, + onMouseLeave: onMouseLeave, + style: inspectMenuButtonStyle(isInspectEnabled, isHovered, theme), + title: "Select a React element in the page to inspect it" + }, React.createElement(SvgIcon, { + path: Icons.INSPECT + })); + }), SettingsMenuButton = Hoverable(function(_ref3) { + var isHovered = _ref3.isHovered, onClick = _ref3.onClick, onMouseEnter = _ref3.onMouseEnter, onMouseLeave = _ref3.onMouseLeave, theme = _ref3.theme; + return React.createElement("button", { + onClick: onClick, + onMouseEnter: onMouseEnter, + onMouseLeave: onMouseLeave, + style: settingsMenuButtonStyle(isHovered, theme), + title: "Customize React DevTools" + }, React.createElement(SvgIcon, { + path: Icons.SETTINGS + })); + }), settingsPaneStyle = function(theme) { + return { + padding: "0.25rem", + display: "flex", + flexWrap: "wrap", + flexShrink: 0, + alignItems: "center", + position: "relative", + backgroundColor: theme.base01, + borderBottom: "1px solid " + theme.base03 + }; + }, clearSearchButtonStyle = function(isHovered, theme) { + return { + fontSize: sansSerif.sizes.large, + padding: "0 0.5rem", + position: "absolute", + cursor: "default", + right: 0, + lineHeight: "28px", + color: isHovered ? theme.base04 : theme.base02 + }; + }, inspectMenuButtonStyle = function(isInspectEnabled, isHovered, theme) { + var color = void 0; + return color = isInspectEnabled ? theme.state00 : isHovered ? theme.state06 : "inherit", + { + display: "flex", + background: "none", + border: "none", + outline: "none", + color: color + }; + }, searchIconStyle = function(theme) { + return { + position: "absolute", + display: "inline-block", + pointerEvents: "none", + left: "0.25rem", + top: 0, + width: "1em", + height: "100%", + strokeWidth: 0, + stroke: theme.base02, + fill: theme.base02, + lineHeight: "28px", + fontSize: sansSerif.sizes.normal + }; + }, settingsMenuButtonStyle = function(isHovered, theme) { + return { + display: "flex", + background: "none", + border: "none", + marginRight: "0.5rem", + color: isHovered ? theme.state06 : "inherit" + }; + }, baseInputStyle = function(theme) { + return { + fontSize: sansSerif.sizes.normal, + padding: "0.25rem", + border: "1px solid " + theme.base02, + outline: "none", + borderRadius: "0.25rem", + paddingLeft: "1.25rem", + width: "150px" + }; + }, highlightedInputStyle = function(theme) { + return _extends({}, baseInputStyle(theme), { + border: "1px solid " + hexToRgba(theme.state00, .75) + }); + }, errorInputStyle = function(theme) { + return _extends({}, baseInputStyle(theme), { + backgroundColor: hexToRgba(theme.special03, .1), + border: "1px solid " + theme.special03 + }); + }, styles = { + growToFill: { + flexGrow: 1 + }, + searchInputWrapper: { + display: "flex", + alignItems: "center", + flexShrink: 0, + position: "relative" + } + }; + module.exports = Wrapped; +}, function(module, exports, __webpack_require__) { + "use strict"; + var decorate = __webpack_require__(39), SettingsCheckbox = __webpack_require__(219), Wrapped = decorate({ + listeners: function() { + return [ "traceupdatesstatechange" ]; + }, + props: function(store) { + return { + state: store.traceupdatesState, + text: "Highlight Updates", + onChange: function(state) { + return store.changeTraceUpdates(state); + } + }; + } + }, SettingsCheckbox); + module.exports = Wrapped; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), immutable = __webpack_require__(220), _require = __webpack_require__(36), sansSerif = _require.sansSerif, StateRecord = immutable.Record({ + enabled: !1 + }), SettingsCheckbox = function(_React$Component) { + function SettingsCheckbox(props) { + _classCallCheck(this, SettingsCheckbox); + var _this = _possibleConstructorReturn(this, (SettingsCheckbox.__proto__ || Object.getPrototypeOf(SettingsCheckbox)).call(this, props)); + return _this._toggle = _this._toggle.bind(_this), _this._defaultState = new StateRecord(), + _this; + } + return _inherits(SettingsCheckbox, _React$Component), _createClass(SettingsCheckbox, [ { + key: "componentDidMount", + value: function() { + !this.props.state !== this._defaultState && this.props.onChange(this._defaultState); + } + }, { + key: "render", + value: function() { + var state = this.props.state || this._defaultState; + return React.createElement("div", { + style: styles.container, + onClick: this._toggle, + tabIndex: 0 + }, React.createElement("input", { + style: styles.checkbox, + type: "checkbox", + checked: state.enabled, + readOnly: !0 + }), React.createElement("span", null, this.props.text)); + } + }, { + key: "_toggle", + value: function() { + var state = this.props.state || this._defaultState, nextState = state.merge({ + enabled: !state.enabled + }); + this.props.onChange(nextState); + } + } ]), SettingsCheckbox; + }(React.Component), styles = { + checkbox: { + pointerEvents: "none", + marginRight: "5px" + }, + container: { + WebkitUserSelect: "none", + cursor: "default", + display: "inline-block", + fontSize: sansSerif.sizes.normal, + outline: "none", + fontFamily: sansSerif.family, + userSelect: "none", + marginRight: "10px" + } + }; + module.exports = SettingsCheckbox; +}, function(module, exports, __webpack_require__) { + !function(global, factory) { + module.exports = factory(); + }(this, function() { + "use strict"; + function createClass(ctor, superClass) { + superClass && (ctor.prototype = Object.create(superClass.prototype)), ctor.prototype.constructor = ctor; + } + function Iterable(value) { + return isIterable(value) ? value : Seq(value); + } + function KeyedIterable(value) { + return isKeyed(value) ? value : KeyedSeq(value); + } + function IndexedIterable(value) { + return isIndexed(value) ? value : IndexedSeq(value); + } + function SetIterable(value) { + return isIterable(value) && !isAssociative(value) ? value : SetSeq(value); + } + function isIterable(maybeIterable) { + return !(!maybeIterable || !maybeIterable[IS_ITERABLE_SENTINEL]); + } + function isKeyed(maybeKeyed) { + return !(!maybeKeyed || !maybeKeyed[IS_KEYED_SENTINEL]); + } + function isIndexed(maybeIndexed) { + return !(!maybeIndexed || !maybeIndexed[IS_INDEXED_SENTINEL]); + } + function isAssociative(maybeAssociative) { + return isKeyed(maybeAssociative) || isIndexed(maybeAssociative); + } + function isOrdered(maybeOrdered) { + return !(!maybeOrdered || !maybeOrdered[IS_ORDERED_SENTINEL]); + } + function MakeRef(ref) { + return ref.value = !1, ref; + } + function SetRef(ref) { + ref && (ref.value = !0); + } + function OwnerID() {} + function arrCopy(arr, offset) { + offset = offset || 0; + for (var len = Math.max(0, arr.length - offset), newArr = new Array(len), ii = 0; ii < len; ii++) newArr[ii] = arr[ii + offset]; + return newArr; + } + function ensureSize(iter) { + return void 0 === iter.size && (iter.size = iter.__iterate(returnTrue)), iter.size; + } + function wrapIndex(iter, index) { + if ("number" != typeof index) { + var uint32Index = index >>> 0; + if ("" + uint32Index !== index || 4294967295 === uint32Index) return NaN; + index = uint32Index; + } + return index < 0 ? ensureSize(iter) + index : index; + } + function returnTrue() { + return !0; + } + function wholeSlice(begin, end, size) { + return (0 === begin || void 0 !== size && begin <= -size) && (void 0 === end || void 0 !== size && end >= size); + } + function resolveBegin(begin, size) { + return resolveIndex(begin, size, 0); + } + function resolveEnd(end, size) { + return resolveIndex(end, size, size); + } + function resolveIndex(index, size, defaultIndex) { + return void 0 === index ? defaultIndex : index < 0 ? Math.max(0, size + index) : void 0 === size ? index : Math.min(size, index); + } + function Iterator(next) { + this.next = next; + } + function iteratorValue(type, k, v, iteratorResult) { + var value = 0 === type ? k : 1 === type ? v : [ k, v ]; + return iteratorResult ? iteratorResult.value = value : iteratorResult = { + value: value, + done: !1 + }, iteratorResult; + } + function iteratorDone() { + return { + value: void 0, + done: !0 + }; + } + function hasIterator(maybeIterable) { + return !!getIteratorFn(maybeIterable); + } + function isIterator(maybeIterator) { + return maybeIterator && "function" == typeof maybeIterator.next; + } + function getIterator(iterable) { + var iteratorFn = getIteratorFn(iterable); + return iteratorFn && iteratorFn.call(iterable); + } + function getIteratorFn(iterable) { + var iteratorFn = iterable && (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL] || iterable[FAUX_ITERATOR_SYMBOL]); + if ("function" == typeof iteratorFn) return iteratorFn; + } + function isArrayLike(value) { + return value && "number" == typeof value.length; + } + function Seq(value) { + return null === value || void 0 === value ? emptySequence() : isIterable(value) ? value.toSeq() : seqFromValue(value); + } + function KeyedSeq(value) { + return null === value || void 0 === value ? emptySequence().toKeyedSeq() : isIterable(value) ? isKeyed(value) ? value.toSeq() : value.fromEntrySeq() : keyedSeqFromValue(value); + } + function IndexedSeq(value) { + return null === value || void 0 === value ? emptySequence() : isIterable(value) ? isKeyed(value) ? value.entrySeq() : value.toIndexedSeq() : indexedSeqFromValue(value); + } + function SetSeq(value) { + return (null === value || void 0 === value ? emptySequence() : isIterable(value) ? isKeyed(value) ? value.entrySeq() : value : indexedSeqFromValue(value)).toSetSeq(); + } + function ArraySeq(array) { + this._array = array, this.size = array.length; + } + function ObjectSeq(object) { + var keys = Object.keys(object); + this._object = object, this._keys = keys, this.size = keys.length; + } + function IterableSeq(iterable) { + this._iterable = iterable, this.size = iterable.length || iterable.size; + } + function IteratorSeq(iterator) { + this._iterator = iterator, this._iteratorCache = []; + } + function isSeq(maybeSeq) { + return !(!maybeSeq || !maybeSeq[IS_SEQ_SENTINEL]); + } + function emptySequence() { + return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([])); + } + function keyedSeqFromValue(value) { + var seq = Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() : isIterator(value) ? new IteratorSeq(value).fromEntrySeq() : hasIterator(value) ? new IterableSeq(value).fromEntrySeq() : "object" == typeof value ? new ObjectSeq(value) : void 0; + if (!seq) throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: " + value); + return seq; + } + function indexedSeqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value); + if (!seq) throw new TypeError("Expected Array or iterable object of values: " + value); + return seq; + } + function seqFromValue(value) { + var seq = maybeIndexedSeqFromValue(value) || "object" == typeof value && new ObjectSeq(value); + if (!seq) throw new TypeError("Expected Array or iterable object of values, or keyed object: " + value); + return seq; + } + function maybeIndexedSeqFromValue(value) { + return isArrayLike(value) ? new ArraySeq(value) : isIterator(value) ? new IteratorSeq(value) : hasIterator(value) ? new IterableSeq(value) : void 0; + } + function seqIterate(seq, fn, reverse, useKeys) { + var cache = seq._cache; + if (cache) { + for (var maxIndex = cache.length - 1, ii = 0; ii <= maxIndex; ii++) { + var entry = cache[reverse ? maxIndex - ii : ii]; + if (fn(entry[1], useKeys ? entry[0] : ii, seq) === !1) return ii + 1; + } + return ii; + } + return seq.__iterateUncached(fn, reverse); + } + function seqIterator(seq, type, reverse, useKeys) { + var cache = seq._cache; + if (cache) { + var maxIndex = cache.length - 1, ii = 0; + return new Iterator(function() { + var entry = cache[reverse ? maxIndex - ii : ii]; + return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]); + }); + } + return seq.__iteratorUncached(type, reverse); + } + function fromJS(json, converter) { + return converter ? fromJSWith(converter, json, "", { + "": json + }) : fromJSDefault(json); + } + function fromJSWith(converter, json, key, parentJSON) { + return Array.isArray(json) ? converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) { + return fromJSWith(converter, v, k, json); + })) : isPlainObj(json) ? converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) { + return fromJSWith(converter, v, k, json); + })) : json; + } + function fromJSDefault(json) { + return Array.isArray(json) ? IndexedSeq(json).map(fromJSDefault).toList() : isPlainObj(json) ? KeyedSeq(json).map(fromJSDefault).toMap() : json; + } + function isPlainObj(value) { + return value && (value.constructor === Object || void 0 === value.constructor); + } + function is(valueA, valueB) { + if (valueA === valueB || valueA !== valueA && valueB !== valueB) return !0; + if (!valueA || !valueB) return !1; + if ("function" == typeof valueA.valueOf && "function" == typeof valueB.valueOf) { + if (valueA = valueA.valueOf(), valueB = valueB.valueOf(), valueA === valueB || valueA !== valueA && valueB !== valueB) return !0; + if (!valueA || !valueB) return !1; + } + return !("function" != typeof valueA.equals || "function" != typeof valueB.equals || !valueA.equals(valueB)); + } + function deepEqual(a, b) { + if (a === b) return !0; + if (!isIterable(b) || void 0 !== a.size && void 0 !== b.size && a.size !== b.size || void 0 !== a.__hash && void 0 !== b.__hash && a.__hash !== b.__hash || isKeyed(a) !== isKeyed(b) || isIndexed(a) !== isIndexed(b) || isOrdered(a) !== isOrdered(b)) return !1; + if (0 === a.size && 0 === b.size) return !0; + var notAssociative = !isAssociative(a); + if (isOrdered(a)) { + var entries = a.entries(); + return b.every(function(v, k) { + var entry = entries.next().value; + return entry && is(entry[1], v) && (notAssociative || is(entry[0], k)); + }) && entries.next().done; + } + var flipped = !1; + if (void 0 === a.size) if (void 0 === b.size) "function" == typeof a.cacheResult && a.cacheResult(); else { + flipped = !0; + var _ = a; + a = b, b = _; + } + var allEqual = !0, bSize = b.__iterate(function(v, k) { + if (notAssociative ? !a.has(v) : flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) return allEqual = !1, + !1; + }); + return allEqual && a.size === bSize; + } + function Repeat(value, times) { + if (!(this instanceof Repeat)) return new Repeat(value, times); + if (this._value = value, this.size = void 0 === times ? 1 / 0 : Math.max(0, times), + 0 === this.size) { + if (EMPTY_REPEAT) return EMPTY_REPEAT; + EMPTY_REPEAT = this; + } + } + function invariant(condition, error) { + if (!condition) throw new Error(error); + } + function Range(start, end, step) { + if (!(this instanceof Range)) return new Range(start, end, step); + if (invariant(0 !== step, "Cannot step a Range by 0"), start = start || 0, void 0 === end && (end = 1 / 0), + step = void 0 === step ? 1 : Math.abs(step), end < start && (step = -step), this._start = start, + this._end = end, this._step = step, this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1), + 0 === this.size) { + if (EMPTY_RANGE) return EMPTY_RANGE; + EMPTY_RANGE = this; + } + } + function Collection() { + throw TypeError("Abstract"); + } + function KeyedCollection() {} + function IndexedCollection() {} + function SetCollection() {} + function smi(i32) { + return i32 >>> 1 & 1073741824 | 3221225471 & i32; + } + function hash(o) { + if (o === !1 || null === o || void 0 === o) return 0; + if ("function" == typeof o.valueOf && (o = o.valueOf(), o === !1 || null === o || void 0 === o)) return 0; + if (o === !0) return 1; + var type = typeof o; + if ("number" === type) { + var h = 0 | o; + for (h !== o && (h ^= 4294967295 * o); o > 4294967295; ) o /= 4294967295, h ^= o; + return smi(h); + } + if ("string" === type) return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o); + if ("function" == typeof o.hashCode) return o.hashCode(); + if ("object" === type) return hashJSObj(o); + if ("function" == typeof o.toString) return hashString(o.toString()); + throw new Error("Value type " + type + " cannot be hashed."); + } + function cachedHashString(string) { + var hash = stringHashCache[string]; + return void 0 === hash && (hash = hashString(string), STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE && (STRING_HASH_CACHE_SIZE = 0, + stringHashCache = {}), STRING_HASH_CACHE_SIZE++, stringHashCache[string] = hash), + hash; + } + function hashString(string) { + for (var hash = 0, ii = 0; ii < string.length; ii++) hash = 31 * hash + string.charCodeAt(ii) | 0; + return smi(hash); + } + function hashJSObj(obj) { + var hash; + if (usingWeakMap && (hash = weakMap.get(obj), void 0 !== hash)) return hash; + if (hash = obj[UID_HASH_KEY], void 0 !== hash) return hash; + if (!canDefineProperty) { + if (hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY], void 0 !== hash) return hash; + if (hash = getIENodeHash(obj), void 0 !== hash) return hash; + } + if (hash = ++objHashUID, 1073741824 & objHashUID && (objHashUID = 0), usingWeakMap) weakMap.set(obj, hash); else { + if (void 0 !== isExtensible && isExtensible(obj) === !1) throw new Error("Non-extensible objects are not allowed as keys."); + if (canDefineProperty) Object.defineProperty(obj, UID_HASH_KEY, { + enumerable: !1, + configurable: !1, + writable: !1, + value: hash + }); else if (void 0 !== obj.propertyIsEnumerable && obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) obj.propertyIsEnumerable = function() { + return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments); + }, obj.propertyIsEnumerable[UID_HASH_KEY] = hash; else { + if (void 0 === obj.nodeType) throw new Error("Unable to set a non-enumerable property on object."); + obj[UID_HASH_KEY] = hash; + } + } + return hash; + } + function getIENodeHash(node) { + if (node && node.nodeType > 0) switch (node.nodeType) { + case 1: + return node.uniqueID; + + case 9: + return node.documentElement && node.documentElement.uniqueID; + } + } + function assertNotInfinite(size) { + invariant(size !== 1 / 0, "Cannot perform this action with an infinite size."); + } + function Map(value) { + return null === value || void 0 === value ? emptyMap() : isMap(value) && !isOrdered(value) ? value : emptyMap().withMutations(function(map) { + var iter = KeyedIterable(value); + assertNotInfinite(iter.size), iter.forEach(function(v, k) { + return map.set(k, v); + }); + }); + } + function isMap(maybeMap) { + return !(!maybeMap || !maybeMap[IS_MAP_SENTINEL]); + } + function ArrayMapNode(ownerID, entries) { + this.ownerID = ownerID, this.entries = entries; + } + function BitmapIndexedNode(ownerID, bitmap, nodes) { + this.ownerID = ownerID, this.bitmap = bitmap, this.nodes = nodes; + } + function HashArrayMapNode(ownerID, count, nodes) { + this.ownerID = ownerID, this.count = count, this.nodes = nodes; + } + function HashCollisionNode(ownerID, keyHash, entries) { + this.ownerID = ownerID, this.keyHash = keyHash, this.entries = entries; + } + function ValueNode(ownerID, keyHash, entry) { + this.ownerID = ownerID, this.keyHash = keyHash, this.entry = entry; + } + function MapIterator(map, type, reverse) { + this._type = type, this._reverse = reverse, this._stack = map._root && mapIteratorFrame(map._root); + } + function mapIteratorValue(type, entry) { + return iteratorValue(type, entry[0], entry[1]); + } + function mapIteratorFrame(node, prev) { + return { + node: node, + index: 0, + __prev: prev + }; + } + function makeMap(size, root, ownerID, hash) { + var map = Object.create(MapPrototype); + return map.size = size, map._root = root, map.__ownerID = ownerID, map.__hash = hash, + map.__altered = !1, map; + } + function emptyMap() { + return EMPTY_MAP || (EMPTY_MAP = makeMap(0)); + } + function updateMap(map, k, v) { + var newRoot, newSize; + if (map._root) { + var didChangeSize = MakeRef(CHANGE_LENGTH), didAlter = MakeRef(DID_ALTER); + if (newRoot = updateNode(map._root, map.__ownerID, 0, void 0, k, v, didChangeSize, didAlter), + !didAlter.value) return map; + newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0); + } else { + if (v === NOT_SET) return map; + newSize = 1, newRoot = new ArrayMapNode(map.__ownerID, [ [ k, v ] ]); + } + return map.__ownerID ? (map.size = newSize, map._root = newRoot, map.__hash = void 0, + map.__altered = !0, map) : newRoot ? makeMap(newSize, newRoot) : emptyMap(); + } + function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + return node ? node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) : value === NOT_SET ? node : (SetRef(didAlter), + SetRef(didChangeSize), new ValueNode(ownerID, keyHash, [ key, value ])); + } + function isLeafNode(node) { + return node.constructor === ValueNode || node.constructor === HashCollisionNode; + } + function mergeIntoNode(node, ownerID, shift, keyHash, entry) { + if (node.keyHash === keyHash) return new HashCollisionNode(ownerID, keyHash, [ node.entry, entry ]); + var newNode, idx1 = (0 === shift ? node.keyHash : node.keyHash >>> shift) & MASK, idx2 = (0 === shift ? keyHash : keyHash >>> shift) & MASK, nodes = idx1 === idx2 ? [ mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry) ] : (newNode = new ValueNode(ownerID, keyHash, entry), + idx1 < idx2 ? [ node, newNode ] : [ newNode, node ]); + return new BitmapIndexedNode(ownerID, 1 << idx1 | 1 << idx2, nodes); + } + function createNodes(ownerID, entries, key, value) { + ownerID || (ownerID = new OwnerID()); + for (var node = new ValueNode(ownerID, hash(key), [ key, value ]), ii = 0; ii < entries.length; ii++) { + var entry = entries[ii]; + node = node.update(ownerID, 0, void 0, entry[0], entry[1]); + } + return node; + } + function packNodes(ownerID, nodes, count, excluding) { + for (var bitmap = 0, packedII = 0, packedNodes = new Array(count), ii = 0, bit = 1, len = nodes.length; ii < len; ii++, + bit <<= 1) { + var node = nodes[ii]; + void 0 !== node && ii !== excluding && (bitmap |= bit, packedNodes[packedII++] = node); + } + return new BitmapIndexedNode(ownerID, bitmap, packedNodes); + } + function expandNodes(ownerID, nodes, bitmap, including, node) { + for (var count = 0, expandedNodes = new Array(SIZE), ii = 0; 0 !== bitmap; ii++, + bitmap >>>= 1) expandedNodes[ii] = 1 & bitmap ? nodes[count++] : void 0; + return expandedNodes[including] = node, new HashArrayMapNode(ownerID, count + 1, expandedNodes); + } + function mergeIntoMapWith(map, merger, iterables) { + for (var iters = [], ii = 0; ii < iterables.length; ii++) { + var value = iterables[ii], iter = KeyedIterable(value); + isIterable(value) || (iter = iter.map(function(v) { + return fromJS(v); + })), iters.push(iter); + } + return mergeIntoCollectionWith(map, merger, iters); + } + function deepMerger(existing, value, key) { + return existing && existing.mergeDeep && isIterable(value) ? existing.mergeDeep(value) : is(existing, value) ? existing : value; + } + function deepMergerWith(merger) { + return function(existing, value, key) { + if (existing && existing.mergeDeepWith && isIterable(value)) return existing.mergeDeepWith(merger, value); + var nextValue = merger(existing, value, key); + return is(existing, nextValue) ? existing : nextValue; + }; + } + function mergeIntoCollectionWith(collection, merger, iters) { + return iters = iters.filter(function(x) { + return 0 !== x.size; + }), 0 === iters.length ? collection : 0 !== collection.size || collection.__ownerID || 1 !== iters.length ? collection.withMutations(function(collection) { + for (var mergeIntoMap = merger ? function(value, key) { + collection.update(key, NOT_SET, function(existing) { + return existing === NOT_SET ? value : merger(existing, value, key); + }); + } : function(value, key) { + collection.set(key, value); + }, ii = 0; ii < iters.length; ii++) iters[ii].forEach(mergeIntoMap); + }) : collection.constructor(iters[0]); + } + function updateInDeepMap(existing, keyPathIter, notSetValue, updater) { + var isNotSet = existing === NOT_SET, step = keyPathIter.next(); + if (step.done) { + var existingValue = isNotSet ? notSetValue : existing, newValue = updater(existingValue); + return newValue === existingValue ? existing : newValue; + } + invariant(isNotSet || existing && existing.set, "invalid keyPath"); + var key = step.value, nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET), nextUpdated = updateInDeepMap(nextExisting, keyPathIter, notSetValue, updater); + return nextUpdated === nextExisting ? existing : nextUpdated === NOT_SET ? existing.remove(key) : (isNotSet ? emptyMap() : existing).set(key, nextUpdated); + } + function popCount(x) { + return x -= x >> 1 & 1431655765, x = (858993459 & x) + (x >> 2 & 858993459), x = x + (x >> 4) & 252645135, + x += x >> 8, x += x >> 16, 127 & x; + } + function setIn(array, idx, val, canEdit) { + var newArray = canEdit ? array : arrCopy(array); + return newArray[idx] = val, newArray; + } + function spliceIn(array, idx, val, canEdit) { + var newLen = array.length + 1; + if (canEdit && idx + 1 === newLen) return array[idx] = val, array; + for (var newArray = new Array(newLen), after = 0, ii = 0; ii < newLen; ii++) ii === idx ? (newArray[ii] = val, + after = -1) : newArray[ii] = array[ii + after]; + return newArray; + } + function spliceOut(array, idx, canEdit) { + var newLen = array.length - 1; + if (canEdit && idx === newLen) return array.pop(), array; + for (var newArray = new Array(newLen), after = 0, ii = 0; ii < newLen; ii++) ii === idx && (after = 1), + newArray[ii] = array[ii + after]; + return newArray; + } + function List(value) { + var empty = emptyList(); + if (null === value || void 0 === value) return empty; + if (isList(value)) return value; + var iter = IndexedIterable(value), size = iter.size; + return 0 === size ? empty : (assertNotInfinite(size), size > 0 && size < SIZE ? makeList(0, size, SHIFT, null, new VNode(iter.toArray())) : empty.withMutations(function(list) { + list.setSize(size), iter.forEach(function(v, i) { + return list.set(i, v); + }); + })); + } + function isList(maybeList) { + return !(!maybeList || !maybeList[IS_LIST_SENTINEL]); + } + function VNode(array, ownerID) { + this.array = array, this.ownerID = ownerID; + } + function iterateList(list, reverse) { + function iterateNodeOrLeaf(node, level, offset) { + return 0 === level ? iterateLeaf(node, offset) : iterateNode(node, level, offset); + } + function iterateLeaf(node, offset) { + var array = offset === tailPos ? tail && tail.array : node && node.array, from = offset > left ? 0 : left - offset, to = right - offset; + return to > SIZE && (to = SIZE), function() { + if (from === to) return DONE; + var idx = reverse ? --to : from++; + return array && array[idx]; + }; + } + function iterateNode(node, level, offset) { + var values, array = node && node.array, from = offset > left ? 0 : left - offset >> level, to = (right - offset >> level) + 1; + return to > SIZE && (to = SIZE), function() { + for (;;) { + if (values) { + var value = values(); + if (value !== DONE) return value; + values = null; + } + if (from === to) return DONE; + var idx = reverse ? --to : from++; + values = iterateNodeOrLeaf(array && array[idx], level - SHIFT, offset + (idx << level)); + } + }; + } + var left = list._origin, right = list._capacity, tailPos = getTailOffset(right), tail = list._tail; + return iterateNodeOrLeaf(list._root, list._level, 0); + } + function makeList(origin, capacity, level, root, tail, ownerID, hash) { + var list = Object.create(ListPrototype); + return list.size = capacity - origin, list._origin = origin, list._capacity = capacity, + list._level = level, list._root = root, list._tail = tail, list.__ownerID = ownerID, + list.__hash = hash, list.__altered = !1, list; + } + function emptyList() { + return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT)); + } + function updateList(list, index, value) { + if (index = wrapIndex(list, index), index !== index) return list; + if (index >= list.size || index < 0) return list.withMutations(function(list) { + index < 0 ? setListBounds(list, index).set(0, value) : setListBounds(list, 0, index + 1).set(index, value); + }); + index += list._origin; + var newTail = list._tail, newRoot = list._root, didAlter = MakeRef(DID_ALTER); + return index >= getTailOffset(list._capacity) ? newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter) : newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter), + didAlter.value ? list.__ownerID ? (list._root = newRoot, list._tail = newTail, list.__hash = void 0, + list.__altered = !0, list) : makeList(list._origin, list._capacity, list._level, newRoot, newTail) : list; + } + function updateVNode(node, ownerID, level, index, value, didAlter) { + var idx = index >>> level & MASK, nodeHas = node && idx < node.array.length; + if (!nodeHas && void 0 === value) return node; + var newNode; + if (level > 0) { + var lowerNode = node && node.array[idx], newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter); + return newLowerNode === lowerNode ? node : (newNode = editableVNode(node, ownerID), + newNode.array[idx] = newLowerNode, newNode); + } + return nodeHas && node.array[idx] === value ? node : (SetRef(didAlter), newNode = editableVNode(node, ownerID), + void 0 === value && idx === newNode.array.length - 1 ? newNode.array.pop() : newNode.array[idx] = value, + newNode); + } + function editableVNode(node, ownerID) { + return ownerID && node && ownerID === node.ownerID ? node : new VNode(node ? node.array.slice() : [], ownerID); + } + function listNodeFor(list, rawIndex) { + if (rawIndex >= getTailOffset(list._capacity)) return list._tail; + if (rawIndex < 1 << list._level + SHIFT) { + for (var node = list._root, level = list._level; node && level > 0; ) node = node.array[rawIndex >>> level & MASK], + level -= SHIFT; + return node; + } + } + function setListBounds(list, begin, end) { + void 0 !== begin && (begin = 0 | begin), void 0 !== end && (end = 0 | end); + var owner = list.__ownerID || new OwnerID(), oldOrigin = list._origin, oldCapacity = list._capacity, newOrigin = oldOrigin + begin, newCapacity = void 0 === end ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end; + if (newOrigin === oldOrigin && newCapacity === oldCapacity) return list; + if (newOrigin >= newCapacity) return list.clear(); + for (var newLevel = list._level, newRoot = list._root, offsetShift = 0; newOrigin + offsetShift < 0; ) newRoot = new VNode(newRoot && newRoot.array.length ? [ void 0, newRoot ] : [], owner), + newLevel += SHIFT, offsetShift += 1 << newLevel; + offsetShift && (newOrigin += offsetShift, oldOrigin += offsetShift, newCapacity += offsetShift, + oldCapacity += offsetShift); + for (var oldTailOffset = getTailOffset(oldCapacity), newTailOffset = getTailOffset(newCapacity); newTailOffset >= 1 << newLevel + SHIFT; ) newRoot = new VNode(newRoot && newRoot.array.length ? [ newRoot ] : [], owner), + newLevel += SHIFT; + var oldTail = list._tail, newTail = newTailOffset < oldTailOffset ? listNodeFor(list, newCapacity - 1) : newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail; + if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) { + newRoot = editableVNode(newRoot, owner); + for (var node = newRoot, level = newLevel; level > SHIFT; level -= SHIFT) { + var idx = oldTailOffset >>> level & MASK; + node = node.array[idx] = editableVNode(node.array[idx], owner); + } + node.array[oldTailOffset >>> SHIFT & MASK] = oldTail; + } + if (newCapacity < oldCapacity && (newTail = newTail && newTail.removeAfter(owner, 0, newCapacity)), + newOrigin >= newTailOffset) newOrigin -= newTailOffset, newCapacity -= newTailOffset, + newLevel = SHIFT, newRoot = null, newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) { + for (offsetShift = 0; newRoot; ) { + var beginIndex = newOrigin >>> newLevel & MASK; + if (beginIndex !== newTailOffset >>> newLevel & MASK) break; + beginIndex && (offsetShift += (1 << newLevel) * beginIndex), newLevel -= SHIFT, + newRoot = newRoot.array[beginIndex]; + } + newRoot && newOrigin > oldOrigin && (newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift)), + newRoot && newTailOffset < oldTailOffset && (newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift)), + offsetShift && (newOrigin -= offsetShift, newCapacity -= offsetShift); + } + return list.__ownerID ? (list.size = newCapacity - newOrigin, list._origin = newOrigin, + list._capacity = newCapacity, list._level = newLevel, list._root = newRoot, list._tail = newTail, + list.__hash = void 0, list.__altered = !0, list) : makeList(newOrigin, newCapacity, newLevel, newRoot, newTail); + } + function mergeIntoListWith(list, merger, iterables) { + for (var iters = [], maxSize = 0, ii = 0; ii < iterables.length; ii++) { + var value = iterables[ii], iter = IndexedIterable(value); + iter.size > maxSize && (maxSize = iter.size), isIterable(value) || (iter = iter.map(function(v) { + return fromJS(v); + })), iters.push(iter); + } + return maxSize > list.size && (list = list.setSize(maxSize)), mergeIntoCollectionWith(list, merger, iters); + } + function getTailOffset(size) { + return size < SIZE ? 0 : size - 1 >>> SHIFT << SHIFT; + } + function OrderedMap(value) { + return null === value || void 0 === value ? emptyOrderedMap() : isOrderedMap(value) ? value : emptyOrderedMap().withMutations(function(map) { + var iter = KeyedIterable(value); + assertNotInfinite(iter.size), iter.forEach(function(v, k) { + return map.set(k, v); + }); + }); + } + function isOrderedMap(maybeOrderedMap) { + return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap); + } + function makeOrderedMap(map, list, ownerID, hash) { + var omap = Object.create(OrderedMap.prototype); + return omap.size = map ? map.size : 0, omap._map = map, omap._list = list, omap.__ownerID = ownerID, + omap.__hash = hash, omap; + } + function emptyOrderedMap() { + return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList())); + } + function updateOrderedMap(omap, k, v) { + var newMap, newList, map = omap._map, list = omap._list, i = map.get(k), has = void 0 !== i; + if (v === NOT_SET) { + if (!has) return omap; + list.size >= SIZE && list.size >= 2 * map.size ? (newList = list.filter(function(entry, idx) { + return void 0 !== entry && i !== idx; + }), newMap = newList.toKeyedSeq().map(function(entry) { + return entry[0]; + }).flip().toMap(), omap.__ownerID && (newMap.__ownerID = newList.__ownerID = omap.__ownerID)) : (newMap = map.remove(k), + newList = i === list.size - 1 ? list.pop() : list.set(i, void 0)); + } else if (has) { + if (v === list.get(i)[1]) return omap; + newMap = map, newList = list.set(i, [ k, v ]); + } else newMap = map.set(k, list.size), newList = list.set(list.size, [ k, v ]); + return omap.__ownerID ? (omap.size = newMap.size, omap._map = newMap, omap._list = newList, + omap.__hash = void 0, omap) : makeOrderedMap(newMap, newList); + } + function ToKeyedSequence(indexed, useKeys) { + this._iter = indexed, this._useKeys = useKeys, this.size = indexed.size; + } + function ToIndexedSequence(iter) { + this._iter = iter, this.size = iter.size; + } + function ToSetSequence(iter) { + this._iter = iter, this.size = iter.size; + } + function FromEntriesSequence(entries) { + this._iter = entries, this.size = entries.size; + } + function flipFactory(iterable) { + var flipSequence = makeSequence(iterable); + return flipSequence._iter = iterable, flipSequence.size = iterable.size, flipSequence.flip = function() { + return iterable; + }, flipSequence.reverse = function() { + var reversedSequence = iterable.reverse.apply(this); + return reversedSequence.flip = function() { + return iterable.reverse(); + }, reversedSequence; + }, flipSequence.has = function(key) { + return iterable.includes(key); + }, flipSequence.includes = function(key) { + return iterable.has(key); + }, flipSequence.cacheResult = cacheResultThrough, flipSequence.__iterateUncached = function(fn, reverse) { + var this$0 = this; + return iterable.__iterate(function(v, k) { + return fn(k, v, this$0) !== !1; + }, reverse); + }, flipSequence.__iteratorUncached = function(type, reverse) { + if (type === ITERATE_ENTRIES) { + var iterator = iterable.__iterator(type, reverse); + return new Iterator(function() { + var step = iterator.next(); + if (!step.done) { + var k = step.value[0]; + step.value[0] = step.value[1], step.value[1] = k; + } + return step; + }); + } + return iterable.__iterator(type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse); + }, flipSequence; + } + function mapFactory(iterable, mapper, context) { + var mappedSequence = makeSequence(iterable); + return mappedSequence.size = iterable.size, mappedSequence.has = function(key) { + return iterable.has(key); + }, mappedSequence.get = function(key, notSetValue) { + var v = iterable.get(key, NOT_SET); + return v === NOT_SET ? notSetValue : mapper.call(context, v, key, iterable); + }, mappedSequence.__iterateUncached = function(fn, reverse) { + var this$0 = this; + return iterable.__iterate(function(v, k, c) { + return fn(mapper.call(context, v, k, c), k, this$0) !== !1; + }, reverse); + }, mappedSequence.__iteratorUncached = function(type, reverse) { + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); + return new Iterator(function() { + var step = iterator.next(); + if (step.done) return step; + var entry = step.value, key = entry[0]; + return iteratorValue(type, key, mapper.call(context, entry[1], key, iterable), step); + }); + }, mappedSequence; + } + function reverseFactory(iterable, useKeys) { + var reversedSequence = makeSequence(iterable); + return reversedSequence._iter = iterable, reversedSequence.size = iterable.size, + reversedSequence.reverse = function() { + return iterable; + }, iterable.flip && (reversedSequence.flip = function() { + var flipSequence = flipFactory(iterable); + return flipSequence.reverse = function() { + return iterable.flip(); + }, flipSequence; + }), reversedSequence.get = function(key, notSetValue) { + return iterable.get(useKeys ? key : -1 - key, notSetValue); + }, reversedSequence.has = function(key) { + return iterable.has(useKeys ? key : -1 - key); + }, reversedSequence.includes = function(value) { + return iterable.includes(value); + }, reversedSequence.cacheResult = cacheResultThrough, reversedSequence.__iterate = function(fn, reverse) { + var this$0 = this; + return iterable.__iterate(function(v, k) { + return fn(v, k, this$0); + }, !reverse); + }, reversedSequence.__iterator = function(type, reverse) { + return iterable.__iterator(type, !reverse); + }, reversedSequence; + } + function filterFactory(iterable, predicate, context, useKeys) { + var filterSequence = makeSequence(iterable); + return useKeys && (filterSequence.has = function(key) { + var v = iterable.get(key, NOT_SET); + return v !== NOT_SET && !!predicate.call(context, v, key, iterable); + }, filterSequence.get = function(key, notSetValue) { + var v = iterable.get(key, NOT_SET); + return v !== NOT_SET && predicate.call(context, v, key, iterable) ? v : notSetValue; + }), filterSequence.__iterateUncached = function(fn, reverse) { + var this$0 = this, iterations = 0; + return iterable.__iterate(function(v, k, c) { + if (predicate.call(context, v, k, c)) return iterations++, fn(v, useKeys ? k : iterations - 1, this$0); + }, reverse), iterations; + }, filterSequence.__iteratorUncached = function(type, reverse) { + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse), iterations = 0; + return new Iterator(function() { + for (;;) { + var step = iterator.next(); + if (step.done) return step; + var entry = step.value, key = entry[0], value = entry[1]; + if (predicate.call(context, value, key, iterable)) return iteratorValue(type, useKeys ? key : iterations++, value, step); + } + }); + }, filterSequence; + } + function countByFactory(iterable, grouper, context) { + var groups = Map().asMutable(); + return iterable.__iterate(function(v, k) { + groups.update(grouper.call(context, v, k, iterable), 0, function(a) { + return a + 1; + }); + }), groups.asImmutable(); + } + function groupByFactory(iterable, grouper, context) { + var isKeyedIter = isKeyed(iterable), groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable(); + iterable.__iterate(function(v, k) { + groups.update(grouper.call(context, v, k, iterable), function(a) { + return a = a || [], a.push(isKeyedIter ? [ k, v ] : v), a; + }); + }); + var coerce = iterableClass(iterable); + return groups.map(function(arr) { + return reify(iterable, coerce(arr)); + }); + } + function sliceFactory(iterable, begin, end, useKeys) { + var originalSize = iterable.size; + if (void 0 !== begin && (begin = 0 | begin), void 0 !== end && (end = 0 | end), + wholeSlice(begin, end, originalSize)) return iterable; + var resolvedBegin = resolveBegin(begin, originalSize), resolvedEnd = resolveEnd(end, originalSize); + if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys); + var sliceSize, resolvedSize = resolvedEnd - resolvedBegin; + resolvedSize === resolvedSize && (sliceSize = resolvedSize < 0 ? 0 : resolvedSize); + var sliceSeq = makeSequence(iterable); + return sliceSeq.size = 0 === sliceSize ? sliceSize : iterable.size && sliceSize || void 0, + !useKeys && isSeq(iterable) && sliceSize >= 0 && (sliceSeq.get = function(index, notSetValue) { + return index = wrapIndex(this, index), index >= 0 && index < sliceSize ? iterable.get(index + resolvedBegin, notSetValue) : notSetValue; + }), sliceSeq.__iterateUncached = function(fn, reverse) { + var this$0 = this; + if (0 === sliceSize) return 0; + if (reverse) return this.cacheResult().__iterate(fn, reverse); + var skipped = 0, isSkipping = !0, iterations = 0; + return iterable.__iterate(function(v, k) { + if (!isSkipping || !(isSkipping = skipped++ < resolvedBegin)) return iterations++, + fn(v, useKeys ? k : iterations - 1, this$0) !== !1 && iterations !== sliceSize; + }), iterations; + }, sliceSeq.__iteratorUncached = function(type, reverse) { + if (0 !== sliceSize && reverse) return this.cacheResult().__iterator(type, reverse); + var iterator = 0 !== sliceSize && iterable.__iterator(type, reverse), skipped = 0, iterations = 0; + return new Iterator(function() { + for (;skipped++ < resolvedBegin; ) iterator.next(); + if (++iterations > sliceSize) return iteratorDone(); + var step = iterator.next(); + return useKeys || type === ITERATE_VALUES ? step : type === ITERATE_KEYS ? iteratorValue(type, iterations - 1, void 0, step) : iteratorValue(type, iterations - 1, step.value[1], step); + }); + }, sliceSeq; + } + function takeWhileFactory(iterable, predicate, context) { + var takeSequence = makeSequence(iterable); + return takeSequence.__iterateUncached = function(fn, reverse) { + var this$0 = this; + if (reverse) return this.cacheResult().__iterate(fn, reverse); + var iterations = 0; + return iterable.__iterate(function(v, k, c) { + return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0); + }), iterations; + }, takeSequence.__iteratorUncached = function(type, reverse) { + var this$0 = this; + if (reverse) return this.cacheResult().__iterator(type, reverse); + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse), iterating = !0; + return new Iterator(function() { + if (!iterating) return iteratorDone(); + var step = iterator.next(); + if (step.done) return step; + var entry = step.value, k = entry[0], v = entry[1]; + return predicate.call(context, v, k, this$0) ? type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step) : (iterating = !1, + iteratorDone()); + }); + }, takeSequence; + } + function skipWhileFactory(iterable, predicate, context, useKeys) { + var skipSequence = makeSequence(iterable); + return skipSequence.__iterateUncached = function(fn, reverse) { + var this$0 = this; + if (reverse) return this.cacheResult().__iterate(fn, reverse); + var isSkipping = !0, iterations = 0; + return iterable.__iterate(function(v, k, c) { + if (!isSkipping || !(isSkipping = predicate.call(context, v, k, c))) return iterations++, + fn(v, useKeys ? k : iterations - 1, this$0); + }), iterations; + }, skipSequence.__iteratorUncached = function(type, reverse) { + var this$0 = this; + if (reverse) return this.cacheResult().__iterator(type, reverse); + var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse), skipping = !0, iterations = 0; + return new Iterator(function() { + var step, k, v; + do { + if (step = iterator.next(), step.done) return useKeys || type === ITERATE_VALUES ? step : type === ITERATE_KEYS ? iteratorValue(type, iterations++, void 0, step) : iteratorValue(type, iterations++, step.value[1], step); + var entry = step.value; + k = entry[0], v = entry[1], skipping && (skipping = predicate.call(context, v, k, this$0)); + } while (skipping); + return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); + }); + }, skipSequence; + } + function concatFactory(iterable, values) { + var isKeyedIterable = isKeyed(iterable), iters = [ iterable ].concat(values).map(function(v) { + return isIterable(v) ? isKeyedIterable && (v = KeyedIterable(v)) : v = isKeyedIterable ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [ v ]), + v; + }).filter(function(v) { + return 0 !== v.size; + }); + if (0 === iters.length) return iterable; + if (1 === iters.length) { + var singleton = iters[0]; + if (singleton === iterable || isKeyedIterable && isKeyed(singleton) || isIndexed(iterable) && isIndexed(singleton)) return singleton; + } + var concatSeq = new ArraySeq(iters); + return isKeyedIterable ? concatSeq = concatSeq.toKeyedSeq() : isIndexed(iterable) || (concatSeq = concatSeq.toSetSeq()), + concatSeq = concatSeq.flatten(!0), concatSeq.size = iters.reduce(function(sum, seq) { + if (void 0 !== sum) { + var size = seq.size; + if (void 0 !== size) return sum + size; + } + }, 0), concatSeq; + } + function flattenFactory(iterable, depth, useKeys) { + var flatSequence = makeSequence(iterable); + return flatSequence.__iterateUncached = function(fn, reverse) { + function flatDeep(iter, currentDepth) { + var this$0 = this; + iter.__iterate(function(v, k) { + return (!depth || currentDepth < depth) && isIterable(v) ? flatDeep(v, currentDepth + 1) : fn(v, useKeys ? k : iterations++, this$0) === !1 && (stopped = !0), + !stopped; + }, reverse); + } + var iterations = 0, stopped = !1; + return flatDeep(iterable, 0), iterations; + }, flatSequence.__iteratorUncached = function(type, reverse) { + var iterator = iterable.__iterator(type, reverse), stack = [], iterations = 0; + return new Iterator(function() { + for (;iterator; ) { + var step = iterator.next(); + if (step.done === !1) { + var v = step.value; + if (type === ITERATE_ENTRIES && (v = v[1]), depth && !(stack.length < depth) || !isIterable(v)) return useKeys ? step : iteratorValue(type, iterations++, v, step); + stack.push(iterator), iterator = v.__iterator(type, reverse); + } else iterator = stack.pop(); + } + return iteratorDone(); + }); + }, flatSequence; + } + function flatMapFactory(iterable, mapper, context) { + var coerce = iterableClass(iterable); + return iterable.toSeq().map(function(v, k) { + return coerce(mapper.call(context, v, k, iterable)); + }).flatten(!0); + } + function interposeFactory(iterable, separator) { + var interposedSequence = makeSequence(iterable); + return interposedSequence.size = iterable.size && 2 * iterable.size - 1, interposedSequence.__iterateUncached = function(fn, reverse) { + var this$0 = this, iterations = 0; + return iterable.__iterate(function(v, k) { + return (!iterations || fn(separator, iterations++, this$0) !== !1) && fn(v, iterations++, this$0) !== !1; + }, reverse), iterations; + }, interposedSequence.__iteratorUncached = function(type, reverse) { + var step, iterator = iterable.__iterator(ITERATE_VALUES, reverse), iterations = 0; + return new Iterator(function() { + return (!step || iterations % 2) && (step = iterator.next(), step.done) ? step : iterations % 2 ? iteratorValue(type, iterations++, separator) : iteratorValue(type, iterations++, step.value, step); + }); + }, interposedSequence; + } + function sortFactory(iterable, comparator, mapper) { + comparator || (comparator = defaultComparator); + var isKeyedIterable = isKeyed(iterable), index = 0, entries = iterable.toSeq().map(function(v, k) { + return [ k, v, index++, mapper ? mapper(v, k, iterable) : v ]; + }).toArray(); + return entries.sort(function(a, b) { + return comparator(a[3], b[3]) || a[2] - b[2]; + }).forEach(isKeyedIterable ? function(v, i) { + entries[i].length = 2; + } : function(v, i) { + entries[i] = v[1]; + }), isKeyedIterable ? KeyedSeq(entries) : isIndexed(iterable) ? IndexedSeq(entries) : SetSeq(entries); + } + function maxFactory(iterable, comparator, mapper) { + if (comparator || (comparator = defaultComparator), mapper) { + var entry = iterable.toSeq().map(function(v, k) { + return [ v, mapper(v, k, iterable) ]; + }).reduce(function(a, b) { + return maxCompare(comparator, a[1], b[1]) ? b : a; + }); + return entry && entry[0]; + } + return iterable.reduce(function(a, b) { + return maxCompare(comparator, a, b) ? b : a; + }); + } + function maxCompare(comparator, a, b) { + var comp = comparator(b, a); + return 0 === comp && b !== a && (void 0 === b || null === b || b !== b) || comp > 0; + } + function zipWithFactory(keyIter, zipper, iters) { + var zipSequence = makeSequence(keyIter); + return zipSequence.size = new ArraySeq(iters).map(function(i) { + return i.size; + }).min(), zipSequence.__iterate = function(fn, reverse) { + for (var step, iterator = this.__iterator(ITERATE_VALUES, reverse), iterations = 0; !(step = iterator.next()).done && fn(step.value, iterations++, this) !== !1; ) ; + return iterations; + }, zipSequence.__iteratorUncached = function(type, reverse) { + var iterators = iters.map(function(i) { + return i = Iterable(i), getIterator(reverse ? i.reverse() : i); + }), iterations = 0, isDone = !1; + return new Iterator(function() { + var steps; + return isDone || (steps = iterators.map(function(i) { + return i.next(); + }), isDone = steps.some(function(s) { + return s.done; + })), isDone ? iteratorDone() : iteratorValue(type, iterations++, zipper.apply(null, steps.map(function(s) { + return s.value; + }))); + }); + }, zipSequence; + } + function reify(iter, seq) { + return isSeq(iter) ? seq : iter.constructor(seq); + } + function validateEntry(entry) { + if (entry !== Object(entry)) throw new TypeError("Expected [K, V] tuple: " + entry); + } + function resolveSize(iter) { + return assertNotInfinite(iter.size), ensureSize(iter); + } + function iterableClass(iterable) { + return isKeyed(iterable) ? KeyedIterable : isIndexed(iterable) ? IndexedIterable : SetIterable; + } + function makeSequence(iterable) { + return Object.create((isKeyed(iterable) ? KeyedSeq : isIndexed(iterable) ? IndexedSeq : SetSeq).prototype); + } + function cacheResultThrough() { + return this._iter.cacheResult ? (this._iter.cacheResult(), this.size = this._iter.size, + this) : Seq.prototype.cacheResult.call(this); + } + function defaultComparator(a, b) { + return a > b ? 1 : a < b ? -1 : 0; + } + function forceIterator(keyPath) { + var iter = getIterator(keyPath); + if (!iter) { + if (!isArrayLike(keyPath)) throw new TypeError("Expected iterable or array-like: " + keyPath); + iter = getIterator(Iterable(keyPath)); + } + return iter; + } + function Record(defaultValues, name) { + var hasInitialized, RecordType = function(values) { + if (values instanceof RecordType) return values; + if (!(this instanceof RecordType)) return new RecordType(values); + if (!hasInitialized) { + hasInitialized = !0; + var keys = Object.keys(defaultValues); + setProps(RecordTypePrototype, keys), RecordTypePrototype.size = keys.length, RecordTypePrototype._name = name, + RecordTypePrototype._keys = keys, RecordTypePrototype._defaultValues = defaultValues; + } + this._map = Map(values); + }, RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype); + return RecordTypePrototype.constructor = RecordType, RecordType; + } + function makeRecord(likeRecord, map, ownerID) { + var record = Object.create(Object.getPrototypeOf(likeRecord)); + return record._map = map, record.__ownerID = ownerID, record; + } + function recordName(record) { + return record._name || record.constructor.name || "Record"; + } + function setProps(prototype, names) { + try { + names.forEach(setProp.bind(void 0, prototype)); + } catch (error) {} + } + function setProp(prototype, name) { + Object.defineProperty(prototype, name, { + get: function() { + return this.get(name); + }, + set: function(value) { + invariant(this.__ownerID, "Cannot set on an immutable record."), this.set(name, value); + } + }); + } + function Set(value) { + return null === value || void 0 === value ? emptySet() : isSet(value) && !isOrdered(value) ? value : emptySet().withMutations(function(set) { + var iter = SetIterable(value); + assertNotInfinite(iter.size), iter.forEach(function(v) { + return set.add(v); + }); + }); + } + function isSet(maybeSet) { + return !(!maybeSet || !maybeSet[IS_SET_SENTINEL]); + } + function updateSet(set, newMap) { + return set.__ownerID ? (set.size = newMap.size, set._map = newMap, set) : newMap === set._map ? set : 0 === newMap.size ? set.__empty() : set.__make(newMap); + } + function makeSet(map, ownerID) { + var set = Object.create(SetPrototype); + return set.size = map ? map.size : 0, set._map = map, set.__ownerID = ownerID, set; + } + function emptySet() { + return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap())); + } + function OrderedSet(value) { + return null === value || void 0 === value ? emptyOrderedSet() : isOrderedSet(value) ? value : emptyOrderedSet().withMutations(function(set) { + var iter = SetIterable(value); + assertNotInfinite(iter.size), iter.forEach(function(v) { + return set.add(v); + }); + }); + } + function isOrderedSet(maybeOrderedSet) { + return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet); + } + function makeOrderedSet(map, ownerID) { + var set = Object.create(OrderedSetPrototype); + return set.size = map ? map.size : 0, set._map = map, set.__ownerID = ownerID, set; + } + function emptyOrderedSet() { + return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap())); + } + function Stack(value) { + return null === value || void 0 === value ? emptyStack() : isStack(value) ? value : emptyStack().unshiftAll(value); + } + function isStack(maybeStack) { + return !(!maybeStack || !maybeStack[IS_STACK_SENTINEL]); + } + function makeStack(size, head, ownerID, hash) { + var map = Object.create(StackPrototype); + return map.size = size, map._head = head, map.__ownerID = ownerID, map.__hash = hash, + map.__altered = !1, map; + } + function emptyStack() { + return EMPTY_STACK || (EMPTY_STACK = makeStack(0)); + } + function mixin(ctor, methods) { + var keyCopier = function(key) { + ctor.prototype[key] = methods[key]; + }; + return Object.keys(methods).forEach(keyCopier), Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier), + ctor; + } + function keyMapper(v, k) { + return k; + } + function entryMapper(v, k) { + return [ k, v ]; + } + function not(predicate) { + return function() { + return !predicate.apply(this, arguments); + }; + } + function neg(predicate) { + return function() { + return -predicate.apply(this, arguments); + }; + } + function quoteString(value) { + return "string" == typeof value ? JSON.stringify(value) : value; + } + function defaultZipper() { + return arrCopy(arguments); + } + function defaultNegComparator(a, b) { + return a < b ? 1 : a > b ? -1 : 0; + } + function hashIterable(iterable) { + if (iterable.size === 1 / 0) return 0; + var ordered = isOrdered(iterable), keyed = isKeyed(iterable), h = ordered ? 1 : 0, size = iterable.__iterate(keyed ? ordered ? function(v, k) { + h = 31 * h + hashMerge(hash(v), hash(k)) | 0; + } : function(v, k) { + h = h + hashMerge(hash(v), hash(k)) | 0; + } : ordered ? function(v) { + h = 31 * h + hash(v) | 0; + } : function(v) { + h = h + hash(v) | 0; + }); + return murmurHashOfSize(size, h); + } + function murmurHashOfSize(size, h) { + return h = imul(h, 3432918353), h = imul(h << 15 | h >>> -15, 461845907), h = imul(h << 13 | h >>> -13, 5), + h = (h + 3864292196 | 0) ^ size, h = imul(h ^ h >>> 16, 2246822507), h = imul(h ^ h >>> 13, 3266489909), + h = smi(h ^ h >>> 16); + } + function hashMerge(a, b) { + return a ^ b + 2654435769 + (a << 6) + (a >> 2) | 0; + } + var SLICE$0 = Array.prototype.slice; + createClass(KeyedIterable, Iterable), createClass(IndexedIterable, Iterable), createClass(SetIterable, Iterable), + Iterable.isIterable = isIterable, Iterable.isKeyed = isKeyed, Iterable.isIndexed = isIndexed, + Iterable.isAssociative = isAssociative, Iterable.isOrdered = isOrdered, Iterable.Keyed = KeyedIterable, + Iterable.Indexed = IndexedIterable, Iterable.Set = SetIterable; + var IS_ITERABLE_SENTINEL = "@@__IMMUTABLE_ITERABLE__@@", IS_KEYED_SENTINEL = "@@__IMMUTABLE_KEYED__@@", IS_INDEXED_SENTINEL = "@@__IMMUTABLE_INDEXED__@@", IS_ORDERED_SENTINEL = "@@__IMMUTABLE_ORDERED__@@", DELETE = "delete", SHIFT = 5, SIZE = 1 << SHIFT, MASK = SIZE - 1, NOT_SET = {}, CHANGE_LENGTH = { + value: !1 + }, DID_ALTER = { + value: !1 + }, ITERATE_KEYS = 0, ITERATE_VALUES = 1, ITERATE_ENTRIES = 2, REAL_ITERATOR_SYMBOL = "function" == typeof Symbol && Symbol.iterator, FAUX_ITERATOR_SYMBOL = "@@iterator", ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL; + Iterator.prototype.toString = function() { + return "[Iterator]"; + }, Iterator.KEYS = ITERATE_KEYS, Iterator.VALUES = ITERATE_VALUES, Iterator.ENTRIES = ITERATE_ENTRIES, + Iterator.prototype.inspect = Iterator.prototype.toSource = function() { + return this.toString(); + }, Iterator.prototype[ITERATOR_SYMBOL] = function() { + return this; + }, createClass(Seq, Iterable), Seq.of = function() { + return Seq(arguments); + }, Seq.prototype.toSeq = function() { + return this; + }, Seq.prototype.toString = function() { + return this.__toString("Seq {", "}"); + }, Seq.prototype.cacheResult = function() { + return !this._cache && this.__iterateUncached && (this._cache = this.entrySeq().toArray(), + this.size = this._cache.length), this; + }, Seq.prototype.__iterate = function(fn, reverse) { + return seqIterate(this, fn, reverse, !0); + }, Seq.prototype.__iterator = function(type, reverse) { + return seqIterator(this, type, reverse, !0); + }, createClass(KeyedSeq, Seq), KeyedSeq.prototype.toKeyedSeq = function() { + return this; + }, createClass(IndexedSeq, Seq), IndexedSeq.of = function() { + return IndexedSeq(arguments); + }, IndexedSeq.prototype.toIndexedSeq = function() { + return this; + }, IndexedSeq.prototype.toString = function() { + return this.__toString("Seq [", "]"); + }, IndexedSeq.prototype.__iterate = function(fn, reverse) { + return seqIterate(this, fn, reverse, !1); + }, IndexedSeq.prototype.__iterator = function(type, reverse) { + return seqIterator(this, type, reverse, !1); + }, createClass(SetSeq, Seq), SetSeq.of = function() { + return SetSeq(arguments); + }, SetSeq.prototype.toSetSeq = function() { + return this; + }, Seq.isSeq = isSeq, Seq.Keyed = KeyedSeq, Seq.Set = SetSeq, Seq.Indexed = IndexedSeq; + var IS_SEQ_SENTINEL = "@@__IMMUTABLE_SEQ__@@"; + Seq.prototype[IS_SEQ_SENTINEL] = !0, createClass(ArraySeq, IndexedSeq), ArraySeq.prototype.get = function(index, notSetValue) { + return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue; + }, ArraySeq.prototype.__iterate = function(fn, reverse) { + for (var array = this._array, maxIndex = array.length - 1, ii = 0; ii <= maxIndex; ii++) if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === !1) return ii + 1; + return ii; + }, ArraySeq.prototype.__iterator = function(type, reverse) { + var array = this._array, maxIndex = array.length - 1, ii = 0; + return new Iterator(function() { + return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++]); + }); + }, createClass(ObjectSeq, KeyedSeq), ObjectSeq.prototype.get = function(key, notSetValue) { + return void 0 === notSetValue || this.has(key) ? this._object[key] : notSetValue; + }, ObjectSeq.prototype.has = function(key) { + return this._object.hasOwnProperty(key); + }, ObjectSeq.prototype.__iterate = function(fn, reverse) { + for (var object = this._object, keys = this._keys, maxIndex = keys.length - 1, ii = 0; ii <= maxIndex; ii++) { + var key = keys[reverse ? maxIndex - ii : ii]; + if (fn(object[key], key, this) === !1) return ii + 1; + } + return ii; + }, ObjectSeq.prototype.__iterator = function(type, reverse) { + var object = this._object, keys = this._keys, maxIndex = keys.length - 1, ii = 0; + return new Iterator(function() { + var key = keys[reverse ? maxIndex - ii : ii]; + return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, key, object[key]); + }); + }, ObjectSeq.prototype[IS_ORDERED_SENTINEL] = !0, createClass(IterableSeq, IndexedSeq), + IterableSeq.prototype.__iterateUncached = function(fn, reverse) { + if (reverse) return this.cacheResult().__iterate(fn, reverse); + var iterable = this._iterable, iterator = getIterator(iterable), iterations = 0; + if (isIterator(iterator)) for (var step; !(step = iterator.next()).done && fn(step.value, iterations++, this) !== !1; ) ; + return iterations; + }, IterableSeq.prototype.__iteratorUncached = function(type, reverse) { + if (reverse) return this.cacheResult().__iterator(type, reverse); + var iterable = this._iterable, iterator = getIterator(iterable); + if (!isIterator(iterator)) return new Iterator(iteratorDone); + var iterations = 0; + return new Iterator(function() { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, iterations++, step.value); + }); + }, createClass(IteratorSeq, IndexedSeq), IteratorSeq.prototype.__iterateUncached = function(fn, reverse) { + if (reverse) return this.cacheResult().__iterate(fn, reverse); + for (var iterator = this._iterator, cache = this._iteratorCache, iterations = 0; iterations < cache.length; ) if (fn(cache[iterations], iterations++, this) === !1) return iterations; + for (var step; !(step = iterator.next()).done; ) { + var val = step.value; + if (cache[iterations] = val, fn(val, iterations++, this) === !1) break; + } + return iterations; + }, IteratorSeq.prototype.__iteratorUncached = function(type, reverse) { + if (reverse) return this.cacheResult().__iterator(type, reverse); + var iterator = this._iterator, cache = this._iteratorCache, iterations = 0; + return new Iterator(function() { + if (iterations >= cache.length) { + var step = iterator.next(); + if (step.done) return step; + cache[iterations] = step.value; + } + return iteratorValue(type, iterations, cache[iterations++]); + }); + }; + var EMPTY_SEQ; + createClass(Repeat, IndexedSeq), Repeat.prototype.toString = function() { + return 0 === this.size ? "Repeat []" : "Repeat [ " + this._value + " " + this.size + " times ]"; + }, Repeat.prototype.get = function(index, notSetValue) { + return this.has(index) ? this._value : notSetValue; + }, Repeat.prototype.includes = function(searchValue) { + return is(this._value, searchValue); + }, Repeat.prototype.slice = function(begin, end) { + var size = this.size; + return wholeSlice(begin, end, size) ? this : new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size)); + }, Repeat.prototype.reverse = function() { + return this; + }, Repeat.prototype.indexOf = function(searchValue) { + return is(this._value, searchValue) ? 0 : -1; + }, Repeat.prototype.lastIndexOf = function(searchValue) { + return is(this._value, searchValue) ? this.size : -1; + }, Repeat.prototype.__iterate = function(fn, reverse) { + for (var ii = 0; ii < this.size; ii++) if (fn(this._value, ii, this) === !1) return ii + 1; + return ii; + }, Repeat.prototype.__iterator = function(type, reverse) { + var this$0 = this, ii = 0; + return new Iterator(function() { + return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone(); + }); + }, Repeat.prototype.equals = function(other) { + return other instanceof Repeat ? is(this._value, other._value) : deepEqual(other); + }; + var EMPTY_REPEAT; + createClass(Range, IndexedSeq), Range.prototype.toString = function() { + return 0 === this.size ? "Range []" : "Range [ " + this._start + "..." + this._end + (this._step > 1 ? " by " + this._step : "") + " ]"; + }, Range.prototype.get = function(index, notSetValue) { + return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue; + }, Range.prototype.includes = function(searchValue) { + var possibleIndex = (searchValue - this._start) / this._step; + return possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex); + }, Range.prototype.slice = function(begin, end) { + return wholeSlice(begin, end, this.size) ? this : (begin = resolveBegin(begin, this.size), + end = resolveEnd(end, this.size), end <= begin ? new Range(0, 0) : new Range(this.get(begin, this._end), this.get(end, this._end), this._step)); + }, Range.prototype.indexOf = function(searchValue) { + var offsetValue = searchValue - this._start; + if (offsetValue % this._step === 0) { + var index = offsetValue / this._step; + if (index >= 0 && index < this.size) return index; + } + return -1; + }, Range.prototype.lastIndexOf = function(searchValue) { + return this.indexOf(searchValue); + }, Range.prototype.__iterate = function(fn, reverse) { + for (var maxIndex = this.size - 1, step = this._step, value = reverse ? this._start + maxIndex * step : this._start, ii = 0; ii <= maxIndex; ii++) { + if (fn(value, ii, this) === !1) return ii + 1; + value += reverse ? -step : step; + } + return ii; + }, Range.prototype.__iterator = function(type, reverse) { + var maxIndex = this.size - 1, step = this._step, value = reverse ? this._start + maxIndex * step : this._start, ii = 0; + return new Iterator(function() { + var v = value; + return value += reverse ? -step : step, ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v); + }); + }, Range.prototype.equals = function(other) { + return other instanceof Range ? this._start === other._start && this._end === other._end && this._step === other._step : deepEqual(this, other); + }; + var EMPTY_RANGE; + createClass(Collection, Iterable), createClass(KeyedCollection, Collection), createClass(IndexedCollection, Collection), + createClass(SetCollection, Collection), Collection.Keyed = KeyedCollection, Collection.Indexed = IndexedCollection, + Collection.Set = SetCollection; + var weakMap, imul = "function" == typeof Math.imul && Math.imul(4294967295, 2) === -2 ? Math.imul : function(a, b) { + a = 0 | a, b = 0 | b; + var c = 65535 & a, d = 65535 & b; + return c * d + ((a >>> 16) * d + c * (b >>> 16) << 16 >>> 0) | 0; + }, isExtensible = Object.isExtensible, canDefineProperty = function() { + try { + return Object.defineProperty({}, "@", {}), !0; + } catch (e) { + return !1; + } + }(), usingWeakMap = "function" == typeof WeakMap; + usingWeakMap && (weakMap = new WeakMap()); + var objHashUID = 0, UID_HASH_KEY = "__immutablehash__"; + "function" == typeof Symbol && (UID_HASH_KEY = Symbol(UID_HASH_KEY)); + var STRING_HASH_CACHE_MIN_STRLEN = 16, STRING_HASH_CACHE_MAX_SIZE = 255, STRING_HASH_CACHE_SIZE = 0, stringHashCache = {}; + createClass(Map, KeyedCollection), Map.prototype.toString = function() { + return this.__toString("Map {", "}"); + }, Map.prototype.get = function(k, notSetValue) { + return this._root ? this._root.get(0, void 0, k, notSetValue) : notSetValue; + }, Map.prototype.set = function(k, v) { + return updateMap(this, k, v); + }, Map.prototype.setIn = function(keyPath, v) { + return this.updateIn(keyPath, NOT_SET, function() { + return v; + }); + }, Map.prototype.remove = function(k) { + return updateMap(this, k, NOT_SET); + }, Map.prototype.deleteIn = function(keyPath) { + return this.updateIn(keyPath, function() { + return NOT_SET; + }); + }, Map.prototype.update = function(k, notSetValue, updater) { + return 1 === arguments.length ? k(this) : this.updateIn([ k ], notSetValue, updater); + }, Map.prototype.updateIn = function(keyPath, notSetValue, updater) { + updater || (updater = notSetValue, notSetValue = void 0); + var updatedValue = updateInDeepMap(this, forceIterator(keyPath), notSetValue, updater); + return updatedValue === NOT_SET ? void 0 : updatedValue; + }, Map.prototype.clear = function() { + return 0 === this.size ? this : this.__ownerID ? (this.size = 0, this._root = null, + this.__hash = void 0, this.__altered = !0, this) : emptyMap(); + }, Map.prototype.merge = function() { + return mergeIntoMapWith(this, void 0, arguments); + }, Map.prototype.mergeWith = function(merger) { + var iters = SLICE$0.call(arguments, 1); + return mergeIntoMapWith(this, merger, iters); + }, Map.prototype.mergeIn = function(keyPath) { + var iters = SLICE$0.call(arguments, 1); + return this.updateIn(keyPath, emptyMap(), function(m) { + return "function" == typeof m.merge ? m.merge.apply(m, iters) : iters[iters.length - 1]; + }); + }, Map.prototype.mergeDeep = function() { + return mergeIntoMapWith(this, deepMerger, arguments); + }, Map.prototype.mergeDeepWith = function(merger) { + var iters = SLICE$0.call(arguments, 1); + return mergeIntoMapWith(this, deepMergerWith(merger), iters); + }, Map.prototype.mergeDeepIn = function(keyPath) { + var iters = SLICE$0.call(arguments, 1); + return this.updateIn(keyPath, emptyMap(), function(m) { + return "function" == typeof m.mergeDeep ? m.mergeDeep.apply(m, iters) : iters[iters.length - 1]; + }); + }, Map.prototype.sort = function(comparator) { + return OrderedMap(sortFactory(this, comparator)); + }, Map.prototype.sortBy = function(mapper, comparator) { + return OrderedMap(sortFactory(this, comparator, mapper)); + }, Map.prototype.withMutations = function(fn) { + var mutable = this.asMutable(); + return fn(mutable), mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this; + }, Map.prototype.asMutable = function() { + return this.__ownerID ? this : this.__ensureOwner(new OwnerID()); + }, Map.prototype.asImmutable = function() { + return this.__ensureOwner(); + }, Map.prototype.wasAltered = function() { + return this.__altered; + }, Map.prototype.__iterator = function(type, reverse) { + return new MapIterator(this, type, reverse); + }, Map.prototype.__iterate = function(fn, reverse) { + var this$0 = this, iterations = 0; + return this._root && this._root.iterate(function(entry) { + return iterations++, fn(entry[1], entry[0], this$0); + }, reverse), iterations; + }, Map.prototype.__ensureOwner = function(ownerID) { + return ownerID === this.__ownerID ? this : ownerID ? makeMap(this.size, this._root, ownerID, this.__hash) : (this.__ownerID = ownerID, + this.__altered = !1, this); + }, Map.isMap = isMap; + var IS_MAP_SENTINEL = "@@__IMMUTABLE_MAP__@@", MapPrototype = Map.prototype; + MapPrototype[IS_MAP_SENTINEL] = !0, MapPrototype[DELETE] = MapPrototype.remove, + MapPrototype.removeIn = MapPrototype.deleteIn, ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) { + for (var entries = this.entries, ii = 0, len = entries.length; ii < len; ii++) if (is(key, entries[ii][0])) return entries[ii][1]; + return notSetValue; + }, ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + for (var removed = value === NOT_SET, entries = this.entries, idx = 0, len = entries.length; idx < len && !is(key, entries[idx][0]); idx++) ; + var exists = idx < len; + if (exists ? entries[idx][1] === value : removed) return this; + if (SetRef(didAlter), (removed || !exists) && SetRef(didChangeSize), !removed || 1 !== entries.length) { + if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) return createNodes(ownerID, entries, key, value); + var isEditable = ownerID && ownerID === this.ownerID, newEntries = isEditable ? entries : arrCopy(entries); + return exists ? removed ? idx === len - 1 ? newEntries.pop() : newEntries[idx] = newEntries.pop() : newEntries[idx] = [ key, value ] : newEntries.push([ key, value ]), + isEditable ? (this.entries = newEntries, this) : new ArrayMapNode(ownerID, newEntries); + } + }, BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) { + void 0 === keyHash && (keyHash = hash(key)); + var bit = 1 << ((0 === shift ? keyHash : keyHash >>> shift) & MASK), bitmap = this.bitmap; + return 0 === (bitmap & bit) ? notSetValue : this.nodes[popCount(bitmap & bit - 1)].get(shift + SHIFT, keyHash, key, notSetValue); + }, BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + void 0 === keyHash && (keyHash = hash(key)); + var keyHashFrag = (0 === shift ? keyHash : keyHash >>> shift) & MASK, bit = 1 << keyHashFrag, bitmap = this.bitmap, exists = 0 !== (bitmap & bit); + if (!exists && value === NOT_SET) return this; + var idx = popCount(bitmap & bit - 1), nodes = this.nodes, node = exists ? nodes[idx] : void 0, newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter); + if (newNode === node) return this; + if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode); + if (exists && !newNode && 2 === nodes.length && isLeafNode(nodes[1 ^ idx])) return nodes[1 ^ idx]; + if (exists && newNode && 1 === nodes.length && isLeafNode(newNode)) return newNode; + var isEditable = ownerID && ownerID === this.ownerID, newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit, newNodes = exists ? newNode ? setIn(nodes, idx, newNode, isEditable) : spliceOut(nodes, idx, isEditable) : spliceIn(nodes, idx, newNode, isEditable); + return isEditable ? (this.bitmap = newBitmap, this.nodes = newNodes, this) : new BitmapIndexedNode(ownerID, newBitmap, newNodes); + }, HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) { + void 0 === keyHash && (keyHash = hash(key)); + var idx = (0 === shift ? keyHash : keyHash >>> shift) & MASK, node = this.nodes[idx]; + return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue; + }, HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + void 0 === keyHash && (keyHash = hash(key)); + var idx = (0 === shift ? keyHash : keyHash >>> shift) & MASK, removed = value === NOT_SET, nodes = this.nodes, node = nodes[idx]; + if (removed && !node) return this; + var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter); + if (newNode === node) return this; + var newCount = this.count; + if (node) { + if (!newNode && (newCount--, newCount < MIN_HASH_ARRAY_MAP_SIZE)) return packNodes(ownerID, nodes, newCount, idx); + } else newCount++; + var isEditable = ownerID && ownerID === this.ownerID, newNodes = setIn(nodes, idx, newNode, isEditable); + return isEditable ? (this.count = newCount, this.nodes = newNodes, this) : new HashArrayMapNode(ownerID, newCount, newNodes); + }, HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) { + for (var entries = this.entries, ii = 0, len = entries.length; ii < len; ii++) if (is(key, entries[ii][0])) return entries[ii][1]; + return notSetValue; + }, HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + void 0 === keyHash && (keyHash = hash(key)); + var removed = value === NOT_SET; + if (keyHash !== this.keyHash) return removed ? this : (SetRef(didAlter), SetRef(didChangeSize), + mergeIntoNode(this, ownerID, shift, keyHash, [ key, value ])); + for (var entries = this.entries, idx = 0, len = entries.length; idx < len && !is(key, entries[idx][0]); idx++) ; + var exists = idx < len; + if (exists ? entries[idx][1] === value : removed) return this; + if (SetRef(didAlter), (removed || !exists) && SetRef(didChangeSize), removed && 2 === len) return new ValueNode(ownerID, this.keyHash, entries[1 ^ idx]); + var isEditable = ownerID && ownerID === this.ownerID, newEntries = isEditable ? entries : arrCopy(entries); + return exists ? removed ? idx === len - 1 ? newEntries.pop() : newEntries[idx] = newEntries.pop() : newEntries[idx] = [ key, value ] : newEntries.push([ key, value ]), + isEditable ? (this.entries = newEntries, this) : new HashCollisionNode(ownerID, this.keyHash, newEntries); + }, ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) { + return is(key, this.entry[0]) ? this.entry[1] : notSetValue; + }, ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { + var removed = value === NOT_SET, keyMatch = is(key, this.entry[0]); + return (keyMatch ? value === this.entry[1] : removed) ? this : (SetRef(didAlter), + removed ? void SetRef(didChangeSize) : keyMatch ? ownerID && ownerID === this.ownerID ? (this.entry[1] = value, + this) : new ValueNode(ownerID, this.keyHash, [ key, value ]) : (SetRef(didChangeSize), + mergeIntoNode(this, ownerID, shift, hash(key), [ key, value ]))); + }, ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = function(fn, reverse) { + for (var entries = this.entries, ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) if (fn(entries[reverse ? maxIndex - ii : ii]) === !1) return !1; + }, BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = function(fn, reverse) { + for (var nodes = this.nodes, ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) { + var node = nodes[reverse ? maxIndex - ii : ii]; + if (node && node.iterate(fn, reverse) === !1) return !1; + } + }, ValueNode.prototype.iterate = function(fn, reverse) { + return fn(this.entry); + }, createClass(MapIterator, Iterator), MapIterator.prototype.next = function() { + for (var type = this._type, stack = this._stack; stack; ) { + var maxIndex, node = stack.node, index = stack.index++; + if (node.entry) { + if (0 === index) return mapIteratorValue(type, node.entry); + } else if (node.entries) { + if (maxIndex = node.entries.length - 1, index <= maxIndex) return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]); + } else if (maxIndex = node.nodes.length - 1, index <= maxIndex) { + var subNode = node.nodes[this._reverse ? maxIndex - index : index]; + if (subNode) { + if (subNode.entry) return mapIteratorValue(type, subNode.entry); + stack = this._stack = mapIteratorFrame(subNode, stack); + } + continue; + } + stack = this._stack = this._stack.__prev; + } + return iteratorDone(); + }; + var EMPTY_MAP, MAX_ARRAY_MAP_SIZE = SIZE / 4, MAX_BITMAP_INDEXED_SIZE = SIZE / 2, MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; + createClass(List, IndexedCollection), List.of = function() { + return this(arguments); + }, List.prototype.toString = function() { + return this.__toString("List [", "]"); + }, List.prototype.get = function(index, notSetValue) { + if (index = wrapIndex(this, index), index >= 0 && index < this.size) { + index += this._origin; + var node = listNodeFor(this, index); + return node && node.array[index & MASK]; + } + return notSetValue; + }, List.prototype.set = function(index, value) { + return updateList(this, index, value); + }, List.prototype.remove = function(index) { + return this.has(index) ? 0 === index ? this.shift() : index === this.size - 1 ? this.pop() : this.splice(index, 1) : this; + }, List.prototype.insert = function(index, value) { + return this.splice(index, 0, value); + }, List.prototype.clear = function() { + return 0 === this.size ? this : this.__ownerID ? (this.size = this._origin = this._capacity = 0, + this._level = SHIFT, this._root = this._tail = null, this.__hash = void 0, this.__altered = !0, + this) : emptyList(); + }, List.prototype.push = function() { + var values = arguments, oldSize = this.size; + return this.withMutations(function(list) { + setListBounds(list, 0, oldSize + values.length); + for (var ii = 0; ii < values.length; ii++) list.set(oldSize + ii, values[ii]); + }); + }, List.prototype.pop = function() { + return setListBounds(this, 0, -1); + }, List.prototype.unshift = function() { + var values = arguments; + return this.withMutations(function(list) { + setListBounds(list, -values.length); + for (var ii = 0; ii < values.length; ii++) list.set(ii, values[ii]); + }); + }, List.prototype.shift = function() { + return setListBounds(this, 1); + }, List.prototype.merge = function() { + return mergeIntoListWith(this, void 0, arguments); + }, List.prototype.mergeWith = function(merger) { + var iters = SLICE$0.call(arguments, 1); + return mergeIntoListWith(this, merger, iters); + }, List.prototype.mergeDeep = function() { + return mergeIntoListWith(this, deepMerger, arguments); + }, List.prototype.mergeDeepWith = function(merger) { + var iters = SLICE$0.call(arguments, 1); + return mergeIntoListWith(this, deepMergerWith(merger), iters); + }, List.prototype.setSize = function(size) { + return setListBounds(this, 0, size); + }, List.prototype.slice = function(begin, end) { + var size = this.size; + return wholeSlice(begin, end, size) ? this : setListBounds(this, resolveBegin(begin, size), resolveEnd(end, size)); + }, List.prototype.__iterator = function(type, reverse) { + var index = 0, values = iterateList(this, reverse); + return new Iterator(function() { + var value = values(); + return value === DONE ? iteratorDone() : iteratorValue(type, index++, value); + }); + }, List.prototype.__iterate = function(fn, reverse) { + for (var value, index = 0, values = iterateList(this, reverse); (value = values()) !== DONE && fn(value, index++, this) !== !1; ) ; + return index; + }, List.prototype.__ensureOwner = function(ownerID) { + return ownerID === this.__ownerID ? this : ownerID ? makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash) : (this.__ownerID = ownerID, + this); + }, List.isList = isList; + var IS_LIST_SENTINEL = "@@__IMMUTABLE_LIST__@@", ListPrototype = List.prototype; + ListPrototype[IS_LIST_SENTINEL] = !0, ListPrototype[DELETE] = ListPrototype.remove, + ListPrototype.setIn = MapPrototype.setIn, ListPrototype.deleteIn = ListPrototype.removeIn = MapPrototype.removeIn, + ListPrototype.update = MapPrototype.update, ListPrototype.updateIn = MapPrototype.updateIn, + ListPrototype.mergeIn = MapPrototype.mergeIn, ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn, + ListPrototype.withMutations = MapPrototype.withMutations, ListPrototype.asMutable = MapPrototype.asMutable, + ListPrototype.asImmutable = MapPrototype.asImmutable, ListPrototype.wasAltered = MapPrototype.wasAltered, + VNode.prototype.removeBefore = function(ownerID, level, index) { + if (index === level ? 1 << level : 0 === this.array.length) return this; + var originIndex = index >>> level & MASK; + if (originIndex >= this.array.length) return new VNode([], ownerID); + var newChild, removingFirst = 0 === originIndex; + if (level > 0) { + var oldChild = this.array[originIndex]; + if (newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index), + newChild === oldChild && removingFirst) return this; + } + if (removingFirst && !newChild) return this; + var editable = editableVNode(this, ownerID); + if (!removingFirst) for (var ii = 0; ii < originIndex; ii++) editable.array[ii] = void 0; + return newChild && (editable.array[originIndex] = newChild), editable; + }, VNode.prototype.removeAfter = function(ownerID, level, index) { + if (index === (level ? 1 << level : 0) || 0 === this.array.length) return this; + var sizeIndex = index - 1 >>> level & MASK; + if (sizeIndex >= this.array.length) return this; + var newChild; + if (level > 0) { + var oldChild = this.array[sizeIndex]; + if (newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index), + newChild === oldChild && sizeIndex === this.array.length - 1) return this; + } + var editable = editableVNode(this, ownerID); + return editable.array.splice(sizeIndex + 1), newChild && (editable.array[sizeIndex] = newChild), + editable; + }; + var EMPTY_LIST, DONE = {}; + createClass(OrderedMap, Map), OrderedMap.of = function() { + return this(arguments); + }, OrderedMap.prototype.toString = function() { + return this.__toString("OrderedMap {", "}"); + }, OrderedMap.prototype.get = function(k, notSetValue) { + var index = this._map.get(k); + return void 0 !== index ? this._list.get(index)[1] : notSetValue; + }, OrderedMap.prototype.clear = function() { + return 0 === this.size ? this : this.__ownerID ? (this.size = 0, this._map.clear(), + this._list.clear(), this) : emptyOrderedMap(); + }, OrderedMap.prototype.set = function(k, v) { + return updateOrderedMap(this, k, v); + }, OrderedMap.prototype.remove = function(k) { + return updateOrderedMap(this, k, NOT_SET); + }, OrderedMap.prototype.wasAltered = function() { + return this._map.wasAltered() || this._list.wasAltered(); + }, OrderedMap.prototype.__iterate = function(fn, reverse) { + var this$0 = this; + return this._list.__iterate(function(entry) { + return entry && fn(entry[1], entry[0], this$0); + }, reverse); + }, OrderedMap.prototype.__iterator = function(type, reverse) { + return this._list.fromEntrySeq().__iterator(type, reverse); + }, OrderedMap.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) return this; + var newMap = this._map.__ensureOwner(ownerID), newList = this._list.__ensureOwner(ownerID); + return ownerID ? makeOrderedMap(newMap, newList, ownerID, this.__hash) : (this.__ownerID = ownerID, + this._map = newMap, this._list = newList, this); + }, OrderedMap.isOrderedMap = isOrderedMap, OrderedMap.prototype[IS_ORDERED_SENTINEL] = !0, + OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove; + var EMPTY_ORDERED_MAP; + createClass(ToKeyedSequence, KeyedSeq), ToKeyedSequence.prototype.get = function(key, notSetValue) { + return this._iter.get(key, notSetValue); + }, ToKeyedSequence.prototype.has = function(key) { + return this._iter.has(key); + }, ToKeyedSequence.prototype.valueSeq = function() { + return this._iter.valueSeq(); + }, ToKeyedSequence.prototype.reverse = function() { + var this$0 = this, reversedSequence = reverseFactory(this, !0); + return this._useKeys || (reversedSequence.valueSeq = function() { + return this$0._iter.toSeq().reverse(); + }), reversedSequence; + }, ToKeyedSequence.prototype.map = function(mapper, context) { + var this$0 = this, mappedSequence = mapFactory(this, mapper, context); + return this._useKeys || (mappedSequence.valueSeq = function() { + return this$0._iter.toSeq().map(mapper, context); + }), mappedSequence; + }, ToKeyedSequence.prototype.__iterate = function(fn, reverse) { + var ii, this$0 = this; + return this._iter.__iterate(this._useKeys ? function(v, k) { + return fn(v, k, this$0); + } : (ii = reverse ? resolveSize(this) : 0, function(v) { + return fn(v, reverse ? --ii : ii++, this$0); + }), reverse); + }, ToKeyedSequence.prototype.__iterator = function(type, reverse) { + if (this._useKeys) return this._iter.__iterator(type, reverse); + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse), ii = reverse ? resolveSize(this) : 0; + return new Iterator(function() { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, reverse ? --ii : ii++, step.value, step); + }); + }, ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = !0, createClass(ToIndexedSequence, IndexedSeq), + ToIndexedSequence.prototype.includes = function(value) { + return this._iter.includes(value); + }, ToIndexedSequence.prototype.__iterate = function(fn, reverse) { + var this$0 = this, iterations = 0; + return this._iter.__iterate(function(v) { + return fn(v, iterations++, this$0); + }, reverse); + }, ToIndexedSequence.prototype.__iterator = function(type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse), iterations = 0; + return new Iterator(function() { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, iterations++, step.value, step); + }); + }, createClass(ToSetSequence, SetSeq), ToSetSequence.prototype.has = function(key) { + return this._iter.includes(key); + }, ToSetSequence.prototype.__iterate = function(fn, reverse) { + var this$0 = this; + return this._iter.__iterate(function(v) { + return fn(v, v, this$0); + }, reverse); + }, ToSetSequence.prototype.__iterator = function(type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function() { + var step = iterator.next(); + return step.done ? step : iteratorValue(type, step.value, step.value, step); + }); + }, createClass(FromEntriesSequence, KeyedSeq), FromEntriesSequence.prototype.entrySeq = function() { + return this._iter.toSeq(); + }, FromEntriesSequence.prototype.__iterate = function(fn, reverse) { + var this$0 = this; + return this._iter.__iterate(function(entry) { + if (entry) { + validateEntry(entry); + var indexedIterable = isIterable(entry); + return fn(indexedIterable ? entry.get(1) : entry[1], indexedIterable ? entry.get(0) : entry[0], this$0); + } + }, reverse); + }, FromEntriesSequence.prototype.__iterator = function(type, reverse) { + var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); + return new Iterator(function() { + for (;;) { + var step = iterator.next(); + if (step.done) return step; + var entry = step.value; + if (entry) { + validateEntry(entry); + var indexedIterable = isIterable(entry); + return iteratorValue(type, indexedIterable ? entry.get(0) : entry[0], indexedIterable ? entry.get(1) : entry[1], step); + } + } + }); + }, ToIndexedSequence.prototype.cacheResult = ToKeyedSequence.prototype.cacheResult = ToSetSequence.prototype.cacheResult = FromEntriesSequence.prototype.cacheResult = cacheResultThrough, + createClass(Record, KeyedCollection), Record.prototype.toString = function() { + return this.__toString(recordName(this) + " {", "}"); + }, Record.prototype.has = function(k) { + return this._defaultValues.hasOwnProperty(k); + }, Record.prototype.get = function(k, notSetValue) { + if (!this.has(k)) return notSetValue; + var defaultVal = this._defaultValues[k]; + return this._map ? this._map.get(k, defaultVal) : defaultVal; + }, Record.prototype.clear = function() { + if (this.__ownerID) return this._map && this._map.clear(), this; + var RecordType = this.constructor; + return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap())); + }, Record.prototype.set = function(k, v) { + if (!this.has(k)) throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this)); + var newMap = this._map && this._map.set(k, v); + return this.__ownerID || newMap === this._map ? this : makeRecord(this, newMap); + }, Record.prototype.remove = function(k) { + if (!this.has(k)) return this; + var newMap = this._map && this._map.remove(k); + return this.__ownerID || newMap === this._map ? this : makeRecord(this, newMap); + }, Record.prototype.wasAltered = function() { + return this._map.wasAltered(); + }, Record.prototype.__iterator = function(type, reverse) { + var this$0 = this; + return KeyedIterable(this._defaultValues).map(function(_, k) { + return this$0.get(k); + }).__iterator(type, reverse); + }, Record.prototype.__iterate = function(fn, reverse) { + var this$0 = this; + return KeyedIterable(this._defaultValues).map(function(_, k) { + return this$0.get(k); + }).__iterate(fn, reverse); + }, Record.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) return this; + var newMap = this._map && this._map.__ensureOwner(ownerID); + return ownerID ? makeRecord(this, newMap, ownerID) : (this.__ownerID = ownerID, + this._map = newMap, this); + }; + var RecordPrototype = Record.prototype; + RecordPrototype[DELETE] = RecordPrototype.remove, RecordPrototype.deleteIn = RecordPrototype.removeIn = MapPrototype.removeIn, + RecordPrototype.merge = MapPrototype.merge, RecordPrototype.mergeWith = MapPrototype.mergeWith, + RecordPrototype.mergeIn = MapPrototype.mergeIn, RecordPrototype.mergeDeep = MapPrototype.mergeDeep, + RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith, RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn, + RecordPrototype.setIn = MapPrototype.setIn, RecordPrototype.update = MapPrototype.update, + RecordPrototype.updateIn = MapPrototype.updateIn, RecordPrototype.withMutations = MapPrototype.withMutations, + RecordPrototype.asMutable = MapPrototype.asMutable, RecordPrototype.asImmutable = MapPrototype.asImmutable, + createClass(Set, SetCollection), Set.of = function() { + return this(arguments); + }, Set.fromKeys = function(value) { + return this(KeyedIterable(value).keySeq()); + }, Set.prototype.toString = function() { + return this.__toString("Set {", "}"); + }, Set.prototype.has = function(value) { + return this._map.has(value); + }, Set.prototype.add = function(value) { + return updateSet(this, this._map.set(value, !0)); + }, Set.prototype.remove = function(value) { + return updateSet(this, this._map.remove(value)); + }, Set.prototype.clear = function() { + return updateSet(this, this._map.clear()); + }, Set.prototype.union = function() { + var iters = SLICE$0.call(arguments, 0); + return iters = iters.filter(function(x) { + return 0 !== x.size; + }), 0 === iters.length ? this : 0 !== this.size || this.__ownerID || 1 !== iters.length ? this.withMutations(function(set) { + for (var ii = 0; ii < iters.length; ii++) SetIterable(iters[ii]).forEach(function(value) { + return set.add(value); + }); + }) : this.constructor(iters[0]); + }, Set.prototype.intersect = function() { + var iters = SLICE$0.call(arguments, 0); + if (0 === iters.length) return this; + iters = iters.map(function(iter) { + return SetIterable(iter); + }); + var originalSet = this; + return this.withMutations(function(set) { + originalSet.forEach(function(value) { + iters.every(function(iter) { + return iter.includes(value); + }) || set.remove(value); + }); + }); + }, Set.prototype.subtract = function() { + var iters = SLICE$0.call(arguments, 0); + if (0 === iters.length) return this; + iters = iters.map(function(iter) { + return SetIterable(iter); + }); + var originalSet = this; + return this.withMutations(function(set) { + originalSet.forEach(function(value) { + iters.some(function(iter) { + return iter.includes(value); + }) && set.remove(value); + }); + }); + }, Set.prototype.merge = function() { + return this.union.apply(this, arguments); + }, Set.prototype.mergeWith = function(merger) { + var iters = SLICE$0.call(arguments, 1); + return this.union.apply(this, iters); + }, Set.prototype.sort = function(comparator) { + return OrderedSet(sortFactory(this, comparator)); + }, Set.prototype.sortBy = function(mapper, comparator) { + return OrderedSet(sortFactory(this, comparator, mapper)); + }, Set.prototype.wasAltered = function() { + return this._map.wasAltered(); + }, Set.prototype.__iterate = function(fn, reverse) { + var this$0 = this; + return this._map.__iterate(function(_, k) { + return fn(k, k, this$0); + }, reverse); + }, Set.prototype.__iterator = function(type, reverse) { + return this._map.map(function(_, k) { + return k; + }).__iterator(type, reverse); + }, Set.prototype.__ensureOwner = function(ownerID) { + if (ownerID === this.__ownerID) return this; + var newMap = this._map.__ensureOwner(ownerID); + return ownerID ? this.__make(newMap, ownerID) : (this.__ownerID = ownerID, this._map = newMap, + this); + }, Set.isSet = isSet; + var IS_SET_SENTINEL = "@@__IMMUTABLE_SET__@@", SetPrototype = Set.prototype; + SetPrototype[IS_SET_SENTINEL] = !0, SetPrototype[DELETE] = SetPrototype.remove, + SetPrototype.mergeDeep = SetPrototype.merge, SetPrototype.mergeDeepWith = SetPrototype.mergeWith, + SetPrototype.withMutations = MapPrototype.withMutations, SetPrototype.asMutable = MapPrototype.asMutable, + SetPrototype.asImmutable = MapPrototype.asImmutable, SetPrototype.__empty = emptySet, + SetPrototype.__make = makeSet; + var EMPTY_SET; + createClass(OrderedSet, Set), OrderedSet.of = function() { + return this(arguments); + }, OrderedSet.fromKeys = function(value) { + return this(KeyedIterable(value).keySeq()); + }, OrderedSet.prototype.toString = function() { + return this.__toString("OrderedSet {", "}"); + }, OrderedSet.isOrderedSet = isOrderedSet; + var OrderedSetPrototype = OrderedSet.prototype; + OrderedSetPrototype[IS_ORDERED_SENTINEL] = !0, OrderedSetPrototype.__empty = emptyOrderedSet, + OrderedSetPrototype.__make = makeOrderedSet; + var EMPTY_ORDERED_SET; + createClass(Stack, IndexedCollection), Stack.of = function() { + return this(arguments); + }, Stack.prototype.toString = function() { + return this.__toString("Stack [", "]"); + }, Stack.prototype.get = function(index, notSetValue) { + var head = this._head; + for (index = wrapIndex(this, index); head && index--; ) head = head.next; + return head ? head.value : notSetValue; + }, Stack.prototype.peek = function() { + return this._head && this._head.value; + }, Stack.prototype.push = function() { + if (0 === arguments.length) return this; + for (var newSize = this.size + arguments.length, head = this._head, ii = arguments.length - 1; ii >= 0; ii--) head = { + value: arguments[ii], + next: head + }; + return this.__ownerID ? (this.size = newSize, this._head = head, this.__hash = void 0, + this.__altered = !0, this) : makeStack(newSize, head); + }, Stack.prototype.pushAll = function(iter) { + if (iter = IndexedIterable(iter), 0 === iter.size) return this; + assertNotInfinite(iter.size); + var newSize = this.size, head = this._head; + return iter.reverse().forEach(function(value) { + newSize++, head = { + value: value, + next: head + }; + }), this.__ownerID ? (this.size = newSize, this._head = head, this.__hash = void 0, + this.__altered = !0, this) : makeStack(newSize, head); + }, Stack.prototype.pop = function() { + return this.slice(1); + }, Stack.prototype.unshift = function() { + return this.push.apply(this, arguments); + }, Stack.prototype.unshiftAll = function(iter) { + return this.pushAll(iter); + }, Stack.prototype.shift = function() { + return this.pop.apply(this, arguments); + }, Stack.prototype.clear = function() { + return 0 === this.size ? this : this.__ownerID ? (this.size = 0, this._head = void 0, + this.__hash = void 0, this.__altered = !0, this) : emptyStack(); + }, Stack.prototype.slice = function(begin, end) { + if (wholeSlice(begin, end, this.size)) return this; + var resolvedBegin = resolveBegin(begin, this.size), resolvedEnd = resolveEnd(end, this.size); + if (resolvedEnd !== this.size) return IndexedCollection.prototype.slice.call(this, begin, end); + for (var newSize = this.size - resolvedBegin, head = this._head; resolvedBegin--; ) head = head.next; + return this.__ownerID ? (this.size = newSize, this._head = head, this.__hash = void 0, + this.__altered = !0, this) : makeStack(newSize, head); + }, Stack.prototype.__ensureOwner = function(ownerID) { + return ownerID === this.__ownerID ? this : ownerID ? makeStack(this.size, this._head, ownerID, this.__hash) : (this.__ownerID = ownerID, + this.__altered = !1, this); + }, Stack.prototype.__iterate = function(fn, reverse) { + if (reverse) return this.reverse().__iterate(fn); + for (var iterations = 0, node = this._head; node && fn(node.value, iterations++, this) !== !1; ) node = node.next; + return iterations; + }, Stack.prototype.__iterator = function(type, reverse) { + if (reverse) return this.reverse().__iterator(type); + var iterations = 0, node = this._head; + return new Iterator(function() { + if (node) { + var value = node.value; + return node = node.next, iteratorValue(type, iterations++, value); + } + return iteratorDone(); + }); + }, Stack.isStack = isStack; + var IS_STACK_SENTINEL = "@@__IMMUTABLE_STACK__@@", StackPrototype = Stack.prototype; + StackPrototype[IS_STACK_SENTINEL] = !0, StackPrototype.withMutations = MapPrototype.withMutations, + StackPrototype.asMutable = MapPrototype.asMutable, StackPrototype.asImmutable = MapPrototype.asImmutable, + StackPrototype.wasAltered = MapPrototype.wasAltered; + var EMPTY_STACK; + Iterable.Iterator = Iterator, mixin(Iterable, { + toArray: function() { + assertNotInfinite(this.size); + var array = new Array(this.size || 0); + return this.valueSeq().__iterate(function(v, i) { + array[i] = v; + }), array; + }, + toIndexedSeq: function() { + return new ToIndexedSequence(this); + }, + toJS: function() { + return this.toSeq().map(function(value) { + return value && "function" == typeof value.toJS ? value.toJS() : value; + }).__toJS(); + }, + toJSON: function() { + return this.toSeq().map(function(value) { + return value && "function" == typeof value.toJSON ? value.toJSON() : value; + }).__toJS(); + }, + toKeyedSeq: function() { + return new ToKeyedSequence(this, (!0)); + }, + toMap: function() { + return Map(this.toKeyedSeq()); + }, + toObject: function() { + assertNotInfinite(this.size); + var object = {}; + return this.__iterate(function(v, k) { + object[k] = v; + }), object; + }, + toOrderedMap: function() { + return OrderedMap(this.toKeyedSeq()); + }, + toOrderedSet: function() { + return OrderedSet(isKeyed(this) ? this.valueSeq() : this); + }, + toSet: function() { + return Set(isKeyed(this) ? this.valueSeq() : this); + }, + toSetSeq: function() { + return new ToSetSequence(this); + }, + toSeq: function() { + return isIndexed(this) ? this.toIndexedSeq() : isKeyed(this) ? this.toKeyedSeq() : this.toSetSeq(); + }, + toStack: function() { + return Stack(isKeyed(this) ? this.valueSeq() : this); + }, + toList: function() { + return List(isKeyed(this) ? this.valueSeq() : this); + }, + toString: function() { + return "[Iterable]"; + }, + __toString: function(head, tail) { + return 0 === this.size ? head + tail : head + " " + this.toSeq().map(this.__toStringMapper).join(", ") + " " + tail; + }, + concat: function() { + var values = SLICE$0.call(arguments, 0); + return reify(this, concatFactory(this, values)); + }, + includes: function(searchValue) { + return this.some(function(value) { + return is(value, searchValue); + }); + }, + entries: function() { + return this.__iterator(ITERATE_ENTRIES); + }, + every: function(predicate, context) { + assertNotInfinite(this.size); + var returnValue = !0; + return this.__iterate(function(v, k, c) { + if (!predicate.call(context, v, k, c)) return returnValue = !1, !1; + }), returnValue; + }, + filter: function(predicate, context) { + return reify(this, filterFactory(this, predicate, context, !0)); + }, + find: function(predicate, context, notSetValue) { + var entry = this.findEntry(predicate, context); + return entry ? entry[1] : notSetValue; + }, + findEntry: function(predicate, context) { + var found; + return this.__iterate(function(v, k, c) { + if (predicate.call(context, v, k, c)) return found = [ k, v ], !1; + }), found; + }, + findLastEntry: function(predicate, context) { + return this.toSeq().reverse().findEntry(predicate, context); + }, + forEach: function(sideEffect, context) { + return assertNotInfinite(this.size), this.__iterate(context ? sideEffect.bind(context) : sideEffect); + }, + join: function(separator) { + assertNotInfinite(this.size), separator = void 0 !== separator ? "" + separator : ","; + var joined = "", isFirst = !0; + return this.__iterate(function(v) { + isFirst ? isFirst = !1 : joined += separator, joined += null !== v && void 0 !== v ? v.toString() : ""; + }), joined; + }, + keys: function() { + return this.__iterator(ITERATE_KEYS); + }, + map: function(mapper, context) { + return reify(this, mapFactory(this, mapper, context)); + }, + reduce: function(reducer, initialReduction, context) { + assertNotInfinite(this.size); + var reduction, useFirst; + return arguments.length < 2 ? useFirst = !0 : reduction = initialReduction, this.__iterate(function(v, k, c) { + useFirst ? (useFirst = !1, reduction = v) : reduction = reducer.call(context, reduction, v, k, c); + }), reduction; + }, + reduceRight: function(reducer, initialReduction, context) { + var reversed = this.toKeyedSeq().reverse(); + return reversed.reduce.apply(reversed, arguments); + }, + reverse: function() { + return reify(this, reverseFactory(this, !0)); + }, + slice: function(begin, end) { + return reify(this, sliceFactory(this, begin, end, !0)); + }, + some: function(predicate, context) { + return !this.every(not(predicate), context); + }, + sort: function(comparator) { + return reify(this, sortFactory(this, comparator)); + }, + values: function() { + return this.__iterator(ITERATE_VALUES); + }, + butLast: function() { + return this.slice(0, -1); + }, + isEmpty: function() { + return void 0 !== this.size ? 0 === this.size : !this.some(function() { + return !0; + }); + }, + count: function(predicate, context) { + return ensureSize(predicate ? this.toSeq().filter(predicate, context) : this); + }, + countBy: function(grouper, context) { + return countByFactory(this, grouper, context); + }, + equals: function(other) { + return deepEqual(this, other); + }, + entrySeq: function() { + var iterable = this; + if (iterable._cache) return new ArraySeq(iterable._cache); + var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq(); + return entriesSequence.fromEntrySeq = function() { + return iterable.toSeq(); + }, entriesSequence; + }, + filterNot: function(predicate, context) { + return this.filter(not(predicate), context); + }, + findLast: function(predicate, context, notSetValue) { + return this.toKeyedSeq().reverse().find(predicate, context, notSetValue); + }, + first: function() { + return this.find(returnTrue); + }, + flatMap: function(mapper, context) { + return reify(this, flatMapFactory(this, mapper, context)); + }, + flatten: function(depth) { + return reify(this, flattenFactory(this, depth, !0)); + }, + fromEntrySeq: function() { + return new FromEntriesSequence(this); + }, + get: function(searchKey, notSetValue) { + return this.find(function(_, key) { + return is(key, searchKey); + }, void 0, notSetValue); + }, + getIn: function(searchKeyPath, notSetValue) { + for (var step, nested = this, iter = forceIterator(searchKeyPath); !(step = iter.next()).done; ) { + var key = step.value; + if (nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET, nested === NOT_SET) return notSetValue; + } + return nested; + }, + groupBy: function(grouper, context) { + return groupByFactory(this, grouper, context); + }, + has: function(searchKey) { + return this.get(searchKey, NOT_SET) !== NOT_SET; + }, + hasIn: function(searchKeyPath) { + return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET; + }, + isSubset: function(iter) { + return iter = "function" == typeof iter.includes ? iter : Iterable(iter), this.every(function(value) { + return iter.includes(value); + }); + }, + isSuperset: function(iter) { + return iter = "function" == typeof iter.isSubset ? iter : Iterable(iter), iter.isSubset(this); + }, + keySeq: function() { + return this.toSeq().map(keyMapper).toIndexedSeq(); + }, + last: function() { + return this.toSeq().reverse().first(); + }, + max: function(comparator) { + return maxFactory(this, comparator); + }, + maxBy: function(mapper, comparator) { + return maxFactory(this, comparator, mapper); + }, + min: function(comparator) { + return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator); + }, + minBy: function(mapper, comparator) { + return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper); + }, + rest: function() { + return this.slice(1); + }, + skip: function(amount) { + return this.slice(Math.max(0, amount)); + }, + skipLast: function(amount) { + return reify(this, this.toSeq().reverse().skip(amount).reverse()); + }, + skipWhile: function(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, !0)); + }, + skipUntil: function(predicate, context) { + return this.skipWhile(not(predicate), context); + }, + sortBy: function(mapper, comparator) { + return reify(this, sortFactory(this, comparator, mapper)); + }, + take: function(amount) { + return this.slice(0, Math.max(0, amount)); + }, + takeLast: function(amount) { + return reify(this, this.toSeq().reverse().take(amount).reverse()); + }, + takeWhile: function(predicate, context) { + return reify(this, takeWhileFactory(this, predicate, context)); + }, + takeUntil: function(predicate, context) { + return this.takeWhile(not(predicate), context); + }, + valueSeq: function() { + return this.toIndexedSeq(); + }, + hashCode: function() { + return this.__hash || (this.__hash = hashIterable(this)); + } + }); + var IterablePrototype = Iterable.prototype; + IterablePrototype[IS_ITERABLE_SENTINEL] = !0, IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values, + IterablePrototype.__toJS = IterablePrototype.toArray, IterablePrototype.__toStringMapper = quoteString, + IterablePrototype.inspect = IterablePrototype.toSource = function() { + return this.toString(); + }, IterablePrototype.chain = IterablePrototype.flatMap, IterablePrototype.contains = IterablePrototype.includes, + function() { + try { + Object.defineProperty(IterablePrototype, "length", { + get: function() { + if (!Iterable.noLengthWarning) { + var stack; + try { + throw new Error(); + } catch (error) { + stack = error.stack; + } + if (stack.indexOf("_wrapObject") === -1) return console && console.warn && console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. " + stack), + this.size; + } + } + }); + } catch (e) {} + }(), mixin(KeyedIterable, { + flip: function() { + return reify(this, flipFactory(this)); + }, + findKey: function(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry && entry[0]; + }, + findLastKey: function(predicate, context) { + return this.toSeq().reverse().findKey(predicate, context); + }, + keyOf: function(searchValue) { + return this.findKey(function(value) { + return is(value, searchValue); + }); + }, + lastKeyOf: function(searchValue) { + return this.findLastKey(function(value) { + return is(value, searchValue); + }); + }, + mapEntries: function(mapper, context) { + var this$0 = this, iterations = 0; + return reify(this, this.toSeq().map(function(v, k) { + return mapper.call(context, [ k, v ], iterations++, this$0); + }).fromEntrySeq()); + }, + mapKeys: function(mapper, context) { + var this$0 = this; + return reify(this, this.toSeq().flip().map(function(k, v) { + return mapper.call(context, k, v, this$0); + }).flip()); + } + }); + var KeyedIterablePrototype = KeyedIterable.prototype; + KeyedIterablePrototype[IS_KEYED_SENTINEL] = !0, KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries, + KeyedIterablePrototype.__toJS = IterablePrototype.toObject, KeyedIterablePrototype.__toStringMapper = function(v, k) { + return JSON.stringify(k) + ": " + quoteString(v); + }, mixin(IndexedIterable, { + toKeyedSeq: function() { + return new ToKeyedSequence(this, (!1)); + }, + filter: function(predicate, context) { + return reify(this, filterFactory(this, predicate, context, !1)); + }, + findIndex: function(predicate, context) { + var entry = this.findEntry(predicate, context); + return entry ? entry[0] : -1; + }, + indexOf: function(searchValue) { + var key = this.toKeyedSeq().keyOf(searchValue); + return void 0 === key ? -1 : key; + }, + lastIndexOf: function(searchValue) { + var key = this.toKeyedSeq().reverse().keyOf(searchValue); + return void 0 === key ? -1 : key; + }, + reverse: function() { + return reify(this, reverseFactory(this, !1)); + }, + slice: function(begin, end) { + return reify(this, sliceFactory(this, begin, end, !1)); + }, + splice: function(index, removeNum) { + var numArgs = arguments.length; + if (removeNum = Math.max(0 | removeNum, 0), 0 === numArgs || 2 === numArgs && !removeNum) return this; + index = resolveBegin(index, index < 0 ? this.count() : this.size); + var spliced = this.slice(0, index); + return reify(this, 1 === numArgs ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))); + }, + findLastIndex: function(predicate, context) { + var key = this.toKeyedSeq().findLastKey(predicate, context); + return void 0 === key ? -1 : key; + }, + first: function() { + return this.get(0); + }, + flatten: function(depth) { + return reify(this, flattenFactory(this, depth, !1)); + }, + get: function(index, notSetValue) { + return index = wrapIndex(this, index), index < 0 || this.size === 1 / 0 || void 0 !== this.size && index > this.size ? notSetValue : this.find(function(_, key) { + return key === index; + }, void 0, notSetValue); + }, + has: function(index) { + return index = wrapIndex(this, index), index >= 0 && (void 0 !== this.size ? this.size === 1 / 0 || index < this.size : this.indexOf(index) !== -1); + }, + interpose: function(separator) { + return reify(this, interposeFactory(this, separator)); + }, + interleave: function() { + var iterables = [ this ].concat(arrCopy(arguments)), zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables), interleaved = zipped.flatten(!0); + return zipped.size && (interleaved.size = zipped.size * iterables.length), reify(this, interleaved); + }, + last: function() { + return this.get(-1); + }, + skipWhile: function(predicate, context) { + return reify(this, skipWhileFactory(this, predicate, context, !1)); + }, + zip: function() { + var iterables = [ this ].concat(arrCopy(arguments)); + return reify(this, zipWithFactory(this, defaultZipper, iterables)); + }, + zipWith: function(zipper) { + var iterables = arrCopy(arguments); + return iterables[0] = this, reify(this, zipWithFactory(this, zipper, iterables)); + } + }), IndexedIterable.prototype[IS_INDEXED_SENTINEL] = !0, IndexedIterable.prototype[IS_ORDERED_SENTINEL] = !0, + mixin(SetIterable, { + get: function(value, notSetValue) { + return this.has(value) ? value : notSetValue; + }, + includes: function(value) { + return this.has(value); + }, + keySeq: function() { + return this.valueSeq(); + } + }), SetIterable.prototype.has = IterablePrototype.includes, mixin(KeyedSeq, KeyedIterable.prototype), + mixin(IndexedSeq, IndexedIterable.prototype), mixin(SetSeq, SetIterable.prototype), + mixin(KeyedCollection, KeyedIterable.prototype), mixin(IndexedCollection, IndexedIterable.prototype), + mixin(SetCollection, SetIterable.prototype); + var Immutable = { + Iterable: Iterable, + Seq: Seq, + Collection: Collection, + Map: Map, + OrderedMap: OrderedMap, + List: List, + Stack: Stack, + Set: Set, + OrderedSet: OrderedSet, + Record: Record, + Range: Range, + Repeat: Repeat, + is: is, + fromJS: fromJS + }; + return Immutable; + }); +}, function(module, exports, __webpack_require__) { + "use strict"; + var decorate = __webpack_require__(39), SettingsCheckbox = __webpack_require__(219), Wrapped = decorate({ + listeners: function() { + return [ "colorizerchange" ]; + }, + props: function(store) { + return { + state: store.colorizerState, + text: "Highlight Search", + onChange: function(state) { + return store.changeColorizer(state); + } + }; + } + }, SettingsCheckbox); + module.exports = Wrapped; +}, function(module, exports) { + "use strict"; + function isValidRegex(needle) { + var isValid = !0; + if (needle) try { + searchTextToRegExp(needle); + } catch (error) { + isValid = !1; + } + return isValid; + } + function searchTextToRegExp(needle) { + return new RegExp(trimSearchText(needle), "gi"); + } + function shouldSearchUseRegex(needle) { + return !!needle && "/" === needle.charAt(0) && trimSearchText(needle).length > 0; + } + function trimSearchText(needle) { + return "/" === needle.charAt(0) && (needle = needle.substr(1)), "/" === needle.charAt(needle.length - 1) && (needle = needle.substr(0, needle.length - 1)), + needle; + } + module.exports = { + isValidRegex: isValidRegex, + searchTextToRegExp: searchTextToRegExp, + shouldSearchUseRegex: shouldSearchUseRegex, + trimSearchText: trimSearchText + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + var React = __webpack_require__(7), SvgIcon = function(_ref) { + var path = _ref.path, _ref$style = _ref.style, style = void 0 === _ref$style ? styles.svgIcon : _ref$style; + return React.createElement("svg", { + style: style, + viewBox: "0 0 24 24" + }, React.createElement("path", { + d: path + })); + }, styles = { + svgIcon: { + flex: "0 0 1rem", + width: "1rem", + height: "1rem", + fill: "currentColor" + } + }; + module.exports = SvgIcon; +}, function(module, exports) { + "use strict"; + var Icons = { + CHECK: "\n M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\n ", + COPY: "\n M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,\n 0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\n ", + EDIT: "\n M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,\n 5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z\n ", + INSPECT: "\n M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M3.05,\n 13H1V11H3.05C3.5,6.83 6.83,3.5 11,3.05V1H13V3.05C17.17,3.5 20.5,6.83 20.95,\n 11H23V13H20.95C20.5,17.17 17.17,20.5 13,20.95V23H11V20.95C6.83,20.5 3.5,17.17 3.05,\n 13M12,5A7,7 0 0,0 5,12A7,7 0 0,0 12,19A7,7 0 0,0 19,12A7,7 0 0,0 12,5Z\n ", + SEARCH: "\n M31.008 27.231l-7.58-6.447c-0.784-0.705-1.622-1.029-2.299-0.998 1.789-2.096 2.87-4.815\n 2.87-7.787 0-6.627-5.373-12-12-12s-12 5.373-12 12 5.373 12 12 12c2.972 0 5.691-1.081\n 7.787-2.87-0.031 0.677 0.293 1.515 0.998 2.299l6.447 7.58c1.104 1.226 2.907 1.33 4.007\n 0.23s0.997-2.903-0.23-4.007zM12 20c-4.418 0-8-3.582-8-8s3.582-8 8-8 8 3.582 8 8-3.582\n 8-8 8z\n ", + SETTINGS: "\n M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,\n 1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,\n 11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,\n 5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,\n 2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,\n 4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,\n 11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,\n 15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,\n 18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,\n 18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,\n 18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z\n ", + SHARE: "\n M18,16.08C17.24,16.08 16.56,16.38 16.04,16.85L8.91,12.7C8.96,12.47 9,12.24 9,12C9,\n 11.76 8.96,11.53 8.91,11.3L15.96,7.19C16.5,7.69 17.21,8 18,8A3,3 0 0,0 21,5A3,\n 3 0 0,0 18,2A3,3 0 0,0 15,5C15,5.24 15.04,5.47 15.09,5.7L8.04,9.81C7.5,9.31 6.79,\n 9 6,9A3,3 0 0,0 3,12A3,3 0 0,0 6,15C6.79,15 7.5,14.69 8.04,14.19L15.16,18.34C15.11,\n 18.55 15.08,18.77 15.08,19C15.08,20.61 16.39,21.91 18,21.91C19.61,21.91 20.92,\n 20.61 20.92,19A2.92,2.92 0 0,0 18,16.08Z\n " + }; + module.exports = Icons; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), Hoverable = function(Component) { + var HoverableImplementation = function(_React$Component) { + function HoverableImplementation() { + var _ref, _temp, _this, _ret; + _classCallCheck(this, HoverableImplementation); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; + return _temp = _this = _possibleConstructorReturn(this, (_ref = HoverableImplementation.__proto__ || Object.getPrototypeOf(HoverableImplementation)).call.apply(_ref, [ this ].concat(args))), + _this.state = { + isHovered: !1, + isPressed: !1 + }, _this._onMouseDown = function(event) { + _this.setState({ + isPressed: !0 + }); + }, _this._onMouseEnter = function(event) { + _this.setState({ + isHovered: !0 + }); + }, _this._onMouseLeave = function(event) { + _this.setState({ + isHovered: !1, + isPressed: !1 + }); + }, _this._onMouseUp = function(event) { + _this.setState({ + isPressed: !1 + }); + }, _ret = _temp, _possibleConstructorReturn(_this, _ret); + } + return _inherits(HoverableImplementation, _React$Component), _createClass(HoverableImplementation, [ { + key: "render", + value: function() { + var _state = this.state, isHovered = _state.isHovered, isPressed = _state.isPressed; + return React.createElement(Component, _extends({}, this.props, { + isHovered: isHovered, + isPressed: isPressed, + onMouseDown: this._onMouseDown, + onMouseEnter: this._onMouseEnter, + onMouseLeave: this._onMouseLeave, + onMouseUp: this._onMouseUp + })); + } + } ]), HoverableImplementation; + }(React.Component); + return HoverableImplementation; + }; + module.exports = Hoverable; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), Breadcrumb = __webpack_require__(227), Node = __webpack_require__(228), React = __webpack_require__(7), SearchUtils = __webpack_require__(222), decorate = __webpack_require__(39), _require = __webpack_require__(36), monospace = _require.monospace, sansSerif = _require.sansSerif, MAX_SEARCH_ROOTS = 200, TreeView = function(_React$Component) { + function TreeView() { + return _classCallCheck(this, TreeView), _possibleConstructorReturn(this, (TreeView.__proto__ || Object.getPrototypeOf(TreeView)).apply(this, arguments)); + } + return _inherits(TreeView, _React$Component), _createClass(TreeView, [ { + key: "getChildContext", + value: function() { + return { + scrollTo: this.scrollTo.bind(this) + }; + } + }, { + key: "scrollTo", + value: function(toNode) { + if (this.node) { + for (var val = 0, height = toNode.offsetHeight; toNode && this.node.contains(toNode); ) val += toNode.offsetTop, + toNode = toNode.offsetParent; + var top = this.node.scrollTop, rel = val - this.node.offsetTop, margin = 40; + top > rel - margin ? this.node.scrollTop = rel - margin : top + this.node.offsetHeight < rel + height + margin && (this.node.scrollTop = rel - this.node.offsetHeight + height + margin); + } + } + }, { + key: "render", + value: function() { + var _this2 = this, theme = this.context.theme; + if (!this.props.roots.count()) return this.props.searching ? React.createElement("div", { + style: styles.container + }, React.createElement("span", { + style: noSearchResultsStyle(theme) + }, "No search results")) : React.createElement("div", { + style: styles.container + }, React.createElement("div", { + ref: function(n) { + return _this2.node = n; + }, + style: styles.scroll + }, React.createElement("div", { + style: styles.scrollContents + }, "Waiting for roots to load...", this.props.reload && React.createElement("span", null, "to reload the inspector ", React.createElement("button", { + onClick: this.props.reload + }, " click here"))))); + var searchText = this.props.searchText, searchRegExp = SearchUtils.isValidRegex(searchText) ? SearchUtils.searchTextToRegExp(searchText) : null; + return this.props.searching && this.props.roots.count() > MAX_SEARCH_ROOTS ? React.createElement("div", { + style: styles.container + }, React.createElement("div", { + ref: function(n) { + return _this2.node = n; + }, + style: styles.scroll + }, React.createElement("div", { + style: styles.scrollContents + }, this.props.roots.slice(0, MAX_SEARCH_ROOTS).map(function(id) { + return React.createElement(Node, { + depth: 0, + id: id, + key: id, + searchRegExp: searchRegExp + }); + }).toJS(), React.createElement("span", null, "Some results not shown. Narrow your search criteria to find them")))) : React.createElement("div", { + style: styles.container + }, React.createElement("div", { + ref: function(n) { + return _this2.node = n; + }, + style: styles.scroll + }, React.createElement("div", { + style: styles.scrollContents + }, this.props.roots.map(function(id) { + return React.createElement(Node, { + depth: 0, + id: id, + key: id, + searchRegExp: searchRegExp + }); + }).toJS())), React.createElement(Breadcrumb, null)); + } + } ]), TreeView; + }(React.Component); + TreeView.childContextTypes = { + scrollTo: React.PropTypes.func + }, TreeView.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var noSearchResultsStyle = function(theme) { + return { + color: theme.base04, + fontFamily: sansSerif.family, + fontSize: sansSerif.sizes.large, + fontStyle: "italic", + padding: "0.5rem" + }; + }, styles = { + container: { + fontFamily: monospace.family, + fontSize: monospace.sizes.normal, + lineHeight: 1.3, + flex: 1, + display: "flex", + flexDirection: "column", + minHeight: 0, + WebkitUserSelect: "none", + MozUserSelect: "none", + userSelect: "none" + }, + scroll: { + overflow: "auto", + minHeight: 0, + flex: 1, + display: "flex", + alignItems: "flex-start" + }, + scrollContents: { + flexDirection: "column", + flex: 1, + display: "flex", + alignItems: "stretch" + } + }, WrappedTreeView = decorate({ + listeners: function(props) { + return [ "searchRoots", "roots" ]; + }, + props: function(store, _props) { + return { + roots: store.searchRoots || store.roots, + searching: !!store.searchRoots, + searchText: store.searchText + }; + } + }, TreeView); + module.exports = WrappedTreeView; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + function getBreadcrumbPath(store) { + for (var path = [], current = store.breadcrumbHead; current; ) path.unshift({ + id: current, + node: store.get(current) + }), current = store.skipWrapper(store.getParent(current), !0); + return path; + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _require = __webpack_require__(36), sansSerif = _require.sansSerif, React = __webpack_require__(7), decorate = __webpack_require__(39), Breadcrumb = function(_React$Component) { + function Breadcrumb(props) { + _classCallCheck(this, Breadcrumb); + var _this = _possibleConstructorReturn(this, (Breadcrumb.__proto__ || Object.getPrototypeOf(Breadcrumb)).call(this, props)); + return _this.state = { + hovered: null + }, _this; + } + return _inherits(Breadcrumb, _React$Component), _createClass(Breadcrumb, [ { + key: "handleCrumbMouseOver", + value: function(id) { + this.setState({ + hovered: id + }), this.props.hover(id, !0); + } + }, { + key: "handleCrumbMouseOut", + value: function(id) { + this.setState({ + hovered: null + }), this.props.hover(id, !1); + } + }, { + key: "render", + value: function() { + var _this2 = this, theme = this.context.theme; + return React.createElement("ul", { + style: containerStyle(theme) + }, this.props.path.map(function(_ref) { + var id = _ref.id, node = _ref.node, isSelected = id === _this2.props.selected, style = itemStyle(isSelected, node.get("nodeType"), theme); + return React.createElement("li", { + style: style, + key: id, + onMouseOver: function() { + return _this2.handleCrumbMouseOver(id); + }, + onMouseOut: function() { + return _this2.handleCrumbMouseOut(id); + }, + onClick: isSelected ? null : function() { + return _this2.props.select(id); + } + }, node.get("name") || '"' + node.get("text") + '"'); + })); + } + } ]), Breadcrumb; + }(React.Component); + Breadcrumb.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var containerStyle = function(theme) { + return { + fontFamily: sansSerif.family, + listStyle: "none", + padding: 0, + margin: 0, + maxHeight: "80px", + overflow: "auto", + marginTop: "2px", + backgroundColor: theme.base01, + borderTop: "1px solid " + theme.base03 + }; + }, itemStyle = function(isSelected, nodeType, theme) { + var color = void 0; + return isSelected ? color = theme.state02 : "Special" === nodeType ? color = theme.special01 : "Composite" === nodeType && (color = theme.special05), + { + backgroundColor: isSelected ? theme.state00 : "transparent", + color: color, + cursor: isSelected ? "default" : "pointer", + padding: "0.25rem 0.5rem", + WebkitUserSelect: "none", + MozUserSelect: "none", + userSelect: "none", + display: "inline-block", + marginRight: "2px" + }; + }; + module.exports = decorate({ + listeners: function() { + return [ "breadcrumbHead", "selected" ]; + }, + props: function(store, _props) { + return { + select: function(id) { + return store.selectBreadcrumb(id); + }, + hover: function(id, isHovered) { + return store.setHover(id, isHovered, !1); + }, + selected: store.selected, + path: getBreadcrumbPath(store) + }; + } + }, Breadcrumb); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), nullthrows = __webpack_require__(3)["default"], decorate = __webpack_require__(39), Props = __webpack_require__(229), _require = __webpack_require__(214), getInvertedWeak = _require.getInvertedWeak, hexToRgba = _require.hexToRgba, Node = function(_React$Component) { + function Node() { + var _ref, _temp, _this, _ret; + _classCallCheck(this, Node); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; + return _temp = _this = _possibleConstructorReturn(this, (_ref = Node.__proto__ || Object.getPrototypeOf(Node)).call.apply(_ref, [ this ].concat(args))), + _this.state = { + isWindowFocused: !0 + }, _this._handleWindowFocus = function() { + setTimeout(function() { + if (_this._ownerWindow) { + var doc = _this._ownerWindow.document; + _this.setState({ + isWindowFocused: doc.hasFocus() + }); + } + }, 50); + }, _this._handleWindowBlur = function() { + _this.setState({ + isWindowFocused: !1 + }); + }, _ret = _temp, _possibleConstructorReturn(_this, _ret); + } + return _inherits(Node, _React$Component), _createClass(Node, [ { + key: "shouldComponentUpdate", + value: function(nextProps, nextState) { + return nextProps !== this.props || nextState.isWindowFocused !== this.state.isWindowFocused; + } + }, { + key: "componentDidMount", + value: function() { + this.props.selected && (this.ensureInView(), this.subscribeToWindowFocus()); + } + }, { + key: "componentDidUpdate", + value: function(prevProps) { + this.props.selected && !prevProps.selected ? (this.ensureInView(), this.subscribeToWindowFocus()) : !this.props.selected && prevProps.selected && this.unsubscribeFromWindowFocus(); + } + }, { + key: "componentWillUnmount", + value: function() { + this.props.selected && this.unsubscribeFromWindowFocus(), this._ownerWindow = null; + } + }, { + key: "findOwnerWindow", + value: function() { + if (!this._head) return null; + var doc = this._head.ownerDocument; + if (!doc) return null; + var win = doc.defaultView; + return win ? win : null; + } + }, { + key: "subscribeToWindowFocus", + value: function() { + if (this._ownerWindow || (this._ownerWindow = this.findOwnerWindow(), this._ownerWindow)) { + var win = this._ownerWindow; + win.addEventListener("focus", this._handleWindowFocus), win.addEventListener("blur", this._handleWindowBlur), + this.props.selected && this.setState({ + isWindowFocused: win.document.hasFocus() + }); + } + } + }, { + key: "unsubscribeFromWindowFocus", + value: function() { + if (this._ownerWindow) { + var win = this._ownerWindow; + win.removeEventListener("focus", this._handleWindowFocus), win.removeEventListener("blur", this._handleWindowBlur); + } + } + }, { + key: "ensureInView", + value: function() { + var node = this.props.isBottomTagSelected ? this._tail : this._head; + node && this.context.scrollTo(node); + } + }, { + key: "render", + value: function() { + var _this2 = this, theme = this.context.theme, _props = this.props, depth = _props.depth, hovered = _props.hovered, isBottomTagHovered = _props.isBottomTagHovered, isBottomTagSelected = _props.isBottomTagSelected, node = _props.node, onContextMenu = _props.onContextMenu, onHover = _props.onHover, onHoverBottom = _props.onHoverBottom, onSelect = _props.onSelect, onSelectBottom = _props.onSelectBottom, onToggleCollapse = _props.onToggleCollapse, searchRegExp = _props.searchRegExp, selected = _props.selected, wrappedChildren = _props.wrappedChildren, isWindowFocused = this.state.isWindowFocused; + if (!node) return React.createElement("span", null, "Node was deleted"); + var children = node.get("children"); + if ("Wrapper" === node.get("nodeType")) return React.createElement("span", null, children.map(function(child) { + return React.createElement(WrappedNode, { + key: child, + id: child, + depth: depth + }); + })); + "NativeWrapper" === node.get("nodeType") && (children = wrappedChildren); + var collapsed = node.get("collapsed"), inverted = selected && isWindowFocused, sharedHeadBracketStyle = bracketStyle(inverted && !isBottomTagSelected, theme), sharedTailBracketStyle = bracketStyle(inverted && isBottomTagSelected, theme), sharedHeadStyle = headStyle({ + depth: depth, + isBottomTagHovered: isBottomTagHovered, + isBottomTagSelected: isBottomTagSelected, + isCollapsed: collapsed, + isHovered: hovered, + isSelected: selected, + isWindowFocused: isWindowFocused, + theme: theme + }), headEvents = { + onContextMenu: onContextMenu, + onDoubleClick: onToggleCollapse, + onMouseOver: function() { + return onHover(!0); + }, + onMouseOut: function() { + return onHover(!1); + }, + onMouseDown: onSelect + }, tailEvents = { + onContextMenu: onContextMenu, + onDoubleClick: onToggleCollapse, + onMouseOver: function() { + return onHoverBottom(!0); + }, + onMouseOut: function() { + return onHoverBottom(!1); + }, + onMouseDown: onSelectBottom + }, nodeType = node.get("nodeType"); + if ("Text" === nodeType || "Empty" === nodeType) { + var tag = void 0; + if ("Text" === nodeType) { + var text = node.get("text"); + tag = React.createElement("span", { + style: tagTextStyle(inverted, theme) + }, '"', text, '"'); + } else "Empty" === nodeType && (tag = React.createElement("span", { + style: tagTextStyle(inverted, theme) + }, React.createElement("span", { + style: styles.falseyLiteral + }, "null"))); + return React.createElement("div", { + style: styles.container + }, React.createElement("div", _extends({ + ref: function(h) { + return _this2._head = h; + }, + style: sharedHeadStyle + }, headEvents), tag)); + } + var name = node.get("name") + ""; + if (searchRegExp) { + for (var unmatched = name.split(searchRegExp), matched = name.match(searchRegExp), pieces = [ React.createElement("span", { + key: 0 + }, unmatched.shift()) ]; unmatched.length > 0; ) pieces.push(React.createElement("span", { + key: pieces.length, + style: highlightStyle(theme) + }, nullthrows(matched).shift())), pieces.push(React.createElement("span", { + key: pieces.length + }, unmatched.shift())); + name = React.createElement("span", null, pieces); + } + if (!children || "string" == typeof children || !children.length) { + var jsxSingleLineTagStyle = jsxTagStyle(inverted, nodeType, theme), content = children, _isCollapsed = null === content || void 0 === content; + return React.createElement("div", { + style: styles.container + }, React.createElement("div", _extends({ + style: sharedHeadStyle, + ref: function(h) { + return _this2._head = h; + } + }, headEvents), React.createElement("span", null, React.createElement("span", null, React.createElement("span", { + style: sharedHeadBracketStyle + }, "<"), React.createElement("span", { + style: jsxSingleLineTagStyle + }, name), node.get("key") && React.createElement(Props, { + key: "key", + props: { + key: node.get("key") + }, + inverted: inverted + }), node.get("ref") && React.createElement(Props, { + key: "ref", + props: { + ref: node.get("ref") + }, + inverted: inverted + }), node.get("props") && React.createElement(Props, { + key: "props", + props: node.get("props"), + inverted: inverted + }), React.createElement("span", { + style: sharedHeadBracketStyle + }, _isCollapsed ? " />" : ">")), !_isCollapsed && [ React.createElement("span", { + key: "content" + }, content), React.createElement("span", { + key: "close" + }, React.createElement("span", { + style: sharedHeadBracketStyle + }, "")) ], selected && React.createElement("span", { + style: jsxSingleLineTagStyle + }, " == $r")))); + } + var jsxCloseTagStyle = jsxTagStyle(inverted && (isBottomTagSelected || collapsed), nodeType, theme), closeTagBracketStyle = collapsed ? sharedHeadBracketStyle : sharedTailBracketStyle, closeTag = React.createElement("span", null, React.createElement("span", { + style: closeTagBracketStyle + }, ""), selected && (collapsed && !this.props.isBottomTagSelected || this.props.isBottomTagSelected) && React.createElement("span", { + style: jsxCloseTagStyle + }, " == $r")), hasState = !!node.get("state") || !!node.get("context"), headInverted = inverted && !isBottomTagSelected, collapser = React.createElement("span", { + title: hasState ? "This component is stateful." : null, + onClick: onToggleCollapse, + style: collapserStyle(depth) + }, React.createElement("span", { + style: arrowStyle(collapsed, hasState, headInverted, theme) + })), jsxOpenTagStyle = jsxTagStyle(inverted && !isBottomTagSelected, nodeType, theme), head = React.createElement("div", _extends({ + ref: function(h) { + return _this2._head = h; + }, + style: sharedHeadStyle + }, headEvents), collapser, React.createElement("span", null, React.createElement("span", { + style: sharedHeadBracketStyle + }, "<"), React.createElement("span", { + style: jsxOpenTagStyle + }, name), node.get("key") && React.createElement(Props, { + key: "key", + props: { + key: node.get("key") + }, + inverted: headInverted + }), node.get("ref") && React.createElement(Props, { + key: "ref", + props: { + ref: node.get("ref") + }, + inverted: headInverted + }), node.get("props") && React.createElement(Props, { + key: "props", + props: node.get("props"), + inverted: headInverted + }), React.createElement("span", { + style: sharedHeadBracketStyle + }, ">"), selected && !collapsed && !this.props.isBottomTagSelected && React.createElement("span", { + style: jsxOpenTagStyle + }, " == $r")), collapsed && React.createElement("span", null, "…"), collapsed && closeTag); + if (collapsed) return React.createElement("div", { + style: styles.container + }, head); + var tailStyleActual = tailStyle({ + depth: depth, + isBottomTagHovered: isBottomTagHovered, + isBottomTagSelected: isBottomTagSelected, + isHovered: hovered, + isSelected: selected, + isWindowFocused: isWindowFocused, + theme: theme + }); + return React.createElement("div", { + style: styles.container + }, head, React.createElement("div", { + style: guidelineStyle(depth, selected, hovered, isBottomTagHovered, theme) + }), React.createElement("div", null, children.map(function(id) { + return React.createElement(WrappedNode, { + key: id, + depth: depth + 1, + id: id + }); + })), React.createElement("div", _extends({ + ref: function(t) { + return _this2._tail = t; + }, + style: tailStyleActual + }, tailEvents), closeTag)); + } + } ]), Node; + }(React.Component); + Node.contextTypes = { + scrollTo: React.PropTypes.func, + theme: React.PropTypes.object.isRequired + }; + var WrappedNode = decorate({ + listeners: function(props) { + return [ props.id ]; + }, + props: function(store, _props2) { + var node = store.get(_props2.id), wrappedChildren = null; + if (node && "NativeWrapper" === node.get("nodeType")) { + var child = store.get(node.get("children")[0]); + wrappedChildren = child && child.get("children"); + } + return { + node: node, + wrappedChildren: wrappedChildren, + selected: store.selected === _props2.id, + isBottomTagSelected: store.isBottomTagSelected, + isBottomTagHovered: store.isBottomTagHovered, + hovered: store.hovered === _props2.id, + searchRegExp: _props2.searchRegExp, + onToggleCollapse: function(e) { + e.preventDefault(), store.toggleCollapse(_props2.id); + }, + onHover: function(isHovered) { + return store.setHover(_props2.id, isHovered, !1); + }, + onHoverBottom: function(isHovered) { + return store.setHover(_props2.id, isHovered, !0); + }, + onSelect: function(e) { + store.selectTop(_props2.id); + }, + onSelectBottom: function(e) { + store.selectBottom(_props2.id); + }, + onContextMenu: function(e) { + store.showContextMenu("tree", e, _props2.id, node); + } + }; + }, + shouldUpdate: function(nextProps, prevProps) { + return nextProps.id !== prevProps.id || nextProps.searchRegExp !== prevProps.searchRegExp; + } + }, Node), calcPaddingLeft = function(depth) { + return 5 + 10 * (depth + 1); + }, paddingRight = 5, headStyle = function(_ref2) { + var depth = _ref2.depth, isBottomTagHovered = _ref2.isBottomTagHovered, isBottomTagSelected = _ref2.isBottomTagSelected, isCollapsed = _ref2.isCollapsed, isHovered = _ref2.isHovered, isSelected = _ref2.isSelected, isWindowFocused = _ref2.isWindowFocused, theme = _ref2.theme, backgroundColor = void 0; + !isSelected || !isCollapsed && isBottomTagSelected ? !isHovered || !isCollapsed && isBottomTagHovered || (backgroundColor = theme.state03) : backgroundColor = isWindowFocused ? theme.state00 : theme.state01; + var isInverted = isSelected && isWindowFocused && !isBottomTagSelected, color = isInverted ? theme.state02 : void 0; + return { + cursor: "default", + borderTop: "1px solid transparent", + position: "relative", + display: "flex", + paddingLeft: calcPaddingLeft(depth), + paddingRight: paddingRight, + backgroundColor: backgroundColor, + color: color + }; + }, jsxTagStyle = function(inverted, nodeType, theme) { + var color = void 0; + return color = inverted ? theme.state02 : "Special" === nodeType ? theme.special01 : "Composite" === nodeType ? theme.special00 : theme.special07, + { + color: color + }; + }, tagTextStyle = function(inverted, theme) { + return { + flex: 1, + whiteSpace: "nowrap", + color: inverted ? getInvertedWeak(theme.state02) : theme.special06 + }; + }, collapserStyle = function(depth) { + return { + position: "absolute", + padding: 2, + left: calcPaddingLeft(depth) - 12 + }; + }, arrowStyle = function(isCollapsed, hasState, isHeadInverted, theme) { + var borderColor = theme.base05; + return isHeadInverted ? borderColor = theme.base00 : hasState && (borderColor = theme.special00), + isCollapsed ? { + borderStyle: "solid", + borderWidth: "4px 0 4px 7px", + borderColor: "transparent transparent transparent " + borderColor, + display: "inline-block", + marginLeft: 1, + verticalAlign: "top" + } : { + borderStyle: "solid", + borderWidth: "7px 4px 0 4px", + borderColor: borderColor + " transparent transparent transparent", + display: "inline-block", + marginTop: 1, + verticalAlign: "top" + }; + }, bracketStyle = function(inverted, theme) { + return { + color: inverted ? getInvertedWeak(theme.state02) : theme.special07 + }; + }, highlightStyle = function(theme) { + return { + backgroundColor: theme.state04, + color: theme.state05 + }; + }, tailStyle = function(_ref3) { + var depth = _ref3.depth, isBottomTagHovered = _ref3.isBottomTagHovered, isBottomTagSelected = _ref3.isBottomTagSelected, isHovered = _ref3.isHovered, isSelected = _ref3.isSelected, isWindowFocused = _ref3.isWindowFocused, theme = _ref3.theme, backgroundColor = void 0; + isSelected && isBottomTagSelected ? backgroundColor = isWindowFocused ? theme.state00 : theme.state01 : isHovered && isBottomTagHovered && (backgroundColor = theme.state03); + var isInverted = isSelected && isWindowFocused && isBottomTagSelected, color = isInverted ? theme.base04 : void 0; + return { + borderTop: "1px solid transparent", + cursor: "default", + paddingLeft: calcPaddingLeft(depth), + paddingRight: paddingRight, + backgroundColor: backgroundColor, + color: color + }; + }, guidelineStyle = function(depth, isSelected, isHovered, isBottomTagHovered, theme) { + var borderLeftColor = "transparent"; + return isSelected ? borderLeftColor = hexToRgba(theme.state00, .45) : isHovered && !isBottomTagHovered && (borderLeftColor = hexToRgba(theme.base04, .2)), + { + position: "absolute", + width: "1px", + borderLeft: "1px solid " + borderLeftColor, + top: 16, + bottom: 0, + willChange: "opacity", + left: calcPaddingLeft(depth) - 7, + zIndex: isSelected ? 1 : 0 + }; + }, styles = { + container: { + flexShrink: 0, + position: "relative", + whiteSpace: "nowrap" + }, + falseyLiteral: { + fontStyle: "italic" + } + }; + module.exports = WrappedNode; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), PropVal = __webpack_require__(211), _require = __webpack_require__(214), getInvertedMid = _require.getInvertedMid, Props = function(_React$Component) { + function Props() { + return _classCallCheck(this, Props), _possibleConstructorReturn(this, (Props.__proto__ || Object.getPrototypeOf(Props)).apply(this, arguments)); + } + return _inherits(Props, _React$Component), _createClass(Props, [ { + key: "shouldComponentUpdate", + value: function(nextProps) { + return nextProps.props !== this.props.props || nextProps.inverted !== this.props.inverted; + } + }, { + key: "render", + value: function() { + var theme = this.context.theme, _props = this.props, inverted = _props.inverted, props = _props.props; + if (!props || "object" !== ("undefined" == typeof props ? "undefined" : _typeof(props))) return React.createElement("span", null); + var names = Object.keys(props).filter(function(name) { + return "_" !== name[0] && "children" !== name; + }), items = []; + return names.slice(0, 3).forEach(function(name) { + items.push(React.createElement("span", { + key: "prop-" + name, + style: propStype(inverted, theme) + }, React.createElement("span", { + style: attributeNameStyle(inverted, theme) + }, name), "=", React.createElement(PropVal, { + val: props[name], + inverted: inverted + }))); + }), names.length > 3 && items.push(React.createElement("span", { + key: "ellipsis", + style: ellipsisStyle(inverted, theme) + }, "…")), React.createElement("span", null, items); + } + } ]), Props; + }(React.Component); + Props.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var attributeNameStyle = function(isInverted, theme) { + return { + color: isInverted ? getInvertedMid(theme.state02) : theme.special06 + }; + }, ellipsisStyle = function(isInverted, theme) { + return { + color: isInverted ? getInvertedMid(theme.state02) : theme.special06 + }; + }, propStype = function(isInverted, theme) { + return { + paddingLeft: 5, + color: isInverted ? getInvertedMid(theme.state02) : theme.special06 + }; + }; + module.exports = Props; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), decorate = __webpack_require__(39), _require = __webpack_require__(36), sansSerif = _require.sansSerif, _require2 = __webpack_require__(231), CUSTOM_THEME_NAME = _require2.CUSTOM_THEME_NAME, Icons = __webpack_require__(224), SvgIcon = __webpack_require__(223), ThemeEditor = __webpack_require__(232), Hoverable = __webpack_require__(225), PreferencesPanel = function(_React$Component) { + function PreferencesPanel(props, context) { + _classCallCheck(this, PreferencesPanel); + var _this = _possibleConstructorReturn(this, (PreferencesPanel.__proto__ || Object.getPrototypeOf(PreferencesPanel)).call(this, props, context)); + return _this._changeTheme = function(event) { + var changeTheme = _this.props.changeTheme; + changeTheme(event.target.value); + }, _this._hide = function() { + var hide = _this.props.hide, editMode = _this.state.editMode; + editMode ? _this.setState({ + editMode: !1 + }) : hide(); + }, _this._onEditCustomThemeClick = function() { + _this.setState({ + editMode: !0 + }); + }, _this._onKeyUp = function(_ref) { + var key = _ref.key; + "Escape" === key && _this.props.hide(); + }, _this._setSelectRef = function(ref) { + _this._selectRef = ref; + }, _this.state = { + editMode: !1 + }, _this; + } + return _inherits(PreferencesPanel, _React$Component), _createClass(PreferencesPanel, [ { + key: "componentDidMount", + value: function(prevProps, prevState) { + this.props.open && this._selectRef.focus(); + } + }, { + key: "componentDidUpdate", + value: function(prevProps, prevState) { + this.props.open && !prevProps.open && this._selectRef.focus(); + } + }, { + key: "render", + value: function() { + var _context = this.context, browserName = _context.browserName, showHiddenThemes = _context.showHiddenThemes, theme = _context.theme, themeName = _context.themeName, themes = _context.themes, _props = this.props, hasCustomTheme = _props.hasCustomTheme, hide = _props.hide, open = _props.open, editMode = this.state.editMode; + if (!open) return null; + var content = void 0; + if (editMode) content = React.createElement(ThemeEditor, { + hide: this._hide, + theme: theme + }); else { + var themeNames = Object.keys(themes); + showHiddenThemes || (themeNames = themeNames.filter(function(key) { + return !themes[key].hidden; + })), content = React.createElement("div", { + style: panelStyle(theme), + onClick: blockClick + }, React.createElement("h4", { + style: styles.header + }, "Theme"), React.createElement("div", { + style: styles.selectAndPreviewRow + }, React.createElement("select", { + onChange: this._changeTheme, + onKeyUp: this._onKeyUp, + ref: this._setSelectRef, + value: themeName + }, browserName && React.createElement("option", { + value: "" + }, browserName), hasCustomTheme && React.createElement("option", { + value: CUSTOM_THEME_NAME + }, "Custom"), (browserName || hasCustomTheme) && React.createElement("option", { + disabled: "disabled" + }, "---"), themeNames.map(function(key) { + return React.createElement("option", { + key: key, + value: key + }, themes[key].displayName); + })), React.createElement(EditButton, { + onClick: this._onEditCustomThemeClick, + theme: theme + }, React.createElement(EditIcon, null))), React.createElement("div", { + style: styles.buttonBar + }, React.createElement("button", { + onClick: hide, + style: styles.button + }, "Close"))); + } + return React.createElement("div", { + style: styles.backdrop, + onClick: this._hide + }, content); + } + } ]), PreferencesPanel; + }(React.Component); + PreferencesPanel.contextTypes = { + browserName: React.PropTypes.string.isRequired, + showHiddenThemes: React.PropTypes.bool.isRequired, + theme: React.PropTypes.object.isRequired, + themeName: React.PropTypes.string.isRequired, + themes: React.PropTypes.object.isRequired + }, PreferencesPanel.propTypes = { + changeTheme: React.PropTypes.func, + hide: React.PropTypes.func, + open: React.PropTypes.bool + }; + var EditButton = Hoverable(function(_ref2) { + var isHovered = _ref2.isHovered, onClick = _ref2.onClick, onMouseEnter = _ref2.onMouseEnter, onMouseLeave = _ref2.onMouseLeave, theme = _ref2.theme; + return React.createElement("button", { + onClick: onClick, + onMouseEnter: onMouseEnter, + onMouseLeave: onMouseLeave, + style: buttonStyle(isHovered, theme) + }, React.createElement(EditIcon, null)); + }), EditIcon = function() { + return React.createElement(SvgIcon, { + path: Icons.EDIT + }); + }, blockClick = function(event) { + return event.stopPropagation(); + }, WrappedPreferencesPanel = decorate({ + listeners: function() { + return [ "preferencesPanelShown" ]; + }, + props: function(store, _props2) { + return { + changeTheme: function(themeName) { + return store.changeTheme(themeName); + }, + hasCustomTheme: !!store.themeStore.customTheme, + hide: function() { + return store.hidePreferencesPanel(); + }, + open: store.preferencesPanelShown + }; + } + }, PreferencesPanel), panelStyle = function(theme) { + return { + maxWidth: "100%", + margin: "0.5rem", + padding: "0.5rem", + borderRadius: "0.25rem", + display: "flex", + flexDirection: "column", + alignItems: "flex-start", + zIndex: 1, + fontFamily: sansSerif.family, + backgroundColor: theme.base01, + border: "1px solid " + theme.base03, + color: theme.base05 + }; + }, buttonStyle = function(isHovered, theme) { + return { + padding: "0.25rem", + marginLeft: "0.25rem", + height: "1.5rem", + background: "none", + border: "none", + color: isHovered ? theme.state06 : "inherit" + }; + }, styles = { + backdrop: { + position: "fixed", + zIndex: 1, + width: "100%", + height: "100%", + top: 0, + left: 0, + display: "flex", + justifyContent: "center", + alignItems: "center", + backgroundColor: "rgba(0,0,0,0)" + }, + header: { + margin: "0 0 0.25rem" + }, + buttonBar: { + flexDirection: "row" + }, + button: { + marginTop: "0.5rem", + marginRight: "0.25rem", + padding: "0.25rem" + }, + selectAndPreviewRow: { + display: "flex", + direction: "row", + alignItems: "center" + } + }; + module.exports = WrappedPreferencesPanel; +}, function(module, exports) { + "use strict"; + var CUSTOM_THEME_NAME = "Custom"; + module.exports = { + CUSTOM_THEME_NAME: CUSTOM_THEME_NAME + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _require = __webpack_require__(233), copy = _require.copy, decorate = __webpack_require__(39), React = __webpack_require__(7), ColorInput = __webpack_require__(235), ColorGroups = __webpack_require__(472), Hoverable = __webpack_require__(225), Icons = __webpack_require__(224), Input = __webpack_require__(42), _require2 = __webpack_require__(36), monospace = _require2.monospace, sansSerif = _require2.sansSerif, Preview = __webpack_require__(473), SvgIcon = __webpack_require__(223), Themes = __webpack_require__(474), TimerSafe = __webpack_require__(475), _require3 = __webpack_require__(476), deserialize = _require3.deserialize, serialize = _require3.serialize, _require4 = __webpack_require__(231), CUSTOM_THEME_NAME = _require4.CUSTOM_THEME_NAME, THEME_SITE_URL = "http://facebook.github.io/react-devtools/?theme=", safeTheme = Themes.ChromeDefault, colors = Object.assign({}, ColorGroups.Base, ColorGroups.Selection, ColorGroups.Syntax), Editor = function(_React$Component) { + function Editor(props, context) { + _classCallCheck(this, Editor); + var _this = _possibleConstructorReturn(this, (Editor.__proto__ || Object.getPrototypeOf(Editor)).call(this, props, context)); + return _this._copyTheme = function() { + var serializedTheme = encodeURI(serialize(_this._customTheme)); + copy(THEME_SITE_URL + serializedTheme), _this.setState({ + showCopyConfirmation: !0 + }, function() { + _this.props.setTimeout(function() { + return _this.setState({ + showCopyConfirmation: !1 + }); + }, 2500); + }); + }, _this._onShareChange = function(event) { + _this._customTheme = deserialize(event.target.value, _this.props.theme), _this._sanitizeCustomTheme(), + _this._udpatePreview(); + }, _this._udpatePreview = function() { + _this.setState(function(state) { + return { + isResetEnabled: _this._serializedPropsTheme !== serialize(_this._customTheme), + updateCounter: state.updateCounter + 1 + }; + }); + }, _this._reset = function() { + _this._customTheme = Object.assign({}, _this.props.theme), _this._udpatePreview(); + }, _this._save = function() { + var _this$props = _this.props, changeTheme = _this$props.changeTheme, hide = _this$props.hide, saveTheme = _this$props.saveTheme; + saveTheme(_this._customTheme), changeTheme(CUSTOM_THEME_NAME), hide(); + }, _this.state = { + isResetEnabled: !1, + showCopyConfirmation: !1, + updateCounter: 0 + }, _this._serializedPropsTheme = serialize(props.theme), _this._reset(), _this._sanitizeCustomTheme(), + _this; + } + return _inherits(Editor, _React$Component), _createClass(Editor, [ { + key: "getChildContext", + value: function() { + return { + theme: this._customTheme + }; + } + }, { + key: "render", + value: function() { + var _this2 = this, hide = this.props.hide, _state = this.state, isResetEnabled = _state.isResetEnabled, showCopyConfirmation = _state.showCopyConfirmation, updateCounter = _state.updateCounter; + return React.createElement("div", { + onClick: function(event) { + return event.stopPropagation(); + }, + style: editorStyle(safeTheme) + }, React.createElement("h3", { + style: styles.header + }, "Custom Theme"), React.createElement("div", { + style: styles.middleRow + }, React.createElement("div", { + style: groupStyle(safeTheme) + }, Object.keys(colors).map(function(key) { + return React.createElement(ColorInput, { + descriptions: colors[key], + customTheme: _this2._customTheme, + key: key, + label: colors[key], + propertyName: key, + udpatePreview: _this2._udpatePreview, + theme: safeTheme + }); + })), React.createElement("div", { + style: previewWrapperStyle(this._customTheme) + }, React.createElement(Preview, { + key: updateCounter, + theme: this._customTheme + }))), React.createElement("div", { + style: styles.bottomRow + }, React.createElement("div", { + style: styles.buttons + }, React.createElement("button", { + onClick: hide + }, "Cancel"), " ", React.createElement("button", { + disabled: !isResetEnabled, + onClick: this._reset + }, "Reset"), " ", React.createElement("button", { + onClick: this._save + }, "Save")), React.createElement("div", { + style: styles.importExportRow + }, React.createElement(CopyThemeButton, { + onClick: this._copyTheme, + showCopyConfirmation: showCopyConfirmation, + title: "Copy theme to clipboard", + theme: safeTheme + }), React.createElement(SvgIcon, { + path: Icons.SHARE + }), React.createElement("label", { + style: styles.shareLabel + }, "Import/export:"), React.createElement(Input, { + onChange: this._onShareChange, + style: shareInput(safeTheme), + theme: safeTheme, + type: "text", + value: serialize(this._customTheme) + })))); + } + }, { + key: "_sanitizeCustomTheme", + value: function() { + this._customTheme.displayName = CUSTOM_THEME_NAME, delete this._customTheme.hidden; + } + } ]), Editor; + }(React.Component); + Editor.childContextTypes = { + theme: React.PropTypes.object + }; + var WrappedEditor = decorate({ + listeners: function() { + return []; + }, + props: function(store, _props) { + return { + changeTheme: function(themeName) { + return store.changeTheme(themeName); + }, + defaultThemeName: store.themeStore.defaultThemeName, + saveTheme: function(theme) { + return store.saveCustomTheme(theme); + } + }; + } + }, TimerSafe(Editor)), CopyThemeButton = Hoverable(function(_ref) { + var isHovered = _ref.isHovered, isPressed = _ref.isPressed, onClick = _ref.onClick, onMouseDown = _ref.onMouseDown, onMouseEnter = _ref.onMouseEnter, onMouseLeave = _ref.onMouseLeave, onMouseUp = _ref.onMouseUp, showCopyConfirmation = _ref.showCopyConfirmation, theme = _ref.theme; + return React.createElement("button", { + onClick: onClick, + onMouseDown: onMouseDown, + onMouseEnter: onMouseEnter, + onMouseLeave: onMouseLeave, + onMouseUp: onMouseUp, + style: copyThemeButtonStyle(isHovered, isPressed, theme), + title: "Copy theme to clipboard" + }, React.createElement(SvgIcon, { + path: showCopyConfirmation ? Icons.CHECK : Icons.COPY + }), React.createElement("label", { + style: styles.copyLabel + }, showCopyConfirmation ? "Copied" : "Copy")); + }), editorStyle = function(theme) { + return { + display: "flex", + flexDirection: "column", + maxWidth: "calc(100vw - 2rem)", + maxHeight: "calc(100vh - 2rem)", + boxSizing: "border-box", + zIndex: 1, + padding: "0.5rem", + borderRadius: "0.25rem", + backgroundColor: theme.base01, + color: theme.base05, + border: "1px solid " + theme.base03, + fontFamily: sansSerif.family, + fontSize: sansSerif.sizes.normal + }; + }, groupStyle = function(theme) { + return { + display: "flex", + flexDirection: "row", + flexWrap: "wrap", + overflowY: "auto", + borderRadius: "0.25rem" + }; + }, previewWrapperStyle = function(theme) { + return { + display: "inline-flex", + flex: "1 0 auto", + marginLeft: "0.5rem", + alignItems: "stretch", + borderRadius: "0.25rem", + border: "1px solid " + theme.base03 + }; + }, shareInput = function(theme) { + return { + flex: "0 1 15rem", + padding: "0.25rem", + border: "1px solid " + theme.base03, + borderRadius: "0.25rem", + fontFamily: monospace.family, + fontSize: monospace.sizes.normal, + color: "inherit" + }; + }, copyThemeButtonStyle = function(isHovered, isPressed, theme) { + return { + flex: "0 0 auto", + display: "flex", + alignItems: "center", + padding: "0.25rem", + margin: "0 0.25rem", + height: "1.5rem", + background: isPressed ? theme.state01 : "none", + border: "none", + color: isHovered ? theme.state06 : "inherit" + }; + }, styles = { + header: { + flex: "0 0 auto", + marginTop: 0, + marginBottom: "0.5rem" + }, + bottomRow: { + flex: "0 0 auto", + display: "flex", + flexDirection: "row", + alignItems: "center", + marginTop: "0.5rem" + }, + buttons: { + flex: "1 0 auto", + marginTop: "0.5rem" + }, + copyLabel: { + flex: "0 0 auto", + marginLeft: "0.25rem" + }, + middleRow: { + display: "flex", + flexDirection: "row", + flex: "0 1 auto", + overflowY: "auto" + }, + column: { + display: "flex", + flexDirection: "column" + }, + importExportRow: { + display: "flex", + flexDirection: "row", + alignItems: "center", + flex: "0 0 auto", + marginTop: "0.5rem" + }, + shareLabel: { + flex: "0 0 auto", + margin: "0 0.25rem" + } + }; + module.exports = WrappedEditor; +}, function(module, exports, __webpack_require__) { + (function(setImmediate) { + !function(name, definition) { + module.exports = definition(); + }("clipboard", function() { + if ("undefined" == typeof document || !document.addEventListener) return null; + var clipboard = {}; + /*! promise-polyfill 2.0.1 */ + return clipboard.copy = function() { + function cleanup() { + _intercept = !1, _data = null, _bogusSelection && window.getSelection().removeAllRanges(), + _bogusSelection = !1; + } + function bogusSelect() { + var sel = document.getSelection(); + if (!document.queryCommandEnabled("copy") && sel.isCollapsed) { + var range = document.createRange(); + range.selectNodeContents(document.body), sel.removeAllRanges(), sel.addRange(range), + _bogusSelection = !0; + } + } + var _intercept = !1, _data = null, _bogusSelection = !1; + return document.addEventListener("copy", function(e) { + if (_intercept) { + for (var key in _data) e.clipboardData.setData(key, _data[key]); + e.preventDefault(); + } + }), function(data) { + return new Promise(function(resolve, reject) { + function triggerCopy(tryBogusSelect) { + try { + if (document.execCommand("copy")) cleanup(), resolve(); else { + if (tryBogusSelect) throw new Error("Unable to copy. Perhaps it's not available in your browser?"); + bogusSelect(), triggerCopy(!0); + } + } catch (e) { + cleanup(), reject(e); + } + } + _intercept = !0, _data = "string" == typeof data ? { + "text/plain": data + } : data instanceof Node ? { + "text/html": new XMLSerializer().serializeToString(data) + } : data, triggerCopy(!1); + }); + }; + }(), clipboard.paste = function() { + var _resolve, _dataType, _intercept = !1; + return document.addEventListener("paste", function(e) { + if (_intercept) { + _intercept = !1, e.preventDefault(); + var resolve = _resolve; + _resolve = null, resolve(e.clipboardData.getData(_dataType)); + } + }), function(dataType) { + return new Promise(function(resolve, reject) { + _intercept = !0, _resolve = resolve, _dataType = dataType || "text/plain"; + try { + document.execCommand("paste") || (_intercept = !1, reject(new Error("Unable to paste. Pasting only works in Internet Explorer at the moment."))); + } catch (e) { + _intercept = !1, reject(new Error(e)); + } + }); + }; + }(), "undefined" == typeof ClipboardEvent && "undefined" != typeof window.clipboardData && "undefined" != typeof window.clipboardData.setData && (!function(a) { + function b(a, b) { + return function() { + a.apply(b, arguments); + }; + } + function c(a) { + if ("object" != typeof this) throw new TypeError("Promises must be constructed via new"); + if ("function" != typeof a) throw new TypeError("not a function"); + this._state = null, this._value = null, this._deferreds = [], i(a, b(e, this), b(f, this)); + } + function d(a) { + var b = this; + return null === this._state ? void this._deferreds.push(a) : void j(function() { + var c = b._state ? a.onFulfilled : a.onRejected; + if (null === c) return void (b._state ? a.resolve : a.reject)(b._value); + var d; + try { + d = c(b._value); + } catch (e) { + return void a.reject(e); + } + a.resolve(d); + }); + } + function e(a) { + try { + if (a === this) throw new TypeError("A promise cannot be resolved with itself."); + if (a && ("object" == typeof a || "function" == typeof a)) { + var c = a.then; + if ("function" == typeof c) return void i(b(c, a), b(e, this), b(f, this)); + } + this._state = !0, this._value = a, g.call(this); + } catch (d) { + f.call(this, d); + } + } + function f(a) { + this._state = !1, this._value = a, g.call(this); + } + function g() { + for (var a = 0, b = this._deferreds.length; b > a; a++) d.call(this, this._deferreds[a]); + this._deferreds = null; + } + function h(a, b, c, d) { + this.onFulfilled = "function" == typeof a ? a : null, this.onRejected = "function" == typeof b ? b : null, + this.resolve = c, this.reject = d; + } + function i(a, b, c) { + var d = !1; + try { + a(function(a) { + d || (d = !0, b(a)); + }, function(a) { + d || (d = !0, c(a)); + }); + } catch (e) { + if (d) return; + d = !0, c(e); + } + } + var j = c.immediateFn || "function" == typeof setImmediate && setImmediate || function(a) { + setTimeout(a, 1); + }, k = Array.isArray || function(a) { + return "[object Array]" === Object.prototype.toString.call(a); + }; + c.prototype["catch"] = function(a) { + return this.then(null, a); + }, c.prototype.then = function(a, b) { + var e = this; + return new c(function(c, f) { + d.call(e, new h(a, b, c, f)); + }); + }, c.all = function() { + var a = Array.prototype.slice.call(1 === arguments.length && k(arguments[0]) ? arguments[0] : arguments); + return new c(function(b, c) { + function d(f, g) { + try { + if (g && ("object" == typeof g || "function" == typeof g)) { + var h = g.then; + if ("function" == typeof h) return void h.call(g, function(a) { + d(f, a); + }, c); + } + a[f] = g, 0 === --e && b(a); + } catch (i) { + c(i); + } + } + if (0 === a.length) return b([]); + for (var e = a.length, f = 0; f < a.length; f++) d(f, a[f]); + }); + }, c.resolve = function(a) { + return a && "object" == typeof a && a.constructor === c ? a : new c(function(b) { + b(a); + }); + }, c.reject = function(a) { + return new c(function(b, c) { + c(a); + }); + }, c.race = function(a) { + return new c(function(b, c) { + for (var d = 0, e = a.length; e > d; d++) a[d].then(b, c); + }); + }, "undefined" != typeof module && module.exports ? module.exports = c : a.Promise || (a.Promise = c); + }(this), clipboard.copy = function(data) { + return new Promise(function(resolve, reject) { + if ("string" != typeof data && !("text/plain" in data)) throw new Error("You must provide a text/plain type."); + var strData = "string" == typeof data ? data : data["text/plain"], copySucceeded = window.clipboardData.setData("Text", strData); + copySucceeded ? resolve() : reject(new Error("Copying was rejected.")); + }); + }, clipboard.paste = function() { + return new Promise(function(resolve, reject) { + var strData = window.clipboardData.getData("Text"); + strData ? resolve(strData) : reject(new Error("Pasting was rejected.")); + }); + }), clipboard; + }); + }).call(exports, __webpack_require__(234).setImmediate); +}, function(module, exports, __webpack_require__) { + (function(setImmediate, clearImmediate) { + function Timeout(id, clearFn) { + this._id = id, this._clearFn = clearFn; + } + var nextTick = __webpack_require__(130).nextTick, apply = Function.prototype.apply, slice = Array.prototype.slice, immediateIds = {}, nextImmediateId = 0; + exports.setTimeout = function() { + return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout); + }, exports.setInterval = function() { + return new Timeout(apply.call(setInterval, window, arguments), clearInterval); + }, exports.clearTimeout = exports.clearInterval = function(timeout) { + timeout.close(); + }, Timeout.prototype.unref = Timeout.prototype.ref = function() {}, Timeout.prototype.close = function() { + this._clearFn.call(window, this._id); + }, exports.enroll = function(item, msecs) { + clearTimeout(item._idleTimeoutId), item._idleTimeout = msecs; + }, exports.unenroll = function(item) { + clearTimeout(item._idleTimeoutId), item._idleTimeout = -1; + }, exports._unrefActive = exports.active = function(item) { + clearTimeout(item._idleTimeoutId); + var msecs = item._idleTimeout; + msecs >= 0 && (item._idleTimeoutId = setTimeout(function() { + item._onTimeout && item._onTimeout(); + }, msecs)); + }, exports.setImmediate = "function" == typeof setImmediate ? setImmediate : function(fn) { + var id = nextImmediateId++, args = !(arguments.length < 2) && slice.call(arguments, 1); + return immediateIds[id] = !0, nextTick(function() { + immediateIds[id] && (args ? fn.apply(null, args) : fn.call(null), exports.clearImmediate(id)); + }), id; + }, exports.clearImmediate = "function" == typeof clearImmediate ? clearImmediate : function(id) { + delete immediateIds[id]; + }; + }).call(exports, __webpack_require__(234).setImmediate, __webpack_require__(234).clearImmediate); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), Portal = __webpack_require__(236), nullthrows = __webpack_require__(3)["default"], ColorPicker = __webpack_require__(242), Input = __webpack_require__(42), _require = __webpack_require__(36), monospace = _require.monospace, _require2 = __webpack_require__(214), getBrightness = _require2.getBrightness, isBright = _require2.isBright, ColorInput = function(_React$Component) { + function ColorInput(props, context) { + _classCallCheck(this, ColorInput); + var _this = _possibleConstructorReturn(this, (ColorInput.__proto__ || Object.getPrototypeOf(ColorInput)).call(this, props, context)); + _initialiseProps.call(_this); + var customTheme = props.customTheme, propertyName = props.propertyName; + return _this.state = { + color: customTheme[propertyName], + isColorPickerOpen: !1, + maxHeight: null, + targetPosition: { + left: 0, + top: 0 + } + }, _this; + } + return _inherits(ColorInput, _React$Component), _createClass(ColorInput, [ { + key: "componentWillReceiveProps", + value: function(nextProps) { + var customTheme = nextProps.customTheme, propertyName = nextProps.propertyName; + this.setState({ + color: customTheme[propertyName] + }); + } + }, { + key: "render", + value: function() { + var _props = this.props, label = _props.label, theme = _props.theme, _state = this.state, color = _state.color, isColorPickerOpen = _state.isColorPickerOpen, maxHeight = _state.maxHeight, targetPosition = _state.targetPosition, backgroundIsBright = isBright(theme.base00), chipIsBright = isBright(color), showColorChipBorder = backgroundIsBright === chipIsBright && getBrightness(color) > getBrightness(theme.base03); + return React.createElement("div", { + ref: this._setContainerRef, + style: containerStyle(maxHeight) + }, React.createElement("label", { + style: styles.label + }, label), React.createElement("div", { + style: inputContainerStyle(theme) + }, React.createElement("div", { + onClick: this._onClick, + ref: this._setColorChipRef, + style: colorChipStyle(theme, color, showColorChipBorder) + }), React.createElement(Input, { + onChange: this._onChange, + style: styles.input, + theme: theme, + type: "text", + value: color || "" + })), React.createElement(Portal, { + closeOnEsc: !0, + closeOnOutsideClick: !0, + isOpened: isColorPickerOpen, + onClose: this._onClose + }, React.createElement("div", { + style: colorPickerPosition(targetPosition) + }, React.createElement(ColorPicker, { + color: color, + theme: theme, + updateColor: this._updateColor + })))); + } + } ]), ColorInput; + }(React.Component), _initialiseProps = function() { + var _this2 = this; + this._onChange = function(_ref) { + var target = _ref.target; + _this2._updateColor(target.value); + }, this._onClick = function(event) { + var container = nullthrows(_this2._containerRef), targetPosition = nullthrows(_this2._colorChipRef).getBoundingClientRect(); + _this2.setState({ + isColorPickerOpen: !0, + maxHeight: container.offsetHeight, + targetPosition: targetPosition + }); + }, this._onClose = function() { + _this2.setState({ + isColorPickerOpen: !1 + }); + }, this._setColorChipRef = function(ref) { + _this2._colorChipRef = ref; + }, this._setContainerRef = function(ref) { + _this2._containerRef = ref; + }, this._updateColor = function(color) { + var _props2 = _this2.props, customTheme = _props2.customTheme, propertyName = _props2.propertyName, udpatePreview = _props2.udpatePreview; + customTheme[propertyName] = color, _this2.setState({ + color: color + }), udpatePreview(); + }; + }, colorPickerPosition = function(position) { + return { + position: "absolute", + left: position.left + "px", + top: position.top + "px" + }; + }, containerStyle = function(maxHeight) { + return { + margin: "0.25rem", + minWidth: "7.5rem", + maxHeight: maxHeight + }; + }, colorChipStyle = function(theme) { + var color = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "", showBorder = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return { + height: "1.25rem", + width: "1.25rem", + borderRadius: "2px", + backgroundColor: color, + boxSizing: "border-box", + border: showBorder ? "1px solid " + theme.base03 : "none" + }; + }, inputContainerStyle = function(theme) { + return { + display: "flex", + flexDirection: "row", + alignItems: "center", + padding: "0.125rem", + flex: "0 0 1.25rem", + backgroundColor: theme.base00, + color: theme.base05, + border: "1px solid " + theme.base03, + borderRadius: "0.25rem" + }; + }, styles = { + input: { + width: "5rem", + flex: "1 0 auto", + textTransform: "lowercase", + boxSizing: "border-box", + background: "transparent", + border: "none", + marginLeft: "0.25rem", + outline: "none", + color: "inherit", + fontFamily: monospace.family, + fontSize: monospace.sizes.large + }, + label: { + marginBottom: "0.25rem", + display: "inline-block" + }, + small: { + fontWeight: "normal" + } + }; + module.exports = ColorInput; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactDom = __webpack_require__(45), _reactDom2 = _interopRequireDefault(_reactDom), _propTypes = __webpack_require__(237), _propTypes2 = _interopRequireDefault(_propTypes), KEYCODES = { + ESCAPE: 27 + }, Portal = function(_React$Component) { + function Portal() { + _classCallCheck(this, Portal); + var _this = _possibleConstructorReturn(this, (Portal.__proto__ || Object.getPrototypeOf(Portal)).call(this)); + return _this.state = { + active: !1 + }, _this.handleWrapperClick = _this.handleWrapperClick.bind(_this), _this.closePortal = _this.closePortal.bind(_this), + _this.handleOutsideMouseClick = _this.handleOutsideMouseClick.bind(_this), _this.handleKeydown = _this.handleKeydown.bind(_this), + _this.portal = null, _this.node = null, _this; + } + return _inherits(Portal, _React$Component), _createClass(Portal, [ { + key: "componentDidMount", + value: function() { + this.props.closeOnEsc && document.addEventListener("keydown", this.handleKeydown), + this.props.closeOnOutsideClick && (document.addEventListener("mouseup", this.handleOutsideMouseClick), + document.addEventListener("touchstart", this.handleOutsideMouseClick)), this.props.isOpened && this.openPortal(); + } + }, { + key: "componentWillReceiveProps", + value: function(newProps) { + "undefined" != typeof newProps.isOpened && (newProps.isOpened && (this.state.active ? this.renderPortal(newProps) : this.openPortal(newProps)), + !newProps.isOpened && this.state.active && this.closePortal()), "undefined" == typeof newProps.isOpened && this.state.active && this.renderPortal(newProps); + } + }, { + key: "componentWillUnmount", + value: function() { + this.props.closeOnEsc && document.removeEventListener("keydown", this.handleKeydown), + this.props.closeOnOutsideClick && (document.removeEventListener("mouseup", this.handleOutsideMouseClick), + document.removeEventListener("touchstart", this.handleOutsideMouseClick)), this.closePortal(!0); + } + }, { + key: "handleWrapperClick", + value: function(e) { + e.preventDefault(), e.stopPropagation(), this.state.active || this.openPortal(); + } + }, { + key: "openPortal", + value: function() { + var props = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.props; + this.setState({ + active: !0 + }), this.renderPortal(props), this.props.onOpen(this.node); + } + }, { + key: "closePortal", + value: function() { + var _this2 = this, isUnmounted = arguments.length > 0 && void 0 !== arguments[0] && arguments[0], resetPortalState = function() { + _this2.node && (_reactDom2["default"].unmountComponentAtNode(_this2.node), document.body.removeChild(_this2.node)), + _this2.portal = null, _this2.node = null, isUnmounted !== !0 && _this2.setState({ + active: !1 + }); + }; + this.state.active && (this.props.beforeClose ? this.props.beforeClose(this.node, resetPortalState) : resetPortalState(), + this.props.onClose()); + } + }, { + key: "handleOutsideMouseClick", + value: function(e) { + if (this.state.active) { + var root = (0, _reactDom.findDOMNode)(this.portal); + root.contains(e.target) || e.button && 0 !== e.button || (e.stopPropagation(), this.closePortal()); + } + } + }, { + key: "handleKeydown", + value: function(e) { + e.keyCode === KEYCODES.ESCAPE && this.state.active && this.closePortal(); + } + }, { + key: "renderPortal", + value: function(props) { + this.node || (this.node = document.createElement("div"), document.body.appendChild(this.node)); + var children = props.children; + "function" == typeof props.children.type && (children = _react2["default"].cloneElement(props.children, { + closePortal: this.closePortal + })), this.portal = _reactDom2["default"].unstable_renderSubtreeIntoContainer(this, children, this.node, this.props.onUpdate); + } + }, { + key: "render", + value: function() { + return this.props.openByClickOn ? _react2["default"].cloneElement(this.props.openByClickOn, { + onClick: this.handleWrapperClick + }) : null; + } + } ]), Portal; + }(_react2["default"].Component); + exports["default"] = Portal, Portal.propTypes = { + children: _propTypes2["default"].element.isRequired, + openByClickOn: _propTypes2["default"].element, + closeOnEsc: _propTypes2["default"].bool, + closeOnOutsideClick: _propTypes2["default"].bool, + isOpened: _propTypes2["default"].bool, + onOpen: _propTypes2["default"].func, + onClose: _propTypes2["default"].func, + beforeClose: _propTypes2["default"].func, + onUpdate: _propTypes2["default"].func + }, Portal.defaultProps = { + onOpen: function() {}, + onClose: function() {}, + onUpdate: function() {} + }, module.exports = exports["default"]; +}, function(module, exports, __webpack_require__) { + module.exports = __webpack_require__(238)(); +}, function(module, exports, __webpack_require__) { + "use strict"; + var emptyFunction = __webpack_require__(239), invariant = __webpack_require__(240), ReactPropTypesSecret = __webpack_require__(241); + module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + secret !== ReactPropTypesSecret && invariant(!1, "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"); + } + function getShim() { + return shim; + } + shim.isRequired = shim; + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + any: shim, + arrayOf: getShim, + element: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim + }; + return ReactPropTypes.checkPropTypes = emptyFunction, ReactPropTypes.PropTypes = ReactPropTypes, + ReactPropTypes; + }; +}, function(module, exports) { + "use strict"; + function makeEmptyFunction(arg) { + return function() { + return arg; + }; + } + var emptyFunction = function() {}; + emptyFunction.thatReturns = makeEmptyFunction, emptyFunction.thatReturnsFalse = makeEmptyFunction(!1), + emptyFunction.thatReturnsTrue = makeEmptyFunction(!0), emptyFunction.thatReturnsNull = makeEmptyFunction(null), + emptyFunction.thatReturnsThis = function() { + return this; + }, emptyFunction.thatReturnsArgument = function(arg) { + return arg; + }, module.exports = emptyFunction; +}, function(module, exports, __webpack_require__) { + "use strict"; + function invariant(condition, format, a, b, c, d, e, f) { + if (validateFormat(format), !condition) { + var error; + if (void 0 === format) error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else { + var args = [ a, b, c, d, e, f ], argIndex = 0; + error = new Error(format.replace(/%s/g, function() { + return args[argIndex++]; + })), error.name = "Invariant Violation"; + } + throw error.framesToPop = 1, error; + } + } + var validateFormat = function(format) {}; + module.exports = invariant; +}, function(module, exports) { + "use strict"; + var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; + module.exports = ReactPropTypesSecret; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), _require = __webpack_require__(243), CustomPicker = _require.CustomPicker, _require2 = __webpack_require__(411), Hue = _require2.Hue, Saturation = _require2.Saturation, ColorPicker = function(_React$Component) { + function ColorPicker() { + var _ref, _temp, _this, _ret; + _classCallCheck(this, ColorPicker); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; + return _temp = _this = _possibleConstructorReturn(this, (_ref = ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call.apply(_ref, [ this ].concat(args))), + _this._onChangeComplete = function(color) { + _this.props.updateColor(color.hex); + }, _this._setRef = function(ref) { + _this._ref = ref; + }, _ret = _temp, _possibleConstructorReturn(_this, _ret); + } + return _inherits(ColorPicker, _React$Component), _createClass(ColorPicker, [ { + key: "render", + value: function() { + var _props = this.props, color = _props.color, theme = _props.theme; + return React.createElement(DecoratedCustomColorPicker, { + color: color, + disableAlpha: !0, + onChangeComplete: this._onChangeComplete, + ref: this._setRef, + theme: theme + }); + } + } ]), ColorPicker; + }(React.Component), CustomColorPicker = function(_React$Component2) { + function CustomColorPicker() { + return _classCallCheck(this, CustomColorPicker), _possibleConstructorReturn(this, (CustomColorPicker.__proto__ || Object.getPrototypeOf(CustomColorPicker)).apply(this, arguments)); + } + return _inherits(CustomColorPicker, _React$Component2), _createClass(CustomColorPicker, [ { + key: "render", + value: function() { + return React.createElement("div", { + style: customColorPicker(this.props.theme) + }, React.createElement("div", { + style: styles.saturation + }, React.createElement(Saturation, _extends({}, this.props, { + onChange: this.props.onChange, + pointer: CustomPointer + }))), React.createElement("div", { + style: styles.hue + }, React.createElement(Hue, _extends({}, this.props, { + direction: "vertical", + onChange: this.props.onChange, + pointer: CustomPointer + })))); + } + } ]), CustomColorPicker; + }(React.Component), CustomPointer = function() { + return React.createElement("div", { + style: styles.pointer + }); + }, DecoratedCustomColorPicker = CustomPicker(CustomColorPicker), customColorPicker = function(theme) { + return { + display: "flex", + flexDirection: "row", + padding: "0.125rem", + borderRadius: "0.25rem", + position: "relative", + zIndex: 1, + background: theme.base00, + border: "1px solid " + theme.base03 + }; + }, styles = { + saturation: { + flex: "0 0 auto", + position: "relative", + width: "6rem", + height: "6rem" + }, + hue: { + flex: "1 0 auto", + position: "relative", + width: "0.75rem", + height: "6rem", + marginLeft: "0.125rem" + }, + pointer: { + width: "0.25rem", + height: "0.25rem", + borderRadius: "50%", + transform: "translate(-0.125rem, -0.125rem)", + boxShadow: "rgb(255, 255, 255) 0px 0px 0px 1.5px, rgba(0, 0, 0, 0.3) 0px 0px 1px 1px inset, rgba(0, 0, 0, 0.4) 0px 0px 1px 2px" + } + }; + module.exports = ColorPicker; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.CustomPicker = exports.TwitterPicker = exports.SwatchesPicker = exports.SliderPicker = exports.SketchPicker = exports.PhotoshopPicker = exports.MaterialPicker = exports.HuePicker = exports.GithubPicker = exports.CompactPicker = exports.ChromePicker = exports["default"] = exports.CirclePicker = exports.BlockPicker = exports.AlphaPicker = void 0; + var _Alpha = __webpack_require__(244); + Object.defineProperty(exports, "AlphaPicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Alpha)["default"]; + } + }); + var _Block = __webpack_require__(432); + Object.defineProperty(exports, "BlockPicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Block)["default"]; + } + }); + var _Circle = __webpack_require__(434); + Object.defineProperty(exports, "CirclePicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Circle)["default"]; + } + }); + var _Chrome = __webpack_require__(437); + Object.defineProperty(exports, "ChromePicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Chrome)["default"]; + } + }); + var _Compact = __webpack_require__(441); + Object.defineProperty(exports, "CompactPicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Compact)["default"]; + } + }); + var _Github = __webpack_require__(450); + Object.defineProperty(exports, "GithubPicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Github)["default"]; + } + }); + var _Hue = __webpack_require__(452); + Object.defineProperty(exports, "HuePicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Hue)["default"]; + } + }); + var _Material = __webpack_require__(454); + Object.defineProperty(exports, "MaterialPicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Material)["default"]; + } + }); + var _Photoshop = __webpack_require__(455); + Object.defineProperty(exports, "PhotoshopPicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Photoshop)["default"]; + } + }); + var _Sketch = __webpack_require__(461); + Object.defineProperty(exports, "SketchPicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Sketch)["default"]; + } + }); + var _Slider = __webpack_require__(464); + Object.defineProperty(exports, "SliderPicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Slider)["default"]; + } + }); + var _Swatches = __webpack_require__(468); + Object.defineProperty(exports, "SwatchesPicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Swatches)["default"]; + } + }); + var _Twitter = __webpack_require__(471); + Object.defineProperty(exports, "TwitterPicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Twitter)["default"]; + } + }); + var _ColorWrap = __webpack_require__(425); + Object.defineProperty(exports, "CustomPicker", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_ColorWrap)["default"]; + } + }); + var _Chrome2 = _interopRequireDefault(_Chrome); + exports["default"] = _Chrome2["default"]; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.AlphaPicker = void 0; + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(411), _AlphaPointer = __webpack_require__(431), _AlphaPointer2 = _interopRequireDefault(_AlphaPointer), AlphaPicker = exports.AlphaPicker = function(_ref) { + var rgb = _ref.rgb, hsl = _ref.hsl, width = _ref.width, height = _ref.height, onChange = _ref.onChange, direction = _ref.direction, style = _ref.style, renderers = _ref.renderers, pointer = _ref.pointer, styles = (0, + _reactcss2["default"])({ + "default": { + picker: { + position: "relative", + width: width, + height: height + }, + alpha: { + radius: "2px", + style: style + } + } + }); + return _react2["default"].createElement("div", { + style: styles.picker, + className: "alpha-picker" + }, _react2["default"].createElement(_common.Alpha, _extends({}, styles.alpha, { + rgb: rgb, + hsl: hsl, + pointer: pointer, + renderers: renderers, + onChange: onChange, + direction: direction + }))); + }; + AlphaPicker.defaultProps = { + width: "316px", + height: "16px", + direction: "horizontal", + pointer: _AlphaPointer2["default"] + }, exports["default"] = (0, _common.ColorWrap)(AlphaPicker); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ReactCSS = exports.loop = exports.handleActive = exports.handleHover = exports.hover = void 0; + var _flattenNames = __webpack_require__(246), _flattenNames2 = _interopRequireDefault(_flattenNames), _mergeClasses = __webpack_require__(374), _mergeClasses2 = _interopRequireDefault(_mergeClasses), _autoprefix = __webpack_require__(407), _autoprefix2 = _interopRequireDefault(_autoprefix), _hover2 = __webpack_require__(408), _hover3 = _interopRequireDefault(_hover2), _active = __webpack_require__(409), _active2 = _interopRequireDefault(_active), _loop2 = __webpack_require__(410), _loop3 = _interopRequireDefault(_loop2); + exports.hover = _hover3["default"], exports.handleHover = _hover3["default"], exports.handleActive = _active2["default"], + exports.loop = _loop3["default"]; + var ReactCSS = exports.ReactCSS = function(classes) { + for (var _len = arguments.length, activations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) activations[_key - 1] = arguments[_key]; + var activeNames = (0, _flattenNames2["default"])(activations), merged = (0, _mergeClasses2["default"])(classes, activeNames); + return (0, _autoprefix2["default"])(merged); + }; + exports["default"] = ReactCSS; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.flattenNames = void 0; + var _isString2 = __webpack_require__(247), _isString3 = _interopRequireDefault(_isString2), _forOwn2 = __webpack_require__(256), _forOwn3 = _interopRequireDefault(_forOwn2), _isPlainObject2 = __webpack_require__(283), _isPlainObject3 = _interopRequireDefault(_isPlainObject2), _map2 = __webpack_require__(285), _map3 = _interopRequireDefault(_map2), flattenNames = exports.flattenNames = function flattenNames() { + var things = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], names = []; + return (0, _map3["default"])(things, function(thing) { + Array.isArray(thing) ? flattenNames(thing).map(function(name) { + return names.push(name); + }) : (0, _isPlainObject3["default"])(thing) ? (0, _forOwn3["default"])(thing, function(value, key) { + value === !0 && names.push(key), names.push(key + "-" + value); + }) : (0, _isString3["default"])(thing) && names.push(thing); + }), names; + }; + exports["default"] = flattenNames; +}, function(module, exports, __webpack_require__) { + function isString(value) { + return "string" == typeof value || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag; + } + var baseGetTag = __webpack_require__(248), isArray = __webpack_require__(254), isObjectLike = __webpack_require__(255), stringTag = "[object String]"; + module.exports = isString; +}, function(module, exports, __webpack_require__) { + function baseGetTag(value) { + return null == value ? void 0 === value ? undefinedTag : nullTag : symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + var Symbol = __webpack_require__(249), getRawTag = __webpack_require__(252), objectToString = __webpack_require__(253), nullTag = "[object Null]", undefinedTag = "[object Undefined]", symToStringTag = Symbol ? Symbol.toStringTag : void 0; + module.exports = baseGetTag; +}, function(module, exports, __webpack_require__) { + var root = __webpack_require__(250), Symbol = root.Symbol; + module.exports = Symbol; +}, function(module, exports, __webpack_require__) { + var freeGlobal = __webpack_require__(251), freeSelf = "object" == typeof self && self && self.Object === Object && self, root = freeGlobal || freeSelf || Function("return this")(); + module.exports = root; +}, function(module, exports) { + (function(global) { + var freeGlobal = "object" == typeof global && global && global.Object === Object && global; + module.exports = freeGlobal; + }).call(exports, function() { + return this; + }()); +}, function(module, exports, __webpack_require__) { + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + try { + value[symToStringTag] = void 0; + var unmasked = !0; + } catch (e) {} + var result = nativeObjectToString.call(value); + return unmasked && (isOwn ? value[symToStringTag] = tag : delete value[symToStringTag]), + result; + } + var Symbol = __webpack_require__(249), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, nativeObjectToString = objectProto.toString, symToStringTag = Symbol ? Symbol.toStringTag : void 0; + module.exports = getRawTag; +}, function(module, exports) { + function objectToString(value) { + return nativeObjectToString.call(value); + } + var objectProto = Object.prototype, nativeObjectToString = objectProto.toString; + module.exports = objectToString; +}, function(module, exports) { + var isArray = Array.isArray; + module.exports = isArray; +}, function(module, exports) { + function isObjectLike(value) { + return null != value && "object" == typeof value; + } + module.exports = isObjectLike; +}, function(module, exports, __webpack_require__) { + function forOwn(object, iteratee) { + return object && baseForOwn(object, castFunction(iteratee)); + } + var baseForOwn = __webpack_require__(257), castFunction = __webpack_require__(281); + module.exports = forOwn; +}, function(module, exports, __webpack_require__) { + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + var baseFor = __webpack_require__(258), keys = __webpack_require__(260); + module.exports = baseForOwn; +}, function(module, exports, __webpack_require__) { + var createBaseFor = __webpack_require__(259), baseFor = createBaseFor(); + module.exports = baseFor; +}, function(module, exports) { + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + for (var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; length--; ) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === !1) break; + } + return object; + }; + } + module.exports = createBaseFor; +}, function(module, exports, __webpack_require__) { + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + var arrayLikeKeys = __webpack_require__(261), baseKeys = __webpack_require__(274), isArrayLike = __webpack_require__(278); + module.exports = keys; +}, function(module, exports, __webpack_require__) { + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; + for (var key in value) !inherited && !hasOwnProperty.call(value, key) || skipIndexes && ("length" == key || isBuff && ("offset" == key || "parent" == key) || isType && ("buffer" == key || "byteLength" == key || "byteOffset" == key) || isIndex(key, length)) || result.push(key); + return result; + } + var baseTimes = __webpack_require__(262), isArguments = __webpack_require__(263), isArray = __webpack_require__(254), isBuffer = __webpack_require__(265), isIndex = __webpack_require__(268), isTypedArray = __webpack_require__(269), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty; + module.exports = arrayLikeKeys; +}, function(module, exports) { + function baseTimes(n, iteratee) { + for (var index = -1, result = Array(n); ++index < n; ) result[index] = iteratee(index); + return result; + } + module.exports = baseTimes; +}, function(module, exports, __webpack_require__) { + var baseIsArguments = __webpack_require__(264), isObjectLike = __webpack_require__(255), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, propertyIsEnumerable = objectProto.propertyIsEnumerable, isArguments = baseIsArguments(function() { + return arguments; + }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); + }; + module.exports = isArguments; +}, function(module, exports, __webpack_require__) { + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + var baseGetTag = __webpack_require__(248), isObjectLike = __webpack_require__(255), argsTag = "[object Arguments]"; + module.exports = baseIsArguments; +}, function(module, exports, __webpack_require__) { + (function(module) { + var root = __webpack_require__(250), stubFalse = __webpack_require__(267), freeExports = "object" == typeof exports && exports && !exports.nodeType && exports, freeModule = freeExports && "object" == typeof module && module && !module.nodeType && module, moduleExports = freeModule && freeModule.exports === freeExports, Buffer = moduleExports ? root.Buffer : void 0, nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0, isBuffer = nativeIsBuffer || stubFalse; + module.exports = isBuffer; + }).call(exports, __webpack_require__(266)(module)); +}, function(module, exports) { + module.exports = function(module) { + return module.webpackPolyfill || (module.deprecate = function() {}, module.paths = [], + module.children = [], module.webpackPolyfill = 1), module; + }; +}, function(module, exports) { + function stubFalse() { + return !1; + } + module.exports = stubFalse; +}, function(module, exports) { + function isIndex(value, length) { + return length = null == length ? MAX_SAFE_INTEGER : length, !!length && ("number" == typeof value || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length; + } + var MAX_SAFE_INTEGER = 9007199254740991, reIsUint = /^(?:0|[1-9]\d*)$/; + module.exports = isIndex; +}, function(module, exports, __webpack_require__) { + var baseIsTypedArray = __webpack_require__(270), baseUnary = __webpack_require__(272), nodeUtil = __webpack_require__(273), nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray, isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + module.exports = isTypedArray; +}, function(module, exports, __webpack_require__) { + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + var baseGetTag = __webpack_require__(248), isLength = __webpack_require__(271), isObjectLike = __webpack_require__(255), argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", weakMapTag = "[object WeakMap]", arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]", typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = !0, + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = !1, + module.exports = baseIsTypedArray; +}, function(module, exports) { + function isLength(value) { + return "number" == typeof value && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + var MAX_SAFE_INTEGER = 9007199254740991; + module.exports = isLength; +}, function(module, exports) { + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + module.exports = baseUnary; +}, function(module, exports, __webpack_require__) { + (function(module) { + var freeGlobal = __webpack_require__(251), freeExports = "object" == typeof exports && exports && !exports.nodeType && exports, freeModule = freeExports && "object" == typeof module && module && !module.nodeType && module, moduleExports = freeModule && freeModule.exports === freeExports, freeProcess = moduleExports && freeGlobal.process, nodeUtil = function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding("util"); + } catch (e) {} + }(); + module.exports = nodeUtil; + }).call(exports, __webpack_require__(266)(module)); +}, function(module, exports, __webpack_require__) { + function baseKeys(object) { + if (!isPrototype(object)) return nativeKeys(object); + var result = []; + for (var key in Object(object)) hasOwnProperty.call(object, key) && "constructor" != key && result.push(key); + return result; + } + var isPrototype = __webpack_require__(275), nativeKeys = __webpack_require__(276), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty; + module.exports = baseKeys; +}, function(module, exports) { + function isPrototype(value) { + var Ctor = value && value.constructor, proto = "function" == typeof Ctor && Ctor.prototype || objectProto; + return value === proto; + } + var objectProto = Object.prototype; + module.exports = isPrototype; +}, function(module, exports, __webpack_require__) { + var overArg = __webpack_require__(277), nativeKeys = overArg(Object.keys, Object); + module.exports = nativeKeys; +}, function(module, exports) { + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + module.exports = overArg; +}, function(module, exports, __webpack_require__) { + function isArrayLike(value) { + return null != value && isLength(value.length) && !isFunction(value); + } + var isFunction = __webpack_require__(279), isLength = __webpack_require__(271); + module.exports = isArrayLike; +}, function(module, exports, __webpack_require__) { + function isFunction(value) { + if (!isObject(value)) return !1; + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + var baseGetTag = __webpack_require__(248), isObject = __webpack_require__(280), asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]"; + module.exports = isFunction; +}, function(module, exports) { + function isObject(value) { + var type = typeof value; + return null != value && ("object" == type || "function" == type); + } + module.exports = isObject; +}, function(module, exports, __webpack_require__) { + function castFunction(value) { + return "function" == typeof value ? value : identity; + } + var identity = __webpack_require__(282); + module.exports = castFunction; +}, function(module, exports) { + function identity(value) { + return value; + } + module.exports = identity; +}, function(module, exports, __webpack_require__) { + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) return !1; + var proto = getPrototype(value); + if (null === proto) return !0; + var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor; + return "function" == typeof Ctor && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; + } + var baseGetTag = __webpack_require__(248), getPrototype = __webpack_require__(284), isObjectLike = __webpack_require__(255), objectTag = "[object Object]", funcProto = Function.prototype, objectProto = Object.prototype, funcToString = funcProto.toString, hasOwnProperty = objectProto.hasOwnProperty, objectCtorString = funcToString.call(Object); + module.exports = isPlainObject; +}, function(module, exports, __webpack_require__) { + var overArg = __webpack_require__(277), getPrototype = overArg(Object.getPrototypeOf, Object); + module.exports = getPrototype; +}, function(module, exports, __webpack_require__) { + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, baseIteratee(iteratee, 3)); + } + var arrayMap = __webpack_require__(286), baseIteratee = __webpack_require__(287), baseMap = __webpack_require__(371), isArray = __webpack_require__(254); + module.exports = map; +}, function(module, exports) { + function arrayMap(array, iteratee) { + for (var index = -1, length = null == array ? 0 : array.length, result = Array(length); ++index < length; ) result[index] = iteratee(array[index], index, array); + return result; + } + module.exports = arrayMap; +}, function(module, exports, __webpack_require__) { + function baseIteratee(value) { + return "function" == typeof value ? value : null == value ? identity : "object" == typeof value ? isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value) : property(value); + } + var baseMatches = __webpack_require__(288), baseMatchesProperty = __webpack_require__(353), identity = __webpack_require__(282), isArray = __webpack_require__(254), property = __webpack_require__(368); + module.exports = baseIteratee; +}, function(module, exports, __webpack_require__) { + function baseMatches(source) { + var matchData = getMatchData(source); + return 1 == matchData.length && matchData[0][2] ? matchesStrictComparable(matchData[0][0], matchData[0][1]) : function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + var baseIsMatch = __webpack_require__(289), getMatchData = __webpack_require__(350), matchesStrictComparable = __webpack_require__(352); + module.exports = baseMatches; +}, function(module, exports, __webpack_require__) { + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, length = index, noCustomizer = !customizer; + if (null == object) return !length; + for (object = Object(object); index--; ) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) return !1; + } + for (;++index < length; ) { + data = matchData[index]; + var key = data[0], objValue = object[key], srcValue = data[1]; + if (noCustomizer && data[2]) { + if (void 0 === objValue && !(key in object)) return !1; + } else { + var stack = new Stack(); + if (customizer) var result = customizer(objValue, srcValue, key, object, source, stack); + if (!(void 0 === result ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) return !1; + } + } + return !0; + } + var Stack = __webpack_require__(290), baseIsEqual = __webpack_require__(326), COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; + module.exports = baseIsMatch; +}, function(module, exports, __webpack_require__) { + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + var ListCache = __webpack_require__(291), stackClear = __webpack_require__(299), stackDelete = __webpack_require__(300), stackGet = __webpack_require__(301), stackHas = __webpack_require__(302), stackSet = __webpack_require__(303); + Stack.prototype.clear = stackClear, Stack.prototype["delete"] = stackDelete, Stack.prototype.get = stackGet, + Stack.prototype.has = stackHas, Stack.prototype.set = stackSet, module.exports = Stack; +}, function(module, exports, __webpack_require__) { + function ListCache(entries) { + var index = -1, length = null == entries ? 0 : entries.length; + for (this.clear(); ++index < length; ) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + var listCacheClear = __webpack_require__(292), listCacheDelete = __webpack_require__(293), listCacheGet = __webpack_require__(296), listCacheHas = __webpack_require__(297), listCacheSet = __webpack_require__(298); + ListCache.prototype.clear = listCacheClear, ListCache.prototype["delete"] = listCacheDelete, + ListCache.prototype.get = listCacheGet, ListCache.prototype.has = listCacheHas, + ListCache.prototype.set = listCacheSet, module.exports = ListCache; +}, function(module, exports) { + function listCacheClear() { + this.__data__ = [], this.size = 0; + } + module.exports = listCacheClear; +}, function(module, exports, __webpack_require__) { + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) return !1; + var lastIndex = data.length - 1; + return index == lastIndex ? data.pop() : splice.call(data, index, 1), --this.size, + !0; + } + var assocIndexOf = __webpack_require__(294), arrayProto = Array.prototype, splice = arrayProto.splice; + module.exports = listCacheDelete; +}, function(module, exports, __webpack_require__) { + function assocIndexOf(array, key) { + for (var length = array.length; length--; ) if (eq(array[length][0], key)) return length; + return -1; + } + var eq = __webpack_require__(295); + module.exports = assocIndexOf; +}, function(module, exports) { + function eq(value, other) { + return value === other || value !== value && other !== other; + } + module.exports = eq; +}, function(module, exports, __webpack_require__) { + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + var assocIndexOf = __webpack_require__(294); + module.exports = listCacheGet; +}, function(module, exports, __webpack_require__) { + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + var assocIndexOf = __webpack_require__(294); + module.exports = listCacheHas; +}, function(module, exports, __webpack_require__) { + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? (++this.size, data.push([ key, value ])) : data[index][1] = value, + this; + } + var assocIndexOf = __webpack_require__(294); + module.exports = listCacheSet; +}, function(module, exports, __webpack_require__) { + function stackClear() { + this.__data__ = new ListCache(), this.size = 0; + } + var ListCache = __webpack_require__(291); + module.exports = stackClear; +}, function(module, exports) { + function stackDelete(key) { + var data = this.__data__, result = data["delete"](key); + return this.size = data.size, result; + } + module.exports = stackDelete; +}, function(module, exports) { + function stackGet(key) { + return this.__data__.get(key); + } + module.exports = stackGet; +}, function(module, exports) { + function stackHas(key) { + return this.__data__.has(key); + } + module.exports = stackHas; +}, function(module, exports, __webpack_require__) { + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) return pairs.push([ key, value ]), + this.size = ++data.size, this; + data = this.__data__ = new MapCache(pairs); + } + return data.set(key, value), this.size = data.size, this; + } + var ListCache = __webpack_require__(291), Map = __webpack_require__(304), MapCache = __webpack_require__(311), LARGE_ARRAY_SIZE = 200; + module.exports = stackSet; +}, function(module, exports, __webpack_require__) { + var getNative = __webpack_require__(305), root = __webpack_require__(250), Map = getNative(root, "Map"); + module.exports = Map; +}, function(module, exports, __webpack_require__) { + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + var baseIsNative = __webpack_require__(306), getValue = __webpack_require__(310); + module.exports = getNative; +}, function(module, exports, __webpack_require__) { + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) return !1; + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + var isFunction = __webpack_require__(279), isMasked = __webpack_require__(307), isObject = __webpack_require__(280), toSource = __webpack_require__(309), reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reIsHostCtor = /^\[object .+?Constructor\]$/, funcProto = Function.prototype, objectProto = Object.prototype, funcToString = funcProto.toString, hasOwnProperty = objectProto.hasOwnProperty, reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); + module.exports = baseIsNative; +}, function(module, exports, __webpack_require__) { + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + var coreJsData = __webpack_require__(308), maskSrcKey = function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + }(); + module.exports = isMasked; +}, function(module, exports, __webpack_require__) { + var root = __webpack_require__(250), coreJsData = root["__core-js_shared__"]; + module.exports = coreJsData; +}, function(module, exports) { + function toSource(func) { + if (null != func) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return func + ""; + } catch (e) {} + } + return ""; + } + var funcProto = Function.prototype, funcToString = funcProto.toString; + module.exports = toSource; +}, function(module, exports) { + function getValue(object, key) { + return null == object ? void 0 : object[key]; + } + module.exports = getValue; +}, function(module, exports, __webpack_require__) { + function MapCache(entries) { + var index = -1, length = null == entries ? 0 : entries.length; + for (this.clear(); ++index < length; ) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + var mapCacheClear = __webpack_require__(312), mapCacheDelete = __webpack_require__(320), mapCacheGet = __webpack_require__(323), mapCacheHas = __webpack_require__(324), mapCacheSet = __webpack_require__(325); + MapCache.prototype.clear = mapCacheClear, MapCache.prototype["delete"] = mapCacheDelete, + MapCache.prototype.get = mapCacheGet, MapCache.prototype.has = mapCacheHas, MapCache.prototype.set = mapCacheSet, + module.exports = MapCache; +}, function(module, exports, __webpack_require__) { + function mapCacheClear() { + this.size = 0, this.__data__ = { + hash: new Hash(), + map: new (Map || ListCache)(), + string: new Hash() + }; + } + var Hash = __webpack_require__(313), ListCache = __webpack_require__(291), Map = __webpack_require__(304); + module.exports = mapCacheClear; +}, function(module, exports, __webpack_require__) { + function Hash(entries) { + var index = -1, length = null == entries ? 0 : entries.length; + for (this.clear(); ++index < length; ) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + var hashClear = __webpack_require__(314), hashDelete = __webpack_require__(316), hashGet = __webpack_require__(317), hashHas = __webpack_require__(318), hashSet = __webpack_require__(319); + Hash.prototype.clear = hashClear, Hash.prototype["delete"] = hashDelete, Hash.prototype.get = hashGet, + Hash.prototype.has = hashHas, Hash.prototype.set = hashSet, module.exports = Hash; +}, function(module, exports, __webpack_require__) { + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}, this.size = 0; + } + var nativeCreate = __webpack_require__(315); + module.exports = hashClear; +}, function(module, exports, __webpack_require__) { + var getNative = __webpack_require__(305), nativeCreate = getNative(Object, "create"); + module.exports = nativeCreate; +}, function(module, exports) { + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + return this.size -= result ? 1 : 0, result; + } + module.exports = hashDelete; +}, function(module, exports, __webpack_require__) { + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + var nativeCreate = __webpack_require__(315), HASH_UNDEFINED = "__lodash_hash_undefined__", objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty; + module.exports = hashGet; +}, function(module, exports, __webpack_require__) { + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? void 0 !== data[key] : hasOwnProperty.call(data, key); + } + var nativeCreate = __webpack_require__(315), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty; + module.exports = hashHas; +}, function(module, exports, __webpack_require__) { + function hashSet(key, value) { + var data = this.__data__; + return this.size += this.has(key) ? 0 : 1, data[key] = nativeCreate && void 0 === value ? HASH_UNDEFINED : value, + this; + } + var nativeCreate = __webpack_require__(315), HASH_UNDEFINED = "__lodash_hash_undefined__"; + module.exports = hashSet; +}, function(module, exports, __webpack_require__) { + function mapCacheDelete(key) { + var result = getMapData(this, key)["delete"](key); + return this.size -= result ? 1 : 0, result; + } + var getMapData = __webpack_require__(321); + module.exports = mapCacheDelete; +}, function(module, exports, __webpack_require__) { + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data["string" == typeof key ? "string" : "hash"] : data.map; + } + var isKeyable = __webpack_require__(322); + module.exports = getMapData; +}, function(module, exports) { + function isKeyable(value) { + var type = typeof value; + return "string" == type || "number" == type || "symbol" == type || "boolean" == type ? "__proto__" !== value : null === value; + } + module.exports = isKeyable; +}, function(module, exports, __webpack_require__) { + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + var getMapData = __webpack_require__(321); + module.exports = mapCacheGet; +}, function(module, exports, __webpack_require__) { + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + var getMapData = __webpack_require__(321); + module.exports = mapCacheHas; +}, function(module, exports, __webpack_require__) { + function mapCacheSet(key, value) { + var data = getMapData(this, key), size = data.size; + return data.set(key, value), this.size += data.size == size ? 0 : 1, this; + } + var getMapData = __webpack_require__(321); + module.exports = mapCacheSet; +}, function(module, exports, __webpack_require__) { + function baseIsEqual(value, other, bitmask, customizer, stack) { + return value === other || (null == value || null == other || !isObjectLike(value) && !isObjectLike(other) ? value !== value && other !== other : baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack)); + } + var baseIsEqualDeep = __webpack_require__(327), isObjectLike = __webpack_require__(255); + module.exports = baseIsEqual; +}, function(module, exports, __webpack_require__) { + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag, othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) return !1; + objIsArr = !0, objIsObj = !1; + } + if (isSameTag && !objIsObj) return stack || (stack = new Stack()), objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; + return stack || (stack = new Stack()), equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + return !!isSameTag && (stack || (stack = new Stack()), equalObjects(object, other, bitmask, customizer, equalFunc, stack)); + } + var Stack = __webpack_require__(290), equalArrays = __webpack_require__(328), equalByTag = __webpack_require__(334), equalObjects = __webpack_require__(338), getTag = __webpack_require__(345), isArray = __webpack_require__(254), isBuffer = __webpack_require__(265), isTypedArray = __webpack_require__(269), COMPARE_PARTIAL_FLAG = 1, argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]", objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty; + module.exports = baseIsEqualDeep; +}, function(module, exports, __webpack_require__) { + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) return !1; + var stacked = stack.get(array); + if (stacked && stack.get(other)) return stacked == other; + var index = -1, result = !0, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0; + for (stack.set(array, other), stack.set(other, array); ++index < arrLength; ) { + var arrValue = array[index], othValue = other[index]; + if (customizer) var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + if (void 0 !== compared) { + if (compared) continue; + result = !1; + break; + } + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) return seen.push(othIndex); + })) { + result = !1; + break; + } + } else if (arrValue !== othValue && !equalFunc(arrValue, othValue, bitmask, customizer, stack)) { + result = !1; + break; + } + } + return stack["delete"](array), stack["delete"](other), result; + } + var SetCache = __webpack_require__(329), arraySome = __webpack_require__(332), cacheHas = __webpack_require__(333), COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; + module.exports = equalArrays; +}, function(module, exports, __webpack_require__) { + function SetCache(values) { + var index = -1, length = null == values ? 0 : values.length; + for (this.__data__ = new MapCache(); ++index < length; ) this.add(values[index]); + } + var MapCache = __webpack_require__(311), setCacheAdd = __webpack_require__(330), setCacheHas = __webpack_require__(331); + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd, SetCache.prototype.has = setCacheHas, + module.exports = SetCache; +}, function(module, exports) { + function setCacheAdd(value) { + return this.__data__.set(value, HASH_UNDEFINED), this; + } + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + module.exports = setCacheAdd; +}, function(module, exports) { + function setCacheHas(value) { + return this.__data__.has(value); + } + module.exports = setCacheHas; +}, function(module, exports) { + function arraySome(array, predicate) { + for (var index = -1, length = null == array ? 0 : array.length; ++index < length; ) if (predicate(array[index], index, array)) return !0; + return !1; + } + module.exports = arraySome; +}, function(module, exports) { + function cacheHas(cache, key) { + return cache.has(key); + } + module.exports = cacheHas; +}, function(module, exports, __webpack_require__) { + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) return !1; + object = object.buffer, other = other.buffer; + + case arrayBufferTag: + return !(object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))); + + case boolTag: + case dateTag: + case numberTag: + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + return object == other + ""; + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + if (convert || (convert = setToArray), object.size != other.size && !isPartial) return !1; + var stacked = stack.get(object); + if (stacked) return stacked == other; + bitmask |= COMPARE_UNORDERED_FLAG, stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + return stack["delete"](object), result; + + case symbolTag: + if (symbolValueOf) return symbolValueOf.call(object) == symbolValueOf.call(other); + } + return !1; + } + var Symbol = __webpack_require__(249), Uint8Array = __webpack_require__(335), eq = __webpack_require__(295), equalArrays = __webpack_require__(328), mapToArray = __webpack_require__(336), setToArray = __webpack_require__(337), COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2, boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", symbolProto = Symbol ? Symbol.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + module.exports = equalByTag; +}, function(module, exports, __webpack_require__) { + var root = __webpack_require__(250), Uint8Array = root.Uint8Array; + module.exports = Uint8Array; +}, function(module, exports) { + function mapToArray(map) { + var index = -1, result = Array(map.size); + return map.forEach(function(value, key) { + result[++index] = [ key, value ]; + }), result; + } + module.exports = mapToArray; +}, function(module, exports) { + function setToArray(set) { + var index = -1, result = Array(set.size); + return set.forEach(function(value) { + result[++index] = value; + }), result; + } + module.exports = setToArray; +}, function(module, exports, __webpack_require__) { + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; + if (objLength != othLength && !isPartial) return !1; + for (var index = objLength; index--; ) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) return !1; + } + var stacked = stack.get(object); + if (stacked && stack.get(other)) return stacked == other; + var result = !0; + stack.set(object, other), stack.set(other, object); + for (var skipCtor = isPartial; ++index < objLength; ) { + key = objProps[index]; + var objValue = object[key], othValue = other[key]; + if (customizer) var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + if (!(void 0 === compared ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result = !1; + break; + } + skipCtor || (skipCtor = "constructor" == key); + } + if (result && !skipCtor) { + var objCtor = object.constructor, othCtor = other.constructor; + objCtor != othCtor && "constructor" in object && "constructor" in other && !("function" == typeof objCtor && objCtor instanceof objCtor && "function" == typeof othCtor && othCtor instanceof othCtor) && (result = !1); + } + return stack["delete"](object), stack["delete"](other), result; + } + var getAllKeys = __webpack_require__(339), COMPARE_PARTIAL_FLAG = 1, objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty; + module.exports = equalObjects; +}, function(module, exports, __webpack_require__) { + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + var baseGetAllKeys = __webpack_require__(340), getSymbols = __webpack_require__(342), keys = __webpack_require__(260); + module.exports = getAllKeys; +}, function(module, exports, __webpack_require__) { + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + var arrayPush = __webpack_require__(341), isArray = __webpack_require__(254); + module.exports = baseGetAllKeys; +}, function(module, exports) { + function arrayPush(array, values) { + for (var index = -1, length = values.length, offset = array.length; ++index < length; ) array[offset + index] = values[index]; + return array; + } + module.exports = arrayPush; +}, function(module, exports, __webpack_require__) { + var arrayFilter = __webpack_require__(343), stubArray = __webpack_require__(344), objectProto = Object.prototype, propertyIsEnumerable = objectProto.propertyIsEnumerable, nativeGetSymbols = Object.getOwnPropertySymbols, getSymbols = nativeGetSymbols ? function(object) { + return null == object ? [] : (object = Object(object), arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + })); + } : stubArray; + module.exports = getSymbols; +}, function(module, exports) { + function arrayFilter(array, predicate) { + for (var index = -1, length = null == array ? 0 : array.length, resIndex = 0, result = []; ++index < length; ) { + var value = array[index]; + predicate(value, index, array) && (result[resIndex++] = value); + } + return result; + } + module.exports = arrayFilter; +}, function(module, exports) { + function stubArray() { + return []; + } + module.exports = stubArray; +}, function(module, exports, __webpack_require__) { + var DataView = __webpack_require__(346), Map = __webpack_require__(304), Promise = __webpack_require__(347), Set = __webpack_require__(348), WeakMap = __webpack_require__(349), baseGetTag = __webpack_require__(248), toSource = __webpack_require__(309), mapTag = "[object Map]", objectTag = "[object Object]", promiseTag = "[object Promise]", setTag = "[object Set]", weakMapTag = "[object WeakMap]", dataViewTag = "[object DataView]", dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap), getTag = baseGetTag; + (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) && (getTag = function(value) { + var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ""; + if (ctorString) switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + + case mapCtorString: + return mapTag; + + case promiseCtorString: + return promiseTag; + + case setCtorString: + return setTag; + + case weakMapCtorString: + return weakMapTag; + } + return result; + }), module.exports = getTag; +}, function(module, exports, __webpack_require__) { + var getNative = __webpack_require__(305), root = __webpack_require__(250), DataView = getNative(root, "DataView"); + module.exports = DataView; +}, function(module, exports, __webpack_require__) { + var getNative = __webpack_require__(305), root = __webpack_require__(250), Promise = getNative(root, "Promise"); + module.exports = Promise; +}, function(module, exports, __webpack_require__) { + var getNative = __webpack_require__(305), root = __webpack_require__(250), Set = getNative(root, "Set"); + module.exports = Set; +}, function(module, exports, __webpack_require__) { + var getNative = __webpack_require__(305), root = __webpack_require__(250), WeakMap = getNative(root, "WeakMap"); + module.exports = WeakMap; +}, function(module, exports, __webpack_require__) { + function getMatchData(object) { + for (var result = keys(object), length = result.length; length--; ) { + var key = result[length], value = object[key]; + result[length] = [ key, value, isStrictComparable(value) ]; + } + return result; + } + var isStrictComparable = __webpack_require__(351), keys = __webpack_require__(260); + module.exports = getMatchData; +}, function(module, exports, __webpack_require__) { + function isStrictComparable(value) { + return value === value && !isObject(value); + } + var isObject = __webpack_require__(280); + module.exports = isStrictComparable; +}, function(module, exports) { + function matchesStrictComparable(key, srcValue) { + return function(object) { + return null != object && (object[key] === srcValue && (void 0 !== srcValue || key in Object(object))); + }; + } + module.exports = matchesStrictComparable; +}, function(module, exports, __webpack_require__) { + function baseMatchesProperty(path, srcValue) { + return isKey(path) && isStrictComparable(srcValue) ? matchesStrictComparable(toKey(path), srcValue) : function(object) { + var objValue = get(object, path); + return void 0 === objValue && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + var baseIsEqual = __webpack_require__(326), get = __webpack_require__(354), hasIn = __webpack_require__(365), isKey = __webpack_require__(357), isStrictComparable = __webpack_require__(351), matchesStrictComparable = __webpack_require__(352), toKey = __webpack_require__(364), COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; + module.exports = baseMatchesProperty; +}, function(module, exports, __webpack_require__) { + function get(object, path, defaultValue) { + var result = null == object ? void 0 : baseGet(object, path); + return void 0 === result ? defaultValue : result; + } + var baseGet = __webpack_require__(355); + module.exports = get; +}, function(module, exports, __webpack_require__) { + function baseGet(object, path) { + path = castPath(path, object); + for (var index = 0, length = path.length; null != object && index < length; ) object = object[toKey(path[index++])]; + return index && index == length ? object : void 0; + } + var castPath = __webpack_require__(356), toKey = __webpack_require__(364); + module.exports = baseGet; +}, function(module, exports, __webpack_require__) { + function castPath(value, object) { + return isArray(value) ? value : isKey(value, object) ? [ value ] : stringToPath(toString(value)); + } + var isArray = __webpack_require__(254), isKey = __webpack_require__(357), stringToPath = __webpack_require__(359), toString = __webpack_require__(362); + module.exports = castPath; +}, function(module, exports, __webpack_require__) { + function isKey(value, object) { + if (isArray(value)) return !1; + var type = typeof value; + return !("number" != type && "symbol" != type && "boolean" != type && null != value && !isSymbol(value)) || (reIsPlainProp.test(value) || !reIsDeepProp.test(value) || null != object && value in Object(object)); + } + var isArray = __webpack_require__(254), isSymbol = __webpack_require__(358), reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; + module.exports = isKey; +}, function(module, exports, __webpack_require__) { + function isSymbol(value) { + return "symbol" == typeof value || isObjectLike(value) && baseGetTag(value) == symbolTag; + } + var baseGetTag = __webpack_require__(248), isObjectLike = __webpack_require__(255), symbolTag = "[object Symbol]"; + module.exports = isSymbol; +}, function(module, exports, __webpack_require__) { + var memoizeCapped = __webpack_require__(360), reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, reEscapeChar = /\\(\\)?/g, stringToPath = memoizeCapped(function(string) { + var result = []; + return reLeadingDot.test(string) && result.push(""), string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, "$1") : number || match); + }), result; + }); + module.exports = stringToPath; +}, function(module, exports, __webpack_require__) { + function memoizeCapped(func) { + var result = memoize(func, function(key) { + return cache.size === MAX_MEMOIZE_SIZE && cache.clear(), key; + }), cache = result.cache; + return result; + } + var memoize = __webpack_require__(361), MAX_MEMOIZE_SIZE = 500; + module.exports = memoizeCapped; +}, function(module, exports, __webpack_require__) { + function memoize(func, resolver) { + if ("function" != typeof func || null != resolver && "function" != typeof resolver) throw new TypeError(FUNC_ERROR_TEXT); + var memoized = function() { + var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; + if (cache.has(key)) return cache.get(key); + var result = func.apply(this, args); + return memoized.cache = cache.set(key, result) || cache, result; + }; + return memoized.cache = new (memoize.Cache || MapCache)(), memoized; + } + var MapCache = __webpack_require__(311), FUNC_ERROR_TEXT = "Expected a function"; + memoize.Cache = MapCache, module.exports = memoize; +}, function(module, exports, __webpack_require__) { + function toString(value) { + return null == value ? "" : baseToString(value); + } + var baseToString = __webpack_require__(363); + module.exports = toString; +}, function(module, exports, __webpack_require__) { + function baseToString(value) { + if ("string" == typeof value) return value; + if (isArray(value)) return arrayMap(value, baseToString) + ""; + if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : ""; + var result = value + ""; + return "0" == result && 1 / value == -INFINITY ? "-0" : result; + } + var Symbol = __webpack_require__(249), arrayMap = __webpack_require__(286), isArray = __webpack_require__(254), isSymbol = __webpack_require__(358), INFINITY = 1 / 0, symbolProto = Symbol ? Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0; + module.exports = baseToString; +}, function(module, exports, __webpack_require__) { + function toKey(value) { + if ("string" == typeof value || isSymbol(value)) return value; + var result = value + ""; + return "0" == result && 1 / value == -INFINITY ? "-0" : result; + } + var isSymbol = __webpack_require__(358), INFINITY = 1 / 0; + module.exports = toKey; +}, function(module, exports, __webpack_require__) { + function hasIn(object, path) { + return null != object && hasPath(object, path, baseHasIn); + } + var baseHasIn = __webpack_require__(366), hasPath = __webpack_require__(367); + module.exports = hasIn; +}, function(module, exports) { + function baseHasIn(object, key) { + return null != object && key in Object(object); + } + module.exports = baseHasIn; +}, function(module, exports, __webpack_require__) { + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + for (var index = -1, length = path.length, result = !1; ++index < length; ) { + var key = toKey(path[index]); + if (!(result = null != object && hasFunc(object, key))) break; + object = object[key]; + } + return result || ++index != length ? result : (length = null == object ? 0 : object.length, + !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object))); + } + var castPath = __webpack_require__(356), isArguments = __webpack_require__(263), isArray = __webpack_require__(254), isIndex = __webpack_require__(268), isLength = __webpack_require__(271), toKey = __webpack_require__(364); + module.exports = hasPath; +}, function(module, exports, __webpack_require__) { + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + var baseProperty = __webpack_require__(369), basePropertyDeep = __webpack_require__(370), isKey = __webpack_require__(357), toKey = __webpack_require__(364); + module.exports = property; +}, function(module, exports) { + function baseProperty(key) { + return function(object) { + return null == object ? void 0 : object[key]; + }; + } + module.exports = baseProperty; +}, function(module, exports, __webpack_require__) { + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + var baseGet = __webpack_require__(355); + module.exports = basePropertyDeep; +}, function(module, exports, __webpack_require__) { + function baseMap(collection, iteratee) { + var index = -1, result = isArrayLike(collection) ? Array(collection.length) : []; + return baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }), result; + } + var baseEach = __webpack_require__(372), isArrayLike = __webpack_require__(278); + module.exports = baseMap; +}, function(module, exports, __webpack_require__) { + var baseForOwn = __webpack_require__(257), createBaseEach = __webpack_require__(373), baseEach = createBaseEach(baseForOwn); + module.exports = baseEach; +}, function(module, exports, __webpack_require__) { + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (null == collection) return collection; + if (!isArrayLike(collection)) return eachFunc(collection, iteratee); + for (var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); (fromRight ? index-- : ++index < length) && iteratee(iterable[index], index, iterable) !== !1; ) ; + return collection; + }; + } + var isArrayLike = __webpack_require__(278); + module.exports = createBaseEach; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.mergeClasses = void 0; + var _forOwn2 = __webpack_require__(256), _forOwn3 = _interopRequireDefault(_forOwn2), _cloneDeep2 = __webpack_require__(375), _cloneDeep3 = _interopRequireDefault(_cloneDeep2), _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, mergeClasses = exports.mergeClasses = function(classes) { + var activeNames = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [], styles = classes["default"] && (0, + _cloneDeep3["default"])(classes["default"]) || {}; + return activeNames.map(function(name) { + var toMerge = classes[name]; + return toMerge && (0, _forOwn3["default"])(toMerge, function(value, key) { + styles[key] || (styles[key] = {}), styles[key] = _extends({}, styles[key], toMerge[key]); + }), name; + }), styles; + }; + exports["default"] = mergeClasses; +}, function(module, exports, __webpack_require__) { + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + var baseClone = __webpack_require__(376), CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4; + module.exports = cloneDeep; +}, function(module, exports, __webpack_require__) { + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; + if (customizer && (result = object ? customizer(value, key, object, stack) : customizer(value)), + void 0 !== result) return result; + if (!isObject(value)) return value; + var isArr = isArray(value); + if (isArr) { + if (result = initCloneArray(value), !isDeep) return copyArray(value, result); + } else { + var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; + if (isBuffer(value)) return cloneBuffer(value, isDeep); + if (tag == objectTag || tag == argsTag || isFunc && !object) { + if (result = isFlat || isFunc ? {} : initCloneObject(value), !isDeep) return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); + } else { + if (!cloneableTags[tag]) return object ? value : {}; + result = initCloneByTag(value, tag, baseClone, isDeep); + } + } + stack || (stack = new Stack()); + var stacked = stack.get(value); + if (stacked) return stacked; + stack.set(value, result); + var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys, props = isArr ? void 0 : keysFunc(value); + return arrayEach(props || value, function(subValue, key) { + props && (key = subValue, subValue = value[key]), assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }), result; + } + var Stack = __webpack_require__(290), arrayEach = __webpack_require__(377), assignValue = __webpack_require__(378), baseAssign = __webpack_require__(381), baseAssignIn = __webpack_require__(383), cloneBuffer = __webpack_require__(387), copyArray = __webpack_require__(388), copySymbols = __webpack_require__(389), copySymbolsIn = __webpack_require__(390), getAllKeys = __webpack_require__(339), getAllKeysIn = __webpack_require__(392), getTag = __webpack_require__(345), initCloneArray = __webpack_require__(393), initCloneByTag = __webpack_require__(394), initCloneObject = __webpack_require__(405), isArray = __webpack_require__(254), isBuffer = __webpack_require__(265), isObject = __webpack_require__(280), keys = __webpack_require__(260), CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4, argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]", arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]", cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = !0, + cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = !1, + module.exports = baseClone; +}, function(module, exports) { + function arrayEach(array, iteratee) { + for (var index = -1, length = null == array ? 0 : array.length; ++index < length && iteratee(array[index], index, array) !== !1; ) ; + return array; + } + module.exports = arrayEach; +}, function(module, exports, __webpack_require__) { + function assignValue(object, key, value) { + var objValue = object[key]; + hasOwnProperty.call(object, key) && eq(objValue, value) && (void 0 !== value || key in object) || baseAssignValue(object, key, value); + } + var baseAssignValue = __webpack_require__(379), eq = __webpack_require__(295), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty; + module.exports = assignValue; +}, function(module, exports, __webpack_require__) { + function baseAssignValue(object, key, value) { + "__proto__" == key && defineProperty ? defineProperty(object, key, { + configurable: !0, + enumerable: !0, + value: value, + writable: !0 + }) : object[key] = value; + } + var defineProperty = __webpack_require__(380); + module.exports = baseAssignValue; +}, function(module, exports, __webpack_require__) { + var getNative = __webpack_require__(305), defineProperty = function() { + try { + var func = getNative(Object, "defineProperty"); + return func({}, "", {}), func; + } catch (e) {} + }(); + module.exports = defineProperty; +}, function(module, exports, __webpack_require__) { + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + var copyObject = __webpack_require__(382), keys = __webpack_require__(260); + module.exports = baseAssign; +}, function(module, exports, __webpack_require__) { + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + for (var index = -1, length = props.length; ++index < length; ) { + var key = props[index], newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0; + void 0 === newValue && (newValue = source[key]), isNew ? baseAssignValue(object, key, newValue) : assignValue(object, key, newValue); + } + return object; + } + var assignValue = __webpack_require__(378), baseAssignValue = __webpack_require__(379); + module.exports = copyObject; +}, function(module, exports, __webpack_require__) { + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + var copyObject = __webpack_require__(382), keysIn = __webpack_require__(384); + module.exports = baseAssignIn; +}, function(module, exports, __webpack_require__) { + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, !0) : baseKeysIn(object); + } + var arrayLikeKeys = __webpack_require__(261), baseKeysIn = __webpack_require__(385), isArrayLike = __webpack_require__(278); + module.exports = keysIn; +}, function(module, exports, __webpack_require__) { + function baseKeysIn(object) { + if (!isObject(object)) return nativeKeysIn(object); + var isProto = isPrototype(object), result = []; + for (var key in object) ("constructor" != key || !isProto && hasOwnProperty.call(object, key)) && result.push(key); + return result; + } + var isObject = __webpack_require__(280), isPrototype = __webpack_require__(275), nativeKeysIn = __webpack_require__(386), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty; + module.exports = baseKeysIn; +}, function(module, exports) { + function nativeKeysIn(object) { + var result = []; + if (null != object) for (var key in Object(object)) result.push(key); + return result; + } + module.exports = nativeKeysIn; +}, function(module, exports, __webpack_require__) { + (function(module) { + function cloneBuffer(buffer, isDeep) { + if (isDeep) return buffer.slice(); + var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + return buffer.copy(result), result; + } + var root = __webpack_require__(250), freeExports = "object" == typeof exports && exports && !exports.nodeType && exports, freeModule = freeExports && "object" == typeof module && module && !module.nodeType && module, moduleExports = freeModule && freeModule.exports === freeExports, Buffer = moduleExports ? root.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0; + module.exports = cloneBuffer; + }).call(exports, __webpack_require__(266)(module)); +}, function(module, exports) { + function copyArray(source, array) { + var index = -1, length = source.length; + for (array || (array = Array(length)); ++index < length; ) array[index] = source[index]; + return array; + } + module.exports = copyArray; +}, function(module, exports, __webpack_require__) { + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + var copyObject = __webpack_require__(382), getSymbols = __webpack_require__(342); + module.exports = copySymbols; +}, function(module, exports, __webpack_require__) { + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + var copyObject = __webpack_require__(382), getSymbolsIn = __webpack_require__(391); + module.exports = copySymbolsIn; +}, function(module, exports, __webpack_require__) { + var arrayPush = __webpack_require__(341), getPrototype = __webpack_require__(284), getSymbols = __webpack_require__(342), stubArray = __webpack_require__(344), nativeGetSymbols = Object.getOwnPropertySymbols, getSymbolsIn = nativeGetSymbols ? function(object) { + for (var result = []; object; ) arrayPush(result, getSymbols(object)), object = getPrototype(object); + return result; + } : stubArray; + module.exports = getSymbolsIn; +}, function(module, exports, __webpack_require__) { + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + var baseGetAllKeys = __webpack_require__(340), getSymbolsIn = __webpack_require__(391), keysIn = __webpack_require__(384); + module.exports = getAllKeysIn; +}, function(module, exports) { + function initCloneArray(array) { + var length = array.length, result = array.constructor(length); + return length && "string" == typeof array[0] && hasOwnProperty.call(array, "index") && (result.index = array.index, + result.input = array.input), result; + } + var objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty; + module.exports = initCloneArray; +}, function(module, exports, __webpack_require__) { + function initCloneByTag(object, tag, cloneFunc, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor((+object)); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return cloneMap(object, isDeep, cloneFunc); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return cloneSet(object, isDeep, cloneFunc); + + case symbolTag: + return cloneSymbol(object); + } + } + var cloneArrayBuffer = __webpack_require__(395), cloneDataView = __webpack_require__(396), cloneMap = __webpack_require__(397), cloneRegExp = __webpack_require__(400), cloneSet = __webpack_require__(401), cloneSymbol = __webpack_require__(403), cloneTypedArray = __webpack_require__(404), boolTag = "[object Boolean]", dateTag = "[object Date]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; + module.exports = initCloneByTag; +}, function(module, exports, __webpack_require__) { + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + return new Uint8Array(result).set(new Uint8Array(arrayBuffer)), result; + } + var Uint8Array = __webpack_require__(335); + module.exports = cloneArrayBuffer; +}, function(module, exports, __webpack_require__) { + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + var cloneArrayBuffer = __webpack_require__(395); + module.exports = cloneDataView; +}, function(module, exports, __webpack_require__) { + function cloneMap(map, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); + return arrayReduce(array, addMapEntry, new map.constructor()); + } + var addMapEntry = __webpack_require__(398), arrayReduce = __webpack_require__(399), mapToArray = __webpack_require__(336), CLONE_DEEP_FLAG = 1; + module.exports = cloneMap; +}, function(module, exports) { + function addMapEntry(map, pair) { + return map.set(pair[0], pair[1]), map; + } + module.exports = addMapEntry; +}, function(module, exports) { + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, length = null == array ? 0 : array.length; + for (initAccum && length && (accumulator = array[++index]); ++index < length; ) accumulator = iteratee(accumulator, array[index], index, array); + return accumulator; + } + module.exports = arrayReduce; +}, function(module, exports) { + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + return result.lastIndex = regexp.lastIndex, result; + } + var reFlags = /\w*$/; + module.exports = cloneRegExp; +}, function(module, exports, __webpack_require__) { + function cloneSet(set, isDeep, cloneFunc) { + var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); + return arrayReduce(array, addSetEntry, new set.constructor()); + } + var addSetEntry = __webpack_require__(402), arrayReduce = __webpack_require__(399), setToArray = __webpack_require__(337), CLONE_DEEP_FLAG = 1; + module.exports = cloneSet; +}, function(module, exports) { + function addSetEntry(set, value) { + return set.add(value), set; + } + module.exports = addSetEntry; +}, function(module, exports, __webpack_require__) { + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + var Symbol = __webpack_require__(249), symbolProto = Symbol ? Symbol.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + module.exports = cloneSymbol; +}, function(module, exports, __webpack_require__) { + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + var cloneArrayBuffer = __webpack_require__(395); + module.exports = cloneTypedArray; +}, function(module, exports, __webpack_require__) { + function initCloneObject(object) { + return "function" != typeof object.constructor || isPrototype(object) ? {} : baseCreate(getPrototype(object)); + } + var baseCreate = __webpack_require__(406), getPrototype = __webpack_require__(284), isPrototype = __webpack_require__(275); + module.exports = initCloneObject; +}, function(module, exports, __webpack_require__) { + var isObject = __webpack_require__(280), objectCreate = Object.create, baseCreate = function() { + function object() {} + return function(proto) { + if (!isObject(proto)) return {}; + if (objectCreate) return objectCreate(proto); + object.prototype = proto; + var result = new object(); + return object.prototype = void 0, result; + }; + }(); + module.exports = baseCreate; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.autoprefix = void 0; + var _forOwn2 = __webpack_require__(256), _forOwn3 = _interopRequireDefault(_forOwn2), _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, transforms = { + borderRadius: function(value) { + return { + msBorderRadius: value, + MozBorderRadius: value, + OBorderRadius: value, + WebkitBorderRadius: value, + borderRadius: value + }; + }, + boxShadow: function(value) { + return { + msBoxShadow: value, + MozBoxShadow: value, + OBoxShadow: value, + WebkitBoxShadow: value, + boxShadow: value + }; + }, + userSelect: function(value) { + return { + WebkitTouchCallout: value, + KhtmlUserSelect: value, + MozUserSelect: value, + msUserSelect: value, + WebkitUserSelect: value, + userSelect: value + }; + }, + flex: function(value) { + return { + WebkitBoxFlex: value, + MozBoxFlex: value, + WebkitFlex: value, + msFlex: value, + flex: value + }; + }, + flexBasis: function(value) { + return { + WebkitFlexBasis: value, + flexBasis: value + }; + }, + justifyContent: function(value) { + return { + WebkitJustifyContent: value, + justifyContent: value + }; + }, + transition: function(value) { + return { + msTransition: value, + MozTransition: value, + OTransition: value, + WebkitTransition: value, + transition: value + }; + }, + transform: function(value) { + return { + msTransform: value, + MozTransform: value, + OTransform: value, + WebkitTransform: value, + transform: value + }; + }, + absolute: function(value) { + var direction = value && value.split(" "); + return { + position: "absolute", + top: direction && direction[0], + right: direction && direction[1], + bottom: direction && direction[2], + left: direction && direction[3] + }; + }, + extend: function(name, otherElementStyles) { + var otherStyle = otherElementStyles[name]; + return otherStyle ? otherStyle : { + extend: name + }; + } + }, autoprefix = exports.autoprefix = function(elements) { + var prefixed = {}; + return (0, _forOwn3["default"])(elements, function(styles, element) { + var expanded = {}; + (0, _forOwn3["default"])(styles, function(value, key) { + var transform = transforms[key]; + transform ? expanded = _extends({}, expanded, transform(value)) : expanded[key] = value; + }), prefixed[element] = expanded; + }), prefixed; + }; + exports["default"] = autoprefix; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.hover = void 0; + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), hover = exports.hover = function(Component) { + var Span = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "span"; + return function(_React$Component) { + function Hover() { + var _ref, _temp, _this, _ret; + _classCallCheck(this, Hover); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; + return _temp = _this = _possibleConstructorReturn(this, (_ref = Hover.__proto__ || Object.getPrototypeOf(Hover)).call.apply(_ref, [ this ].concat(args))), + _this.state = { + hover: !1 + }, _this.handleMouseOver = function() { + return _this.setState({ + hover: !0 + }); + }, _this.handleMouseOut = function() { + return _this.setState({ + hover: !1 + }); + }, _this.render = function() { + return _react2["default"].createElement(Span, { + onMouseOver: _this.handleMouseOver, + onMouseOut: _this.handleMouseOut + }, _react2["default"].createElement(Component, _extends({}, _this.props, _this.state))); + }, _ret = _temp, _possibleConstructorReturn(_this, _ret); + } + return _inherits(Hover, _React$Component), Hover; + }(_react2["default"].Component); + }; + exports["default"] = hover; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.active = void 0; + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), active = exports.active = function(Component) { + var Span = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "span"; + return function(_React$Component) { + function Active() { + var _ref, _temp, _this, _ret; + _classCallCheck(this, Active); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; + return _temp = _this = _possibleConstructorReturn(this, (_ref = Active.__proto__ || Object.getPrototypeOf(Active)).call.apply(_ref, [ this ].concat(args))), + _this.state = { + active: !1 + }, _this.handleMouseDown = function() { + return _this.setState({ + active: !0 + }); + }, _this.handleMouseUp = function() { + return _this.setState({ + active: !1 + }); + }, _this.render = function() { + return _react2["default"].createElement(Span, { + onMouseDown: _this.handleMouseDown, + onMouseUp: _this.handleMouseUp + }, _react2["default"].createElement(Component, _extends({}, _this.props, _this.state))); + }, _ret = _temp, _possibleConstructorReturn(_this, _ret); + } + return _inherits(Active, _React$Component), Active; + }(_react2["default"].Component); + }; + exports["default"] = active; +}, function(module, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var loopable = function(i, length) { + var props = {}, setProp = function(name) { + var value = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]; + props[name] = value; + }; + return 0 === i && setProp("first-child"), i === length - 1 && setProp("last-child"), + (0 === i || i % 2 === 0) && setProp("even"), 1 === Math.abs(i % 2) && setProp("odd"), + setProp("nth-child", i), props; + }; + exports["default"] = loopable; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var _Alpha = __webpack_require__(412); + Object.defineProperty(exports, "Alpha", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Alpha)["default"]; + } + }); + var _Checkboard = __webpack_require__(414); + Object.defineProperty(exports, "Checkboard", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Checkboard)["default"]; + } + }); + var _EditableInput = __webpack_require__(416); + Object.defineProperty(exports, "EditableInput", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_EditableInput)["default"]; + } + }); + var _Hue = __webpack_require__(417); + Object.defineProperty(exports, "Hue", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Hue)["default"]; + } + }); + var _Saturation = __webpack_require__(419); + Object.defineProperty(exports, "Saturation", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Saturation)["default"]; + } + }); + var _ColorWrap = __webpack_require__(425); + Object.defineProperty(exports, "ColorWrap", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_ColorWrap)["default"]; + } + }); + var _Swatch = __webpack_require__(430); + Object.defineProperty(exports, "Swatch", { + enumerable: !0, + get: function() { + return _interopRequireDefault(_Swatch)["default"]; + } + }); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) return obj; + var newObj = {}; + if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]); + return newObj["default"] = obj, newObj; + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Alpha = void 0; + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _alpha = __webpack_require__(413), alpha = _interopRequireWildcard(_alpha), _Checkboard = __webpack_require__(414), _Checkboard2 = _interopRequireDefault(_Checkboard), Alpha = exports.Alpha = function(_ref) { + function Alpha() { + var _ref2, _temp, _this, _ret; + _classCallCheck(this, Alpha); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; + return _temp = _this = _possibleConstructorReturn(this, (_ref2 = Alpha.__proto__ || Object.getPrototypeOf(Alpha)).call.apply(_ref2, [ this ].concat(args))), + _this.handleChange = function(e, skip) { + var change = alpha.calculateChange(e, skip, _this.props, _this.refs.container); + change && _this.props.onChange(change, e); + }, _this.handleMouseDown = function(e) { + _this.handleChange(e, !0), window.addEventListener("mousemove", _this.handleChange), + window.addEventListener("mouseup", _this.handleMouseUp); + }, _this.handleMouseUp = function() { + _this.unbindEventListeners(); + }, _this.unbindEventListeners = function() { + window.removeEventListener("mousemove", _this.handleChange), window.removeEventListener("mouseup", _this.handleMouseUp); + }, _ret = _temp, _possibleConstructorReturn(_this, _ret); + } + return _inherits(Alpha, _ref), _createClass(Alpha, [ { + key: "componentWillUnmount", + value: function() { + this.unbindEventListeners(); + } + }, { + key: "render", + value: function() { + var rgb = this.props.rgb, styles = (0, _reactcss2["default"])({ + "default": { + alpha: { + absolute: "0px 0px 0px 0px", + borderRadius: this.props.radius + }, + checkboard: { + absolute: "0px 0px 0px 0px", + overflow: "hidden" + }, + gradient: { + absolute: "0px 0px 0px 0px", + background: "linear-gradient(to right, rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + ", 0) 0%,\n rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + ", 1) 100%)", + boxShadow: this.props.shadow, + borderRadius: this.props.radius + }, + container: { + position: "relative", + height: "100%", + margin: "0 3px" + }, + pointer: { + position: "absolute", + left: 100 * rgb.a + "%" + }, + slider: { + width: "4px", + borderRadius: "1px", + height: "8px", + boxShadow: "0 0 2px rgba(0, 0, 0, .6)", + background: "#fff", + marginTop: "1px", + transform: "translateX(-2px)" + } + }, + vertical: { + gradient: { + background: "linear-gradient(to bottom, rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + ", 0) 0%,\n rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + ", 1) 100%)" + }, + pointer: { + left: 0, + top: 100 * rgb.a + "%" + } + }, + overwrite: _extends({}, this.props.style) + }, { + vertical: "vertical" === this.props.direction, + overwrite: !0 + }); + return _react2["default"].createElement("div", { + style: styles.alpha + }, _react2["default"].createElement("div", { + style: styles.checkboard + }, _react2["default"].createElement(_Checkboard2["default"], { + renderers: this.props.renderers + })), _react2["default"].createElement("div", { + style: styles.gradient + }), _react2["default"].createElement("div", { + style: styles.container, + ref: "container", + onMouseDown: this.handleMouseDown, + onTouchMove: this.handleChange, + onTouchStart: this.handleChange + }, _react2["default"].createElement("div", { + style: styles.pointer + }, this.props.pointer ? _react2["default"].createElement(this.props.pointer, this.props) : _react2["default"].createElement("div", { + style: styles.slider + })))); + } + } ]), Alpha; + }(_react.PureComponent || _react.Component); + exports["default"] = Alpha; +}, function(module, exports) { + "use strict"; + function calculateChange(e, skip, props, container) { + !skip && e.preventDefault(); + var containerWidth = container.clientWidth, containerHeight = container.clientHeight, x = "number" == typeof e.pageX ? e.pageX : e.touches[0].pageX, y = "number" == typeof e.pageY ? e.pageY : e.touches[0].pageY, left = x - (container.getBoundingClientRect().left + window.pageXOffset), top = y - (container.getBoundingClientRect().top + window.pageYOffset); + if ("vertical" === props.direction) { + var a = void 0; + if (a = top < 0 ? 0 : top > containerHeight ? 1 : Math.round(100 * top / containerHeight) / 100, + props.hsl.a !== a) return { + h: props.hsl.h, + s: props.hsl.s, + l: props.hsl.l, + a: a, + source: "rgb" + }; + } else { + var _a = void 0; + if (_a = left < 0 ? 0 : left > containerWidth ? 1 : Math.round(100 * left / containerWidth) / 100, + props.a !== _a) return { + h: props.hsl.h, + s: props.hsl.s, + l: props.hsl.l, + a: _a, + source: "rgb" + }; + } + return null; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.calculateChange = calculateChange; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) return obj; + var newObj = {}; + if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]); + return newObj["default"] = obj, newObj; + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Checkboard = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _checkboard = __webpack_require__(415), checkboard = _interopRequireWildcard(_checkboard), Checkboard = exports.Checkboard = function(_ref) { + var white = _ref.white, grey = _ref.grey, size = _ref.size, renderers = _ref.renderers, styles = (0, + _reactcss2["default"])({ + "default": { + grid: { + absolute: "0px 0px 0px 0px", + background: "url(" + checkboard.get(white, grey, size, renderers.canvas) + ") center left" + } + } + }); + return _react2["default"].createElement("div", { + style: styles.grid + }); + }; + Checkboard.defaultProps = { + size: 8, + white: "transparent", + grey: "rgba(0,0,0,.08)", + renderers: {} + }, exports["default"] = Checkboard; +}, function(module, exports) { + "use strict"; + function render(c1, c2, size, serverCanvas) { + if ("undefined" == typeof document && !serverCanvas) return null; + var canvas = serverCanvas ? new serverCanvas() : document.createElement("canvas"); + canvas.width = 2 * size, canvas.height = 2 * size; + var ctx = canvas.getContext("2d"); + return ctx ? (ctx.fillStyle = c1, ctx.fillRect(0, 0, canvas.width, canvas.height), + ctx.fillStyle = c2, ctx.fillRect(0, 0, size, size), ctx.translate(size, size), ctx.fillRect(0, 0, size, size), + canvas.toDataURL()) : null; + } + function get(c1, c2, size, serverCanvas) { + var key = c1 + "-" + c2 + "-" + size + (serverCanvas ? "-server" : ""), checkboard = render(c1, c2, size, serverCanvas); + return checkboardCache[key] ? checkboardCache[key] : (checkboardCache[key] = checkboard, + checkboard); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.render = render, exports.get = get; + var checkboardCache = {}; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _defineProperty(obj, key, value) { + return key in obj ? Object.defineProperty(obj, key, { + value: value, + enumerable: !0, + configurable: !0, + writable: !0 + }) : obj[key] = value, obj; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.EditableInput = void 0; + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), EditableInput = exports.EditableInput = function(_ref) { + function EditableInput(props) { + _classCallCheck(this, EditableInput); + var _this = _possibleConstructorReturn(this, (EditableInput.__proto__ || Object.getPrototypeOf(EditableInput)).call(this)); + return _this.handleBlur = function() { + _this.state.blurValue && _this.setState({ + value: _this.state.blurValue, + blurValue: null + }); + }, _this.handleChange = function(e) { + _this.props.label ? _this.props.onChange(_defineProperty({}, _this.props.label, e.target.value), e) : _this.props.onChange(e.target.value, e), + _this.setState({ + value: e.target.value + }); + }, _this.handleKeyDown = function(e) { + var number = Number(e.target.value); + if (!isNaN(number)) { + var amount = _this.props.arrowOffset || 1; + 38 === e.keyCode && (null !== _this.props.label ? _this.props.onChange(_defineProperty({}, _this.props.label, number + amount), e) : _this.props.onChange(number + amount, e), + _this.setState({ + value: number + amount + })), 40 === e.keyCode && (null !== _this.props.label ? _this.props.onChange(_defineProperty({}, _this.props.label, number - amount), e) : _this.props.onChange(number - amount, e), + _this.setState({ + value: number - amount + })); + } + }, _this.handleDrag = function(e) { + if (_this.props.dragLabel) { + var newValue = Math.round(_this.props.value + e.movementX); + newValue >= 0 && newValue <= _this.props.dragMax && _this.props.onChange(_defineProperty({}, _this.props.label, newValue), e); + } + }, _this.handleMouseDown = function(e) { + _this.props.dragLabel && (e.preventDefault(), _this.handleDrag(e), window.addEventListener("mousemove", _this.handleDrag), + window.addEventListener("mouseup", _this.handleMouseUp)); + }, _this.handleMouseUp = function() { + _this.unbindEventListeners(); + }, _this.unbindEventListeners = function() { + window.removeEventListener("mousemove", _this.handleDrag), window.removeEventListener("mouseup", _this.handleMouseUp); + }, _this.state = { + value: String(props.value).toUpperCase(), + blurValue: String(props.value).toUpperCase() + }, _this; + } + return _inherits(EditableInput, _ref), _createClass(EditableInput, [ { + key: "componentWillReceiveProps", + value: function(nextProps) { + var input = this.refs.input; + nextProps.value !== this.state.value && (input === document.activeElement ? this.setState({ + blurValue: String(nextProps.value).toUpperCase() + }) : this.setState({ + value: String(nextProps.value).toUpperCase() + })); + } + }, { + key: "componentWillUnmount", + value: function() { + this.unbindEventListeners(); + } + }, { + key: "render", + value: function() { + var styles = (0, _reactcss2["default"])({ + "default": { + wrap: { + position: "relative" + } + }, + "user-override": { + wrap: this.props.style && this.props.style.wrap ? this.props.style.wrap : {}, + input: this.props.style && this.props.style.input ? this.props.style.input : {}, + label: this.props.style && this.props.style.label ? this.props.style.label : {} + }, + "dragLabel-true": { + label: { + cursor: "ew-resize" + } + } + }, { + "user-override": !0 + }, this.props); + return _react2["default"].createElement("div", { + style: styles.wrap + }, _react2["default"].createElement("input", { + style: styles.input, + ref: "input", + value: this.state.value, + onKeyDown: this.handleKeyDown, + onChange: this.handleChange, + onBlur: this.handleBlur, + placeholder: this.props.placeholder + }), this.props.label ? _react2["default"].createElement("span", { + style: styles.label, + onMouseDown: this.handleMouseDown + }, this.props.label) : null); + } + } ]), EditableInput; + }(_react.PureComponent || _react.Component); + exports["default"] = EditableInput; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) return obj; + var newObj = {}; + if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]); + return newObj["default"] = obj, newObj; + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Hue = void 0; + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _hue = __webpack_require__(418), hue = _interopRequireWildcard(_hue), Hue = exports.Hue = function(_ref) { + function Hue() { + var _ref2, _temp, _this, _ret; + _classCallCheck(this, Hue); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; + return _temp = _this = _possibleConstructorReturn(this, (_ref2 = Hue.__proto__ || Object.getPrototypeOf(Hue)).call.apply(_ref2, [ this ].concat(args))), + _this.handleChange = function(e, skip) { + var change = hue.calculateChange(e, skip, _this.props, _this.refs.container); + change && _this.props.onChange(change, e); + }, _this.handleMouseDown = function(e) { + _this.handleChange(e, !0), window.addEventListener("mousemove", _this.handleChange), + window.addEventListener("mouseup", _this.handleMouseUp); + }, _this.handleMouseUp = function() { + _this.unbindEventListeners(); + }, _ret = _temp, _possibleConstructorReturn(_this, _ret); + } + return _inherits(Hue, _ref), _createClass(Hue, [ { + key: "componentWillUnmount", + value: function() { + this.unbindEventListeners(); + } + }, { + key: "unbindEventListeners", + value: function() { + window.removeEventListener("mousemove", this.handleChange), window.removeEventListener("mouseup", this.handleMouseUp); + } + }, { + key: "render", + value: function() { + var styles = (0, _reactcss2["default"])({ + "default": { + hue: { + absolute: "0px 0px 0px 0px", + background: "linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)", + borderRadius: this.props.radius, + boxShadow: this.props.shadow + }, + container: { + margin: "0 2px", + position: "relative", + height: "100%" + }, + pointer: { + position: "absolute", + left: 100 * this.props.hsl.h / 360 + "%" + }, + slider: { + marginTop: "1px", + width: "4px", + borderRadius: "1px", + height: "8px", + boxShadow: "0 0 2px rgba(0, 0, 0, .6)", + background: "#fff", + transform: "translateX(-2px)" + } + }, + vertical: { + hue: { + background: "linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)" + }, + pointer: { + left: "0px", + top: -(100 * this.props.hsl.h / 360) + 100 + "%" + } + } + }, { + vertical: "vertical" === this.props.direction + }); + return _react2["default"].createElement("div", { + style: styles.hue + }, _react2["default"].createElement("div", { + style: styles.container, + ref: "container", + onMouseDown: this.handleMouseDown, + onTouchMove: this.handleChange, + onTouchStart: this.handleChange + }, _react2["default"].createElement("div", { + style: styles.pointer + }, this.props.pointer ? _react2["default"].createElement(this.props.pointer, this.props) : _react2["default"].createElement("div", { + style: styles.slider + })))); + } + } ]), Hue; + }(_react.PureComponent || _react.Component); + exports["default"] = Hue; +}, function(module, exports) { + "use strict"; + function calculateChange(e, skip, props, container) { + !skip && e.preventDefault(); + var containerWidth = container.clientWidth, containerHeight = container.clientHeight, x = "number" == typeof e.pageX ? e.pageX : e.touches[0].pageX, y = "number" == typeof e.pageY ? e.pageY : e.touches[0].pageY, left = x - (container.getBoundingClientRect().left + window.pageXOffset), top = y - (container.getBoundingClientRect().top + window.pageYOffset); + if ("vertical" === props.direction) { + var h = void 0; + if (top < 0) h = 359; else if (top > containerHeight) h = 0; else { + var percent = -(100 * top / containerHeight) + 100; + h = 360 * percent / 100; + } + if (props.hsl.h !== h) return { + h: h, + s: props.hsl.s, + l: props.hsl.l, + a: props.hsl.a, + source: "rgb" + }; + } else { + var _h = void 0; + if (left < 0) _h = 0; else if (left > containerWidth) _h = 359; else { + var _percent = 100 * left / containerWidth; + _h = 360 * _percent / 100; + } + if (props.hsl.h !== _h) return { + h: _h, + s: props.hsl.s, + l: props.hsl.l, + a: props.hsl.a, + source: "rgb" + }; + } + return null; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.calculateChange = calculateChange; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) return obj; + var newObj = {}; + if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]); + return newObj["default"] = obj, newObj; + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Saturation = void 0; + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _throttle = __webpack_require__(420), _throttle2 = _interopRequireDefault(_throttle), _saturation = __webpack_require__(424), saturation = _interopRequireWildcard(_saturation), Saturation = exports.Saturation = function(_ref) { + function Saturation(props) { + _classCallCheck(this, Saturation); + var _this = _possibleConstructorReturn(this, (Saturation.__proto__ || Object.getPrototypeOf(Saturation)).call(this, props)); + return _this.handleChange = function(e, skip) { + _this.throttle(_this.props.onChange, saturation.calculateChange(e, skip, _this.props, _this.refs.container), e); + }, _this.handleMouseDown = function(e) { + _this.handleChange(e, !0), window.addEventListener("mousemove", _this.handleChange), + window.addEventListener("mouseup", _this.handleMouseUp); + }, _this.handleMouseUp = function() { + _this.unbindEventListeners(); + }, _this.throttle = (0, _throttle2["default"])(function(fn, data, e) { + fn(data, e); + }, 50), _this; + } + return _inherits(Saturation, _ref), _createClass(Saturation, [ { + key: "componentWillUnmount", + value: function() { + this.unbindEventListeners(); + } + }, { + key: "unbindEventListeners", + value: function() { + window.removeEventListener("mousemove", this.handleChange), window.removeEventListener("mouseup", this.handleMouseUp); + } + }, { + key: "render", + value: function() { + var _ref2 = this.props.style || {}, color = _ref2.color, white = _ref2.white, black = _ref2.black, pointer = _ref2.pointer, circle = _ref2.circle, styles = (0, + _reactcss2["default"])({ + "default": { + color: { + absolute: "0px 0px 0px 0px", + background: "hsl(" + this.props.hsl.h + ",100%, 50%)", + borderRadius: this.props.radius + }, + white: { + absolute: "0px 0px 0px 0px", + background: "linear-gradient(to right, #fff, rgba(255,255,255,0))" + }, + black: { + absolute: "0px 0px 0px 0px", + background: "linear-gradient(to top, #000, rgba(0,0,0,0))", + boxShadow: this.props.shadow + }, + pointer: { + position: "absolute", + top: -(100 * this.props.hsv.v) + 100 + "%", + left: 100 * this.props.hsv.s + "%", + cursor: "default" + }, + circle: { + width: "4px", + height: "4px", + boxShadow: "0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)", + borderRadius: "50%", + cursor: "hand", + transform: "translate(-2px, -2px)" + } + }, + custom: { + color: color, + white: white, + black: black, + pointer: pointer, + circle: circle + } + }, { + custom: !!this.props.style + }); + return _react2["default"].createElement("div", { + style: styles.color, + ref: "container", + onMouseDown: this.handleMouseDown, + onTouchMove: this.handleChange, + onTouchStart: this.handleChange + }, _react2["default"].createElement("div", { + style: styles.white + }, _react2["default"].createElement("div", { + style: styles.black + }), _react2["default"].createElement("div", { + style: styles.pointer + }, this.props.pointer ? _react2["default"].createElement(this.props.pointer, this.props) : _react2["default"].createElement("div", { + style: styles.circle + })))); + } + } ]), Saturation; + }(_react.PureComponent || _react.Component); + exports["default"] = Saturation; +}, function(module, exports, __webpack_require__) { + function throttle(func, wait, options) { + var leading = !0, trailing = !0; + if ("function" != typeof func) throw new TypeError(FUNC_ERROR_TEXT); + return isObject(options) && (leading = "leading" in options ? !!options.leading : leading, + trailing = "trailing" in options ? !!options.trailing : trailing), debounce(func, wait, { + leading: leading, + maxWait: wait, + trailing: trailing + }); + } + var debounce = __webpack_require__(421), isObject = __webpack_require__(280), FUNC_ERROR_TEXT = "Expected a function"; + module.exports = throttle; +}, function(module, exports, __webpack_require__) { + function debounce(func, wait, options) { + function invokeFunc(time) { + var args = lastArgs, thisArg = lastThis; + return lastArgs = lastThis = void 0, lastInvokeTime = time, result = func.apply(thisArg, args); + } + function leadingEdge(time) { + return lastInvokeTime = time, timerId = setTimeout(timerExpired, wait), leading ? invokeFunc(time) : result; + } + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result = wait - timeSinceLastCall; + return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + } + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; + return void 0 === lastCallTime || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; + } + function timerExpired() { + var time = now(); + return shouldInvoke(time) ? trailingEdge(time) : void (timerId = setTimeout(timerExpired, remainingWait(time))); + } + function trailingEdge(time) { + return timerId = void 0, trailing && lastArgs ? invokeFunc(time) : (lastArgs = lastThis = void 0, + result); + } + function cancel() { + void 0 !== timerId && clearTimeout(timerId), lastInvokeTime = 0, lastArgs = lastCallTime = lastThis = timerId = void 0; + } + function flush() { + return void 0 === timerId ? result : trailingEdge(now()); + } + function debounced() { + var time = now(), isInvoking = shouldInvoke(time); + if (lastArgs = arguments, lastThis = this, lastCallTime = time, isInvoking) { + if (void 0 === timerId) return leadingEdge(lastCallTime); + if (maxing) return timerId = setTimeout(timerExpired, wait), invokeFunc(lastCallTime); + } + return void 0 === timerId && (timerId = setTimeout(timerExpired, wait)), result; + } + var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = !1, maxing = !1, trailing = !0; + if ("function" != typeof func) throw new TypeError(FUNC_ERROR_TEXT); + return wait = toNumber(wait) || 0, isObject(options) && (leading = !!options.leading, + maxing = "maxWait" in options, maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait, + trailing = "trailing" in options ? !!options.trailing : trailing), debounced.cancel = cancel, + debounced.flush = flush, debounced; + } + var isObject = __webpack_require__(280), now = __webpack_require__(422), toNumber = __webpack_require__(423), FUNC_ERROR_TEXT = "Expected a function", nativeMax = Math.max, nativeMin = Math.min; + module.exports = debounce; +}, function(module, exports, __webpack_require__) { + var root = __webpack_require__(250), now = function() { + return root.Date.now(); + }; + module.exports = now; +}, function(module, exports, __webpack_require__) { + function toNumber(value) { + if ("number" == typeof value) return value; + if (isSymbol(value)) return NAN; + if (isObject(value)) { + var other = "function" == typeof value.valueOf ? value.valueOf() : value; + value = isObject(other) ? other + "" : other; + } + if ("string" != typeof value) return 0 === value ? value : +value; + value = value.replace(reTrim, ""); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; + } + var isObject = __webpack_require__(280), isSymbol = __webpack_require__(358), NAN = NaN, reTrim = /^\s+|\s+$/g, reIsBadHex = /^[-+]0x[0-9a-f]+$/i, reIsBinary = /^0b[01]+$/i, reIsOctal = /^0o[0-7]+$/i, freeParseInt = parseInt; + module.exports = toNumber; +}, function(module, exports) { + "use strict"; + function calculateChange(e, skip, props, container) { + !skip && e.preventDefault(); + var containerWidth = container.clientWidth, containerHeight = container.clientHeight, x = "number" == typeof e.pageX ? e.pageX : e.touches[0].pageX, y = "number" == typeof e.pageY ? e.pageY : e.touches[0].pageY, left = x - (container.getBoundingClientRect().left + window.pageXOffset), top = y - (container.getBoundingClientRect().top + window.pageYOffset); + left < 0 ? left = 0 : left > containerWidth ? left = containerWidth : top < 0 ? top = 0 : top > containerHeight && (top = containerHeight); + var saturation = 100 * left / containerWidth, bright = -(100 * top / containerHeight) + 100; + return { + h: props.hsl.h, + s: saturation, + v: bright, + a: props.hsl.a, + source: "rgb" + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.calculateChange = calculateChange; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ColorWrap = void 0; + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _debounce = __webpack_require__(421), _debounce2 = _interopRequireDefault(_debounce), _color = __webpack_require__(426), _color2 = _interopRequireDefault(_color), ColorWrap = exports.ColorWrap = function(Picker) { + var ColorPicker = function(_ref) { + function ColorPicker(props) { + _classCallCheck(this, ColorPicker); + var _this = _possibleConstructorReturn(this, (ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call(this)); + return _this.handleChange = function(data, event) { + var isValidColor = _color2["default"].simpleCheckForValidColor(data); + if (isValidColor) { + var colors = _color2["default"].toState(data, data.h || _this.state.oldHue); + _this.setState(colors), _this.props.onChangeComplete && _this.debounce(_this.props.onChangeComplete, colors, event), + _this.props.onChange && _this.props.onChange(colors, event); + } + }, _this.state = _extends({}, _color2["default"].toState(props.color, 0), { + visible: props.display + }), _this.debounce = (0, _debounce2["default"])(function(fn, data, event) { + fn(data, event); + }, 100), _this; + } + return _inherits(ColorPicker, _ref), _createClass(ColorPicker, [ { + key: "componentWillReceiveProps", + value: function(nextProps) { + this.setState(_extends({}, _color2["default"].toState(nextProps.color, this.state.oldHue), { + visible: nextProps.display + })); + } + }, { + key: "render", + value: function() { + return _react2["default"].createElement(Picker, _extends({}, this.props, this.state, { + onChange: this.handleChange + })); + } + } ]), ColorPicker; + }(_react.PureComponent || _react.Component); + return ColorPicker.defaultProps = { + color: { + h: 250, + s: .5, + l: .2, + a: 1 + } + }, ColorPicker; + }; + exports["default"] = ColorWrap; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.red = void 0; + var _each = __webpack_require__(427), _each2 = _interopRequireDefault(_each), _tinycolor = __webpack_require__(429), _tinycolor2 = _interopRequireDefault(_tinycolor); + exports["default"] = { + simpleCheckForValidColor: function(data) { + var keysToCheck = [ "r", "g", "b", "a", "h", "s", "a", "v" ], checked = 0, passed = 0; + return (0, _each2["default"])(keysToCheck, function(letter) { + data[letter] && (checked += 1, isNaN(data[letter]) || (passed += 1)); + }), checked === passed && data; + }, + toState: function(data, oldHue) { + var color = data.hex ? (0, _tinycolor2["default"])(data.hex) : (0, _tinycolor2["default"])(data), hsl = color.toHsl(), hsv = color.toHsv(); + return 0 === hsl.s && (hsl.h = oldHue || 0, hsv.h = oldHue || 0), { + hsl: hsl, + hex: "#" + color.toHex(), + rgb: color.toRgb(), + hsv: hsv, + oldHue: data.h || oldHue || hsl.h, + source: data.source + }; + }, + isValidHex: function(hex) { + return (0, _tinycolor2["default"])(hex).isValid(); + } + }; + exports.red = { + hsl: { + a: 1, + h: 0, + l: .5, + s: 1 + }, + hex: "#ff0000", + rgb: { + r: 255, + g: 0, + b: 0, + a: 1 + }, + hsv: { + h: 0, + s: 1, + v: 1, + a: 1 + } + }; +}, function(module, exports, __webpack_require__) { + module.exports = __webpack_require__(428); +}, function(module, exports, __webpack_require__) { + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); + } + var arrayEach = __webpack_require__(377), baseEach = __webpack_require__(372), castFunction = __webpack_require__(281), isArray = __webpack_require__(254); + module.exports = forEach; +}, function(module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_RESULT__; + !function() { + function tinycolor(color, opts) { + if (color = color ? color : "", opts = opts || {}, color instanceof tinycolor) return color; + if (!(this instanceof tinycolor)) return new tinycolor(color, opts); + var rgb = inputToRGB(color); + this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, + this._a = rgb.a, this._roundA = mathRound(100 * this._a) / 100, this._format = opts.format || rgb.format, + this._gradientType = opts.gradientType, this._r < 1 && (this._r = mathRound(this._r)), + this._g < 1 && (this._g = mathRound(this._g)), this._b < 1 && (this._b = mathRound(this._b)), + this._ok = rgb.ok, this._tc_id = tinyCounter++; + } + function inputToRGB(color) { + var rgb = { + r: 0, + g: 0, + b: 0 + }, a = 1, ok = !1, format = !1; + return "string" == typeof color && (color = stringInputToObject(color)), "object" == typeof color && (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b") ? (rgb = rgbToRgb(color.r, color.g, color.b), + ok = !0, format = "%" === String(color.r).substr(-1) ? "prgb" : "rgb") : color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v") ? (color.s = convertToPercentage(color.s, 1), + color.v = convertToPercentage(color.v, 1), rgb = hsvToRgb(color.h, color.s, color.v), + ok = !0, format = "hsv") : color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l") && (color.s = convertToPercentage(color.s), + color.l = convertToPercentage(color.l), rgb = hslToRgb(color.h, color.s, color.l), + ok = !0, format = "hsl"), color.hasOwnProperty("a") && (a = color.a)), a = boundAlpha(a), + { + ok: ok, + format: color.format || format, + r: mathMin(255, mathMax(rgb.r, 0)), + g: mathMin(255, mathMax(rgb.g, 0)), + b: mathMin(255, mathMax(rgb.b, 0)), + a: a + }; + } + function rgbToRgb(r, g, b) { + return { + r: 255 * bound01(r, 255), + g: 255 * bound01(g, 255), + b: 255 * bound01(b, 255) + }; + } + function rgbToHsl(r, g, b) { + r = bound01(r, 255), g = bound01(g, 255), b = bound01(b, 255); + var h, s, max = mathMax(r, g, b), min = mathMin(r, g, b), l = (max + min) / 2; + if (max == min) h = s = 0; else { + var d = max - min; + switch (s = l > .5 ? d / (2 - max - min) : d / (max + min), max) { + case r: + h = (g - b) / d + (g < b ? 6 : 0); + break; + + case g: + h = (b - r) / d + 2; + break; + + case b: + h = (r - g) / d + 4; + } + h /= 6; + } + return { + h: h, + s: s, + l: l + }; + } + function hslToRgb(h, s, l) { + function hue2rgb(p, q, t) { + return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? p + 6 * (q - p) * t : t < .5 ? q : t < 2 / 3 ? p + (q - p) * (2 / 3 - t) * 6 : p; + } + var r, g, b; + if (h = bound01(h, 360), s = bound01(s, 100), l = bound01(l, 100), 0 === s) r = g = b = l; else { + var q = l < .5 ? l * (1 + s) : l + s - l * s, p = 2 * l - q; + r = hue2rgb(p, q, h + 1 / 3), g = hue2rgb(p, q, h), b = hue2rgb(p, q, h - 1 / 3); + } + return { + r: 255 * r, + g: 255 * g, + b: 255 * b + }; + } + function rgbToHsv(r, g, b) { + r = bound01(r, 255), g = bound01(g, 255), b = bound01(b, 255); + var h, s, max = mathMax(r, g, b), min = mathMin(r, g, b), v = max, d = max - min; + if (s = 0 === max ? 0 : d / max, max == min) h = 0; else { + switch (max) { + case r: + h = (g - b) / d + (g < b ? 6 : 0); + break; + + case g: + h = (b - r) / d + 2; + break; + + case b: + h = (r - g) / d + 4; + } + h /= 6; + } + return { + h: h, + s: s, + v: v + }; + } + function hsvToRgb(h, s, v) { + h = 6 * bound01(h, 360), s = bound01(s, 100), v = bound01(v, 100); + var i = math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [ v, q, p, p, t, v ][mod], g = [ t, v, v, q, p, p ][mod], b = [ p, p, t, v, v, q ][mod]; + return { + r: 255 * r, + g: 255 * g, + b: 255 * b + }; + } + function rgbToHex(r, g, b, allow3Char) { + var hex = [ pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ]; + return allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) ? hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) : hex.join(""); + } + function rgbaToHex(r, g, b, a) { + var hex = [ pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ]; + return hex.join(""); + } + function desaturate(color, amount) { + amount = 0 === amount ? 0 : amount || 10; + var hsl = tinycolor(color).toHsl(); + return hsl.s -= amount / 100, hsl.s = clamp01(hsl.s), tinycolor(hsl); + } + function saturate(color, amount) { + amount = 0 === amount ? 0 : amount || 10; + var hsl = tinycolor(color).toHsl(); + return hsl.s += amount / 100, hsl.s = clamp01(hsl.s), tinycolor(hsl); + } + function greyscale(color) { + return tinycolor(color).desaturate(100); + } + function lighten(color, amount) { + amount = 0 === amount ? 0 : amount || 10; + var hsl = tinycolor(color).toHsl(); + return hsl.l += amount / 100, hsl.l = clamp01(hsl.l), tinycolor(hsl); + } + function brighten(color, amount) { + amount = 0 === amount ? 0 : amount || 10; + var rgb = tinycolor(color).toRgb(); + return rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * -(amount / 100)))), + rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * -(amount / 100)))), rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * -(amount / 100)))), + tinycolor(rgb); + } + function darken(color, amount) { + amount = 0 === amount ? 0 : amount || 10; + var hsl = tinycolor(color).toHsl(); + return hsl.l -= amount / 100, hsl.l = clamp01(hsl.l), tinycolor(hsl); + } + function spin(color, amount) { + var hsl = tinycolor(color).toHsl(), hue = (mathRound(hsl.h) + amount) % 360; + return hsl.h = hue < 0 ? 360 + hue : hue, tinycolor(hsl); + } + function complement(color) { + var hsl = tinycolor(color).toHsl(); + return hsl.h = (hsl.h + 180) % 360, tinycolor(hsl); + } + function triad(color) { + var hsl = tinycolor(color).toHsl(), h = hsl.h; + return [ tinycolor(color), tinycolor({ + h: (h + 120) % 360, + s: hsl.s, + l: hsl.l + }), tinycolor({ + h: (h + 240) % 360, + s: hsl.s, + l: hsl.l + }) ]; + } + function tetrad(color) { + var hsl = tinycolor(color).toHsl(), h = hsl.h; + return [ tinycolor(color), tinycolor({ + h: (h + 90) % 360, + s: hsl.s, + l: hsl.l + }), tinycolor({ + h: (h + 180) % 360, + s: hsl.s, + l: hsl.l + }), tinycolor({ + h: (h + 270) % 360, + s: hsl.s, + l: hsl.l + }) ]; + } + function splitcomplement(color) { + var hsl = tinycolor(color).toHsl(), h = hsl.h; + return [ tinycolor(color), tinycolor({ + h: (h + 72) % 360, + s: hsl.s, + l: hsl.l + }), tinycolor({ + h: (h + 216) % 360, + s: hsl.s, + l: hsl.l + }) ]; + } + function analogous(color, results, slices) { + results = results || 6, slices = slices || 30; + var hsl = tinycolor(color).toHsl(), part = 360 / slices, ret = [ tinycolor(color) ]; + for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results; ) hsl.h = (hsl.h + part) % 360, + ret.push(tinycolor(hsl)); + return ret; + } + function monochromatic(color, results) { + results = results || 6; + for (var hsv = tinycolor(color).toHsv(), h = hsv.h, s = hsv.s, v = hsv.v, ret = [], modification = 1 / results; results--; ) ret.push(tinycolor({ + h: h, + s: s, + v: v + })), v = (v + modification) % 1; + return ret; + } + function flip(o) { + var flipped = {}; + for (var i in o) o.hasOwnProperty(i) && (flipped[o[i]] = i); + return flipped; + } + function boundAlpha(a) { + return a = parseFloat(a), (isNaN(a) || a < 0 || a > 1) && (a = 1), a; + } + function bound01(n, max) { + isOnePointZero(n) && (n = "100%"); + var processPercent = isPercentage(n); + return n = mathMin(max, mathMax(0, parseFloat(n))), processPercent && (n = parseInt(n * max, 10) / 100), + math.abs(n - max) < 1e-6 ? 1 : n % max / parseFloat(max); + } + function clamp01(val) { + return mathMin(1, mathMax(0, val)); + } + function parseIntFromHex(val) { + return parseInt(val, 16); + } + function isOnePointZero(n) { + return "string" == typeof n && n.indexOf(".") != -1 && 1 === parseFloat(n); + } + function isPercentage(n) { + return "string" == typeof n && n.indexOf("%") != -1; + } + function pad2(c) { + return 1 == c.length ? "0" + c : "" + c; + } + function convertToPercentage(n, multiplier) { + return multiplier = multiplier || 100, n <= 1 && (n = n * multiplier + "%"), n; + } + function convertDecimalToHex(d) { + return Math.round(255 * parseFloat(d)).toString(16); + } + function convertHexToDecimal(h) { + return parseIntFromHex(h) / 255; + } + function stringInputToObject(color) { + color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase(); + var named = !1; + if (names[color]) color = names[color], named = !0; else if ("transparent" == color) return { + r: 0, + g: 0, + b: 0, + a: 0, + format: "name" + }; + var match; + return (match = matchers.rgb.exec(color)) ? { + r: match[1], + g: match[2], + b: match[3] + } : (match = matchers.rgba.exec(color)) ? { + r: match[1], + g: match[2], + b: match[3], + a: match[4] + } : (match = matchers.hsl.exec(color)) ? { + h: match[1], + s: match[2], + l: match[3] + } : (match = matchers.hsla.exec(color)) ? { + h: match[1], + s: match[2], + l: match[3], + a: match[4] + } : (match = matchers.hsv.exec(color)) ? { + h: match[1], + s: match[2], + v: match[3] + } : (match = matchers.hsva.exec(color)) ? { + h: match[1], + s: match[2], + v: match[3], + a: match[4] + } : (match = matchers.hex8.exec(color)) ? { + a: convertHexToDecimal(match[1]), + r: parseIntFromHex(match[2]), + g: parseIntFromHex(match[3]), + b: parseIntFromHex(match[4]), + format: named ? "name" : "hex8" + } : (match = matchers.hex6.exec(color)) ? { + r: parseIntFromHex(match[1]), + g: parseIntFromHex(match[2]), + b: parseIntFromHex(match[3]), + format: named ? "name" : "hex" + } : !!(match = matchers.hex3.exec(color)) && { + r: parseIntFromHex(match[1] + "" + match[1]), + g: parseIntFromHex(match[2] + "" + match[2]), + b: parseIntFromHex(match[3] + "" + match[3]), + format: named ? "name" : "hex" + }; + } + function validateWCAG2Parms(parms) { + var level, size; + return parms = parms || { + level: "AA", + size: "small" + }, level = (parms.level || "AA").toUpperCase(), size = (parms.size || "small").toLowerCase(), + "AA" !== level && "AAA" !== level && (level = "AA"), "small" !== size && "large" !== size && (size = "small"), + { + level: level, + size: size + }; + } + var trimLeft = /^[\s,#]+/, trimRight = /\s+$/, tinyCounter = 0, math = Math, mathRound = math.round, mathMin = math.min, mathMax = math.max, mathRandom = math.random; + tinycolor.prototype = { + isDark: function() { + return this.getBrightness() < 128; + }, + isLight: function() { + return !this.isDark(); + }, + isValid: function() { + return this._ok; + }, + getOriginalInput: function() { + return this._originalInput; + }, + getFormat: function() { + return this._format; + }, + getAlpha: function() { + return this._a; + }, + getBrightness: function() { + var rgb = this.toRgb(); + return (299 * rgb.r + 587 * rgb.g + 114 * rgb.b) / 1e3; + }, + getLuminance: function() { + var RsRGB, GsRGB, BsRGB, R, G, B, rgb = this.toRgb(); + return RsRGB = rgb.r / 255, GsRGB = rgb.g / 255, BsRGB = rgb.b / 255, R = RsRGB <= .03928 ? RsRGB / 12.92 : Math.pow((RsRGB + .055) / 1.055, 2.4), + G = GsRGB <= .03928 ? GsRGB / 12.92 : Math.pow((GsRGB + .055) / 1.055, 2.4), B = BsRGB <= .03928 ? BsRGB / 12.92 : Math.pow((BsRGB + .055) / 1.055, 2.4), + .2126 * R + .7152 * G + .0722 * B; + }, + setAlpha: function(value) { + return this._a = boundAlpha(value), this._roundA = mathRound(100 * this._a) / 100, + this; + }, + toHsv: function() { + var hsv = rgbToHsv(this._r, this._g, this._b); + return { + h: 360 * hsv.h, + s: hsv.s, + v: hsv.v, + a: this._a + }; + }, + toHsvString: function() { + var hsv = rgbToHsv(this._r, this._g, this._b), h = mathRound(360 * hsv.h), s = mathRound(100 * hsv.s), v = mathRound(100 * hsv.v); + return 1 == this._a ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")"; + }, + toHsl: function() { + var hsl = rgbToHsl(this._r, this._g, this._b); + return { + h: 360 * hsl.h, + s: hsl.s, + l: hsl.l, + a: this._a + }; + }, + toHslString: function() { + var hsl = rgbToHsl(this._r, this._g, this._b), h = mathRound(360 * hsl.h), s = mathRound(100 * hsl.s), l = mathRound(100 * hsl.l); + return 1 == this._a ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")"; + }, + toHex: function(allow3Char) { + return rgbToHex(this._r, this._g, this._b, allow3Char); + }, + toHexString: function(allow3Char) { + return "#" + this.toHex(allow3Char); + }, + toHex8: function() { + return rgbaToHex(this._r, this._g, this._b, this._a); + }, + toHex8String: function() { + return "#" + this.toHex8(); + }, + toRgb: function() { + return { + r: mathRound(this._r), + g: mathRound(this._g), + b: mathRound(this._b), + a: this._a + }; + }, + toRgbString: function() { + return 1 == this._a ? "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" : "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")"; + }, + toPercentageRgb: function() { + return { + r: mathRound(100 * bound01(this._r, 255)) + "%", + g: mathRound(100 * bound01(this._g, 255)) + "%", + b: mathRound(100 * bound01(this._b, 255)) + "%", + a: this._a + }; + }, + toPercentageRgbString: function() { + return 1 == this._a ? "rgb(" + mathRound(100 * bound01(this._r, 255)) + "%, " + mathRound(100 * bound01(this._g, 255)) + "%, " + mathRound(100 * bound01(this._b, 255)) + "%)" : "rgba(" + mathRound(100 * bound01(this._r, 255)) + "%, " + mathRound(100 * bound01(this._g, 255)) + "%, " + mathRound(100 * bound01(this._b, 255)) + "%, " + this._roundA + ")"; + }, + toName: function() { + return 0 === this._a ? "transparent" : !(this._a < 1) && (hexNames[rgbToHex(this._r, this._g, this._b, !0)] || !1); + }, + toFilter: function(secondColor) { + var hex8String = "#" + rgbaToHex(this._r, this._g, this._b, this._a), secondHex8String = hex8String, gradientType = this._gradientType ? "GradientType = 1, " : ""; + if (secondColor) { + var s = tinycolor(secondColor); + secondHex8String = s.toHex8String(); + } + return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")"; + }, + toString: function(format) { + var formatSet = !!format; + format = format || this._format; + var formattedString = !1, hasAlpha = this._a < 1 && this._a >= 0, needsAlphaFormat = !formatSet && hasAlpha && ("hex" === format || "hex6" === format || "hex3" === format || "name" === format); + return needsAlphaFormat ? "name" === format && 0 === this._a ? this.toName() : this.toRgbString() : ("rgb" === format && (formattedString = this.toRgbString()), + "prgb" === format && (formattedString = this.toPercentageRgbString()), "hex" !== format && "hex6" !== format || (formattedString = this.toHexString()), + "hex3" === format && (formattedString = this.toHexString(!0)), "hex8" === format && (formattedString = this.toHex8String()), + "name" === format && (formattedString = this.toName()), "hsl" === format && (formattedString = this.toHslString()), + "hsv" === format && (formattedString = this.toHsvString()), formattedString || this.toHexString()); + }, + _applyModification: function(fn, args) { + var color = fn.apply(null, [ this ].concat([].slice.call(args))); + return this._r = color._r, this._g = color._g, this._b = color._b, this.setAlpha(color._a), + this; + }, + lighten: function() { + return this._applyModification(lighten, arguments); + }, + brighten: function() { + return this._applyModification(brighten, arguments); + }, + darken: function() { + return this._applyModification(darken, arguments); + }, + desaturate: function() { + return this._applyModification(desaturate, arguments); + }, + saturate: function() { + return this._applyModification(saturate, arguments); + }, + greyscale: function() { + return this._applyModification(greyscale, arguments); + }, + spin: function() { + return this._applyModification(spin, arguments); + }, + _applyCombination: function(fn, args) { + return fn.apply(null, [ this ].concat([].slice.call(args))); + }, + analogous: function() { + return this._applyCombination(analogous, arguments); + }, + complement: function() { + return this._applyCombination(complement, arguments); + }, + monochromatic: function() { + return this._applyCombination(monochromatic, arguments); + }, + splitcomplement: function() { + return this._applyCombination(splitcomplement, arguments); + }, + triad: function() { + return this._applyCombination(triad, arguments); + }, + tetrad: function() { + return this._applyCombination(tetrad, arguments); + } + }, tinycolor.fromRatio = function(color, opts) { + if ("object" == typeof color) { + var newColor = {}; + for (var i in color) color.hasOwnProperty(i) && ("a" === i ? newColor[i] = color[i] : newColor[i] = convertToPercentage(color[i])); + color = newColor; + } + return tinycolor(color, opts); + }, tinycolor.equals = function(color1, color2) { + return !(!color1 || !color2) && tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); + }, tinycolor.random = function() { + return tinycolor.fromRatio({ + r: mathRandom(), + g: mathRandom(), + b: mathRandom() + }); + }, tinycolor.mix = function(color1, color2, amount) { + amount = 0 === amount ? 0 : amount || 50; + var w1, rgb1 = tinycolor(color1).toRgb(), rgb2 = tinycolor(color2).toRgb(), p = amount / 100, w = 2 * p - 1, a = rgb2.a - rgb1.a; + w1 = w * a == -1 ? w : (w + a) / (1 + w * a), w1 = (w1 + 1) / 2; + var w2 = 1 - w1, rgba = { + r: rgb2.r * w1 + rgb1.r * w2, + g: rgb2.g * w1 + rgb1.g * w2, + b: rgb2.b * w1 + rgb1.b * w2, + a: rgb2.a * p + rgb1.a * (1 - p) + }; + return tinycolor(rgba); + }, tinycolor.readability = function(color1, color2) { + var c1 = tinycolor(color1), c2 = tinycolor(color2); + return (Math.max(c1.getLuminance(), c2.getLuminance()) + .05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + .05); + }, tinycolor.isReadable = function(color1, color2, wcag2) { + var wcag2Parms, out, readability = tinycolor.readability(color1, color2); + switch (out = !1, wcag2Parms = validateWCAG2Parms(wcag2), wcag2Parms.level + wcag2Parms.size) { + case "AAsmall": + case "AAAlarge": + out = readability >= 4.5; + break; + + case "AAlarge": + out = readability >= 3; + break; + + case "AAAsmall": + out = readability >= 7; + } + return out; + }, tinycolor.mostReadable = function(baseColor, colorList, args) { + var readability, includeFallbackColors, level, size, bestColor = null, bestScore = 0; + args = args || {}, includeFallbackColors = args.includeFallbackColors, level = args.level, + size = args.size; + for (var i = 0; i < colorList.length; i++) readability = tinycolor.readability(baseColor, colorList[i]), + readability > bestScore && (bestScore = readability, bestColor = tinycolor(colorList[i])); + return tinycolor.isReadable(baseColor, bestColor, { + level: level, + size: size + }) || !includeFallbackColors ? bestColor : (args.includeFallbackColors = !1, tinycolor.mostReadable(baseColor, [ "#fff", "#000" ], args)); + }; + var names = tinycolor.names = { + aliceblue: "f0f8ff", + antiquewhite: "faebd7", + aqua: "0ff", + aquamarine: "7fffd4", + azure: "f0ffff", + beige: "f5f5dc", + bisque: "ffe4c4", + black: "000", + blanchedalmond: "ffebcd", + blue: "00f", + blueviolet: "8a2be2", + brown: "a52a2a", + burlywood: "deb887", + burntsienna: "ea7e5d", + cadetblue: "5f9ea0", + chartreuse: "7fff00", + chocolate: "d2691e", + coral: "ff7f50", + cornflowerblue: "6495ed", + cornsilk: "fff8dc", + crimson: "dc143c", + cyan: "0ff", + darkblue: "00008b", + darkcyan: "008b8b", + darkgoldenrod: "b8860b", + darkgray: "a9a9a9", + darkgreen: "006400", + darkgrey: "a9a9a9", + darkkhaki: "bdb76b", + darkmagenta: "8b008b", + darkolivegreen: "556b2f", + darkorange: "ff8c00", + darkorchid: "9932cc", + darkred: "8b0000", + darksalmon: "e9967a", + darkseagreen: "8fbc8f", + darkslateblue: "483d8b", + darkslategray: "2f4f4f", + darkslategrey: "2f4f4f", + darkturquoise: "00ced1", + darkviolet: "9400d3", + deeppink: "ff1493", + deepskyblue: "00bfff", + dimgray: "696969", + dimgrey: "696969", + dodgerblue: "1e90ff", + firebrick: "b22222", + floralwhite: "fffaf0", + forestgreen: "228b22", + fuchsia: "f0f", + gainsboro: "dcdcdc", + ghostwhite: "f8f8ff", + gold: "ffd700", + goldenrod: "daa520", + gray: "808080", + green: "008000", + greenyellow: "adff2f", + grey: "808080", + honeydew: "f0fff0", + hotpink: "ff69b4", + indianred: "cd5c5c", + indigo: "4b0082", + ivory: "fffff0", + khaki: "f0e68c", + lavender: "e6e6fa", + lavenderblush: "fff0f5", + lawngreen: "7cfc00", + lemonchiffon: "fffacd", + lightblue: "add8e6", + lightcoral: "f08080", + lightcyan: "e0ffff", + lightgoldenrodyellow: "fafad2", + lightgray: "d3d3d3", + lightgreen: "90ee90", + lightgrey: "d3d3d3", + lightpink: "ffb6c1", + lightsalmon: "ffa07a", + lightseagreen: "20b2aa", + lightskyblue: "87cefa", + lightslategray: "789", + lightslategrey: "789", + lightsteelblue: "b0c4de", + lightyellow: "ffffe0", + lime: "0f0", + limegreen: "32cd32", + linen: "faf0e6", + magenta: "f0f", + maroon: "800000", + mediumaquamarine: "66cdaa", + mediumblue: "0000cd", + mediumorchid: "ba55d3", + mediumpurple: "9370db", + mediumseagreen: "3cb371", + mediumslateblue: "7b68ee", + mediumspringgreen: "00fa9a", + mediumturquoise: "48d1cc", + mediumvioletred: "c71585", + midnightblue: "191970", + mintcream: "f5fffa", + mistyrose: "ffe4e1", + moccasin: "ffe4b5", + navajowhite: "ffdead", + navy: "000080", + oldlace: "fdf5e6", + olive: "808000", + olivedrab: "6b8e23", + orange: "ffa500", + orangered: "ff4500", + orchid: "da70d6", + palegoldenrod: "eee8aa", + palegreen: "98fb98", + paleturquoise: "afeeee", + palevioletred: "db7093", + papayawhip: "ffefd5", + peachpuff: "ffdab9", + peru: "cd853f", + pink: "ffc0cb", + plum: "dda0dd", + powderblue: "b0e0e6", + purple: "800080", + rebeccapurple: "663399", + red: "f00", + rosybrown: "bc8f8f", + royalblue: "4169e1", + saddlebrown: "8b4513", + salmon: "fa8072", + sandybrown: "f4a460", + seagreen: "2e8b57", + seashell: "fff5ee", + sienna: "a0522d", + silver: "c0c0c0", + skyblue: "87ceeb", + slateblue: "6a5acd", + slategray: "708090", + slategrey: "708090", + snow: "fffafa", + springgreen: "00ff7f", + steelblue: "4682b4", + tan: "d2b48c", + teal: "008080", + thistle: "d8bfd8", + tomato: "ff6347", + turquoise: "40e0d0", + violet: "ee82ee", + wheat: "f5deb3", + white: "fff", + whitesmoke: "f5f5f5", + yellow: "ff0", + yellowgreen: "9acd32" + }, hexNames = tinycolor.hexNames = flip(names), matchers = function() { + var CSS_INTEGER = "[-\\+]?\\d+%?", CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?", CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")", PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?", PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; + return { + rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), + rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), + hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), + hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), + hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), + hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), + hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, + hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, + hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ + }; + }(); + "undefined" != typeof module && module.exports ? module.exports = tinycolor : (__WEBPACK_AMD_DEFINE_RESULT__ = function() { + return tinycolor; + }.call(exports, __webpack_require__, exports, module), !(void 0 !== __WEBPACK_AMD_DEFINE_RESULT__ && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))); + }(); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Swatch = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), Swatch = exports.Swatch = function(_ref) { + var color = _ref.color, style = _ref.style, onClick = _ref.onClick, _ref$title = _ref.title, title = void 0 === _ref$title ? color : _ref$title, styles = (0, + _reactcss2["default"])({ + "default": { + swatch: { + background: color, + height: "100%", + width: "100%", + cursor: "pointer" + } + }, + custom: { + swatch: style + } + }, "custom"), handleClick = function(e) { + return onClick(color, e); + }; + return _react2["default"].createElement("div", { + style: styles.swatch, + onClick: handleClick, + title: title + }); + }; + exports["default"] = Swatch; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.AlphaPointer = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), AlphaPointer = exports.AlphaPointer = function(_ref) { + var direction = _ref.direction, styles = (0, _reactcss2["default"])({ + "default": { + picker: { + width: "18px", + height: "18px", + borderRadius: "50%", + transform: "translate(-9px, -1px)", + backgroundColor: "rgb(248, 248, 248)", + boxShadow: "0 1px 4px 0 rgba(0, 0, 0, 0.37)" + } + }, + vertical: { + picker: { + transform: "translate(-3px, -9px)" + } + } + }, { + vertical: "vertical" === direction + }); + return _react2["default"].createElement("div", { + style: styles.picker + }); + }; + exports["default"] = AlphaPointer; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Block = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _color = __webpack_require__(426), _color2 = _interopRequireDefault(_color), _common = __webpack_require__(411), _BlockSwatches = __webpack_require__(433), _BlockSwatches2 = _interopRequireDefault(_BlockSwatches), Block = exports.Block = function(_ref) { + var onChange = _ref.onChange, hex = _ref.hex, colors = _ref.colors, width = _ref.width, triangle = _ref.triangle, handleChange = function(hexCode, e) { + _color2["default"].isValidHex(hexCode) && onChange({ + hex: hexCode, + source: "hex" + }, e); + }, styles = (0, _reactcss2["default"])({ + "default": { + card: { + width: width, + background: "#fff", + boxShadow: "0 1px rgba(0,0,0,.1)", + borderRadius: "6px", + position: "relative" + }, + head: { + height: "110px", + background: hex, + borderRadius: "6px 6px 0 0", + display: "flex", + alignItems: "center", + justifyContent: "center" + }, + body: { + padding: "10px" + }, + label: { + fontSize: "18px", + color: "#fff" + }, + triangle: { + width: "0px", + height: "0px", + borderStyle: "solid", + borderWidth: "0 10px 10px 10px", + borderColor: "transparent transparent " + hex + " transparent", + position: "absolute", + top: "-10px", + left: "50%", + marginLeft: "-10px" + }, + input: { + width: "100%", + fontSize: "12px", + color: "#666", + border: "0px", + outline: "none", + height: "22px", + boxShadow: "inset 0 0 0 1px #ddd", + borderRadius: "4px", + padding: "0 7px", + boxSizing: "border-box" + } + }, + "hide-triangle": { + triangle: { + display: "none" + } + } + }, { + "hide-triangle": "hide" === triangle + }); + return _react2["default"].createElement("div", { + style: styles.card, + className: "block-picker" + }, _react2["default"].createElement("div", { + style: styles.triangle + }), _react2["default"].createElement("div", { + style: styles.head + }, _react2["default"].createElement("div", { + style: styles.label + }, hex)), _react2["default"].createElement("div", { + style: styles.body + }, _react2["default"].createElement(_BlockSwatches2["default"], { + colors: colors, + onClick: handleChange + }), _react2["default"].createElement(_common.EditableInput, { + placeholder: "Hex Code", + style: { + input: styles.input + }, + value: "", + onChange: handleChange + }))); + }; + Block.defaultProps = { + width: "170px", + colors: [ "#D9E3F0", "#F47373", "#697689", "#37D67A", "#2CCCE4", "#555555", "#dce775", "#ff8a65", "#ba68c8" ], + triangle: "top" + }, exports["default"] = (0, _common.ColorWrap)(Block); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.BlockSwatches = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(285), _map2 = _interopRequireDefault(_map), _common = __webpack_require__(411), BlockSwatches = exports.BlockSwatches = function(_ref) { + var colors = _ref.colors, onClick = _ref.onClick, styles = (0, _reactcss2["default"])({ + "default": { + swatches: { + marginRight: "-10px" + }, + swatch: { + width: "22px", + height: "22px", + "float": "left", + marginRight: "10px", + marginBottom: "10px", + borderRadius: "4px" + }, + clear: { + clear: "both" + } + } + }); + return _react2["default"].createElement("div", { + style: styles.swatches + }, (0, _map2["default"])(colors, function(c) { + return _react2["default"].createElement(_common.Swatch, { + key: c, + color: c, + style: styles.swatch, + onClick: onClick + }); + }), _react2["default"].createElement("div", { + style: styles.clear + })); + }; + exports["default"] = BlockSwatches; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) return obj; + var newObj = {}; + if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]); + return newObj["default"] = obj, newObj; + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Circle = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(285), _map2 = _interopRequireDefault(_map), _materialColors = __webpack_require__(435), material = _interopRequireWildcard(_materialColors), _common = __webpack_require__(411), _CircleSwatch = __webpack_require__(436), _CircleSwatch2 = _interopRequireDefault(_CircleSwatch), Circle = exports.Circle = function(_ref) { + var width = _ref.width, onChange = _ref.onChange, colors = _ref.colors, hex = _ref.hex, circleSize = _ref.circleSize, circleSpacing = _ref.circleSpacing, styles = (0, + _reactcss2["default"])({ + "default": { + card: { + width: width, + display: "flex", + flexWrap: "wrap", + marginRight: -circleSpacing, + marginBottom: -circleSpacing + } + } + }), handleChange = function(hexCode, e) { + return onChange({ + hex: hexCode, + source: "hex" + }, e); + }; + return _react2["default"].createElement("div", { + style: styles.card, + className: "circle-picker" + }, (0, _map2["default"])(colors, function(c) { + return _react2["default"].createElement(_CircleSwatch2["default"], { + key: c, + color: c, + onClick: handleChange, + active: hex === c.toLowerCase(), + circleSize: circleSize, + circleSpacing: circleSpacing + }); + })); + }; + Circle.defaultProps = { + width: "252px", + circleSize: 28, + circleSpacing: 14, + colors: [ material.red[500], material.pink[500], material.purple[500], material.deepPurple[500], material.indigo[500], material.blue[500], material.lightBlue[500], material.cyan[500], material.teal[500], material.green[500], material.lightGreen[500], material.lime[500], material.yellow[500], material.amber[500], material.orange[500], material.deepOrange[500], material.brown[500], material.blueGrey[500] ] + }, exports["default"] = (0, _common.ColorWrap)(Circle); +}, function(module, exports, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; + !function(root, factory) { + __WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof __WEBPACK_AMD_DEFINE_FACTORY__ ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, + !(void 0 !== __WEBPACK_AMD_DEFINE_RESULT__ && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + }(this, function() { + return { + red: { + "50": "#ffebee", + "100": "#ffcdd2", + "200": "#ef9a9a", + "300": "#e57373", + "400": "#ef5350", + "500": "#f44336", + "600": "#e53935", + "700": "#d32f2f", + "800": "#c62828", + "900": "#b71c1c", + a100: "#ff8a80", + a200: "#ff5252", + a400: "#ff1744", + a700: "#d50000" + }, + pink: { + "50": "#fce4ec", + "100": "#f8bbd0", + "200": "#f48fb1", + "300": "#f06292", + "400": "#ec407a", + "500": "#e91e63", + "600": "#d81b60", + "700": "#c2185b", + "800": "#ad1457", + "900": "#880e4f", + a100: "#ff80ab", + a200: "#ff4081", + a400: "#f50057", + a700: "#c51162" + }, + purple: { + "50": "#f3e5f5", + "100": "#e1bee7", + "200": "#ce93d8", + "300": "#ba68c8", + "400": "#ab47bc", + "500": "#9c27b0", + "600": "#8e24aa", + "700": "#7b1fa2", + "800": "#6a1b9a", + "900": "#4a148c", + a100: "#ea80fc", + a200: "#e040fb", + a400: "#d500f9", + a700: "#aa00ff" + }, + deepPurple: { + "50": "#ede7f6", + "100": "#d1c4e9", + "200": "#b39ddb", + "300": "#9575cd", + "400": "#7e57c2", + "500": "#673ab7", + "600": "#5e35b1", + "700": "#512da8", + "800": "#4527a0", + "900": "#311b92", + a100: "#b388ff", + a200: "#7c4dff", + a400: "#651fff", + a700: "#6200ea" + }, + indigo: { + "50": "#e8eaf6", + "100": "#c5cae9", + "200": "#9fa8da", + "300": "#7986cb", + "400": "#5c6bc0", + "500": "#3f51b5", + "600": "#3949ab", + "700": "#303f9f", + "800": "#283593", + "900": "#1a237e", + a100: "#8c9eff", + a200: "#536dfe", + a400: "#3d5afe", + a700: "#304ffe" + }, + blue: { + "50": "#e3f2fd", + "100": "#bbdefb", + "200": "#90caf9", + "300": "#64b5f6", + "400": "#42a5f5", + "500": "#2196f3", + "600": "#1e88e5", + "700": "#1976d2", + "800": "#1565c0", + "900": "#0d47a1", + a100: "#82b1ff", + a200: "#448aff", + a400: "#2979ff", + a700: "#2962ff" + }, + lightBlue: { + "50": "#e1f5fe", + "100": "#b3e5fc", + "200": "#81d4fa", + "300": "#4fc3f7", + "400": "#29b6f6", + "500": "#03a9f4", + "600": "#039be5", + "700": "#0288d1", + "800": "#0277bd", + "900": "#01579b", + a100: "#80d8ff", + a200: "#40c4ff", + a400: "#00b0ff", + a700: "#0091ea" + }, + cyan: { + "50": "#e0f7fa", + "100": "#b2ebf2", + "200": "#80deea", + "300": "#4dd0e1", + "400": "#26c6da", + "500": "#00bcd4", + "600": "#00acc1", + "700": "#0097a7", + "800": "#00838f", + "900": "#006064", + a100: "#84ffff", + a200: "#18ffff", + a400: "#00e5ff", + a700: "#00b8d4" + }, + teal: { + "50": "#e0f2f1", + "100": "#b2dfdb", + "200": "#80cbc4", + "300": "#4db6ac", + "400": "#26a69a", + "500": "#009688", + "600": "#00897b", + "700": "#00796b", + "800": "#00695c", + "900": "#004d40", + a100: "#a7ffeb", + a200: "#64ffda", + a400: "#1de9b6", + a700: "#00bfa5" + }, + green: { + "50": "#e8f5e9", + "100": "#c8e6c9", + "200": "#a5d6a7", + "300": "#81c784", + "400": "#66bb6a", + "500": "#4caf50", + "600": "#43a047", + "700": "#388e3c", + "800": "#2e7d32", + "900": "#1b5e20", + a100: "#b9f6ca", + a200: "#69f0ae", + a400: "#00e676", + a700: "#00c853" + }, + lightGreen: { + "50": "#f1f8e9", + "100": "#dcedc8", + "200": "#c5e1a5", + "300": "#aed581", + "400": "#9ccc65", + "500": "#8bc34a", + "600": "#7cb342", + "700": "#689f38", + "800": "#558b2f", + "900": "#33691e", + a100: "#ccff90", + a200: "#b2ff59", + a400: "#76ff03", + a700: "#64dd17" + }, + lime: { + "50": "#f9fbe7", + "100": "#f0f4c3", + "200": "#e6ee9c", + "300": "#dce775", + "400": "#d4e157", + "500": "#cddc39", + "600": "#c0ca33", + "700": "#afb42b", + "800": "#9e9d24", + "900": "#827717", + a100: "#f4ff81", + a200: "#eeff41", + a400: "#c6ff00", + a700: "#aeea00" + }, + yellow: { + "50": "#fffde7", + "100": "#fff9c4", + "200": "#fff59d", + "300": "#fff176", + "400": "#ffee58", + "500": "#ffeb3b", + "600": "#fdd835", + "700": "#fbc02d", + "800": "#f9a825", + "900": "#f57f17", + a100: "#ffff8d", + a200: "#ffff00", + a400: "#ffea00", + a700: "#ffd600" + }, + amber: { + "50": "#fff8e1", + "100": "#ffecb3", + "200": "#ffe082", + "300": "#ffd54f", + "400": "#ffca28", + "500": "#ffc107", + "600": "#ffb300", + "700": "#ffa000", + "800": "#ff8f00", + "900": "#ff6f00", + a100: "#ffe57f", + a200: "#ffd740", + a400: "#ffc400", + a700: "#ffab00" + }, + orange: { + "50": "#fff3e0", + "100": "#ffe0b2", + "200": "#ffcc80", + "300": "#ffb74d", + "400": "#ffa726", + "500": "#ff9800", + "600": "#fb8c00", + "700": "#f57c00", + "800": "#ef6c00", + "900": "#e65100", + a100: "#ffd180", + a200: "#ffab40", + a400: "#ff9100", + a700: "#ff6d00" + }, + deepOrange: { + "50": "#fbe9e7", + "100": "#ffccbc", + "200": "#ffab91", + "300": "#ff8a65", + "400": "#ff7043", + "500": "#ff5722", + "600": "#f4511e", + "700": "#e64a19", + "800": "#d84315", + "900": "#bf360c", + a100: "#ff9e80", + a200: "#ff6e40", + a400: "#ff3d00", + a700: "#dd2c00" + }, + brown: { + "50": "#efebe9", + "100": "#d7ccc8", + "200": "#bcaaa4", + "300": "#a1887f", + "400": "#8d6e63", + "500": "#795548", + "600": "#6d4c41", + "700": "#5d4037", + "800": "#4e342e", + "900": "#3e2723" + }, + grey: { + "50": "#fafafa", + "100": "#f5f5f5", + "200": "#eeeeee", + "300": "#e0e0e0", + "400": "#bdbdbd", + "500": "#9e9e9e", + "600": "#757575", + "700": "#616161", + "800": "#424242", + "900": "#212121" + }, + blueGrey: { + "50": "#eceff1", + "100": "#cfd8dc", + "200": "#b0bec5", + "300": "#90a4ae", + "400": "#78909c", + "500": "#607d8b", + "600": "#546e7a", + "700": "#455a64", + "800": "#37474f", + "900": "#263238" + }, + darkText: { + primary: "rgba(0, 0, 0, 0.87)", + secondary: "rgba(0, 0, 0, 0.54)", + disabled: "rgba(0, 0, 0, 0.38)", + dividers: "rgba(0, 0, 0, 0.12)" + }, + lightText: { + primary: "rgba(255, 255, 255, 1)", + secondary: "rgba(255, 255, 255, 0.7)", + disabled: "rgba(255, 255, 255, 0.5)", + dividers: "rgba(255, 255, 255, 0.12)" + }, + darkIcons: { + active: "rgba(0, 0, 0, 0.54)", + inactive: "rgba(0, 0, 0, 0.38)" + }, + lightIcons: { + active: "rgba(255, 255, 255, 1)", + inactive: "rgba(255, 255, 255, 0.5)" + }, + white: "#ffffff", + black: "#000000" + }; + }); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.CircleSwatch = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(411), CircleSwatch = exports.CircleSwatch = function(_ref) { + var color = _ref.color, onClick = _ref.onClick, hover = _ref.hover, active = _ref.active, circleSize = _ref.circleSize, circleSpacing = _ref.circleSpacing, styles = (0, + _reactcss2["default"])({ + "default": { + swatch: { + width: circleSize, + height: circleSize, + marginRight: circleSpacing, + marginBottom: circleSpacing, + transform: "scale(1)", + transition: "100ms transform ease" + }, + Swatch: { + borderRadius: "50%", + background: "transparent", + boxShadow: "inset 0 0 0 " + circleSize / 2 + "px " + color, + transition: "100ms box-shadow ease" + } + }, + hover: { + swatch: { + transform: "scale(1.2)" + } + }, + active: { + Swatch: { + boxShadow: "inset 0 0 0 3px " + color + } + } + }, { + hover: hover, + active: active + }); + return _react2["default"].createElement("div", { + style: styles.swatch + }, _react2["default"].createElement(_common.Swatch, { + style: styles.Swatch, + color: color, + onClick: onClick + })); + }; + CircleSwatch.defaultProps = { + circleSize: 28, + circleSpacing: 14 + }, exports["default"] = (0, _reactcss.handleHover)(CircleSwatch); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Chrome = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(411), _ChromeFields = __webpack_require__(438), _ChromeFields2 = _interopRequireDefault(_ChromeFields), _ChromePointer = __webpack_require__(439), _ChromePointer2 = _interopRequireDefault(_ChromePointer), _ChromePointerCircle = __webpack_require__(440), _ChromePointerCircle2 = _interopRequireDefault(_ChromePointerCircle), Chrome = exports.Chrome = function(_ref) { + var onChange = _ref.onChange, disableAlpha = _ref.disableAlpha, rgb = _ref.rgb, hsl = _ref.hsl, hsv = _ref.hsv, hex = _ref.hex, renderers = _ref.renderers, styles = (0, + _reactcss2["default"])({ + "default": { + picker: { + background: "#fff", + borderRadius: "2px", + boxShadow: "0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)", + boxSizing: "initial", + width: "225px", + fontFamily: "Menlo" + }, + saturation: { + width: "100%", + paddingBottom: "55%", + position: "relative", + borderRadius: "2px 2px 0 0", + overflow: "hidden" + }, + Saturation: { + radius: "2px 2px 0 0" + }, + body: { + padding: "16px 16px 12px" + }, + controls: { + display: "flex" + }, + color: { + width: "32px" + }, + swatch: { + marginTop: "6px", + width: "16px", + height: "16px", + borderRadius: "8px", + position: "relative", + overflow: "hidden" + }, + active: { + absolute: "0px 0px 0px 0px", + borderRadius: "8px", + boxShadow: "inset 0 0 0 1px rgba(0,0,0,.1)", + background: "rgba(" + rgb.r + ", " + rgb.g + ", " + rgb.b + ", " + rgb.a + ")", + zIndex: "2" + }, + toggles: { + flex: "1" + }, + hue: { + height: "10px", + position: "relative", + marginBottom: "8px" + }, + Hue: { + radius: "2px" + }, + alpha: { + height: "10px", + position: "relative" + }, + Alpha: { + radius: "2px" + } + }, + disableAlpha: { + color: { + width: "22px" + }, + alpha: { + display: "none" + }, + hue: { + marginBottom: "0px" + }, + swatch: { + width: "10px", + height: "10px", + marginTop: "0px" + } + } + }, { + disableAlpha: disableAlpha + }); + return _react2["default"].createElement("div", { + style: styles.picker, + className: "chrome-picker" + }, _react2["default"].createElement("div", { + style: styles.saturation + }, _react2["default"].createElement(_common.Saturation, { + style: styles.Saturation, + hsl: hsl, + hsv: hsv, + pointer: _ChromePointerCircle2["default"], + onChange: onChange + })), _react2["default"].createElement("div", { + style: styles.body + }, _react2["default"].createElement("div", { + style: styles.controls, + className: "flexbox-fix" + }, _react2["default"].createElement("div", { + style: styles.color + }, _react2["default"].createElement("div", { + style: styles.swatch + }, _react2["default"].createElement("div", { + style: styles.active + }), _react2["default"].createElement(_common.Checkboard, { + renderers: renderers + }))), _react2["default"].createElement("div", { + style: styles.toggles + }, _react2["default"].createElement("div", { + style: styles.hue + }, _react2["default"].createElement(_common.Hue, { + style: styles.Hue, + hsl: hsl, + pointer: _ChromePointer2["default"], + onChange: onChange + })), _react2["default"].createElement("div", { + style: styles.alpha + }, _react2["default"].createElement(_common.Alpha, { + style: styles.Alpha, + rgb: rgb, + hsl: hsl, + pointer: _ChromePointer2["default"], + renderers: renderers, + onChange: onChange + })))), _react2["default"].createElement(_ChromeFields2["default"], { + rgb: rgb, + hsl: hsl, + hex: hex, + onChange: onChange, + disableAlpha: disableAlpha + }))); + }; + exports["default"] = (0, _common.ColorWrap)(Chrome); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ChromeFields = void 0; + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _color = __webpack_require__(426), _color2 = _interopRequireDefault(_color), _common = __webpack_require__(411), ChromeFields = exports.ChromeFields = function(_React$Component) { + function ChromeFields() { + var _ref, _temp, _this, _ret; + _classCallCheck(this, ChromeFields); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; + return _temp = _this = _possibleConstructorReturn(this, (_ref = ChromeFields.__proto__ || Object.getPrototypeOf(ChromeFields)).call.apply(_ref, [ this ].concat(args))), + _this.state = { + view: "" + }, _this.toggleViews = function() { + "hex" === _this.state.view ? _this.setState({ + view: "rgb" + }) : "rgb" === _this.state.view ? _this.setState({ + view: "hsl" + }) : "hsl" === _this.state.view && (1 === _this.props.hsl.a ? _this.setState({ + view: "hex" + }) : _this.setState({ + view: "rgb" + })); + }, _this.handleChange = function(data, e) { + data.hex ? _color2["default"].isValidHex(data.hex) && _this.props.onChange({ + hex: data.hex, + source: "hex" + }, e) : data.r || data.g || data.b ? _this.props.onChange({ + r: data.r || _this.props.rgb.r, + g: data.g || _this.props.rgb.g, + b: data.b || _this.props.rgb.b, + source: "rgb" + }, e) : data.a ? (data.a < 0 ? data.a = 0 : data.a > 1 && (data.a = 1), _this.props.onChange({ + h: _this.props.hsl.h, + s: _this.props.hsl.s, + l: _this.props.hsl.l, + a: Math.round(100 * data.a) / 100, + source: "rgb" + }, e)) : (data.h || data.s || data.l) && _this.props.onChange({ + h: data.h || _this.props.hsl.h, + s: data.s && data.s.replace("%", "") || _this.props.hsl.s, + l: data.l && data.l.replace("%", "") || _this.props.hsl.l, + source: "hsl" + }, e); + }, _this.showHighlight = function(e) { + e.target.style.background = "#eee"; + }, _this.hideHighlight = function(e) { + e.target.style.background = "transparent"; + }, _ret = _temp, _possibleConstructorReturn(_this, _ret); + } + return _inherits(ChromeFields, _React$Component), _createClass(ChromeFields, [ { + key: "componentDidMount", + value: function() { + 1 === this.props.hsl.a && "hex" !== this.state.view ? this.setState({ + view: "hex" + }) : "rgb" !== this.state.view && "hsl" !== this.state.view && this.setState({ + view: "rgb" + }); + } + }, { + key: "componentWillReceiveProps", + value: function(nextProps) { + 1 !== nextProps.hsl.a && "hex" === this.state.view && this.setState({ + view: "rgb" + }); + } + }, { + key: "render", + value: function() { + var styles = (0, _reactcss2["default"])({ + "default": { + wrap: { + paddingTop: "16px", + display: "flex" + }, + fields: { + flex: "1", + display: "flex", + marginLeft: "-6px" + }, + field: { + paddingLeft: "6px", + width: "100%" + }, + alpha: { + paddingLeft: "6px", + width: "100%" + }, + toggle: { + width: "32px", + textAlign: "right", + position: "relative" + }, + icon: { + marginRight: "-4px", + marginTop: "12px", + cursor: "pointer", + position: "relative" + }, + iconHighlight: { + position: "absolute", + width: "24px", + height: "28px", + background: "#eee", + borderRadius: "4px", + top: "10px", + left: "12px", + display: "none" + }, + input: { + fontSize: "11px", + color: "#333", + width: "100%", + borderRadius: "2px", + border: "none", + boxShadow: "inset 0 0 0 1px #dadada", + height: "21px", + textAlign: "center" + }, + label: { + textTransform: "uppercase", + fontSize: "11px", + lineHeight: "11px", + color: "#969696", + textAlign: "center", + display: "block", + marginTop: "12px" + }, + svg: { + width: "24px", + height: "24px", + border: "1px transparent solid", + borderRadius: "5px" + } + }, + disableAlpha: { + alpha: { + display: "none" + } + } + }, this.props, this.state), fields = void 0; + return "hex" === this.state.view ? fields = _react2["default"].createElement("div", { + style: styles.fields, + className: "flexbox-fix" + }, _react2["default"].createElement("div", { + style: styles.field + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "hex", + value: this.props.hex, + onChange: this.handleChange + }))) : "rgb" === this.state.view ? fields = _react2["default"].createElement("div", { + style: styles.fields, + className: "flexbox-fix" + }, _react2["default"].createElement("div", { + style: styles.field + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "r", + value: this.props.rgb.r, + onChange: this.handleChange + })), _react2["default"].createElement("div", { + style: styles.field + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "g", + value: this.props.rgb.g, + onChange: this.handleChange + })), _react2["default"].createElement("div", { + style: styles.field + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "b", + value: this.props.rgb.b, + onChange: this.handleChange + })), _react2["default"].createElement("div", { + style: styles.alpha + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "a", + value: this.props.rgb.a, + arrowOffset: .01, + onChange: this.handleChange + }))) : "hsl" === this.state.view && (fields = _react2["default"].createElement("div", { + style: styles.fields, + className: "flexbox-fix" + }, _react2["default"].createElement("div", { + style: styles.field + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "h", + value: Math.round(this.props.hsl.h), + onChange: this.handleChange + })), _react2["default"].createElement("div", { + style: styles.field + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "s", + value: Math.round(100 * this.props.hsl.s) + "%", + onChange: this.handleChange + })), _react2["default"].createElement("div", { + style: styles.field + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "l", + value: Math.round(100 * this.props.hsl.l) + "%", + onChange: this.handleChange + })), _react2["default"].createElement("div", { + style: styles.alpha + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "a", + value: this.props.hsl.a, + arrowOffset: .01, + onChange: this.handleChange + })))), _react2["default"].createElement("div", { + style: styles.wrap, + className: "flexbox-fix" + }, fields, _react2["default"].createElement("div", { + style: styles.toggle + }, _react2["default"].createElement("div", { + style: styles.icon, + onClick: this.toggleViews, + ref: "icon" + }, _react2["default"].createElement("svg", { + style: styles.svg, + viewBox: "0 0 24 24", + onMouseOver: this.showHighlight, + onMouseEnter: this.showHighlight, + onMouseOut: this.hideHighlight + }, _react2["default"].createElement("path", { + ref: "iconUp", + fill: "#333", + d: "M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z" + }), _react2["default"].createElement("path", { + ref: "iconDown", + fill: "#333", + d: "M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15Z" + }))))); + } + } ]), ChromeFields; + }(_react2["default"].Component); + exports["default"] = ChromeFields; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ChromePointer = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), ChromePointer = exports.ChromePointer = function() { + var styles = (0, _reactcss2["default"])({ + "default": { + picker: { + width: "12px", + height: "12px", + borderRadius: "6px", + transform: "translate(-6px, -1px)", + backgroundColor: "rgb(248, 248, 248)", + boxShadow: "0 1px 4px 0 rgba(0, 0, 0, 0.37)" + } + } + }); + return _react2["default"].createElement("div", { + style: styles.picker + }); + }; + exports["default"] = ChromePointer; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ChromePointerCircle = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), ChromePointerCircle = exports.ChromePointerCircle = function() { + var styles = (0, _reactcss2["default"])({ + "default": { + picker: { + width: "12px", + height: "12px", + borderRadius: "6px", + boxShadow: "inset 0 0 0 1px #fff", + transform: "translate(-6px, -6px)" + } + } + }); + return _react2["default"].createElement("div", { + style: styles.picker + }); + }; + exports["default"] = ChromePointerCircle; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Compact = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(285), _map2 = _interopRequireDefault(_map), _color = __webpack_require__(426), _color2 = _interopRequireDefault(_color), _reactMaterialDesign = __webpack_require__(442), _common = __webpack_require__(411), _CompactColor = __webpack_require__(448), _CompactColor2 = _interopRequireDefault(_CompactColor), _CompactFields = __webpack_require__(449), _CompactFields2 = _interopRequireDefault(_CompactFields), Compact = exports.Compact = function(_ref) { + var onChange = _ref.onChange, colors = _ref.colors, hex = _ref.hex, rgb = _ref.rgb, styles = (0, + _reactcss2["default"])({ + "default": { + Compact: { + background: "#f6f6f6", + radius: "4px" + }, + compact: { + paddingTop: "5px", + paddingLeft: "5px", + boxSizing: "initial", + width: "240px" + }, + clear: { + clear: "both" + } + } + }), handleChange = function(data, e) { + data.hex ? _color2["default"].isValidHex(data.hex) && onChange({ + hex: data.hex, + source: "hex" + }, e) : onChange(data, e); + }; + return _react2["default"].createElement(_reactMaterialDesign.Raised, { + style: styles.Compact + }, _react2["default"].createElement("div", { + style: styles.compact, + className: "compact-picker" + }, _react2["default"].createElement("div", null, (0, _map2["default"])(colors, function(c) { + return _react2["default"].createElement(_CompactColor2["default"], { + key: c, + color: c, + active: c.toLowerCase() === hex, + onClick: handleChange + }); + }), _react2["default"].createElement("div", { + style: styles.clear + })), _react2["default"].createElement(_CompactFields2["default"], { + hex: hex, + rgb: rgb, + onChange: handleChange + }))); + }; + Compact.defaultProps = { + colors: [ "#4D4D4D", "#999999", "#FFFFFF", "#F44E3B", "#FE9200", "#FCDC00", "#DBDF00", "#A4DD00", "#68CCCA", "#73D8FF", "#AEA1FF", "#FDA1FF", "#333333", "#808080", "#cccccc", "#D33115", "#E27300", "#FCC400", "#B0BC00", "#68BC00", "#16A5A5", "#009CE0", "#7B64FF", "#FA28FF", "#000000", "#666666", "#B3B3B3", "#9F0500", "#C45100", "#FB9E00", "#808900", "#194D33", "#0C797D", "#0062B1", "#653294", "#AB149E" ] + }, exports["default"] = (0, _common.ColorWrap)(Compact); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var _libComponentsRaised = __webpack_require__(443), _libComponentsRaised2 = _interopRequireDefault(_libComponentsRaised), _libComponentsTile = __webpack_require__(444), _libComponentsTile2 = _interopRequireDefault(_libComponentsTile), _libComponentsTabs = __webpack_require__(445), _libComponentsTabs2 = _interopRequireDefault(_libComponentsTabs); + exports.Raised = _libComponentsRaised2["default"], exports.Tile = _libComponentsTile2["default"], + exports.Tabs = _libComponentsTabs2["default"]; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(237), _propTypes2 = _interopRequireDefault(_propTypes), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), Raised = function(_React$Component) { + function Raised() { + return _classCallCheck(this, Raised), _possibleConstructorReturn(this, (Raised.__proto__ || Object.getPrototypeOf(Raised)).apply(this, arguments)); + } + return _inherits(Raised, _React$Component), _createClass(Raised, [ { + key: "render", + value: function() { + var styles = (0, _reactcss2["default"])({ + "default": { + wrap: { + position: "relative" + }, + content: { + position: "relative" + }, + bg: { + absolute: "0px 0px 0px 0px", + boxShadow: "0 ${ this.props.zDepth }px ${ this.props.zDepth * 4 }px rgba(0,0,0,.24)", + borderRadius: this.props.radius, + background: this.props.background + } + }, + "zDepth-0": { + bg: { + boxShadow: "none" + } + }, + "zDepth-1": { + bg: { + boxShadow: "0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)" + } + }, + "zDepth-2": { + bg: { + boxShadow: "0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)" + } + }, + "zDepth-3": { + bg: { + boxShadow: "0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)" + } + }, + "zDepth-4": { + bg: { + boxShadow: "0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)" + } + }, + "zDepth-5": { + bg: { + boxShadow: "0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)" + } + }, + square: { + bg: { + borderRadius: "0" + } + }, + circle: { + bg: { + borderRadius: "50%" + } + } + }, this.props); + return _react2["default"].createElement("div", { + style: styles.wrap + }, _react2["default"].createElement("div", { + style: styles.bg + }), _react2["default"].createElement("div", { + style: styles.content + }, this.props.children)); + } + } ]), Raised; + }(_react2["default"].Component); + Raised.propTypes = { + background: _propTypes2["default"].string, + zDepth: _propTypes2["default"].oneOf([ "0", "1", "2", "3", "4", "5", 0, 1, 2, 3, 4, 5 ]), + radius: _propTypes2["default"].oneOfType([ _propTypes2["default"].string, _propTypes2["default"].number ]) + }, Raised.defaultProps = { + background: "#fff", + zDepth: "1", + radius: "2px" + }, exports["default"] = Raised; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var _slicedToArray = function() { + function sliceIterator(arr, i) { + var _arr = [], _n = !0, _d = !1, _e = void 0; + try { + for (var _s, _i = arr[Symbol.iterator](); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), + !i || _arr.length !== i); _n = !0) ; + } catch (err) { + _d = !0, _e = err; + } finally { + try { + !_n && _i["return"] && _i["return"](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function(arr, i) { + if (Array.isArray(arr)) return arr; + if (Symbol.iterator in Object(arr)) return sliceIterator(arr, i); + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + }; + }(), _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), Tile = function(_React$Component) { + function Tile() { + return _classCallCheck(this, Tile), _possibleConstructorReturn(this, (Tile.__proto__ || Object.getPrototypeOf(Tile)).apply(this, arguments)); + } + return _inherits(Tile, _React$Component), _createClass(Tile, [ { + key: "render", + value: function() { + var styles = (0, _reactcss2["default"])({ + "default": { + tile: { + fontSize: "16px", + padding: "16px", + display: "flex", + justifyContent: "space-between", + color: this.props.color + }, + primary: { + display: "flex", + width: "100%" + }, + sidebar: { + minWidth: "56px", + maxWidth: "56px", + flexBasis: "56px" + }, + content: { + background: "none", + flex: "1", + overflow: "auto" + }, + secondary: { + flexBasis: "42", + textAlign: "center" + }, + sidebarIcon: { + marginTop: "-12px", + marginLeft: "-12px", + marginBottom: "-12px" + } + }, + divider: { + tile: { + boxShadow: "inset 0 -1px 0 rgba(0,0,0,.12)" + } + }, + condensed: { + tile: { + paddingBottom: "0px", + paddingTop: "0px", + paddingRight: "0px" + }, + sidebar: { + minWidth: "28px", + maxWidth: "28px", + flexBasis: "28px" + } + } + }, { + clickable: this.props.onClick + }, this.props), _props$children = _slicedToArray(this.props.children, 2), sidebar = _props$children[0], content = _props$children[1]; + return _react2["default"].createElement("div", { + style: styles.tile, + className: "flexbox-fix" + }, _react2["default"].createElement("div", { + style: styles.primary, + className: "flexbox-fix" + }, _react2["default"].createElement("div", { + style: styles.sidebar, + key: "sidebar-#{ sidebar }" + }, sidebar), _react2["default"].createElement("div", { + style: styles.content, + key: "content-#{ content }" + }, content))); + } + } ]), Tile; + }(_react2["default"].Component); + exports["default"] = Tile; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _isString = __webpack_require__(247), _isString2 = _interopRequireDefault(_isString), _Tab = __webpack_require__(446), _Tab2 = _interopRequireDefault(_Tab), _Link = __webpack_require__(447), _Link2 = _interopRequireDefault(_Link), Tabs = function(_React$Component) { + function Tabs(props) { + _classCallCheck(this, Tabs); + var selectedTab, _this = _possibleConstructorReturn(this, (Tabs.__proto__ || Object.getPrototypeOf(Tabs)).call(this)); + return selectedTab = props.selectedTab < (props.tabs && props.tabs.length) ? props.selectedTab : 0, + _this.state = { + selectedTab: selectedTab + }, _this.handleClick = _this.handleClick.bind(_this), _this.slide = _this.slide.bind(_this), + _this; + } + return _inherits(Tabs, _React$Component), _createClass(Tabs, [ { + key: "handleClick", + value: function(tab) { + this.props.onChange && this.props.onChange(tab), this.setState({ + selectedTab: tab + }); + } + }, { + key: "slide", + value: function() { + if (this.props.tabs.length) { + var containerNode = this.refs.tabs.getDOMNode(), containerLeft = containerNode.scrollLeft, containerRight = containerNode.offsetWidth + containerNode.scrollLeft, selectedNode = this.refs["tab-" + this.state.selectedTab] && this.refs["tab-" + this.state.selectedTab].getDOMNode(), selectedLeft = selectedNode && selectedNode.getBoundingClientRect().left - containerNode.getBoundingClientRect().left + containerNode.scrollLeft, selectedRight = selectedNode && selectedLeft + selectedNode.offsetWidth; + selectedRight > containerRight && (containerNode.scrollLeft += selectedRight - containerRight), + selectedLeft < containerLeft && (containerNode.scrollLeft -= containerLeft - selectedLeft); + var indicator = this.refs.indicator; + indicator.style.left = selectedLeft + "px", indicator.style.width = selectedNode.offsetWidth + "px", + indicator.style.height = "2px"; + } + } + }, { + key: "componentDidMount", + value: function() { + this.slide(); + } + }, { + key: "componentWillReceiveProps", + value: function(nextProps) { + nextProps.selectedTab !== this.state.selectedTab && this.setState({ + selectedTab: nextProps.selectedTab + }); + } + }, { + key: "componentWillUpdate", + value: function(nextProps, nextState) { + nextState.selectedTab >= (nextProps.tabs && nextProps.tabs.length) && (nextState.selectedTab = nextProps.tabs.length - 1); + } + }, { + key: "componentDidUpdate", + value: function() { + this.slide(); + } + }, { + key: "render", + value: function() { + for (var styles = (0, _reactcss2["default"])({ + "default": { + tabs: { + position: "relative", + background: this.props.background + }, + tabWrap: { + display: "flex" + }, + tab: { + justifyContent: "flex-start", + minWidth: "68px", + maxWidth: "240px" + }, + Tab: { + color: this.props.color, + inactive: this.props.inactive, + capitalize: this.props.capitalize + }, + indicator: { + height: "0", + position: "absolute", + bottom: "0", + left: "0", + background: this.props.color, + transition: "all 200ms linear" + } + }, + scrollable: { + tabs: { + overflowX: "scroll" + }, + tabWrap: { + paddingLeft: "60px", + justifyContent: "flex-start", + width: "400%" + }, + tab: { + width: "auto" + } + }, + "align-justify": { + tabWrap: { + justifyContent: "space-between" + }, + tab: { + width: 100 / this.props.tabs.length + "%" + } + }, + "align-left": { + tabWrap: { + paddingLeft: "60px", + justifyContent: "flex-start" + }, + tab: { + width: "auto" + } + }, + "align-center": { + tabWrap: { + justifyContent: "center" + }, + tab: { + width: "auto" + } + } + }, { + scrollable: this.props.width / this.props.tabs.length < 72 + }, this.props, this.state), tabs = [], i = 0; i < this.props.tabs.length; i++) { + var label, callback, callbackValue, newTab, tab = this.props.tabs[i]; + (0, _isString2["default"])(tab) ? (label = tab, callback = null) : (label = tab.label, + callback = tab.onClick, callbackValue = tab.callbackValue, newTab = tab.newTab), + tabs.push(_react2["default"].createElement("div", { + style: styles.tab, + ref: "tab-" + i, + key: i + }, _react2["default"].createElement(_Link2["default"], { + onClick: callback, + callbackValue: callbackValue, + newTab: newTab + }, _react2["default"].createElement(_Tab2["default"], { + style: styles.Tab, + tab: i, + selected: this.state.selectedTab === i, + selectable: tab.selectable, + onClick: this.handleClick + }, label)))); + } + return _react2["default"].createElement("div", { + style: styles.tabs, + ref: "tabs" + }, _react2["default"].createElement("div", { + style: styles.tabWrap, + className: "flexbox-fix" + }, tabs), _react2["default"].createElement("div", { + style: styles.indicator, + ref: "indicator" + })); + } + } ]), Tabs; + }(_react2["default"].Component); + Tabs.defaultProps = { + selectedTab: 0, + background: "transparent", + color: "#fff" + }, exports["default"] = Tabs; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(237), _propTypes2 = _interopRequireDefault(_propTypes), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), Tab = function(_React$Component) { + function Tab() { + _classCallCheck(this, Tab); + var _this = _possibleConstructorReturn(this, (Tab.__proto__ || Object.getPrototypeOf(Tab)).call(this)); + return _this.handleClick = _this.handleClick.bind(_this), _this; + } + return _inherits(Tab, _React$Component), _createClass(Tab, [ { + key: "handleClick", + value: function() { + this.props.selectable !== !1 && this.props.onClick(this.props.tab); + } + }, { + key: "render", + value: function() { + var styles = (0, _reactcss2["default"])({ + "default": { + tab: { + color: this.props.inactive || this.props.color, + cursor: "pointer", + paddingLeft: "12px", + paddingRight: "12px", + height: "48px", + lineHeight: "48px", + textAlign: "center", + fontSize: "14px", + textTransform: this.props.capitalize === !1 ? "" : "uppercase", + fontWeight: "500", + whiteSpace: "nowrap", + opacity: ".47", + transition: "opacity 100ms linear" + } + }, + selected: { + tab: { + color: this.props.color, + opacity: ".87" + } + } + }, this.props); + return _react2["default"].createElement("div", { + style: styles.tab, + onClick: this.handleClick + }, this.props.children); + } + } ]), Tab; + }(_react2["default"].Component); + Tab.propTypes = { + selected: _propTypes2["default"].bool + }, Tab.defaultProps = { + selected: !1, + color: "#fff" + }, exports["default"] = Tab; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }); + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _isString = __webpack_require__(247), _isString2 = _interopRequireDefault(_isString), Link = function(_React$Component) { + function Link() { + _classCallCheck(this, Link); + var _this = _possibleConstructorReturn(this, (Link.__proto__ || Object.getPrototypeOf(Link)).call(this)); + return _this.handleClick = _this.handleClick.bind(_this), _this; + } + return _inherits(Link, _React$Component), _createClass(Link, [ { + key: "handleClick", + value: function(e) { + this.props.onClick && this.props.onClick(e, this.props.callbackValue); + } + }, { + key: "render", + value: function() { + var a; + return a = (0, _isString2["default"])(this.props.onClick) ? _react2["default"].createElement("a", { + style: { + textDecoration: "none" + }, + href: this.props.onClick, + target: this.props.newTab && "_blank" + }, this.props.children) : _react2["default"].createElement("a", { + style: { + textDecoration: "none" + }, + onClick: this.handleClick + }, this.props.children); + } + } ]), Link; + }(_react2["default"].Component); + Link.defaultProps = { + newTab: !1 + }, exports["default"] = Link; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.CompactColor = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), CompactColor = exports.CompactColor = function(_ref) { + var color = _ref.color, onClick = _ref.onClick, active = _ref.active, styles = (0, + _reactcss2["default"])({ + "default": { + color: { + background: color, + width: "15px", + height: "15px", + "float": "left", + marginRight: "5px", + marginBottom: "5px", + position: "relative", + cursor: "pointer" + }, + dot: { + absolute: "5px 5px 5px 5px", + background: "#fff", + borderRadius: "50%", + opacity: "0" + } + }, + active: { + dot: { + opacity: "1" + } + }, + "color-#FFFFFF": { + color: { + boxShadow: "inset 0 0 0 1px #ddd" + }, + dot: { + background: "#000" + } + } + }, { + active: active, + "color-#FFFFFF": "#FFFFFF" === color + }), handleClick = function(e) { + return onClick({ + hex: color + }, e); + }; + return _react2["default"].createElement("div", { + style: styles.color, + onClick: handleClick + }, _react2["default"].createElement("div", { + style: styles.dot + })); + }; + exports["default"] = CompactColor; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.CompactFields = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(411), CompactFields = exports.CompactFields = function(_ref) { + var hex = _ref.hex, rgb = _ref.rgb, onChange = _ref.onChange, styles = (0, _reactcss2["default"])({ + "default": { + fields: { + display: "flex", + paddingBottom: "6px", + paddingRight: "5px", + position: "relative" + }, + active: { + position: "absolute", + top: "6px", + left: "5px", + height: "9px", + width: "9px", + background: hex + }, + HEXwrap: { + flex: "6", + position: "relative" + }, + HEXinput: { + width: "80%", + padding: "0px", + paddingLeft: "20%", + border: "none", + outline: "none", + background: "none", + fontSize: "12px", + color: "#333", + height: "16px" + }, + HEXlabel: { + display: "none" + }, + RGBwrap: { + flex: "3", + position: "relative" + }, + RGBinput: { + width: "70%", + padding: "0px", + paddingLeft: "30%", + border: "none", + outline: "none", + background: "none", + fontSize: "12px", + color: "#333", + height: "16px" + }, + RGBlabel: { + position: "absolute", + top: "3px", + left: "0px", + lineHeight: "16px", + textTransform: "uppercase", + fontSize: "12px", + color: "#999" + } + } + }), handleChange = function(data, e) { + data.r || data.g || data.b ? onChange({ + r: data.r || rgb.r, + g: data.g || rgb.g, + b: data.b || rgb.b, + source: "rgb" + }, e) : onChange({ + hex: data.hex, + source: "hex" + }, e); + }; + return _react2["default"].createElement("div", { + style: styles.fields, + className: "flexbox-fix" + }, _react2["default"].createElement("div", { + style: styles.active + }), _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.HEXwrap, + input: styles.HEXinput, + label: styles.HEXlabel + }, + label: "hex", + value: hex, + onChange: handleChange + }), _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.RGBwrap, + input: styles.RGBinput, + label: styles.RGBlabel + }, + label: "r", + value: rgb.r, + onChange: handleChange + }), _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.RGBwrap, + input: styles.RGBinput, + label: styles.RGBlabel + }, + label: "g", + value: rgb.g, + onChange: handleChange + }), _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.RGBwrap, + input: styles.RGBinput, + label: styles.RGBlabel + }, + label: "b", + value: rgb.b, + onChange: handleChange + })); + }; + exports["default"] = CompactFields; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Github = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(285), _map2 = _interopRequireDefault(_map), _common = __webpack_require__(411), _GithubSwatch = __webpack_require__(451), _GithubSwatch2 = _interopRequireDefault(_GithubSwatch), Github = exports.Github = function(_ref) { + var width = _ref.width, colors = _ref.colors, onChange = _ref.onChange, triangle = _ref.triangle, styles = (0, + _reactcss2["default"])({ + "default": { + card: { + width: width, + background: "#fff", + border: "1px solid rgba(0,0,0,0.2)", + boxShadow: "0 3px 12px rgba(0,0,0,0.15)", + borderRadius: "4px", + position: "relative", + padding: "5px", + display: "flex", + flexWrap: "wrap" + }, + triangle: { + position: "absolute", + border: "7px solid transparent", + borderBottomColor: "#fff" + }, + triangleShadow: { + position: "absolute", + border: "8px solid transparent", + borderBottomColor: "rgba(0,0,0,0.15)" + } + }, + "hide-triangle": { + triangle: { + display: "none" + }, + triangleShadow: { + display: "none" + } + }, + "top-left-triangle": { + triangle: { + top: "-14px", + left: "10px" + }, + triangleShadow: { + top: "-16px", + left: "9px" + } + }, + "top-right-triangle": { + triangle: { + top: "-14px", + right: "10px" + }, + triangleShadow: { + top: "-16px", + right: "9px" + } + }, + "bottom-right-triangle": { + triangle: { + top: "35px", + right: "10px", + transform: "rotate(180deg)" + }, + triangleShadow: { + top: "37px", + right: "9px", + transform: "rotate(180deg)" + } + } + }, { + "hide-triangle": "hide" === triangle, + "top-left-triangle": "top-left" === triangle, + "top-right-triangle": "top-right" === triangle, + "bottom-right-triangle": "bottom-right" === triangle + }), handleChange = function(hex, e) { + return onChange({ + hex: hex, + source: "hex" + }, e); + }; + return _react2["default"].createElement("div", { + style: styles.card, + className: "github-picker" + }, _react2["default"].createElement("div", { + style: styles.triangleShadow + }), _react2["default"].createElement("div", { + style: styles.triangle + }), (0, _map2["default"])(colors, function(c) { + return _react2["default"].createElement(_GithubSwatch2["default"], { + color: c, + key: c, + onClick: handleChange + }); + })); + }; + Github.defaultProps = { + width: "200px", + colors: [ "#B80000", "#DB3E00", "#FCCB00", "#008B02", "#006B76", "#1273DE", "#004DCF", "#5300EB", "#EB9694", "#FAD0C3", "#FEF3BD", "#C1E1C5", "#BEDADC", "#C4DEF6", "#BED3F3", "#D4C4FB" ], + triangle: "top-left" + }, exports["default"] = (0, _common.ColorWrap)(Github); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.GithubSwatch = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(411), GithubSwatch = exports.GithubSwatch = function(_ref) { + var hover = _ref.hover, color = _ref.color, onClick = _ref.onClick, styles = (0, + _reactcss2["default"])({ + "default": { + swatch: { + width: "25px", + height: "25px" + } + }, + hover: { + swatch: { + position: "relative", + zIndex: "2", + outline: "2px solid #fff", + boxShadow: "0 0 5px 2px rgba(0,0,0,0.25)" + } + } + }, { + hover: hover + }); + return _react2["default"].createElement("div", { + style: styles.swatch + }, _react2["default"].createElement(_common.Swatch, { + color: color, + onClick: onClick + })); + }; + exports["default"] = (0, _reactcss.handleHover)(GithubSwatch); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.HuePicker = void 0; + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(411), _HuePointer = __webpack_require__(453), _HuePointer2 = _interopRequireDefault(_HuePointer), HuePicker = exports.HuePicker = function(_ref) { + var width = _ref.width, height = _ref.height, onChange = _ref.onChange, hsl = _ref.hsl, direction = _ref.direction, pointer = _ref.pointer, styles = (0, + _reactcss2["default"])({ + "default": { + picker: { + position: "relative", + width: width, + height: height + }, + hue: { + radius: "2px" + } + } + }), handleChange = function(data) { + return onChange({ + a: 1, + h: data.h, + l: .5, + s: 1 + }); + }; + return _react2["default"].createElement("div", { + style: styles.picker, + className: "hue-picker" + }, _react2["default"].createElement(_common.Hue, _extends({}, styles.hue, { + hsl: hsl, + pointer: pointer, + onChange: handleChange, + direction: direction + }))); + }; + HuePicker.defaultProps = { + width: "316px", + height: "16px", + direction: "horizontal", + pointer: _HuePointer2["default"] + }, exports["default"] = (0, _common.ColorWrap)(HuePicker); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.SliderPointer = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), SliderPointer = exports.SliderPointer = function(_ref) { + var direction = _ref.direction, styles = (0, _reactcss2["default"])({ + "default": { + picker: { + width: "18px", + height: "18px", + borderRadius: "50%", + transform: "translate(-9px, -1px)", + backgroundColor: "rgb(248, 248, 248)", + boxShadow: "0 1px 4px 0 rgba(0, 0, 0, 0.37)" + } + }, + vertical: { + picker: { + transform: "translate(-3px, -9px)" + } + } + }, { + vertical: "vertical" === direction + }); + return _react2["default"].createElement("div", { + style: styles.picker + }); + }; + exports["default"] = SliderPointer; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Material = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _color = __webpack_require__(426), _color2 = _interopRequireDefault(_color), _reactMaterialDesign = __webpack_require__(442), _common = __webpack_require__(411), Material = exports.Material = function(_ref) { + var onChange = _ref.onChange, hex = _ref.hex, rgb = _ref.rgb, styles = (0, _reactcss2["default"])({ + "default": { + material: { + width: "98px", + height: "98px", + padding: "16px", + fontFamily: "Roboto" + }, + HEXwrap: { + position: "relative" + }, + HEXinput: { + width: "100%", + marginTop: "12px", + fontSize: "15px", + color: "#333", + padding: "0px", + border: "0px", + borderBottom: "2px solid " + hex, + outline: "none", + height: "30px" + }, + HEXlabel: { + position: "absolute", + top: "0px", + left: "0px", + fontSize: "11px", + color: "#999999", + textTransform: "capitalize" + }, + Hex: { + style: {} + }, + RGBwrap: { + position: "relative" + }, + RGBinput: { + width: "100%", + marginTop: "12px", + fontSize: "15px", + color: "#333", + padding: "0px", + border: "0px", + borderBottom: "1px solid #eee", + outline: "none", + height: "30px" + }, + RGBlabel: { + position: "absolute", + top: "0px", + left: "0px", + fontSize: "11px", + color: "#999999", + textTransform: "capitalize" + }, + split: { + display: "flex", + marginRight: "-10px", + paddingTop: "11px" + }, + third: { + flex: "1", + paddingRight: "10px" + } + } + }), handleChange = function(data, e) { + data.hex ? _color2["default"].isValidHex(data.hex) && onChange({ + hex: data.hex, + source: "hex" + }, e) : (data.r || data.g || data.b) && onChange({ + r: data.r || rgb.r, + g: data.g || rgb.g, + b: data.b || rgb.b, + source: "rgb" + }, e); + }; + return _react2["default"].createElement(_reactMaterialDesign.Raised, null, _react2["default"].createElement("div", { + style: styles.material, + className: "material-picker" + }, _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.HEXwrap, + input: styles.HEXinput, + label: styles.HEXlabel + }, + label: "hex", + value: hex, + onChange: handleChange + }), _react2["default"].createElement("div", { + style: styles.split, + className: "flexbox-fix" + }, _react2["default"].createElement("div", { + style: styles.third + }, _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.RGBwrap, + input: styles.RGBinput, + label: styles.RGBlabel + }, + label: "r", + value: rgb.r, + onChange: handleChange + })), _react2["default"].createElement("div", { + style: styles.third + }, _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.RGBwrap, + input: styles.RGBinput, + label: styles.RGBlabel + }, + label: "g", + value: rgb.g, + onChange: handleChange + })), _react2["default"].createElement("div", { + style: styles.third + }, _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.RGBwrap, + input: styles.RGBinput, + label: styles.RGBlabel + }, + label: "b", + value: rgb.b, + onChange: handleChange + }))))); + }; + exports["default"] = (0, _common.ColorWrap)(Material); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Photoshop = void 0; + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(411), _PhotoshopFields = __webpack_require__(456), _PhotoshopFields2 = _interopRequireDefault(_PhotoshopFields), _PhotoshopPointerCircle = __webpack_require__(457), _PhotoshopPointerCircle2 = _interopRequireDefault(_PhotoshopPointerCircle), _PhotoshopPointer = __webpack_require__(458), _PhotoshopPointer2 = _interopRequireDefault(_PhotoshopPointer), _PhotoshopButton = __webpack_require__(459), _PhotoshopButton2 = _interopRequireDefault(_PhotoshopButton), _PhotoshopPreviews = __webpack_require__(460), _PhotoshopPreviews2 = _interopRequireDefault(_PhotoshopPreviews), Photoshop = exports.Photoshop = function(_React$Component) { + function Photoshop(props) { + _classCallCheck(this, Photoshop); + var _this = _possibleConstructorReturn(this, (Photoshop.__proto__ || Object.getPrototypeOf(Photoshop)).call(this)); + return _this.state = { + currentColor: props.hex + }, _this; + } + return _inherits(Photoshop, _React$Component), _createClass(Photoshop, [ { + key: "render", + value: function() { + var styles = (0, _reactcss2["default"])({ + "default": { + picker: { + background: "#DCDCDC", + borderRadius: "4px", + boxShadow: "0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)", + boxSizing: "initial", + width: "513px" + }, + head: { + backgroundImage: "linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)", + borderBottom: "1px solid #B1B1B1", + boxShadow: "inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)", + height: "23px", + lineHeight: "24px", + borderRadius: "4px 4px 0 0", + fontSize: "13px", + color: "#4D4D4D", + textAlign: "center" + }, + body: { + padding: "15px 15px 0", + display: "flex" + }, + saturation: { + width: "256px", + height: "256px", + position: "relative", + border: "2px solid #B3B3B3", + borderBottom: "2px solid #F0F0F0", + overflow: "hidden" + }, + hue: { + position: "relative", + height: "256px", + width: "19px", + marginLeft: "10px", + border: "2px solid #B3B3B3", + borderBottom: "2px solid #F0F0F0" + }, + controls: { + width: "180px", + marginLeft: "10px" + }, + top: { + display: "flex" + }, + previews: { + width: "60px" + }, + actions: { + flex: "1", + marginLeft: "20px" + } + } + }); + return _react2["default"].createElement("div", { + style: styles.picker, + className: "photoshop-picker" + }, _react2["default"].createElement("div", { + style: styles.head + }, this.props.header), _react2["default"].createElement("div", { + style: styles.body, + className: "flexbox-fix" + }, _react2["default"].createElement("div", { + style: styles.saturation + }, _react2["default"].createElement(_common.Saturation, { + hsl: this.props.hsl, + hsv: this.props.hsv, + pointer: _PhotoshopPointerCircle2["default"], + onChange: this.props.onChange + })), _react2["default"].createElement("div", { + style: styles.hue + }, _react2["default"].createElement(_common.Hue, { + direction: "vertical", + hsl: this.props.hsl, + pointer: _PhotoshopPointer2["default"], + onChange: this.props.onChange + })), _react2["default"].createElement("div", { + style: styles.controls + }, _react2["default"].createElement("div", { + style: styles.top, + className: "flexbox-fix" + }, _react2["default"].createElement("div", { + style: styles.previews + }, _react2["default"].createElement(_PhotoshopPreviews2["default"], { + rgb: this.props.rgb, + currentColor: this.state.currentColor + })), _react2["default"].createElement("div", { + style: styles.actions + }, _react2["default"].createElement(_PhotoshopButton2["default"], { + label: "OK", + onClick: this.props.onAccept, + active: !0 + }), _react2["default"].createElement(_PhotoshopButton2["default"], { + label: "Cancel", + onClick: this.props.onCancel + }), _react2["default"].createElement(_PhotoshopFields2["default"], { + onChange: this.props.onChange, + rgb: this.props.rgb, + hsv: this.props.hsv, + hex: this.props.hex + })))))); + } + } ]), Photoshop; + }(_react2["default"].Component); + Photoshop.defaultProps = { + header: "Color Picker" + }, exports["default"] = (0, _common.ColorWrap)(Photoshop); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.PhotoshopPicker = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _color = __webpack_require__(426), _color2 = _interopRequireDefault(_color), _common = __webpack_require__(411), PhotoshopPicker = exports.PhotoshopPicker = function(_ref) { + var onChange = _ref.onChange, rgb = _ref.rgb, hsv = _ref.hsv, hex = _ref.hex, styles = (0, + _reactcss2["default"])({ + "default": { + fields: { + paddingTop: "5px", + paddingBottom: "9px", + width: "80px", + position: "relative" + }, + divider: { + height: "5px" + }, + RGBwrap: { + position: "relative" + }, + RGBinput: { + marginLeft: "40%", + width: "40%", + height: "18px", + border: "1px solid #888888", + boxShadow: "inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC", + marginBottom: "5px", + fontSize: "13px", + paddingLeft: "3px", + marginRight: "10px" + }, + RGBlabel: { + left: "0px", + width: "34px", + textTransform: "uppercase", + fontSize: "13px", + height: "18px", + lineHeight: "22px", + position: "absolute" + }, + HEXwrap: { + position: "relative" + }, + HEXinput: { + marginLeft: "20%", + width: "80%", + height: "18px", + border: "1px solid #888888", + boxShadow: "inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC", + marginBottom: "6px", + fontSize: "13px", + paddingLeft: "3px" + }, + HEXlabel: { + position: "absolute", + top: "0px", + left: "0px", + width: "14px", + textTransform: "uppercase", + fontSize: "13px", + height: "18px", + lineHeight: "22px" + }, + fieldSymbols: { + position: "absolute", + top: "5px", + right: "-7px", + fontSize: "13px" + }, + symbol: { + height: "20px", + lineHeight: "22px", + paddingBottom: "7px" + } + } + }), handleChange = function(data, e) { + data["#"] ? _color2["default"].isValidHex(data["#"]) && onChange({ + hex: data["#"], + source: "hex" + }, e) : data.r || data.g || data.b ? onChange({ + r: data.r || rgb.r, + g: data.g || rgb.g, + b: data.b || rgb.b, + source: "rgb" + }, e) : (data.h || data.s || data.v) && onChange({ + h: data.h || hsv.h, + s: data.s || hsv.s, + v: data.v || hsv.v, + source: "hsv" + }, e); + }; + return _react2["default"].createElement("div", { + style: styles.fields + }, _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.RGBwrap, + input: styles.RGBinput, + label: styles.RGBlabel + }, + label: "h", + value: Math.round(hsv.h), + onChange: handleChange + }), _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.RGBwrap, + input: styles.RGBinput, + label: styles.RGBlabel + }, + label: "s", + value: Math.round(100 * hsv.s), + onChange: handleChange + }), _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.RGBwrap, + input: styles.RGBinput, + label: styles.RGBlabel + }, + label: "v", + value: Math.round(100 * hsv.v), + onChange: handleChange + }), _react2["default"].createElement("div", { + style: styles.divider + }), _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.RGBwrap, + input: styles.RGBinput, + label: styles.RGBlabel + }, + label: "r", + value: rgb.r, + onChange: handleChange + }), _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.RGBwrap, + input: styles.RGBinput, + label: styles.RGBlabel + }, + label: "g", + value: rgb.g, + onChange: handleChange + }), _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.RGBwrap, + input: styles.RGBinput, + label: styles.RGBlabel + }, + label: "b", + value: rgb.b, + onChange: handleChange + }), _react2["default"].createElement("div", { + style: styles.divider + }), _react2["default"].createElement(_common.EditableInput, { + style: { + wrap: styles.HEXwrap, + input: styles.HEXinput, + label: styles.HEXlabel + }, + label: "#", + value: hex.replace("#", ""), + onChange: handleChange + }), _react2["default"].createElement("div", { + style: styles.fieldSymbols + }, _react2["default"].createElement("div", { + style: styles.symbol + }, "°"), _react2["default"].createElement("div", { + style: styles.symbol + }, "%"), _react2["default"].createElement("div", { + style: styles.symbol + }, "%"))); + }; + exports["default"] = PhotoshopPicker; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.PhotoshopPointerCircle = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), PhotoshopPointerCircle = exports.PhotoshopPointerCircle = function(_ref) { + var hsl = _ref.hsl, styles = (0, _reactcss2["default"])({ + "default": { + picker: { + width: "12px", + height: "12px", + borderRadius: "6px", + boxShadow: "inset 0 0 0 1px #fff", + transform: "translate(-6px, -6px)" + } + }, + "black-outline": { + picker: { + boxShadow: "inset 0 0 0 1px #000" + } + } + }, { + "black-outline": hsl.l > .5 + }); + return _react2["default"].createElement("div", { + style: styles.picker + }); + }; + exports["default"] = PhotoshopPointerCircle; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.PhotoshopPointerCircle = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), PhotoshopPointerCircle = exports.PhotoshopPointerCircle = function() { + var styles = (0, _reactcss2["default"])({ + "default": { + triangle: { + width: 0, + height: 0, + borderStyle: "solid", + borderWidth: "4px 0 4px 6px", + borderColor: "transparent transparent transparent #fff", + position: "absolute", + top: "1px", + left: "1px" + }, + triangleBorder: { + width: 0, + height: 0, + borderStyle: "solid", + borderWidth: "5px 0 5px 8px", + borderColor: "transparent transparent transparent #555" + }, + left: { + Extend: "triangleBorder", + transform: "translate(-13px, -4px)" + }, + leftInside: { + Extend: "triangle", + transform: "translate(-8px, -5px)" + }, + right: { + Extend: "triangleBorder", + transform: "translate(20px, -14px) rotate(180deg)" + }, + rightInside: { + Extend: "triangle", + transform: "translate(-8px, -5px)" + } + } + }); + return _react2["default"].createElement("div", { + style: styles.pointer + }, _react2["default"].createElement("div", { + style: styles.left + }, _react2["default"].createElement("div", { + style: styles.leftInside + })), _react2["default"].createElement("div", { + style: styles.right + }, _react2["default"].createElement("div", { + style: styles.rightInside + }))); + }; + exports["default"] = PhotoshopPointerCircle; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.PhotoshopBotton = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), PhotoshopBotton = exports.PhotoshopBotton = function(_ref) { + var onClick = _ref.onClick, label = _ref.label, children = _ref.children, active = _ref.active, styles = (0, + _reactcss2["default"])({ + "default": { + button: { + backgroundImage: "linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)", + border: "1px solid #878787", + borderRadius: "2px", + height: "20px", + boxShadow: "0 1px 0 0 #EAEAEA", + fontSize: "14px", + color: "#000", + lineHeight: "20px", + textAlign: "center", + marginBottom: "10px", + cursor: "pointer" + } + }, + active: { + button: { + boxShadow: "0 0 0 1px #878787" + } + } + }, { + active: active + }); + return _react2["default"].createElement("div", { + style: styles.button, + onClick: onClick + }, label || children); + }; + exports["default"] = PhotoshopBotton; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.PhotoshopPreviews = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), PhotoshopPreviews = exports.PhotoshopPreviews = function(_ref) { + var rgb = _ref.rgb, currentColor = _ref.currentColor, styles = (0, _reactcss2["default"])({ + "default": { + swatches: { + border: "1px solid #B3B3B3", + borderBottom: "1px solid #F0F0F0", + marginBottom: "2px", + marginTop: "1px" + }, + "new": { + height: "34px", + background: "rgb(" + rgb.r + "," + rgb.g + ", " + rgb.b + ")", + boxShadow: "inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000" + }, + current: { + height: "34px", + background: currentColor, + boxShadow: "inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000" + }, + label: { + fontSize: "14px", + color: "#000", + textAlign: "center" + } + } + }); + return _react2["default"].createElement("div", null, _react2["default"].createElement("div", { + style: styles.label + }, "new"), _react2["default"].createElement("div", { + style: styles.swatches + }, _react2["default"].createElement("div", { + style: styles["new"] + }), _react2["default"].createElement("div", { + style: styles.current + })), _react2["default"].createElement("div", { + style: styles.label + }, "current")); + }; + exports["default"] = PhotoshopPreviews; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Sketch = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(411), _SketchFields = __webpack_require__(462), _SketchFields2 = _interopRequireDefault(_SketchFields), _SketchPresetColors = __webpack_require__(463), _SketchPresetColors2 = _interopRequireDefault(_SketchPresetColors), Sketch = exports.Sketch = function(_ref) { + var width = _ref.width, rgb = _ref.rgb, hex = _ref.hex, hsv = _ref.hsv, hsl = _ref.hsl, onChange = _ref.onChange, disableAlpha = _ref.disableAlpha, presetColors = _ref.presetColors, renderers = _ref.renderers, styles = (0, + _reactcss2["default"])({ + "default": { + picker: { + width: width, + padding: "10px 10px 0", + boxSizing: "initial", + background: "#fff", + borderRadius: "4px", + boxShadow: "0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)" + }, + saturation: { + width: "100%", + paddingBottom: "75%", + position: "relative", + overflow: "hidden" + }, + Saturation: { + radius: "3px", + shadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" + }, + controls: { + display: "flex" + }, + sliders: { + padding: "4px 0", + flex: "1" + }, + color: { + width: "24px", + height: "24px", + position: "relative", + marginTop: "4px", + marginLeft: "4px", + borderRadius: "3px" + }, + activeColor: { + absolute: "0px 0px 0px 0px", + borderRadius: "2px", + background: "rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + "," + rgb.a + ")", + boxShadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" + }, + hue: { + position: "relative", + height: "10px", + overflow: "hidden" + }, + Hue: { + radius: "2px", + shadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" + }, + alpha: { + position: "relative", + height: "10px", + marginTop: "4px", + overflow: "hidden" + }, + Alpha: { + radius: "2px", + shadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" + } + }, + disableAlpha: { + color: { + height: "10px" + }, + hue: { + height: "10px" + }, + alpha: { + display: "none" + } + } + }, { + disableAlpha: disableAlpha + }); + return _react2["default"].createElement("div", { + style: styles.picker, + className: "sketch-picker" + }, _react2["default"].createElement("div", { + style: styles.saturation + }, _react2["default"].createElement(_common.Saturation, { + style: styles.Saturation, + hsl: hsl, + hsv: hsv, + onChange: onChange + })), _react2["default"].createElement("div", { + style: styles.controls, + className: "flexbox-fix" + }, _react2["default"].createElement("div", { + style: styles.sliders + }, _react2["default"].createElement("div", { + style: styles.hue + }, _react2["default"].createElement(_common.Hue, { + style: styles.Hue, + hsl: hsl, + onChange: onChange + })), _react2["default"].createElement("div", { + style: styles.alpha + }, _react2["default"].createElement(_common.Alpha, { + style: styles.Alpha, + rgb: rgb, + hsl: hsl, + renderers: renderers, + onChange: onChange + }))), _react2["default"].createElement("div", { + style: styles.color + }, _react2["default"].createElement(_common.Checkboard, null), _react2["default"].createElement("div", { + style: styles.activeColor + }))), _react2["default"].createElement(_SketchFields2["default"], { + rgb: rgb, + hsl: hsl, + hex: hex, + onChange: onChange, + disableAlpha: disableAlpha + }), _react2["default"].createElement(_SketchPresetColors2["default"], { + colors: presetColors, + onClick: onChange + })); + }; + Sketch.defaultProps = { + presetColors: [ "#D0021B", "#F5A623", "#F8E71C", "#8B572A", "#7ED321", "#417505", "#BD10E0", "#9013FE", "#4A90E2", "#50E3C2", "#B8E986", "#000000", "#4A4A4A", "#9B9B9B", "#FFFFFF" ], + width: 200 + }, exports["default"] = (0, _common.ColorWrap)(Sketch); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.ShetchFields = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _color = __webpack_require__(426), _color2 = _interopRequireDefault(_color), _common = __webpack_require__(411), ShetchFields = exports.ShetchFields = function(_ref) { + var onChange = _ref.onChange, rgb = _ref.rgb, hsl = _ref.hsl, hex = _ref.hex, disableAlpha = _ref.disableAlpha, styles = (0, + _reactcss2["default"])({ + "default": { + fields: { + display: "flex", + paddingTop: "4px" + }, + single: { + flex: "1", + paddingLeft: "6px" + }, + alpha: { + flex: "1", + paddingLeft: "6px" + }, + "double": { + flex: "2" + }, + input: { + width: "80%", + padding: "4px 10% 3px", + border: "none", + boxShadow: "inset 0 0 0 1px #ccc", + fontSize: "11px" + }, + label: { + display: "block", + textAlign: "center", + fontSize: "11px", + color: "#222", + paddingTop: "3px", + paddingBottom: "4px", + textTransform: "capitalize" + } + }, + disableAlpha: { + alpha: { + display: "none" + } + } + }, { + disableAlpha: disableAlpha + }), handleChange = function(data, e) { + data.hex ? _color2["default"].isValidHex(data.hex) && onChange({ + hex: data.hex, + source: "hex" + }, e) : data.r || data.g || data.b ? onChange({ + r: data.r || rgb.r, + g: data.g || rgb.g, + b: data.b || rgb.b, + a: rgb.a, + source: "rgb" + }, e) : data.a && (data.a < 0 ? data.a = 0 : data.a > 100 && (data.a = 100), data.a = data.a / 100, + onChange({ + h: hsl.h, + s: hsl.s, + l: hsl.l, + a: data.a, + source: "rgb" + }, e)); + }; + return _react2["default"].createElement("div", { + style: styles.fields, + className: "flexbox-fix" + }, _react2["default"].createElement("div", { + style: styles["double"] + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "hex", + value: hex.replace("#", ""), + onChange: handleChange + })), _react2["default"].createElement("div", { + style: styles.single + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "r", + value: rgb.r, + onChange: handleChange, + dragLabel: "true", + dragMax: "255" + })), _react2["default"].createElement("div", { + style: styles.single + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "g", + value: rgb.g, + onChange: handleChange, + dragLabel: "true", + dragMax: "255" + })), _react2["default"].createElement("div", { + style: styles.single + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "b", + value: rgb.b, + onChange: handleChange, + dragLabel: "true", + dragMax: "255" + })), _react2["default"].createElement("div", { + style: styles.alpha + }, _react2["default"].createElement(_common.EditableInput, { + style: { + input: styles.input, + label: styles.label + }, + label: "a", + value: Math.round(100 * rgb.a), + onChange: handleChange, + dragLabel: "true", + dragMax: "100" + }))); + }; + exports["default"] = ShetchFields; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.SketchPresetColors = void 0; + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(237), _propTypes2 = _interopRequireDefault(_propTypes), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(411), SketchPresetColors = exports.SketchPresetColors = function(_ref) { + var colors = _ref.colors, onClick = _ref.onClick, styles = (0, _reactcss2["default"])({ + "default": { + colors: { + margin: "0 -10px", + padding: "10px 0 0 10px", + borderTop: "1px solid #eee", + display: "flex", + flexWrap: "wrap", + position: "relative" + }, + swatchWrap: { + width: "16px", + height: "16px", + margin: "0 10px 10px 0" + }, + swatch: { + borderRadius: "3px", + boxShadow: "inset 0 0 0 1px rgba(0,0,0,.15)" + } + }, + "no-presets": { + colors: { + display: "none" + } + } + }, { + "no-presets": !colors || !colors.length + }), handleClick = function(hex, e) { + onClick({ + hex: hex, + source: "hex" + }, e); + }; + return _react2["default"].createElement("div", { + style: styles.colors, + className: "flexbox-fix" + }, colors.map(function(colorObjOrString) { + var c = "string" == typeof colorObjOrString ? { + color: colorObjOrString + } : colorObjOrString; + return _react2["default"].createElement("div", { + key: c.color, + style: styles.swatchWrap + }, _react2["default"].createElement(_common.Swatch, _extends({}, c, { + style: styles.swatch, + onClick: handleClick + }))); + })); + }; + SketchPresetColors.propTypes = { + colors: _propTypes2["default"].arrayOf(_propTypes2["default"].oneOfType([ _propTypes2["default"].string, _propTypes2["default"].shape({ + color: _propTypes2["default"].string, + title: _propTypes2["default"].string + }) ])) + }, exports["default"] = SketchPresetColors; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Slider = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _common = __webpack_require__(411), _SliderSwatches = __webpack_require__(465), _SliderSwatches2 = _interopRequireDefault(_SliderSwatches), _SliderPointer = __webpack_require__(467), _SliderPointer2 = _interopRequireDefault(_SliderPointer), Slider = exports.Slider = function(_ref) { + var hsl = _ref.hsl, onChange = _ref.onChange, pointer = _ref.pointer, styles = (0, + _reactcss2["default"])({ + "default": { + hue: { + height: "12px", + position: "relative" + }, + Hue: { + radius: "2px" + } + } + }); + return _react2["default"].createElement("div", { + className: "slider-picker" + }, _react2["default"].createElement("div", { + style: styles.hue + }, _react2["default"].createElement(_common.Hue, { + style: styles.Hue, + hsl: hsl, + pointer: pointer, + onChange: onChange + })), _react2["default"].createElement("div", { + style: styles.swatches + }, _react2["default"].createElement(_SliderSwatches2["default"], { + hsl: hsl, + onClick: onChange + }))); + }; + Slider.defaultProps = { + pointer: _SliderPointer2["default"] + }, exports["default"] = (0, _common.ColorWrap)(Slider); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.SliderSwatches = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _SliderSwatch = __webpack_require__(466), _SliderSwatch2 = _interopRequireDefault(_SliderSwatch), SliderSwatches = exports.SliderSwatches = function(_ref) { + var onClick = _ref.onClick, hsl = _ref.hsl, styles = (0, _reactcss2["default"])({ + "default": { + swatches: { + marginTop: "20px" + }, + swatch: { + boxSizing: "border-box", + width: "20%", + paddingRight: "1px", + "float": "left" + }, + clear: { + clear: "both" + } + } + }); + return _react2["default"].createElement("div", { + style: styles.swatches + }, _react2["default"].createElement("div", { + style: styles.swatch + }, _react2["default"].createElement(_SliderSwatch2["default"], { + hsl: hsl, + offset: ".80", + active: Math.round(100 * hsl.l) / 100 === .8 && Math.round(100 * hsl.s) / 100 === .5, + onClick: onClick, + first: !0 + })), _react2["default"].createElement("div", { + style: styles.swatch + }, _react2["default"].createElement(_SliderSwatch2["default"], { + hsl: hsl, + offset: ".65", + active: Math.round(100 * hsl.l) / 100 === .65 && Math.round(100 * hsl.s) / 100 === .5, + onClick: onClick + })), _react2["default"].createElement("div", { + style: styles.swatch + }, _react2["default"].createElement(_SliderSwatch2["default"], { + hsl: hsl, + offset: ".50", + active: Math.round(100 * hsl.l) / 100 === .5 && Math.round(100 * hsl.s) / 100 === .5, + onClick: onClick + })), _react2["default"].createElement("div", { + style: styles.swatch + }, _react2["default"].createElement(_SliderSwatch2["default"], { + hsl: hsl, + offset: ".35", + active: Math.round(100 * hsl.l) / 100 === .35 && Math.round(100 * hsl.s) / 100 === .5, + onClick: onClick + })), _react2["default"].createElement("div", { + style: styles.swatch + }, _react2["default"].createElement(_SliderSwatch2["default"], { + hsl: hsl, + offset: ".20", + active: Math.round(100 * hsl.l) / 100 === .2 && Math.round(100 * hsl.s) / 100 === .5, + onClick: onClick, + last: !0 + })), _react2["default"].createElement("div", { + style: styles.clear + })); + }; + exports["default"] = SliderSwatches; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.SliderSwatch = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), SliderSwatch = exports.SliderSwatch = function(_ref) { + var hsl = _ref.hsl, offset = _ref.offset, onClick = _ref.onClick, active = _ref.active, first = _ref.first, last = _ref.last, styles = (0, + _reactcss2["default"])({ + "default": { + swatch: { + height: "12px", + background: "hsl(" + hsl.h + ", 50%, " + 100 * offset + "%)", + cursor: "pointer" + } + }, + first: { + swatch: { + borderRadius: "2px 0 0 2px" + } + }, + last: { + swatch: { + borderRadius: "0 2px 2px 0" + } + }, + active: { + swatch: { + transform: "scaleY(1.8)", + borderRadius: "3.6px/2px" + } + } + }, { + active: active, + first: first, + last: last + }), handleClick = function(e) { + return onClick({ + h: hsl.h, + s: .5, + l: offset, + source: "hsl" + }, e); + }; + return _react2["default"].createElement("div", { + style: styles.swatch, + onClick: handleClick + }); + }; + exports["default"] = SliderSwatch; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.SliderPointer = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), SliderPointer = exports.SliderPointer = function() { + var styles = (0, _reactcss2["default"])({ + "default": { + picker: { + width: "14px", + height: "14px", + borderRadius: "6px", + transform: "translate(-7px, -1px)", + backgroundColor: "rgb(248, 248, 248)", + boxShadow: "0 1px 4px 0 rgba(0, 0, 0, 0.37)" + } + } + }); + return _react2["default"].createElement("div", { + style: styles.picker + }); + }; + exports["default"] = SliderPointer; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) return obj; + var newObj = {}; + if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]); + return newObj["default"] = obj, newObj; + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Swatches = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(285), _map2 = _interopRequireDefault(_map), _color = __webpack_require__(426), _color2 = _interopRequireDefault(_color), _materialColors = __webpack_require__(435), material = _interopRequireWildcard(_materialColors), _common = __webpack_require__(411), _reactMaterialDesign = __webpack_require__(442), _SwatchesGroup = __webpack_require__(469), _SwatchesGroup2 = _interopRequireDefault(_SwatchesGroup), Swatches = exports.Swatches = function(_ref) { + var width = _ref.width, height = _ref.height, onChange = _ref.onChange, colors = _ref.colors, hex = _ref.hex, styles = (0, + _reactcss2["default"])({ + "default": { + picker: { + width: width, + height: height + }, + overflow: { + height: height, + overflowY: "scroll" + }, + body: { + padding: "16px 0 6px 16px" + }, + clear: { + clear: "both" + } + } + }), handleChange = function(data, e) { + _color2["default"].isValidHex(data) && onChange({ + hex: data, + source: "hex" + }, e); + }; + return _react2["default"].createElement("div", { + style: styles.picker, + className: "swatches-picker" + }, _react2["default"].createElement(_reactMaterialDesign.Raised, null, _react2["default"].createElement("div", { + style: styles.overflow + }, _react2["default"].createElement("div", { + style: styles.body + }, (0, _map2["default"])(colors, function(group) { + return _react2["default"].createElement(_SwatchesGroup2["default"], { + key: group.toString(), + group: group, + active: hex, + onClick: handleChange + }); + }), _react2["default"].createElement("div", { + style: styles.clear + }))))); + }; + Swatches.defaultProps = { + width: 320, + height: 240, + colors: [ [ material.red[900], material.red[700], material.red[500], material.red[300], material.red[100] ], [ material.pink[900], material.pink[700], material.pink[500], material.pink[300], material.pink[100] ], [ material.purple[900], material.purple[700], material.purple[500], material.purple[300], material.purple[100] ], [ material.deepPurple[900], material.deepPurple[700], material.deepPurple[500], material.deepPurple[300], material.deepPurple[100] ], [ material.indigo[900], material.indigo[700], material.indigo[500], material.indigo[300], material.indigo[100] ], [ material.blue[900], material.blue[700], material.blue[500], material.blue[300], material.blue[100] ], [ material.lightBlue[900], material.lightBlue[700], material.lightBlue[500], material.lightBlue[300], material.lightBlue[100] ], [ material.cyan[900], material.cyan[700], material.cyan[500], material.cyan[300], material.cyan[100] ], [ material.teal[900], material.teal[700], material.teal[500], material.teal[300], material.teal[100] ], [ "#194D33", material.green[700], material.green[500], material.green[300], material.green[100] ], [ material.lightGreen[900], material.lightGreen[700], material.lightGreen[500], material.lightGreen[300], material.lightGreen[100] ], [ material.lime[900], material.lime[700], material.lime[500], material.lime[300], material.lime[100] ], [ material.yellow[900], material.yellow[700], material.yellow[500], material.yellow[300], material.yellow[100] ], [ material.amber[900], material.amber[700], material.amber[500], material.amber[300], material.amber[100] ], [ material.orange[900], material.orange[700], material.orange[500], material.orange[300], material.orange[100] ], [ material.deepOrange[900], material.deepOrange[700], material.deepOrange[500], material.deepOrange[300], material.deepOrange[100] ], [ material.brown[900], material.brown[700], material.brown[500], material.brown[300], material.brown[100] ], [ material.blueGrey[900], material.blueGrey[700], material.blueGrey[500], material.blueGrey[300], material.blueGrey[100] ], [ "#000000", "#525252", "#969696", "#D9D9D9", "#FFFFFF" ] ] + }, exports["default"] = (0, _common.ColorWrap)(Swatches); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.SwatchesGroup = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(285), _map2 = _interopRequireDefault(_map), _SwatchesColor = __webpack_require__(470), _SwatchesColor2 = _interopRequireDefault(_SwatchesColor), SwatchesGroup = exports.SwatchesGroup = function(_ref) { + var onClick = _ref.onClick, group = _ref.group, active = _ref.active, styles = (0, + _reactcss2["default"])({ + "default": { + group: { + paddingBottom: "10px", + width: "40px", + "float": "left", + marginRight: "10px" + } + } + }); + return _react2["default"].createElement("div", { + style: styles.group + }, (0, _map2["default"])(group, function(color, i) { + return _react2["default"].createElement(_SwatchesColor2["default"], { + key: color, + color: color, + active: color.toLowerCase() === active, + first: 0 === i, + last: i === group.length - 1, + onClick: onClick + }); + })); + }; + exports["default"] = SwatchesGroup; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.SwatchesColor = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), SwatchesColor = exports.SwatchesColor = function(_ref) { + var color = _ref.color, onClick = _ref.onClick, first = _ref.first, last = _ref.last, active = _ref.active, styles = (0, + _reactcss2["default"])({ + "default": { + color: { + width: "40px", + height: "24px", + cursor: "pointer", + background: color, + marginBottom: "1px" + }, + check: { + fill: "#fff", + marginLeft: "8px", + display: "none" + } + }, + first: { + color: { + overflow: "hidden", + borderRadius: "2px 2px 0 0" + } + }, + last: { + color: { + overflow: "hidden", + borderRadius: "0 0 2px 2px" + } + }, + active: { + check: { + display: "block" + } + }, + "color-#FFFFFF": { + color: { + boxShadow: "inset 0 0 0 1px #ddd" + }, + check: { + fill: "#333" + } + } + }, { + first: first, + last: last, + active: active, + "color-#FFFFFF": "#FFFFFF" === color + }), handleClick = function(e) { + return onClick(color, e); + }; + return _react2["default"].createElement("div", { + style: styles.color, + onClick: handleClick + }, _react2["default"].createElement("div", { + style: styles.check + }, _react2["default"].createElement("svg", { + style: { + width: "24px", + height: "24px" + }, + viewBox: "0 0 24 24" + }, _react2["default"].createElement("path", { + d: "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" + })))); + }; + exports["default"] = SwatchesColor; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.Twitter = void 0; + var _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _reactcss = __webpack_require__(245), _reactcss2 = _interopRequireDefault(_reactcss), _map = __webpack_require__(285), _map2 = _interopRequireDefault(_map), _color = __webpack_require__(426), _color2 = _interopRequireDefault(_color), _common = __webpack_require__(411), Twitter = exports.Twitter = function(_ref) { + var onChange = _ref.onChange, colors = _ref.colors, width = _ref.width, triangle = _ref.triangle, styles = (0, + _reactcss2["default"])({ + "default": { + card: { + width: width, + background: "#fff", + border: "0 solid rgba(0,0,0,0.25)", + boxShadow: "0 1px 4px rgba(0,0,0,0.25)", + borderRadius: "4px", + position: "relative" + }, + body: { + padding: "15px 9px 9px 15px" + }, + label: { + fontSize: "18px", + color: "#fff" + }, + triangle: { + width: "0px", + height: "0px", + borderStyle: "solid", + borderWidth: "0 9px 10px 9px", + borderColor: "transparent transparent #fff transparent", + position: "absolute" + }, + triangleShadow: { + width: "0px", + height: "0px", + borderStyle: "solid", + borderWidth: "0 9px 10px 9px", + borderColor: "transparent transparent rgba(0,0,0,.1) transparent", + position: "absolute" + }, + hash: { + background: "#F0F0F0", + height: "30px", + width: "30px", + borderRadius: "4px 0 0 4px", + "float": "left", + color: "#98A1A4", + display: "flex", + alignItems: "center", + justifyContent: "center" + }, + input: { + width: "100px", + fontSize: "14px", + color: "#666", + border: "0px", + outline: "none", + height: "28px", + boxShadow: "inset 0 0 0 1px #F0F0F0", + borderRadius: "0 4px 4px 0", + "float": "left", + paddingLeft: "8px" + }, + swatch: { + width: "30px", + height: "30px", + "float": "left", + borderRadius: "4px", + margin: "0 6px 6px 0" + }, + clear: { + clear: "both" + } + }, + "hide-triangle": { + triangle: { + display: "none" + }, + triangleShadow: { + display: "none" + } + }, + "top-left-triangle": { + triangle: { + top: "-10px", + left: "12px" + }, + triangleShadow: { + top: "-11px", + left: "12px" + } + }, + "top-right-triangle": { + triangle: { + top: "-10px", + right: "12px" + }, + triangleShadow: { + top: "-11px", + right: "12px" + } + } + }, { + "hide-triangle": "hide" === triangle, + "top-left-triangle": "top-left" === triangle, + "top-right-triangle": "top-right" === triangle + }), handleChange = function(hex, e) { + _color2["default"].isValidHex(hex) && onChange({ + hex: hex, + source: "hex" + }, e); + }; + return _react2["default"].createElement("div", { + style: styles.card, + className: "twitter-picker" + }, _react2["default"].createElement("div", { + style: styles.triangleShadow + }), _react2["default"].createElement("div", { + style: styles.triangle + }), _react2["default"].createElement("div", { + style: styles.body + }, (0, _map2["default"])(colors, function(c, i) { + return _react2["default"].createElement(_common.Swatch, { + key: i, + color: c, + hex: c, + style: styles.swatch, + onClick: handleChange + }); + }), _react2["default"].createElement("div", { + style: styles.hash + }, "#"), _react2["default"].createElement(_common.EditableInput, { + placeholder: "ff691f", + style: { + input: styles.input + }, + value: "", + onChange: handleChange + }), _react2["default"].createElement("div", { + style: styles.clear + }))); + }; + Twitter.defaultProps = { + width: "276px", + colors: [ "#FF6900", "#FCB900", "#7BDCB5", "#00D084", "#8ED1FC", "#0693E3", "#ABB8C3", "#EB144C", "#F78DA7", "#9900EF" ], + triangle: "top-left" + }, exports["default"] = (0, _common.ColorWrap)(Twitter); +}, function(module, exports) { + "use strict"; + var Base = { + base00: "Default Background", + base01: "Soft Background", + base02: "Soft Middle", + base03: "Strong Middle", + base04: "Soft Foreground", + base05: "Default Foreground" + }, Syntax = { + special00: "Custom Components", + special01: "Integers, Booleans", + special02: "Strings, Arrays", + special03: "Details Pane Text", + special04: "Functions, Objects", + special05: "Special Text", + special06: "XML Attributes", + special07: "Host Components" + }, Selection = { + state00: "Focused Background", + state01: "Blurred Background", + state03: "Hovered Background", + state02: "Focused Foreground", + state04: "Search Background", + state05: "Search Foreground", + state06: "Interactive Hover" + }; + module.exports = { + Base: Base, + Selection: Selection, + Syntax: Syntax + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _defineProperty(obj, key, value) { + return key in obj ? Object.defineProperty(obj, key, { + value: value, + enumerable: !0, + configurable: !0, + writable: !0 + }) : obj[key] = value, obj; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _fauxRef, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), _require = __webpack_require__(220), Map = _require.Map, consts = __webpack_require__(189), Node = __webpack_require__(228), _require2 = __webpack_require__(36), monospace = _require2.monospace, Preview = function(_React$Component) { + function Preview() { + return _classCallCheck(this, Preview), _possibleConstructorReturn(this, (Preview.__proto__ || Object.getPrototypeOf(Preview)).apply(this, arguments)); + } + return _inherits(Preview, _React$Component), _createClass(Preview, [ { + key: "getChildContext", + value: function() { + return { + scrollTo: function() {}, + store: fauxStore + }; + } + }, { + key: "render", + value: function() { + var theme = this.props.theme; + return React.createElement("div", { + style: panelStyle(theme) + }, React.createElement(Node, { + depth: 0, + node: Map({ + children: [ "strictMode" ], + name: "div" + }), + searchRegExp: /iv/ + })); + } + } ]), Preview; + }(React.Component); + Preview.childContextTypes = { + scrollTo: React.PropTypes.func, + store: React.PropTypes.object + }; + var fauxRef = (_fauxRef = {}, _defineProperty(_fauxRef, consts.type, "function"), + _defineProperty(_fauxRef, consts.name, "setRef"), _fauxRef), childNode = Map({ + id: "child", + children: "text", + name: "div", + props: { + style: { + color: "red" + } + }, + ref: fauxRef + }), strictModeNode = Map({ + id: "strictMode", + children: [ "grandparent" ], + name: "StrictMode", + nodeType: "Special" + }), grandparentNode = Map({ + id: "grandparent", + children: [ "parent" ], + name: "Grandparent", + nodeType: "Composite", + props: { + depth: 0 + } + }), parentNode = Map({ + id: "parent", + children: [ "child" ], + name: "Parent", + nodeType: "Composite", + props: { + "boolean": !0, + integer: 123, + string: "foobar" + } + }), nodes = { + child: childNode, + grandparent: grandparentNode, + parent: parentNode, + strictMode: strictModeNode + }, noop = function() {}, fauxStore = { + hovered: "parent", + selected: "grandparent", + get: function(id) { + return nodes[id]; + }, + off: noop, + on: noop, + onContextMenu: noop, + onHover: noop, + onHoverBottom: noop, + onSelect: noop, + onSelectBottom: noop, + onToggleCollapse: noop, + setHover: noop, + selectBottom: noop, + selectTop: noop + }, panelStyle = function(theme) { + return { + maxWidth: "100%", + padding: "0.25rem 0", + zIndex: 1, + fontFamily: monospace.family, + fontSize: monospace.sizes.normal, + backgroundColor: theme.base00, + color: theme.base05 + }; + }; + module.exports = Preview; +}, function(module, exports) { + "use strict"; + var ApathyDark = { + displayName: "Apathy (dark)", + base00: "#1b322e", + base01: "#30695f", + base02: "#184E45", + base03: "#2B685E", + base04: "#5F9C92", + base05: "#f5fcfb", + special00: "#3E9688", + special01: "#3E7996", + special02: "#883E96", + special03: "#963E4C", + special04: "#96883E", + special05: "#4C963E", + special06: "#3E965B", + special07: "#5F9C92", + state00: "#28423d", + state01: "#28423d", + state02: "#f5fcfb", + state03: "#28423d", + state04: "#3E4C96", + state05: "#f5fcfb", + state06: "#ffffff" + }, ApathyLight = { + displayName: "Apathy (light)", + base00: "#D2E7E4", + base01: "#fff", + base02: "#184E45", + base03: "#2B685E", + base04: "#5F9C92", + base05: "rgba(0, 0, 0, .7)", + special00: "#3E9688", + special01: "#3E7996", + special02: "#883E96", + special03: "#963E4C", + special04: "#96883E", + special05: "#4C963E", + special06: "#3E965B", + special07: "#5F9C92", + state00: "#f5fcfb", + state01: "#f5fcfb", + state02: "#2b2d2d", + state03: "#f5fcfb", + state04: "#3E4C96", + state05: "#f5fcfb", + state06: "#000000" + }, AtomDark = { + displayName: "Atom (dark)", + hidden: !0, + base00: "#1d1f21", + base01: "#292c2f", + base02: "#2e2e2e", + base03: "#303030", + base04: "#868989", + base05: "#c1c4c2", + special00: "#fffeba", + special01: "#f574f3", + special02: "#aafd6a", + special03: "#93c294", + special04: "#fed2aa", + special05: "#93c294", + special06: "#c5c5fb", + special07: "#98ccfc", + state00: "#4483c2", + state01: "#444444", + state02: "#ffffff", + state03: "#444444", + state04: "#4483c2", + state05: "#ffffff", + state06: "#e3e6e4" + }, AtomLight = { + displayName: "Atom (light)", + hidden: !0, + base00: "#ffffff", + base01: "#f4f4f4", + base02: "#eeeeee", + base03: "#555555", + base04: "#999989", + base05: "#222222", + special00: "#11807f", + special01: "#db1847", + special02: "#db1847", + special03: "#11807f", + special04: "#97040c", + special05: "#616b9f", + special06: "#455686", + special07: "#11807f", + state00: "#b0c4d9", + state01: "#fffed8", + state02: "#222222", + state03: "#fffed8", + state04: "#6da6e7", + state05: "#ffffff", + state06: "#000000" + }, ChromeDark = { + displayName: "Chrome (dark)", + hidden: !0, + base00: "#242424", + base01: "#2a2a2a", + base02: "#363636", + base03: "#404040", + base04: "#777777", + base05: "#a5a5a5", + special00: "#5db0d7", + special01: "#a1f7b5", + special02: "#f29766", + special03: "#d2c057", + special04: "#34d1c5", + special05: "#9a7fd5", + special06: "#9bbbdc", + special07: "#777777", + state00: "#c78626", + state01: "#363636", + state02: "#242424", + state03: "#342e24", + state04: "#66ff88", + state05: "#242424", + state06: "#cccccc" + }, ChromeDefault = { + displayName: "Chrome (default)", + hidden: !0, + base00: "#ffffff", + base01: "#f3f3f3", + base02: "#eeeeee", + base03: "#dadada", + base04: "#888888", + base05: "#5a5a5a", + special00: "#881280", + special01: "#222222", + special02: "#1a1aa6", + special03: "#c80000", + special04: "#236e25", + special05: "#aa0d91", + special06: "#994500", + special07: "#888888", + state00: "#3879d9", + state01: "#dadada", + state02: "#ffffff", + state03: "#ebf1fb", + state04: "#FFFF00", + state05: "#222222", + state06: "#222222" + }, Dracula = { + displayName: "Dracula", + base00: "#282936", + base01: "#3a3c4e", + base02: "#4d4f68", + base03: "#626483", + base04: "#6f7191", + base05: "#e9e9f4", + special00: "#ff79c6", + special01: "#bd93f9", + special02: "#f1fa8c", + special03: "#a1efe4", + special04: "#4afa7b", + special05: "#ff79c6", + special06: "#f8f8f2", + special07: "#6f7191", + state00: "#181a21", + state01: "#323547", + state02: "#f7f7fb", + state03: "#323547", + state04: "#fafa8c", + state05: "#000000", + state06: "#ffffff" + }, Eighties = { + displayName: "Eighties", + base00: "#2d2d2d", + base01: "#393939", + base02: "#515151", + base03: "#747369", + base04: "#a09f93", + base05: "#d3d0c8", + special00: "#f2777a", + special01: "#f99157", + special02: "#99cc99", + special03: "#66cccc", + special04: "#4afa7b", + special05: "#cc99cc", + special06: "#d27b53", + special07: "#a09f93", + state00: "#f2f0ec", + state01: "#3f3e3e", + state02: "#2d2d2d", + state03: "#3f3e3e", + state04: "#4afa7b", + state05: "#121212", + state06: "#e3e0d8" + }, FirefoxDark = { + displayName: "Firefox (dark)", + hidden: !0, + base00: "#393f4c", + base01: "#393f4c", + base02: "#454d5d", + base03: "#454D5D", + base04: "#8fa1b2", + base05: "#a9bacb", + special00: "#00ff7f", + special01: "#eb5368", + special02: "#e9f4fe", + special03: "#bcb8db", + special04: "#e9f4fe", + special05: "#e9f4fe", + special06: "#e9f4fe", + special07: "#8fa1b2", + state00: "#5675b9", + state01: "#475983", + state02: "#ffffff", + state03: "#475983", + state04: "#00ff7f", + state05: "#181d20", + state06: "#b9cadb" + }, FirefoxFirebug = { + displayName: "Firefox (firebug)", + hidden: !0, + base00: "#ffffff", + base01: "#f5f5f5", + base02: "#dde1e4", + base03: "#c1c1c1", + base04: "#888888", + base05: "#2a2a2a", + special00: "#0000ff", + special01: "#ff0000", + special02: "#ff0000", + special03: "#292e33", + special04: "#ff0000", + special05: "#0000ff", + special06: "#000062", + special07: "#0000ff", + state00: "#3399ff", + state01: "#e4f1fa", + state02: "#ffffff", + state03: "#e6e6e6", + state04: "#ffee99", + state05: "#000000", + state06: "#000000" + }, FirefoxLight = { + displayName: "Firefox (light)", + hidden: !0, + base00: "#ffffff", + base01: "#fcfcfc", + base02: "#dde1e4", + base03: "#c1c1c1", + base04: "#888888", + base05: "#767676", + special00: "#2e9dd5", + special01: "#676bff", + special02: "#5b5fff", + special03: "#393f4c", + special04: "#ed2655", + special05: "#4f88cc", + special06: "#393f4c", + special07: "#888888", + state00: "#4c9ed9", + state01: "#e4f1fa", + state02: "#f4f7fa", + state03: "#e4f1fa", + state04: "#FFFF00", + state05: "#585959", + state06: "#444444" + }, Flat = { + displayName: "Flat", + base00: "#2C3E50", + base01: "#34495E", + base02: "#7F8C8D", + base03: "#95A5A6", + base04: "#BDC3C7", + base05: "#e0e0e0", + special00: "#E74C3C", + special01: "#E67E22", + special02: "#2ECC71", + special03: "#1ABC9C", + special04: "#3498DB", + special05: "#b670d2", + special06: "#be643c", + special07: "#BDC3C7", + state00: "#6a8db1", + state01: "#364c62", + state02: "#2C3E50", + state03: "#364c62", + state04: "#64fa82", + state05: "#2C3E50", + state06: "#ffffff" + }, GruvboxDark = { + displayName: "Gruvbox (dark)", + base00: "#282828", + base01: "#3c3836", + base02: "#504945", + base03: "#928374", + base04: "#bdae93", + base05: "#ebdbb2", + special00: "#83a598", + special01: "#d3869b", + special02: "#b8bb26", + special03: "#689d6a", + special04: "#fabd2f", + special05: "#fe8019", + special06: "#fe8019", + special07: "#bdae93", + state00: "#504945", + state01: "#3c3836", + state02: "#fbf1c7", + state03: "#3c3836", + state04: "#7c6f64", + state05: "#fbf1c7", + state06: "#fbebc2" + }, GruvboxLight = { + displayName: "Gruvbox (light)", + base00: "#fbf1c7", + base01: "#ebdbb2", + base02: "#d5c4a1", + base03: "#928374", + base04: "#282828", + base05: "#3c3836", + special00: "#076678", + special01: "#8f3f71", + special02: "#98971a", + special03: "#af3a03", + special04: "#458588", + special05: "#fe8019", + special06: "#b57614", + special07: "#282828", + state00: "#bdae93", + state01: "#d5c4a1", + state02: "#282828", + state03: "#d5c4a1", + state04: "#d5c4a1", + state05: "#282828", + state06: "#000000" + }, Halflife = { + displayName: "Halflife", + base00: "#222222", + base01: "#f3f3f3", + base02: "#888888", + base03: "#282828", + base04: "#888888", + base05: "#aaaaaa", + special00: "#fc913a", + special01: "#f9d423", + special02: "#f9d423", + special03: "#cccccc", + special04: "#f9d423", + special05: "#3b3a32", + special06: "#cccccc", + special07: "#7d8991", + state00: "#f85931", + state01: "#dadada", + state02: "#ffffff", + state03: "#282828", + state04: "#ffe792", + state05: "#000000", + state06: "#222222" + }, Materia = { + displayName: "Materia", + base00: "#263238", + base01: "#2C393F", + base02: "#37474F", + base03: "#707880", + base04: "#C9CCD3", + base05: "#CDD3DE", + special00: "#EC5F67", + special01: "#EA9560", + special02: "#8BD649", + special03: "#80CBC4", + special04: "#89DDFF", + special05: "#82AAFF", + special06: "#EC5F67", + special07: "#C9CCD3", + state00: "#0084ff", + state01: "#314048", + state02: "#263238", + state03: "#314048", + state04: "#00ff84", + state05: "#263238", + state06: "#DDE3EE" + }, MaterialDark = { + displayName: "Material Dark", + base00: "#263239", + base01: "#373b41", + base02: "#3e4a51", + base03: "#445052", + base04: "#718184", + base05: "#B2CCD6", + special00: "#f95479", + special01: "#F78C6A", + special02: "#C3E88D", + special03: "#89DDF3", + special04: "#82AAFF", + special05: "#C792EA", + special06: "#FFCB6B", + special07: "#718184", + state00: "#4a55b9", + state01: "#3e4a50", + state02: "#ffffff", + state03: "#212b30", + state04: "#4a55b9", + state05: "#ffffff", + state06: "#D2ECF6" + }, OceanDark = { + displayName: "Ocean Dark", + base00: "#232730", + base01: "#2b303c", + base02: "#323943", + base03: "#414551", + base04: "#65727e", + base05: "#757984", + special00: "#b48bae", + special01: "#c0c5ce", + special02: "#a3c08a", + special03: "#ab7866", + special04: "#eccd88", + special05: "#d06a77", + special06: "#757a85", + special07: "#65727e", + state00: "#a0a4ae", + state01: "#314048", + state02: "#263238", + state03: "#314048", + state04: "#d06a77", + state05: "#1c1f27", + state06: "#A5A9B4" + }, OneDark = { + displayName: "One (dark)", + base00: "#282c34", + base01: "#21252b", + base02: "#568af2", + base03: "#3b4048", + base04: "#3e454f", + base05: "#abb2bf", + special00: "#e5c07b", + special01: "#abb2bf", + special02: "#98c379", + special03: "#9da5b4", + special04: "#e06c75", + special05: "#6b717e", + special06: "#d19a66", + special07: "#abb2bf", + state00: "#4d78cc", + state01: "#3e4450", + state02: "#ffffff", + state03: "#2c323c", + state04: "#4d78cc", + state05: "#ffffff", + state06: "#ffffff" + }, OneLight = { + displayName: "One (light)", + base00: "#fafafa", + base01: "#eaeaeb", + base02: "#eeeeee", + base03: "#dbdbdc", + base04: "#8e8e90", + base05: "#3e4048", + special00: "#c0831e", + special01: "#a42ea2", + special02: "#68ab68", + special03: "#447bef", + special04: "#e2574e", + special05: "#424242", + special06: "#976715", + special07: "#424242", + state00: "#447bef", + state01: "#f0f0f1", + state02: "#ffffff", + state03: "#f0f0f1", + state04: "#447bef", + state05: "#ffffff", + state06: "#1c2026" + }, Phd = { + displayName: "Phd", + base00: "#061229", + base01: "#2a3448", + base02: "#4d5666", + base03: "#717885", + base04: "#9a99a3", + base05: "#b8bbc2", + special00: "#d07346", + special01: "#f0a000", + special02: "#99bf52", + special03: "#72b9bf", + special04: "#5299bf", + special05: "#9989cc", + special06: "#b08060", + special07: "#9a99a3", + state00: "#4b73bf", + state01: "#112243", + state02: "#061229", + state03: "#112243", + state04: "#00c8fa", + state05: "#061229", + state06: "#d8dbe2" + }, SolarizedDark = { + displayName: "Solarized Dark", + base00: "#002b36", + base01: "#073642", + base02: "#586e75", + base03: "#657b83", + base04: "#93a1a1", + base05: "#839496", + special00: "#268bd2", + special01: "#268bd2", + special02: "#2aa198", + special03: "#839496", + special04: "#2aa198", + special05: "#b58900", + special06: "#859900", + special07: "#268bd2", + state00: "#073642", + state01: "#002b36", + state02: "#93a1a1", + state03: "#073642", + state04: "#859900", + state05: "#002b36", + state06: "#fdf6e3" + }, SolarizedLight = { + displayName: "Solarized Light", + base00: "#fdf6e3", + base01: "#eee8d5", + base02: "#586e75", + base03: "#657b83", + base04: "#93a1a1", + base05: "#657b83", + special00: "#268bd2", + special01: "#268bd2", + special02: "#2aa198", + special03: "#839496", + special04: "#2aa198", + special05: "#b58900", + special06: "#859900", + special07: "#268bd2", + state00: "#eee8d5", + state01: "#eee8d5", + state02: "#586e75", + state03: "#eee8d5", + state04: "#859900", + state05: "#eee8d5", + state06: "#073642" + }, Tomorrow = { + displayName: "Tomorrow", + base00: "#ffffff", + base01: "#e0e0e0", + base02: "#d6d6d6", + base03: "#8e908c", + base04: "#969896", + base05: "#4d4d4c", + special00: "#c82829", + special01: "#f5871f", + special02: "#718c00", + special03: "#3e999f", + special04: "#4271ae", + special05: "#8959a8", + special06: "#a3685a", + special07: "#969896", + state00: "#4271ae", + state01: "#e0e0e0", + state02: "#ffffff", + state03: "#e0e0e0", + state04: "#eab700", + state05: "#1d1f21", + state06: "#222222" + }, TomorrowNight = { + displayName: "Tomorrow Night", + base00: "#1d1f21", + base01: "#282a2e", + base02: "#373b41", + base03: "#969896", + base04: "#b4b7b4", + base05: "#c5c8c6", + special00: "#cc6666", + special01: "#de935f", + special02: "#b5bd68", + special03: "#8abeb7", + special04: "#81a2be", + special05: "#b294bb", + special06: "#a3685a", + special07: "#b4b7b4", + state00: "#0084ff", + state01: "#e0e0e0", + state02: "#282a2e", + state03: "#373b41", + state04: "#f0c674", + state05: "#1d1f21", + state06: "#e5e8e6" + }; + module.exports = { + ApathyDark: ApathyDark, + ApathyLight: ApathyLight, + AtomDark: AtomDark, + AtomLight: AtomLight, + ChromeDark: ChromeDark, + ChromeDefault: ChromeDefault, + Dracula: Dracula, + Eighties: Eighties, + FirefoxDark: FirefoxDark, + FirefoxFirebug: FirefoxFirebug, + FirefoxLight: FirefoxLight, + Flat: Flat, + GruvboxDark: GruvboxDark, + GruvboxLight: GruvboxLight, + Halflife: Halflife, + Materia: Materia, + MaterialDark: MaterialDark, + OceanDark: OceanDark, + OneDark: OneDark, + OneLight: OneLight, + Phd: Phd, + SolarizedDark: SolarizedDark, + SolarizedLight: SolarizedLight, + Tomorrow: Tomorrow, + TomorrowNight: TomorrowNight + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), TimerSafe = function(Component) { + var TimerSafeImplementation = function(_React$Component) { + function TimerSafeImplementation() { + var _ref, _temp, _this, _ret; + _classCallCheck(this, TimerSafeImplementation); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; + return _temp = _this = _possibleConstructorReturn(this, (_ref = TimerSafeImplementation.__proto__ || Object.getPrototypeOf(TimerSafeImplementation)).call.apply(_ref, [ this ].concat(args))), + _this._timeoutIds = {}, _this._clearTimeout = function(id) { + clearTimeout(id), delete _this._timeoutIds[id]; + }, _this._setTimeout = function(callback, delay) { + var id = setTimeout(function() { + delete _this._timeoutIds[id], callback(); + }, delay); + return _this._timeoutIds[id] = !0, id; + }, _ret = _temp, _possibleConstructorReturn(_this, _ret); + } + return _inherits(TimerSafeImplementation, _React$Component), _createClass(TimerSafeImplementation, [ { + key: "componentWillUnmount", + value: function() { + Object.keys(this._timeoutIds).forEach(this._clearTimeout); + } + }, { + key: "render", + value: function() { + return React.createElement(Component, _extends({}, this.props, { + clearTimeout: this._clearTimeout, + setTimeout: this._setTimeout + })); + } + } ]), TimerSafeImplementation; + }(React.Component); + return TimerSafeImplementation; + }; + module.exports = TimerSafe; +}, function(module, exports, __webpack_require__) { + "use strict"; + function deserialize(string) { + var fallbackTheme = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : ChromeDefault, theme = {}; + try { + !function() { + var maybeTheme = JSON.parse(string); + themeKeys.forEach(function(key) { + var maybeColor = maybeTheme[key]; + isColorSet(maybeColor) && (theme[key] = maybeColor); + }); + }(); + } catch (error) { + console.error("Could not deserialize theme", error); + } + return isColorSet(theme.state06) || (theme.state06 = theme.base05), themeKeys.forEach(function(key) { + var maybeColor = theme[key]; + isColorSet(maybeColor) || (theme[key] = fallbackTheme[key]); + }), theme; + } + function isColorSet(maybeColor) { + return "string" == typeof maybeColor && "" !== maybeColor; + } + function serialize(theme) { + return JSON.stringify(theme, null, 0); + } + var _require = __webpack_require__(474), ChromeDefault = _require.ChromeDefault, themeKeys = Object.keys(ChromeDefault); + module.exports = { + deserialize: deserialize, + serialize: serialize + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), ReactDOM = __webpack_require__(45), Draggable = __webpack_require__(478), nullthrows = __webpack_require__(3)["default"], SplitPane = function(_React$Component) { + function SplitPane(props) { + _classCallCheck(this, SplitPane); + var _this = _possibleConstructorReturn(this, (SplitPane.__proto__ || Object.getPrototypeOf(SplitPane)).call(this, props)); + return _this.state = { + moving: !1, + width: props.initialWidth, + height: props.initialHeight + }, _this; + } + return _inherits(SplitPane, _React$Component), _createClass(SplitPane, [ { + key: "componentDidMount", + value: function() { + var node = nullthrows(ReactDOM.findDOMNode(this)), width = Math.floor(node.offsetWidth * (this.props.isVertical ? .6 : .3)); + this.setState({ + width: Math.min(250, width), + height: Math.floor(.3 * node.offsetHeight) + }); + } + }, { + key: "onMove", + value: function(x, y) { + var _this2 = this, rect = ReactDOM.findDOMNode(this).getBoundingClientRect(); + this.setState(function(prevState) { + return { + width: _this2.props.isVertical ? prevState.width : Math.floor(rect.left + rect.width - x), + height: _this2.props.isVertical ? Math.floor(rect.top + rect.height - y) : prevState.height + }; + }); + } + }, { + key: "render", + value: function() { + var _this3 = this, theme = this.context.theme, isVertical = this.props.isVertical, _state = this.state, height = _state.height, width = _state.width; + return React.createElement("div", { + style: containerStyle(isVertical) + }, React.createElement("div", { + style: styles.leftPane + }, this.props.left()), React.createElement("div", { + style: rightStyle(isVertical, width, height) + }, React.createElement(Draggable, { + style: draggerStyle(isVertical), + onStart: function() { + return _this3.setState({ + moving: !0 + }); + }, + onMove: function(x, y) { + return _this3.onMove(x, y); + }, + onStop: function() { + return _this3.setState({ + moving: !1 + }); + } + }, React.createElement("div", { + style: draggerInnerStyle(isVertical, theme) + })), React.createElement("div", { + style: styles.rightPane + }, this.props.right()))); + } + } ]), SplitPane; + }(React.Component); + SplitPane.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var containerStyle = function(isVertical) { + return { + display: "flex", + minWidth: 0, + flex: 1, + flexDirection: isVertical ? "column" : "row" + }; + }, draggerInnerStyle = function(isVertical, theme) { + return { + height: isVertical ? "1px" : "100%", + width: isVertical ? "100%" : "1px", + backgroundColor: theme.base04 + }; + }, draggerStyle = function(isVertical) { + return { + position: "relative", + zIndex: 1, + padding: isVertical ? "0.25rem 0" : "0 0.25rem", + margin: isVertical ? "-0.25rem 0" : "0 -0.25rem", + cursor: isVertical ? "ns-resize" : "ew-resize" + }; + }, rightStyle = function(isVertical, width, height) { + return _extends({}, containerStyle(isVertical), { + width: isVertical ? null : width, + height: isVertical ? height : null, + flex: "initial", + minHeight: 120, + minWidth: 150 + }); + }, styles = { + rightPane: { + display: "flex", + width: "100%" + }, + leftPane: { + display: "flex", + minWidth: "50%", + minHeight: "50%", + flex: 1, + overflow: "hidden" + } + }; + module.exports = SplitPane; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), ReactDOM = __webpack_require__(45), Draggable = function(_React$Component) { + function Draggable() { + return _classCallCheck(this, Draggable), _possibleConstructorReturn(this, (Draggable.__proto__ || Object.getPrototypeOf(Draggable)).apply(this, arguments)); + } + return _inherits(Draggable, _React$Component), _createClass(Draggable, [ { + key: "componentDidMount", + value: function() { + this._onMove = this.onMove.bind(this), this._onUp = this.onUp.bind(this); + } + }, { + key: "_startDragging", + value: function(evt) { + evt.preventDefault(); + var doc = ReactDOM.findDOMNode(this).ownerDocument; + doc.addEventListener("mousemove", this._onMove), doc.addEventListener("mouseup", this._onUp), + this.props.onStart(); + } + }, { + key: "onMove", + value: function(evt) { + evt.preventDefault(), this.props.onMove(evt.pageX, evt.pageY); + } + }, { + key: "onUp", + value: function(evt) { + evt.preventDefault(); + var doc = ReactDOM.findDOMNode(this).ownerDocument; + doc.removeEventListener("mousemove", this._onMove), doc.removeEventListener("mouseup", this._onUp), + this.props.onStop(); + } + }, { + key: "render", + value: function() { + return React.createElement("div", { + style: this.props.style, + onMouseDown: this._startDragging.bind(this) + }, this.props.children); + } + } ]), Draggable; + }(React.Component); + module.exports = Draggable; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), decorate = __webpack_require__(39), _require = __webpack_require__(36), sansSerif = _require.sansSerif, TabbedPane = function(_React$Component) { + function TabbedPane() { + return _classCallCheck(this, TabbedPane), _possibleConstructorReturn(this, (TabbedPane.__proto__ || Object.getPrototypeOf(TabbedPane)).apply(this, arguments)); + } + return _inherits(TabbedPane, _React$Component), _createClass(TabbedPane, [ { + key: "render", + value: function() { + var _this2 = this, theme = this.context.theme, tabs = Object.keys(this.props.tabs); + return 1 === tabs.length ? this.props.tabs[tabs[0]]() : React.createElement("div", { + style: styles.container + }, React.createElement("ul", { + style: tabsStyle(theme) + }, tabs.map(function(name, i) { + return React.createElement("li", { + key: name + i, + onClick: function() { + return _this2.props.setSelectedTab(name); + }, + style: tabStyle(name === _this2.props.selected, theme) + }, name); + })), React.createElement("div", { + style: styles.body + }, this.props.tabs[this.props.selected]())); + } + } ]), TabbedPane; + }(React.Component); + TabbedPane.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var tabsStyle = function(theme) { + return { + display: "flex", + flexShrink: 0, + listStyle: "none", + margin: 0, + backgroundColor: theme.base00, + borderBottom: "1px solid " + theme.base03, + padding: "0.25rem 0.25rem 0 0.25rem" + }; + }, tabStyle = function(isSelected, theme) { + var border = isSelected ? "1px solid " + theme.base03 : "none"; + return { + padding: "0.25rem 0.5rem", + lineHeight: "15px", + fontSize: sansSerif.sizes.normal, + fontFamily: sansSerif.family, + cursor: "pointer", + backgroundColor: isSelected ? theme.base01 : "transparent", + borderLeft: border, + borderRight: border, + borderTop: border + }; + }, styles = { + container: { + flex: 1, + display: "flex", + flexDirection: "column", + width: "100%" + }, + body: { + flex: 1, + display: "flex", + minHeight: 0 + } + }; + module.exports = decorate({ + listeners: function() { + return [ "selectedTab" ]; + }, + shouldUpdate: function(props, prevProps) { + for (var name in props) if (props[name] !== prevProps[name]) return !0; + return !1; + }, + props: function(store) { + return { + selected: store.selectedTab, + setSelectedTab: function(name) { + return store.setSelectedTab(name); + } + }; + } + }, TabbedPane); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _slicedToArray = function() { + function sliceIterator(arr, i) { + var _arr = [], _n = !0, _d = !1, _e = void 0; + try { + for (var _s, _i = arr[Symbol.iterator](); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), + !i || _arr.length !== i); _n = !0) ; + } catch (err) { + _d = !0, _e = err; + } finally { + try { + !_n && _i["return"] && _i["return"](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function(arr, i) { + if (Array.isArray(arr)) return arr; + if (Symbol.iterator in Object(arr)) return sliceIterator(arr, i); + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + }; + }(), _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _require = __webpack_require__(481), EventEmitter = _require.EventEmitter, _require2 = __webpack_require__(220), Map = _require2.Map, Set = _require2.Set, List = _require2.List, assign = __webpack_require__(38), _require3 = __webpack_require__(233), copy = _require3.copy, nodeMatchesText = __webpack_require__(482), consts = __webpack_require__(189), serializePropsForCopy = __webpack_require__(483), invariant = __webpack_require__(215), SearchUtils = __webpack_require__(222), Store = (__webpack_require__(484), + function(_EventEmitter) { + function Store(bridge, themeStore) { + _classCallCheck(this, Store); + var _this = _possibleConstructorReturn(this, (Store.__proto__ || Object.getPrototypeOf(Store)).call(this)); + return _this._nodes = new Map(), _this._parents = new Map(), _this._nodesByName = new Map(), + _this._bridge = bridge, _this.isInspectEnabled = !1, _this.roots = new List(), _this.contextMenu = null, + _this.searchRoots = null, _this.hovered = null, _this.selected = null, _this.selectedTab = "Elements", + _this.breadcrumbHead = null, _this.isBottomTagHovered = !1, _this.isBottomTagSelected = !1, + _this.searchText = "", _this.capabilities = {}, _this.traceupdatesState = null, + _this.colorizerState = null, _this.refreshSearch = !1, _this.themeStore = themeStore, + window.store = _this, _this._bridge.on("root", function(id) { + _this.roots.contains(id) || (_this.roots = _this.roots.push(id), _this.selected || (_this.selected = _this.skipWrapper(id), + _this.breadcrumbHead = _this.selected, _this.emit("selected"), _this.emit("breadcrumbHead"), + _this._bridge.send("selected", _this.selected)), _this.emit("roots")); + }), _this._bridge.on("mount", function(data) { + return _this._mountComponent(data); + }), _this._bridge.on("update", function(data) { + return _this._updateComponent(data); + }), _this._bridge.on("unmount", function(id) { + return _this._unmountComponent(id); + }), _this._bridge.on("setInspectEnabled", function(data) { + return _this.setInspectEnabled(data); + }), _this._bridge.on("select", function(_ref) { + for (var id = _ref.id, quiet = _ref.quiet, _ref$offsetFromLeaf = _ref.offsetFromLeaf, offsetFromLeaf = void 0 === _ref$offsetFromLeaf ? 0 : _ref$offsetFromLeaf; offsetFromLeaf > 0; ) { + offsetFromLeaf--; + var pid = _this._parents.get(id); + if (!pid) break; + id = pid; + } + _this._revealDeep(id), _this.selectTop(_this.skipWrapper(id), quiet), _this.setSelectedTab("Elements"); + }), _this._establishConnection(), _this._eventQueue = [], _this._eventTimer = null, + _this; + } + return _inherits(Store, _EventEmitter), _createClass(Store, [ { + key: "emit", + value: function(event) { + var _this2 = this; + return this._eventQueue.indexOf(event) !== -1 || (this._eventQueue.push(event), + this._eventTimer || (this._eventTimer = setTimeout(function() { + return _this2.flush(); + }, 50)), !0); + } + }, { + key: "flush", + value: function() { + var _this3 = this; + this._eventTimer && (clearTimeout(this._eventTimer), this._eventTimer = null), this._eventQueue.forEach(function(evt) { + EventEmitter.prototype.emit.call(_this3, evt); + }), this._eventQueue = []; + } + }, { + key: "scrollToNode", + value: function(id) { + this._bridge.send("scrollToNode", id); + } + }, { + key: "copyNodeName", + value: function(name) { + copy(name); + } + }, { + key: "copyNodeProps", + value: function(props) { + copy(serializePropsForCopy(props)); + } + }, { + key: "setSelectedTab", + value: function(name) { + this.selectedTab !== name && (this.selectedTab = name, this.emit("selectedTab")); + } + }, { + key: "changeTextContent", + value: function(id, text) { + this._bridge.send("changeTextContent", { + id: id, + text: text + }); + var node = this._nodes.get(id); + if ("Text" === node.get("nodeType")) this._nodes = this._nodes.set(id, node.set("text", text)); else { + this._nodes = this._nodes.set(id, node.set("children", text)); + var props = node.get("props"); + props.children = text; + } + this.emit(id); + } + }, { + key: "changeSearch", + value: function(text) { + var _this4 = this, needle = text.toLowerCase(); + (needle !== this.searchText.toLowerCase() || this.refreshSearch) && (text && 0 !== SearchUtils.trimSearchText(text).length ? (this.searchRoots && 0 === needle.indexOf(this.searchText.toLowerCase()) && !SearchUtils.shouldSearchUseRegex(text) ? this.searchRoots = this.searchRoots.filter(function(item) { + var node = _this4.get(item); + return node.get("name") && node.get("name").toLowerCase().indexOf(needle) !== -1 || node.get("text") && node.get("text").toLowerCase().indexOf(needle) !== -1 || "string" == typeof node.get("children") && node.get("children").toLowerCase().indexOf(needle) !== -1; + }) : this.searchRoots = this._nodes.entrySeq().filter(function(_ref2) { + var _ref3 = _slicedToArray(_ref2, 2), key = _ref3[0], val = _ref3[1]; + return nodeMatchesText(val, needle, key, _this4); + }).map(function(_ref4) { + var _ref5 = _slicedToArray(_ref4, 2), key = _ref5[0]; + _ref5[1]; + return key; + }).toList(), this.searchRoots.forEach(function(id) { + _this4.hasBottom(id) && (_this4._nodes = _this4._nodes.setIn([ id, "collapsed" ], !0)); + })) : this.searchRoots = null, this.searchText = text, this.emit("searchText"), + this.emit("searchRoots"), this.searchRoots && !this.searchRoots.contains(this.selected) ? this.select(null, !0) : this.searchRoots || (this.selected ? this._revealDeep(this.selected) : this.select(this.roots.get(0))), + this.highlightSearch(), this.refreshSearch = !1, this.flush()); + } + }, { + key: "highlight", + value: function(id) { + this.colorizerState && this.colorizerState.enabled || this._bridge.send("highlight", id); + } + }, { + key: "highlightMany", + value: function(ids) { + this._bridge.send("highlightMany", ids); + } + }, { + key: "highlightSearch", + value: function() { + this.colorizerState && this.colorizerState.enabled && (this._bridge.send("hideHighlight"), + this.searchRoots && this.highlightMany(this.searchRoots.toArray())); + } + }, { + key: "hoverClass", + value: function(name) { + if (null === name) return void this.hideHighlight(); + var ids = this._nodesByName.get(name); + ids && this.highlightMany(ids.toArray()); + } + }, { + key: "selectFirstOfClass", + value: function(name) { + var ids = this._nodesByName.get(name); + if (ids && ids.size) { + var id = ids.toSeq().first(); + this._revealDeep(id), this.selectTop(id); + } + } + }, { + key: "showContextMenu", + value: function(type, evt) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key]; + evt.preventDefault(), this.contextMenu = { + type: type, + x: evt.pageX, + y: evt.pageY, + args: args + }, this.emit("contextMenu"); + } + }, { + key: "hideContextMenu", + value: function() { + this.contextMenu = null, this.emit("contextMenu"); + } + }, { + key: "changeTheme", + value: function(themeName) { + this.themeStore.update(themeName), this.emit("theme"); + } + }, { + key: "changeDefaultTheme", + value: function(defaultThemeName) { + this.themeStore.setDefaultTheme(defaultThemeName), this.emit("theme"); + } + }, { + key: "saveCustomTheme", + value: function(theme) { + this.themeStore.saveCustomTheme(theme), this.emit("theme"); + } + }, { + key: "showPreferencesPanel", + value: function() { + this.preferencesPanelShown = !0, this.emit("preferencesPanelShown"); + } + }, { + key: "hidePreferencesPanel", + value: function() { + this.preferencesPanelShown = !1, this.emit("preferencesPanelShown"); + } + }, { + key: "selectFirstSearchResult", + value: function() { + this.searchRoots && this.select(this.searchRoots.get(0), !0); + } + }, { + key: "hasBottom", + value: function(id) { + var node = this.get(id), children = node.get("children"); + return "NativeWrapper" === node.get("nodeType") && (children = this.get(children[0]).get("children")), + !("string" == typeof children || !children || !children.length || node.get("collapsed")); + } + }, { + key: "toggleCollapse", + value: function(id) { + this._nodes = this._nodes.updateIn([ id, "collapsed" ], function(c) { + return !c; + }), this.emit(id); + } + }, { + key: "toggleAllChildrenNodes", + value: function(value) { + var id = this.selected; + id && this._toggleDeepChildren(id, value); + } + }, { + key: "setProps", + value: function(id, path, value) { + this._bridge.send("setProps", { + id: id, + path: path, + value: value + }); + } + }, { + key: "setState", + value: function(id, path, value) { + this._bridge.send("setState", { + id: id, + path: path, + value: value + }); + } + }, { + key: "setContext", + value: function(id, path, value) { + this._bridge.send("setContext", { + id: id, + path: path, + value: value + }); + } + }, { + key: "makeGlobal", + value: function(id, path) { + this._bridge.send("makeGlobal", { + id: id, + path: path + }); + } + }, { + key: "setHover", + value: function(id, isHovered, isBottomTag) { + if (isHovered) { + var old = this.hovered; + this.hovered = id, this.isBottomTagHovered = isBottomTag, old && this.emit(old), + this.emit(id), this.emit("hover"), this.highlight(id); + } else this.hovered === id && (this.hideHighlight(), this.isBottomTagHovered = !1); + } + }, { + key: "hideHighlight", + value: function() { + if ((!this.colorizerState || !this.colorizerState.enabled) && (this._bridge.send("hideHighlight"), + this.hovered)) { + var id = this.hovered; + this.hovered = null, this.emit(id), this.emit("hover"); + } + } + }, { + key: "selectBreadcrumb", + value: function(id) { + this._revealDeep(id), this.changeSearch(""), this.isBottomTagSelected = !1, this.select(id, !1, !0); + } + }, { + key: "selectTop", + value: function(id, noHighlight) { + this.isBottomTagSelected = !1, this.select(id, noHighlight); + } + }, { + key: "selectBottom", + value: function(id) { + this.isBottomTagSelected = !0, this.select(id); + } + }, { + key: "select", + value: function(id, noHighlight, keepBreadcrumb) { + var oldSel = this.selected; + this.selected = id, oldSel && this.emit(oldSel), id && this.emit(id), keepBreadcrumb || (this.breadcrumbHead = id, + this.emit("breadcrumbHead")), this.emit("selected"), this._bridge.send("selected", id), + !noHighlight && id && this.highlight(id); + } + }, { + key: "get", + value: function(id) { + return this._nodes.get(id); + } + }, { + key: "getParent", + value: function(id) { + return this._parents.get(id); + } + }, { + key: "skipWrapper", + value: function(id, up, end) { + if (id) for (;;) { + var node = this.get(id), nodeType = node.get("nodeType"); + if ("Wrapper" !== nodeType && "Native" !== nodeType) return id; + if ("Native" === nodeType && (!up || "NativeWrapper" !== this.get(this._parents.get(id)).get("nodeType"))) return id; + if (up) { + var parentId = this._parents.get(id); + if (!parentId) return; + id = parentId; + } else { + var children = node.get("children"); + if (0 === children.length) return; + var index = end ? children.length - 1 : 0, childId = children[index]; + id = childId; + } + } + } + }, { + key: "off", + value: function(evt, fn) { + this.removeListener(evt, fn); + } + }, { + key: "inspect", + value: function(id, path, cb) { + var _this5 = this; + invariant("props" === path[0] || "state" === path[0] || "context" === path[0], "Inspected path must be one of props, state, or context"), + this._bridge.inspect(id, path, function(value) { + var base = _this5.get(id).get(path[0]), inspected = path.slice(1).reduce(function(obj, attr) { + return obj ? obj[attr] : null; + }, base); + inspected && (assign(inspected, value), inspected[consts.inspected] = !0), cb(); + }); + } + }, { + key: "changeTraceUpdates", + value: function(state) { + this.traceupdatesState = state, this.emit("traceupdatesstatechange"), invariant(state.toJS, "state.toJS should exist"), + this._bridge.send("traceupdatesstatechange", state.toJS()); + } + }, { + key: "changeColorizer", + value: function(state) { + this.colorizerState = state, this.emit("colorizerchange"), this._bridge.send("colorizerchange", state.toJS()), + this.colorizerState && this.colorizerState.enabled ? this.highlightSearch() : this.hideHighlight(); + } + }, { + key: "setInspectEnabled", + value: function(isInspectEnabled) { + this.isInspectEnabled = isInspectEnabled, this.emit("isInspectEnabled"), this._bridge.send("setInspectEnabled", isInspectEnabled); + } + }, { + key: "_establishConnection", + value: function() { + var requestInt, _this6 = this, tries = 0; + this._bridge.once("capabilities", function(capabilities) { + clearInterval(requestInt), _this6.capabilities = assign(_this6.capabilities, capabilities), + _this6.emit("connected"); + }), this._bridge.send("requestCapabilities"), requestInt = setInterval(function() { + return tries += 1, tries > 100 ? (console.error("failed to connect"), clearInterval(requestInt), + void _this6.emit("connection failed")) : void _this6._bridge.send("requestCapabilities"); + }, 500); + } + }, { + key: "_revealDeep", + value: function(id) { + if (!this.searchRoots || !this.searchRoots.contains(id)) for (var pid = this._parents.get(id); pid; ) { + if (this._nodes.getIn([ pid, "collapsed" ]) && (this._nodes = this._nodes.setIn([ pid, "collapsed" ], !1), + this.emit(pid)), this.searchRoots && this.searchRoots.contains(pid)) return; + pid = this._parents.get(pid); + } + } + }, { + key: "_toggleDeepChildren", + value: function(id, value) { + var _this7 = this, node = this._nodes.get(id); + if (node) { + node.get("collapsed") !== value && (this._nodes = this._nodes.setIn([ id, "collapsed" ], value), + this.emit(id)); + var children = node.get("children"); + children && children.forEach && children.forEach(function(cid) { + return _this7._toggleDeepChildren(cid, value); + }); + } + } + }, { + key: "_mountComponent", + value: function(data) { + var _this8 = this, map = Map(data).set("renders", 1); + "Composite" === data.nodeType && (map = map.set("collapsed", !0)), this._nodes = this._nodes.set(data.id, map), + data.children && data.children.forEach && data.children.forEach(function(cid) { + _this8._parents = _this8._parents.set(cid, data.id); + }); + var curNodes = this._nodesByName.get(data.name) || new Set(); + this._nodesByName = this._nodesByName.set(data.name, curNodes.add(data.id)), this.emit(data.id); + } + }, { + key: "_updateComponent", + value: function(data) { + var _this9 = this, node = this.get(data.id); + node && (data.renders = node.get("renders") + 1, this._nodes = this._nodes.mergeIn([ data.id ], Map(data)), + data.children && data.children.forEach && data.children.forEach(function(cid) { + if (!_this9._parents.get(cid)) { + _this9._parents = _this9._parents.set(cid, data.id); + var childNode = _this9._nodes.get(cid), childID = childNode.get("id"); + _this9.searchRoots && nodeMatchesText(childNode, _this9.searchText.toLowerCase(), childID, _this9) && (_this9.searchRoots = _this9.searchRoots.push(childID), + _this9.emit("searchRoots"), _this9.highlightSearch()); + } + }), this.emit(data.id)); + } + }, { + key: "_unmountComponent", + value: function(id) { + var pid = this._parents.get(id); + if (this._removeFromNodesByName(id), this._parents = this._parents["delete"](id), + this._nodes = this._nodes["delete"](id), pid) this.emit(pid); else { + var ix = this.roots.indexOf(id); + ix !== -1 && (this.roots = this.roots["delete"](ix), this.emit("roots")); + } + if (id === this.selected) { + var newsel = pid ? this.skipWrapper(pid, !0) : this.roots.get(0); + this.selectTop(newsel, !0); + } + this.searchRoots && this.searchRoots.contains(id) && (this.searchRoots = this.searchRoots["delete"](this.searchRoots.indexOf(id)), + this.emit("searchRoots"), this.highlightSearch()); + } + }, { + key: "_removeFromNodesByName", + value: function(id) { + var node = this._nodes.get(id); + node && (this._nodesByName = this._nodesByName.set(node.get("name"), this._nodesByName.get(node.get("name"))["delete"](id))); + } + } ]), Store; + }(EventEmitter)); + module.exports = Store; +}, function(module, exports) { + function EventEmitter() { + this._events = this._events || {}, this._maxListeners = this._maxListeners || void 0; + } + function isFunction(arg) { + return "function" == typeof arg; + } + function isNumber(arg) { + return "number" == typeof arg; + } + function isObject(arg) { + return "object" == typeof arg && null !== arg; + } + function isUndefined(arg) { + return void 0 === arg; + } + module.exports = EventEmitter, EventEmitter.EventEmitter = EventEmitter, EventEmitter.prototype._events = void 0, + EventEmitter.prototype._maxListeners = void 0, EventEmitter.defaultMaxListeners = 10, + EventEmitter.prototype.setMaxListeners = function(n) { + if (!isNumber(n) || n < 0 || isNaN(n)) throw TypeError("n must be a positive number"); + return this._maxListeners = n, this; + }, EventEmitter.prototype.emit = function(type) { + var er, handler, len, args, i, listeners; + if (this._events || (this._events = {}), "error" === type && (!this._events.error || isObject(this._events.error) && !this._events.error.length)) { + if (er = arguments[1], er instanceof Error) throw er; + var err = new Error('Uncaught, unspecified "error" event. (' + er + ")"); + throw err.context = er, err; + } + if (handler = this._events[type], isUndefined(handler)) return !1; + if (isFunction(handler)) switch (arguments.length) { + case 1: + handler.call(this); + break; + + case 2: + handler.call(this, arguments[1]); + break; + + case 3: + handler.call(this, arguments[1], arguments[2]); + break; + + default: + args = Array.prototype.slice.call(arguments, 1), handler.apply(this, args); + } else if (isObject(handler)) for (args = Array.prototype.slice.call(arguments, 1), + listeners = handler.slice(), len = listeners.length, i = 0; i < len; i++) listeners[i].apply(this, args); + return !0; + }, EventEmitter.prototype.addListener = function(type, listener) { + var m; + if (!isFunction(listener)) throw TypeError("listener must be a function"); + return this._events || (this._events = {}), this._events.newListener && this.emit("newListener", type, isFunction(listener.listener) ? listener.listener : listener), + this._events[type] ? isObject(this._events[type]) ? this._events[type].push(listener) : this._events[type] = [ this._events[type], listener ] : this._events[type] = listener, + isObject(this._events[type]) && !this._events[type].warned && (m = isUndefined(this._maxListeners) ? EventEmitter.defaultMaxListeners : this._maxListeners, + m && m > 0 && this._events[type].length > m && (this._events[type].warned = !0, + console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", this._events[type].length), + "function" == typeof console.trace && console.trace())), this; + }, EventEmitter.prototype.on = EventEmitter.prototype.addListener, EventEmitter.prototype.once = function(type, listener) { + function g() { + this.removeListener(type, g), fired || (fired = !0, listener.apply(this, arguments)); + } + if (!isFunction(listener)) throw TypeError("listener must be a function"); + var fired = !1; + return g.listener = listener, this.on(type, g), this; + }, EventEmitter.prototype.removeListener = function(type, listener) { + var list, position, length, i; + if (!isFunction(listener)) throw TypeError("listener must be a function"); + if (!this._events || !this._events[type]) return this; + if (list = this._events[type], length = list.length, position = -1, list === listener || isFunction(list.listener) && list.listener === listener) delete this._events[type], + this._events.removeListener && this.emit("removeListener", type, listener); else if (isObject(list)) { + for (i = length; i-- > 0; ) if (list[i] === listener || list[i].listener && list[i].listener === listener) { + position = i; + break; + } + if (position < 0) return this; + 1 === list.length ? (list.length = 0, delete this._events[type]) : list.splice(position, 1), + this._events.removeListener && this.emit("removeListener", type, listener); + } + return this; + }, EventEmitter.prototype.removeAllListeners = function(type) { + var key, listeners; + if (!this._events) return this; + if (!this._events.removeListener) return 0 === arguments.length ? this._events = {} : this._events[type] && delete this._events[type], + this; + if (0 === arguments.length) { + for (key in this._events) "removeListener" !== key && this.removeAllListeners(key); + return this.removeAllListeners("removeListener"), this._events = {}, this; + } + if (listeners = this._events[type], isFunction(listeners)) this.removeListener(type, listeners); else if (listeners) for (;listeners.length; ) this.removeListener(type, listeners[listeners.length - 1]); + return delete this._events[type], this; + }, EventEmitter.prototype.listeners = function(type) { + var ret; + return ret = this._events && this._events[type] ? isFunction(this._events[type]) ? [ this._events[type] ] : this._events[type].slice() : []; + }, EventEmitter.prototype.listenerCount = function(type) { + if (this._events) { + var evlistener = this._events[type]; + if (isFunction(evlistener)) return 1; + if (evlistener) return evlistener.length; + } + return 0; + }, EventEmitter.listenerCount = function(emitter, type) { + return emitter.listenerCount(type); + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function nodeMatchesText(node, needle, key, store) { + var name = node.get("name"), wrapper = store.get(store.getParent(key)); + if ("Native" === node.get("nodeType") && wrapper && "NativeWrapper" === wrapper.get("nodeType")) return !1; + var useRegex = SearchUtils.shouldSearchUseRegex(needle); + if (name && "Wrapper" !== node.get("nodeType")) return validString(name, needle, useRegex); + var text = node.get("text"); + if (text) return validString(text, needle, useRegex); + var children = node.get("children"); + return "string" == typeof children && validString(children, needle, useRegex); + } + function validString(str, needle, regex) { + if (regex) try { + var regExp = SearchUtils.searchTextToRegExp(needle); + return regExp.test(str.toLowerCase()); + } catch (error) { + return !1; + } + return str.toLowerCase().indexOf(needle) !== -1; + } + var SearchUtils = __webpack_require__(222); + module.exports = nodeMatchesText; +}, function(module, exports, __webpack_require__) { + "use strict"; + function stripFunctions(props) { + for (var key in props) { + var value = props[key], type = value && value[consts.type] || ("undefined" == typeof value ? "undefined" : _typeof(value)); + if ("function" === type) { + var name = value[consts.name]; + props[key] = "[function " + name + "]"; + } + } + } + function serializePropsForCopy(props) { + var cloned = Object.assign({}, props); + delete cloned.children, stripFunctions(cloned); + try { + return JSON.stringify(cloned, null, 2); + } catch (error) { + return ""; + } + } + var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, consts = __webpack_require__(189); + module.exports = serializePropsForCopy; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function getFromLocalStorage(key) { + var value = void 0; + try { + value = localStorage.getItem(key); + } catch (error) { + console.error("Could not read from localStorage.", error); + } + return value || null; + } + function getSafeThemeName(themeName, fallbackThemeName) { + return themeName === CUSTOM_THEME_NAME ? CUSTOM_THEME_NAME : themeName && Themes.hasOwnProperty(themeName) ? themeName : fallbackThemeName && Themes.hasOwnProperty(fallbackThemeName) ? fallbackThemeName : "ChromeDefault"; + } + function setInLocalStorage(key, value) { + try { + return localStorage.setItem(key, value), !0; + } catch (error) { + console.error("Could not write to localStorage.", error); + } + return !1; + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _require = __webpack_require__(476), deserialize = _require.deserialize, serialize = _require.serialize, Themes = __webpack_require__(474), _require2 = __webpack_require__(231), CUSTOM_THEME_NAME = _require2.CUSTOM_THEME_NAME, LOCAL_STORAGE_CUSTOM_THEME_KEY = "customTheme", LOCAL_STORAGE_THEME_NAME_KEY = "themeName", Store = function() { + function Store(defaultThemeName) { + _classCallCheck(this, Store), this.themes = Themes; + var customTheme = getFromLocalStorage(LOCAL_STORAGE_CUSTOM_THEME_KEY); + customTheme && (this.customTheme = deserialize(customTheme)), this.setDefaultTheme(defaultThemeName); + } + return _createClass(Store, [ { + key: "setDefaultTheme", + value: function(defaultThemeName) { + this.defaultThemeName = getSafeThemeName(defaultThemeName); + var themeName = getSafeThemeName(getFromLocalStorage(LOCAL_STORAGE_THEME_NAME_KEY), this.defaultThemeName); + this.theme = themeName === CUSTOM_THEME_NAME ? this.customTheme : Themes[themeName], + this.themeName = themeName; + } + }, { + key: "update", + value: function(themeName) { + if (themeName === CUSTOM_THEME_NAME) this.theme = this.customTheme, this.themeName = CUSTOM_THEME_NAME; else { + var safeThemeKey = getSafeThemeName(themeName, this.defaultThemeName); + this.theme = this.themes[safeThemeKey], this.themeName = safeThemeKey; + } + setInLocalStorage(LOCAL_STORAGE_THEME_NAME_KEY, themeName || null); + } + }, { + key: "saveCustomTheme", + value: function(theme) { + this.customTheme = theme, this.theme = theme, setInLocalStorage(LOCAL_STORAGE_CUSTOM_THEME_KEY, serialize(theme)); + } + } ]), Store; + }(); + module.exports = Store; +}, function(module, exports, __webpack_require__) { + "use strict"; + function getDest(dir, store) { + var id = store.selected; + if (!id) return null; + var bottom = store.isBottomTagSelected, node = store.get(id), collapsed = node.get("collapsed"), children = node.get("children"); + "NativeWrapper" === node.get("nodeType") && (children = store.get(children[0]).get("children")); + var hasChildren = children && "string" != typeof children && children.length; + return dirToDest(dir, bottom, collapsed, hasChildren); + } + function getRootSelection(dest, store, id) { + var roots = store.searchRoots || store.roots, ix = roots.indexOf(id); + if (ix === -1 && (ix = roots.indexOf(store._parents.get(id))), "prevSibling" === dest) { + if (0 === ix) return null; + var prev = store.skipWrapper(roots.get(ix - 1), !1, !0); + return store.isBottomTagSelected = !!prev && store.hasBottom(prev), prev; + } + return "nextSibling" === dest ? ix >= roots.size - 1 ? null : (store.isBottomTagSelected = !1, + store.skipWrapper(roots.get(ix + 1))) : null; + } + function getNewSelection(dest, store) { + var id = store.selected; + if (id) { + var node = store.get(id), pid = store.getParent(id); + if (pid) { + var lastId = id; + if ("parent" === dest) { + var parentNode = store.get(pid); + if ("Wrapper" !== parentNode.get("nodeType")) return pid; + for (;"Wrapper" === parentNode.get("nodeType"); ) { + if (lastId = id, id = pid, pid = store.getParent(id), !pid) { + pid = id, id = lastId; + break; + } + parentNode = store.get(pid); + } + dest = "prevSibling"; + } else if ("parentBottom" === dest) { + var _parentNode = store.get(pid); + if ("Wrapper" !== _parentNode.get("nodeType")) return store.isBottomTagSelected = !0, + pid; + for (;"Wrapper" === _parentNode.get("nodeType"); ) { + if (lastId = id, id = pid, pid = store.getParent(id), !pid) { + pid = id, id = lastId; + break; + } + _parentNode = store.get(pid); + } + dest = "nextSibling"; + } + } + if (id) { + if (store.searchRoots && store.searchRoots.contains(pid) && (pid = null), "collapse" === dest || "uncollapse" === dest) return "collapse" === dest && (store.isBottomTagSelected = !1), + void store.toggleCollapse(id); + "selectTop" === dest && store.selectTop(id); + var children = node.get("children"); + "NativeWrapper" === node.get("nodeType") && (children = store.get(children[0]).get("children")); + var cid; + if ("firstChild" === dest) { + if ("string" == typeof children) return getNewSelection("nextSibling", store); + for (var i = 0; i < children.length; i++) if (cid = store.skipWrapper(children[i])) return store.isBottomTagSelected = !1, + cid; + } + if ("lastChild" === dest) return "string" == typeof children ? getNewSelection("prevSibling", store) : (cid = store.skipWrapper(children[children.length - 1], !1, !0), + cid && !store.hasBottom(cid) && (store.isBottomTagSelected = !1), cid); + if (!pid) return getRootSelection(dest, store, id); + var parent = store.get(store.getParent(id)), pchildren = parent.get("children"), pix = pchildren.indexOf(id); + if (pix === -1 && (pix = pchildren.indexOf(store._parents.get(id))), "prevSibling" === dest) { + for (;pix > 0; ) { + var _childId = pchildren[pix - 1], _child = store.get(_childId), prevCid = store.skipWrapper(_childId, !1, "Wrapper" === _child.get("nodeType")); + if (prevCid) return store.hasBottom(prevCid) && (store.isBottomTagSelected = !0), + prevCid; + pix--; + } + var roots = store.searchRoots || store.roots; + if (roots.indexOf(store.getParent(id)) > -1) return getRootSelection(dest, store, id); + var childId = pchildren[pix], child = store.get(childId); + return "Wrapper" === child.get("nodeType") ? store.getParent(id) : getNewSelection("parent", store); + } + if ("nextSibling" === dest) { + if (pix === pchildren.length - 1) { + var _roots = store.searchRoots || store.roots; + if (_roots.indexOf(store.getParent(id)) > -1) return getRootSelection(dest, store, id); + var _childId2 = pchildren[pix], _child2 = store.get(_childId2); + return "Wrapper" === _child2.get("nodeType") ? (store.isBottomTagSelected = !0, + store.getParent(id)) : getNewSelection("parentBottom", store); + } + return store.isBottomTagSelected = !1, store.skipWrapper(pchildren[pix + 1]); + } + return null; + } + } + } + var dirToDest = __webpack_require__(486), keyCodes = { + "72": "left", + "74": "down", + "75": "up", + "76": "right", + "37": "left", + "38": "up", + "39": "right", + "40": "down" + }; + module.exports = function(store, win) { + return win = win || window, function(e) { + if (win.document.activeElement === win.document.body && !e.shiftKey && !e.metaKey) { + var direction = keyCodes[e.keyCode]; + if (direction) { + if (e.preventDefault(), e.altKey && "right" === direction) return void store.toggleAllChildrenNodes(!1); + if (e.altKey && "left" === direction) return void store.toggleAllChildrenNodes(!0); + if (!e.ctrlKey && !e.altKey) { + var dest = getDest(direction, store); + if (dest) { + var move = getNewSelection(dest, store); + move && move !== store.selected && store.select(move); + } + } + } + } + }; + }; +}, function(module, exports) { + "use strict"; + module.exports = function(dir, bottom, collapsed, hasChildren) { + if ("down" === dir) return bottom || collapsed || !hasChildren ? "nextSibling" : "firstChild"; + if ("up" === dir) return bottom && !collapsed && hasChildren ? "lastChild" : "prevSibling"; + if ("left" === dir) return !collapsed && hasChildren ? bottom ? "selectTop" : "collapse" : "parent"; + if ("right" === dir) { + if (collapsed && hasChildren) return "uncollapse"; + if (hasChildren) return bottom ? null : "firstChild"; + } + return null; + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + return arr2; + } + return Array.from(arr); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function getWindowFunction(name, polyfill) { + return String(window[name]).indexOf("[native code]") === -1 ? polyfill : window[name]; + } + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), consts = __webpack_require__(189), hydrate = __webpack_require__(488), dehydrate = __webpack_require__(489), getIn = __webpack_require__(490), performanceNow = __webpack_require__(491), lastRunTimeMS = 5, cancelIdleCallback = getWindowFunction("cancelIdleCallback", clearTimeout), requestIdleCallback = getWindowFunction("requestIdleCallback", function(cb, options) { + var delayMS = 3e3 * lastRunTimeMS; + return delayMS > 500 && (delayMS = 500), setTimeout(function() { + var startTime = performanceNow(); + cb({ + didTimeout: !1, + timeRemaining: function() { + return 1 / 0; + } + }); + var endTime = performanceNow(); + lastRunTimeMS = (endTime - startTime) / 1e3; + }, delayMS); + }), Bridge = function() { + function Bridge(wall) { + _classCallCheck(this, Bridge), this._cbs = new Map(), this._inspectables = new Map(), + this._cid = 0, this._listeners = {}, this._buffer = [], this._flushHandle = null, + this._callers = {}, this._paused = !1, this._wall = wall, wall.listen(this._handleMessage.bind(this)); + } + return _createClass(Bridge, [ { + key: "inspect", + value: function(id, path, cb) { + var _cid = this._cid++; + this._cbs.set(_cid, function(data, cleaned, proto, protoclean) { + cleaned.length && hydrate(data, cleaned), proto && protoclean.length && hydrate(proto, protoclean), + proto && (data[consts.proto] = proto), cb(data); + }), this._wall.send({ + type: "inspect", + callback: _cid, + path: path, + id: id + }); + } + }, { + key: "call", + value: function(name, args, cb) { + var _cid = this._cid++; + this._cbs.set(_cid, cb), this._wall.send({ + type: "call", + callback: _cid, + args: args, + name: name + }); + } + }, { + key: "onCall", + value: function(name, handler) { + if (this._callers[name]) throw new Error("only one call handler per call name allowed"); + this._callers[name] = handler; + } + }, { + key: "pause", + value: function() { + this._wall.send({ + type: "pause" + }); + } + }, { + key: "resume", + value: function() { + this._wall.send({ + type: "resume" + }); + } + }, { + key: "setInspectable", + value: function(id, data) { + var prev = this._inspectables.get(id); + return prev ? void this._inspectables.set(id, _extends({}, prev, data)) : void this._inspectables.set(id, data); + } + }, { + key: "send", + value: function(evt, data) { + this._buffer.push({ + evt: evt, + data: data + }), this.scheduleFlush(); + } + }, { + key: "scheduleFlush", + value: function() { + if (!this._flushHandle && this._buffer.length) { + var timeout = this._paused ? 5e3 : 500; + this._flushHandle = requestIdleCallback(this.flushBufferWhileIdle.bind(this), { + timeout: timeout + }); + } + } + }, { + key: "cancelFlush", + value: function() { + this._flushHandle && (cancelIdleCallback(this._flushHandle), this._flushHandle = null); + } + }, { + key: "flushBufferWhileIdle", + value: function(deadline) { + this._flushHandle = null; + for (var chunkCount = this._paused ? 20 : 10, chunkSize = Math.round(this._buffer.length / chunkCount), minChunkSize = this._paused ? 50 : 100; this._buffer.length && (deadline.timeRemaining() > 0 || deadline.didTimeout); ) { + var take = Math.min(this._buffer.length, Math.max(minChunkSize, chunkSize)), currentBuffer = this._buffer.splice(0, take); + this.flushBufferSlice(currentBuffer); + } + this._buffer.length && this.scheduleFlush(); + } + }, { + key: "flushBufferSlice", + value: function(bufferSlice) { + var _this = this, events = bufferSlice.map(function(_ref) { + var evt = _ref.evt, data = _ref.data, cleaned = [], san = dehydrate(data, cleaned); + return cleaned.length && _this.setInspectable(data.id, data), { + type: "event", + evt: evt, + data: san, + cleaned: cleaned + }; + }); + this._wall.send({ + type: "many-events", + events: events + }); + } + }, { + key: "forget", + value: function(id) { + this._inspectables["delete"](id); + } + }, { + key: "on", + value: function(evt, fn) { + this._listeners[evt] ? this._listeners[evt].push(fn) : this._listeners[evt] = [ fn ]; + } + }, { + key: "off", + value: function(evt, fn) { + if (this._listeners[evt]) { + var ix = this._listeners[evt].indexOf(fn); + ix !== -1 && this._listeners[evt].splice(ix, 1); + } + } + }, { + key: "once", + value: function(evt, fn) { + var self = this, listener = function listener() { + fn.apply(this, arguments), self.off(evt, listener); + }; + this.on(evt, listener); + } + }, { + key: "_handleMessage", + value: function(payload) { + var _this2 = this; + if ("resume" === payload.type) return this._paused = !1, void this.scheduleFlush(); + if ("pause" === payload.type) return this._paused = !0, void this.cancelFlush(); + if ("callback" === payload.type) { + var callback = this._cbs.get(payload.id); + return void (callback && (callback.apply(void 0, _toConsumableArray(payload.args)), + this._cbs["delete"](payload.id))); + } + if ("call" === payload.type) return void this._handleCall(payload.name, payload.args, payload.callback); + if ("inspect" === payload.type) return void this._inspectResponse(payload.id, payload.path, payload.callback); + if ("event" === payload.type) { + payload.cleaned && hydrate(payload.data, payload.cleaned); + var fns = this._listeners[payload.evt], data = payload.data; + fns && fns.forEach(function(fn) { + return fn(data); + }); + } + "many-events" === payload.type && payload.events.forEach(function(event) { + event.cleaned && hydrate(event.data, event.cleaned); + var handlers = _this2._listeners[event.evt]; + handlers && handlers.forEach(function(fn) { + return fn(event.data); + }); + }); + } + }, { + key: "_handleCall", + value: function(name, args, callback) { + if (!this._callers[name]) return void console.warn('unknown call: "' + name + '"'); + args = Array.isArray(args) ? args : [ args ]; + var result; + try { + result = this._callers[name].apply(null, args); + } catch (e) { + return void console.error("Failed to call", e); + } + this._wall.send({ + type: "callback", + id: callback, + args: [ result ] + }); + } + }, { + key: "_inspectResponse", + value: function(id, path, callback) { + var inspectable = this._inspectables.get(id), result = {}, cleaned = [], proto = null, protoclean = []; + if (inspectable) { + var val = getIn(inspectable, path), protod = !1, isFn = "function" == typeof val; + if (val && "function" == typeof val[Symbol.iterator]) { + var iterVal = Object.create({}), count = 0, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0; + try { + for (var _step, _iterator = val[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) { + var entry = _step.value; + if (count > 100) break; + iterVal[count] = entry, count++; + } + } catch (err) { + _didIteratorError = !0, _iteratorError = err; + } finally { + try { + !_iteratorNormalCompletion && _iterator["return"] && _iterator["return"](); + } finally { + if (_didIteratorError) throw _iteratorError; + } + } + val = iterVal; + } + if (Object.getOwnPropertyNames(val).forEach(function(name) { + "__proto__" === name && (protod = !0), (!isFn || "arguments" !== name && "callee" !== name && "caller" !== name) && (result[name] = dehydrate(val[name], cleaned, [ name ])); + }), !protod && val.__proto__ && "Object" !== val.constructor.name) { + var newProto = {}, pIsFn = "function" == typeof val.__proto__; + Object.getOwnPropertyNames(val.__proto__).forEach(function(name) { + (!pIsFn || "arguments" !== name && "callee" !== name && "caller" !== name) && (newProto[name] = dehydrate(val.__proto__[name], protoclean, [ name ])); + }), proto = newProto; + } + } + this._wall.send({ + type: "callback", + id: callback, + args: [ result, cleaned, proto, protoclean ] + }); + } + } ]), Bridge; + }(); + module.exports = Bridge; +}, function(module, exports, __webpack_require__) { + "use strict"; + function hydrate(data, cleaned) { + cleaned.forEach(function(path) { + var last = path.pop(), obj = path.reduce(function(obj_, attr) { + return obj_ ? obj_[attr] : null; + }, data); + if (obj && obj[last]) { + var replace = {}; + replace[consts.name] = obj[last].name, replace[consts.type] = obj[last].type, replace[consts.meta] = obj[last].meta, + replace[consts.inspected] = !1, obj[last] = replace; + } + }); + } + var consts = __webpack_require__(189); + module.exports = hydrate; +}, function(module, exports) { + "use strict"; + function getPropType(data) { + if (!data) return null; + var type = "undefined" == typeof data ? "undefined" : _typeof(data); + if ("object" === type) { + if (data._reactFragment) return "react_fragment"; + if (Array.isArray(data)) return "array"; + if (ArrayBuffer.isView(data)) return data instanceof DataView ? "data_view" : "typed_array"; + if (data instanceof ArrayBuffer) return "array_buffer"; + if ("function" == typeof data[Symbol.iterator]) return "iterator"; + if ("[object Date]" === Object.prototype.toString.call(data)) return "date"; + } + return type; + } + function createDehydrated(type, data, cleaned, path) { + var meta = {}; + return "array" !== type && "typed_array" !== type || (meta.length = data.length), + "iterator" !== type && "typed_array" !== type || (meta.readOnly = !0), cleaned.push(path), + { + type: type, + meta: meta, + name: data.constructor && "Object" !== data.constructor.name ? data.constructor.name : "" + }; + } + function dehydrate(data, cleaned) { + var path = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : [], level = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0, type = getPropType(data); + switch (type) { + case "function": + return cleaned.push(path), { + name: data.name, + type: "function" + }; + + case "string": + return data.length <= 500 ? data : data.slice(0, 500) + "..."; + + case "symbol": + return cleaned.push(path), { + type: "symbol", + name: data.toString() + }; + + case "react_fragment": + return "A React Fragment"; + + case "array_buffer": + case "data_view": + return cleaned.push(path), { + type: type, + name: "data_view" === type ? "DataView" : "ArrayBuffer", + meta: { + length: data.byteLength, + uninspectable: !0 + } + }; + + case "array": + return level > 2 ? createDehydrated(type, data, cleaned, path) : data.map(function(item, i) { + return dehydrate(item, cleaned, path.concat([ i ]), level + 1); + }); + + case "typed_array": + case "iterator": + return createDehydrated(type, data, cleaned, path); + + case "date": + return cleaned.push(path), { + name: data.toString(), + type: "date", + meta: { + uninspectable: !0 + } + }; + + case "object": + if (level > 2 || data.constructor && "function" == typeof data.constructor && "Object" !== data.constructor.name) return createDehydrated(type, data, cleaned, path); + var res = {}; + for (var name in data) res[name] = dehydrate(data[name], cleaned, path.concat([ name ]), level + 1); + return res; + + default: + return data; + } + } + var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + module.exports = dehydrate; +}, function(module, exports) { + "use strict"; + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + return arr2; + } + return Array.from(arr); + } + function getIn(base, path) { + return path.reduce(function(obj, attr) { + if (obj) { + if (obj.hasOwnProperty(attr)) return obj[attr]; + if ("function" == typeof obj[Symbol.iterator]) return [].concat(_toConsumableArray(obj))[attr]; + } + return null; + }, base); + } + module.exports = getIn; +}, function(module, exports, __webpack_require__) { + "use strict"; + var performanceNow, performance = __webpack_require__(492); + performanceNow = performance.now ? function() { + return performance.now(); + } : function() { + return Date.now(); + }, module.exports = performanceNow; +}, function(module, exports, __webpack_require__) { + "use strict"; + var performance, ExecutionEnvironment = __webpack_require__(493); + ExecutionEnvironment.canUseDOM && (performance = window.performance || window.msPerformance || window.webkitPerformance), + module.exports = performance || {}; +}, function(module, exports) { + "use strict"; + var canUseDOM = !("undefined" == typeof window || !window.document || !window.document.createElement), ExecutionEnvironment = { + canUseDOM: canUseDOM, + canUseWorkers: "undefined" != typeof Worker, + canUseEventListeners: canUseDOM && !(!window.addEventListener && !window.attachEvent), + canUseViewport: canUseDOM && !!window.screen, + isInWorker: !canUseDOM + }; + module.exports = ExecutionEnvironment; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + function shallowClone(obj) { + var nobj = {}; + for (var n in obj) nobj[n] = obj[n]; + return nobj; + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), StyleEdit = __webpack_require__(495), BoxInspector = __webpack_require__(497), NativeStyler = function(_React$Component) { + function NativeStyler(props) { + _classCallCheck(this, NativeStyler); + var _this = _possibleConstructorReturn(this, (NativeStyler.__proto__ || Object.getPrototypeOf(NativeStyler)).call(this, props)); + return _this.state = { + style: null, + measuredLayout: null + }, _this; + } + return _inherits(NativeStyler, _React$Component), _createClass(NativeStyler, [ { + key: "componentWillMount", + value: function() { + var _this2 = this; + this._styleGet = this._styleGet.bind(this), this.props.supportsMeasure ? (this.props.bridge.on("rn-style:measure", this._styleGet), + this.props.bridge.send("rn-style:measure", this.props.id)) : this.props.bridge.call("rn-style:get", this.props.id, function(style) { + _this2.setState({ + style: style + }); + }); + } + }, { + key: "componentWillUnmount", + value: function() { + this.props.supportsMeasure && this.props.bridge.off("rn-style:measure", this._styleGet); + } + }, { + key: "componentWillReceiveProps", + value: function(nextProps) { + var _this3 = this; + nextProps.id !== this.props.id && (this.setState({ + style: null + }), this.props.bridge.send("rn-style:get", nextProps.id), this.props.supportsMeasure ? this.props.bridge.send("rn-style:measure", nextProps.id) : this.props.bridge.call("rn-style:get", nextProps.id, function(style) { + _this3.setState({ + style: style + }); + })); + } + }, { + key: "_styleGet", + value: function(result) { + var style = result.style, measuredLayout = result.measuredLayout; + this.setState({ + style: style, + measuredLayout: measuredLayout + }); + } + }, { + key: "_handleStyleChange", + value: function(attr, val) { + this.state.style && (this.state.style[attr] = val), this.props.bridge.send("rn-style:set", { + id: this.props.id, + attr: attr, + val: val + }), this.setState({ + style: this.state.style + }); + } + }, { + key: "_handleStyleRename", + value: function(oldName, newName, val) { + var style = shallowClone(this.state.style); + delete style[oldName], style[newName] = val, this.props.bridge.send("rn-style:rename", { + id: this.props.id, + oldName: oldName, + newName: newName, + val: val + }), this.setState({ + style: style + }); + } + }, { + key: "render", + value: function() { + return this.state.style ? React.createElement("div", { + style: styles.container + }, this.state.measuredLayout && React.createElement(BoxInspector, this.state.measuredLayout), React.createElement(StyleEdit, { + style: this.state.style, + onRename: this._handleStyleRename.bind(this), + onChange: this._handleStyleChange.bind(this) + })) : React.createElement("em", null, "loading"); + } + } ]), NativeStyler; + }(React.Component), styles = { + container: { + display: "flex", + flexDirection: "column" + } + }; + module.exports = NativeStyler; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), AutoSizeInput = __webpack_require__(496), StyleEdit = function(_React$Component) { + function StyleEdit(props) { + _classCallCheck(this, StyleEdit); + var _this = _possibleConstructorReturn(this, (StyleEdit.__proto__ || Object.getPrototypeOf(StyleEdit)).call(this, props)); + return _this.state = { + showNew: !1, + newAttr: "", + newValue: "" + }, _this; + } + return _inherits(StyleEdit, _React$Component), _createClass(StyleEdit, [ { + key: "onChange", + value: function(name, val) { + var num = Number(val); + this.props.onChange(name, num === Number(val) ? num : val); + } + }, { + key: "onNewSubmit", + value: function(val) { + this.onChange(this.state.newAttr, val), this.setState({ + showNew: !1, + newAttr: "", + newValue: "" + }); + } + }, { + key: "onNewAttr", + value: function(attr) { + "" === attr ? this.setState({ + showNew: !1 + }) : this.setState({ + newAttr: "" + attr + }); + } + }, { + key: "onListClick", + value: function(e) { + e.target instanceof Element && "INPUT" === e.target.tagName || this.setState({ + showNew: !0 + }); + } + }, { + key: "render", + value: function() { + var _this2 = this, attrs = Object.keys(this.props.style); + return React.createElement("ul", { + style: styles.list, + onClick: function(e) { + return _this2.onListClick(e); + } + }, React.createElement("span", { + style: tagStyle(this.context.theme) + }, "style"), React.createElement("span", null, " {"), attrs.map(function(name) { + return React.createElement("li", { + key: "style-" + name, + style: styles.listItem, + onClick: blockClick + }, React.createElement(AutoSizeInput, { + type: "attr", + value: name, + onChange: function(newName) { + return _this2.props.onRename(name, "" + newName, _this2.props.style[name]); + } + }), React.createElement("span", { + style: styles.colon + }, ":"), React.createElement(AutoSizeInput, { + value: _this2.props.style[name], + onChange: function(val) { + return _this2.onChange(name, val); + } + }), React.createElement("span", { + style: styles.colon + }, ";")); + }), this.state.showNew && React.createElement("li", { + style: styles.listItem + }, React.createElement(AutoSizeInput, { + isNew: !0, + type: "attr", + value: this.state.newAttr, + onChange: function(newAttr) { + return _this2.onNewAttr(newAttr); + } + }), React.createElement("span", { + style: styles.colon + }, ":"), React.createElement(AutoSizeInput, { + value: "", + onChange: function(val) { + return _this2.onNewSubmit(val); + } + }), React.createElement("span", { + style: styles.colon + }, ";")), React.createElement("span", null, "}")); + } + } ]), StyleEdit; + }(React.Component); + StyleEdit.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var blockClick = function(event) { + return event.stopPropagation(); + }, tagStyle = function(theme) { + return { + color: theme.base04 + }; + }, styles = { + list: { + listStyle: "none", + padding: 0, + margin: "5px 0px", + cursor: "text" + }, + colon: { + margin: "-3px" + }, + listItem: { + margin: 0, + display: "flex", + alignItems: "center", + cursor: "default" + } + }; + module.exports = StyleEdit; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), nullthrows = __webpack_require__(3)["default"], _require = __webpack_require__(36), monospace = _require.monospace, Input = __webpack_require__(42), AutoSizeInput = function(_React$Component) { + function AutoSizeInput(props, context) { + _classCallCheck(this, AutoSizeInput); + var _this = _possibleConstructorReturn(this, (AutoSizeInput.__proto__ || Object.getPrototypeOf(AutoSizeInput)).call(this, props, context)); + return _this.state = { + text: "" + _this.props.value, + inputWidth: 1 + }, _this; + } + return _inherits(AutoSizeInput, _React$Component), _createClass(AutoSizeInput, [ { + key: "componentDidMount", + value: function() { + this.copyInputStyles(), this.updateInputWidth(), this.props.isNew && this.input.focus(); + } + }, { + key: "componentDidUpdate", + value: function(prevProps, prevState) { + this.updateInputWidth(); + } + }, { + key: "componentWillReceiveProps", + value: function(nextProps) { + this.setState({ + text: "" + nextProps.value + }); + } + }, { + key: "copyInputStyles", + value: function() { + if (window.getComputedStyle) { + var inputStyle = this.input && window.getComputedStyle(this.input); + if (inputStyle) { + var sizerNode = nullthrows(this.sizer); + sizerNode.style.fontSize = inputStyle.fontSize, sizerNode.style.fontFamily = inputStyle.fontFamily, + sizerNode.style.fontWeight = inputStyle.fontWeight, sizerNode.style.fontStyle = inputStyle.fontStyle, + sizerNode.style.letterSpacing = inputStyle.letterSpacing; + } + } + } + }, { + key: "updateInputWidth", + value: function() { + if (this.sizer && "undefined" != typeof this.sizer.scrollWidth) { + var width = this.sizer.scrollWidth + 1; + width !== this.state.inputWidth && this.setState({ + inputWidth: width + }); + } + } + }, { + key: "onKeyDown", + value: function(e) { + return "Enter" === e.key || "Escape" === e.key ? void this.done() : void ("ArrowUp" === e.key ? +this.state.text + "" === this.state.text && this.props.onChange(+this.state.text + 1) : "ArrowDown" === e.key && +this.state.text + "" === this.state.text && this.props.onChange(+this.state.text - 1)); + } + }, { + key: "onFocus", + value: function() { + var theme = this.context.theme, input = this.input; + input.selectionStart = 0, input.selectionEnd = input.value.length, input.style.color = theme.base05, + input.style.boxShadow = "0 0 3px " + theme.base03, input.style.border = "1px solid " + theme.base03, + input.style.padding = "0px 1px"; + } + }, { + key: "done", + value: function() { + var input = this.input; + input.style.color = this.getColor(), input.style.boxShadow = "none", input.style.border = "none", + input.style.padding = "1px 2px", (this.state.text !== "" + this.props.value || this.props.isNew) && this.props.onChange(this.state.text); + } + }, { + key: "getColor", + value: function() { + var theme = this.context.theme; + return "attr" === this.props.type ? theme.special06 : theme.base05; + } + }, { + key: "render", + value: function() { + var _this2 = this, style = inputStyle(this.state.text); + return style.color = this.getColor(), style.width = this.state.inputWidth + "px", + React.createElement("div", { + style: styles.wrapper + }, React.createElement(Input, { + innerRef: function(i) { + return _this2.input = i; + }, + value: this.state.text, + style: style, + onChange: function(e) { + return _this2.setState({ + text: e.target.value + }); + }, + onFocus: function() { + return _this2.onFocus(); + }, + onBlur: function() { + return _this2.done(); + }, + onKeyDown: function(e) { + return _this2.onKeyDown(e); + } + }), React.createElement("div", { + ref: function(el) { + return _this2.sizer = el; + }, + style: styles.sizer + }, this.state.text)); + } + } ]), AutoSizeInput; + }(React.Component); + AutoSizeInput.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var inputStyle = function(text) { + return { + fontFamily: monospace.family, + fontSize: monospace.sizes.normal, + boxSizing: "content-box", + border: "none", + padding: "1px 2px", + marginLeft: "0.75rem", + outline: "none", + width: "0px", + minWidth: text ? "0" : "1rem" + }; + }, styles = { + wrapper: { + display: "inline-block" + }, + sizer: { + position: "absolute", + top: 0, + left: 0, + visibility: "hidden", + height: 0, + overflow: "scroll", + whiteSpace: "pre" + } + }; + module.exports = AutoSizeInput; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), _require = __webpack_require__(36), sansSerif = _require.sansSerif, Box = function(props) { + var title = props.title, children = props.children, top = props.top, left = props.left, right = props.right, bottom = props.bottom, theme = props.theme; + return React.createElement("div", { + style: boxStyle(theme) + }, React.createElement("span", { + style: labelStyle(theme) + }, title), React.createElement("div", { + style: styles.boxText + }, +top.toFixed(3)), React.createElement("div", { + style: styles.row + }, React.createElement("span", { + style: styles.boxText + }, +left.toFixed(3)), children, React.createElement("span", { + style: styles.boxText + }, +right.toFixed(3))), React.createElement("div", { + style: styles.boxText + }, +bottom.toFixed(3))); + }, BoxInspector = function(_React$Component) { + function BoxInspector() { + return _classCallCheck(this, BoxInspector), _possibleConstructorReturn(this, (BoxInspector.__proto__ || Object.getPrototypeOf(BoxInspector)).apply(this, arguments)); + } + return _inherits(BoxInspector, _React$Component), _createClass(BoxInspector, [ { + key: "render", + value: function() { + var theme = this.context.theme, _props = this.props, left = _props.left, top = _props.top, width = _props.width, height = _props.height, margin = _props.margin, padding = _props.padding; + return React.createElement(Box, _extends({ + theme: theme, + title: "margin" + }, margin), React.createElement(Box, _extends({ + theme: theme, + title: "padding" + }, padding), React.createElement("div", { + style: styles.measureLayout + }, React.createElement("span", { + style: positionTextStyle(theme) + }, "(", +left.toFixed(3), ", ", +top.toFixed(3), ")"), React.createElement("span", { + style: dimenTextStyle(theme) + }, +width.toFixed(3), " × ", +height.toFixed(3))))); + } + } ]), BoxInspector; + }(React.Component); + BoxInspector.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var labelStyle = function(theme) { + return { + flex: 1, + color: theme.special03 + }; + }, positionTextStyle = function(theme) { + return { + color: theme.base03, + fontSize: sansSerif.sizes.normal, + textAlign: "center" + }; + }, dimenTextStyle = function(theme) { + return { + color: theme.special02, + textAlign: "center" + }; + }, boxStyle = function(theme) { + return { + position: "relative", + padding: 8, + margin: 8, + width: 184, + border: "1px dashed " + theme.base05, + alignItems: "center", + alignSelf: "center" + }; + }, styles = { + row: { + display: "flex", + alignItems: "center", + justifyContent: "space-between" + }, + measureLayout: { + display: "flex", + flexDirection: "column", + margin: 4 + }, + boxText: { + textAlign: "center" + } + }; + module.exports = BoxInspector; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), provideStore = __webpack_require__(499), RelayStore = __webpack_require__(500), QueriesTab = __webpack_require__(501), ElementPanel = __webpack_require__(506), StoreWrapper = provideStore("relayStore"), RelayPlugin = function() { + function RelayPlugin(store, bridge, refresh) { + var _this = this; + _classCallCheck(this, RelayPlugin), this.bridge = bridge, this.store = store, this.hasRelay = !1, + this.relayStore = new RelayStore(bridge, store), setTimeout(function() { + bridge.call("relay:check", [], function(hasRelay) { + _this.hasRelay = hasRelay, refresh(); + }); + }, 1e3); + } + return _createClass(RelayPlugin, [ { + key: "panes", + value: function() { + var _this2 = this; + return this.hasRelay ? [ function(node, id) { + return React.createElement(StoreWrapper, { + store: _this2.relayStore, + key: "relay" + }, function() { + return React.createElement(ElementPanel, { + node: node, + id: id + }); + }); + } ] : []; + } + }, { + key: "teardown", + value: function() {} + }, { + key: "tabs", + value: function() { + var _this3 = this; + return this.hasRelay ? { + Relay: function() { + return React.createElement(StoreWrapper, { + store: _this3.relayStore + }, function() { + return React.createElement(QueriesTab, null); + }); + } + } : null; + } + } ]), RelayPlugin; + }(); + module.exports = RelayPlugin; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _defineProperty(obj, key, value) { + return key in obj ? Object.defineProperty(obj, key, { + value: value, + enumerable: !0, + configurable: !0, + writable: !0 + }) : obj[key] = value, obj; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7); + module.exports = function(name) { + var Wrapper = function(_React$Component) { + function Wrapper() { + return _classCallCheck(this, Wrapper), _possibleConstructorReturn(this, (Wrapper.__proto__ || Object.getPrototypeOf(Wrapper)).apply(this, arguments)); + } + return _inherits(Wrapper, _React$Component), _createClass(Wrapper, [ { + key: "getChildContext", + value: function() { + return _defineProperty({}, name, this.props.store); + } + }, { + key: "render", + value: function() { + return this.props.children(); + } + } ]), Wrapper; + }(React.Component); + return Wrapper.childContextTypes = _defineProperty({}, name, React.PropTypes.object), + Wrapper.displayName = "StoreProvider(" + name + ")", Wrapper; + }; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + function getDataIDs(obj) { + var collector = []; + return getDataIDsInternal(obj, collector), collector; + } + function getDataIDsInternal(obj, collector) { + for (var name in obj) "id" === name && "string" == typeof obj[name] ? collector.push(obj[name]) : "object" === _typeof(obj[name]) && getDataIDs(obj[name]); + } + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _require = __webpack_require__(481), EventEmitter = _require.EventEmitter, _require2 = __webpack_require__(220), OrderedMap = _require2.OrderedMap, Map = _require2.Map, assign = __webpack_require__(38), consts = __webpack_require__(189), invariant = __webpack_require__(215), Store = function(_EventEmitter) { + function Store(bridge, mainStore) { + _classCallCheck(this, Store); + var _this = _possibleConstructorReturn(this, (Store.__proto__ || Object.getPrototypeOf(Store)).call(this)); + return _this.storeData = null, _this.storeDateSubscriptionCount = 0, _this.selectedQuery = null, + _this.queries = new OrderedMap(), _this._bridge = bridge, _this._mainStore = mainStore, + bridge.on("relay:store", function(data) { + _this.storeData = data, _this.emit("storeData"); + }), _this.queriesByDataID = {}, bridge.on("relay:pending", function(pendingQueries) { + pendingQueries.forEach(function(pendingQuery) { + _this.queries = _this.queries.set(pendingQuery.id, new Map(_extends({}, pendingQuery, { + status: "pending", + text: pendingQuery.text.join("") + }))), _this.emit("queries"), _this.emit(pendingQuery.id), getDataIDs(pendingQuery.variables).forEach(function(id) { + _this.queriesByDataID[id] ? _this.queriesByDataID[id].push(pendingQuery.id) : _this.queriesByDataID[id] = [ pendingQuery.id ]; + }); + }); + }), bridge.on("relay:success", function(_ref) { + var id = _ref.id, response = _ref.response, end = _ref.end; + _this.queries = _this.queries.mergeIn([ id ], new Map({ + status: "success", + response: response, + end: end + })), _this.emit("queries"), _this.emit(id); + }), bridge.on("relay:failure", function(_ref2) { + var id = _ref2.id, error = _ref2.error, end = _ref2.end; + _this.queries = _this.queries.mergeIn([ id ], new Map({ + status: "failure", + error: error, + end: end + })), _this.emit("queries"), _this.emit(id); + }), _this.dataIDsToNodes = {}, _this.nodesToDataIDs = {}, bridge.on("mount", function(data) { + if (data.props && (data.props.relay || 0 === data.name.indexOf("Relay("))) { + _this.nodesToDataIDs[data.id] = new window.Set(); + for (var name in data.props) { + var id = data.props[name] && data.props[name].__dataID__; + id && (_this.dataIDsToNodes[id] || (_this.dataIDsToNodes[id] = new window.Set()), + _this.dataIDsToNodes[id].add(data.id), _this.nodesToDataIDs[data.id].add(id)); + } + } + }), bridge.on("update", function(data) { + if (data.props && _this.nodesToDataIDs[data.id]) { + var newIds = new window.Set(); + for (var name in data.props) { + var id = data.props[name] && data.props[name].__dataID__; + id && (newIds.add(id), _this.nodesToDataIDs[data.id].has(id) || (_this.dataIDsToNodes[id] || (_this.dataIDsToNodes[id] = new window.Set()), + _this.dataIDsToNodes[id].add(data.id))); + } + var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0; + try { + for (var _step, _iterator = _this.nodesToDataIDs[data.id][Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) { + var item = _step.value; + newIds.has(item) || _this.dataIDsToNodes[item]["delete"](data.id); + } + } catch (err) { + _didIteratorError = !0, _iteratorError = err; + } finally { + try { + !_iteratorNormalCompletion && _iterator["return"] && _iterator["return"](); + } finally { + if (_didIteratorError) throw _iteratorError; + } + } + _this.nodesToDataIDs[id] = newIds; + } + }), bridge.on("unmount", function(id) { + if (_this.nodesToDataIDs[id]) { + var _iteratorNormalCompletion2 = !0, _didIteratorError2 = !1, _iteratorError2 = void 0; + try { + for (var _step2, _iterator2 = _this.nodesToDataIDs[id][Symbol.iterator](); !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) { + var item = _step2.value; + _this.dataIDsToNodes[item]["delete"](id); + } + } catch (err) { + _didIteratorError2 = !0, _iteratorError2 = err; + } finally { + try { + !_iteratorNormalCompletion2 && _iterator2["return"] && _iterator2["return"](); + } finally { + if (_didIteratorError2) throw _iteratorError2; + } + } + _this.nodesToDataIDs[id] = null; + } + }), _this; + } + return _inherits(Store, _EventEmitter), _createClass(Store, [ { + key: "jumpToDataID", + value: function(dataID) { + this._mainStore.setSelectedTab("RelayStore"), this.selectedDataNode = dataID, this.emit("selectedDataNode"); + } + }, { + key: "jumpToQuery", + value: function(queryID) { + this._mainStore.setSelectedTab("Relay"), this.selectedQuery = queryID, this.emit("selectedQuery"), + this.emit("queries"); + } + }, { + key: "inspect", + value: function(id, path, cb) { + var _this2 = this; + this._bridge.inspect(id, path, function(value) { + var base; + "relay:store" === id ? (invariant(_this2.storeData, "RelayStore.inspect: this.storeData should be defined."), + base = _this2.storeData.nodes) : base = _this2.queries.get(id).get(path[0]); + var inspected = path.slice(1).reduce(function(obj, attr) { + return obj ? obj[attr] : null; + }, base); + inspected && (assign(inspected, value), inspected[consts.inspected] = !0), cb(); + }); + } + }, { + key: "on", + value: function(evt, fn) { + "storeData" === evt && (this.storeDateSubscriptionCount++, 1 === this.storeDateSubscriptionCount && this._bridge.call("relay:store:enable", [], function() {})), + this.addListener(evt, fn); + } + }, { + key: "off", + value: function(evt, fn) { + "storeData" === evt && (this.storeDateSubscriptionCount--, 0 === this.storeDateSubscriptionCount && this._bridge.call("relay:store:disable", [], function() {})), + this.removeListener(evt, fn); + } + }, { + key: "selectQuery", + value: function(id) { + this.selectedQuery = id, this.emit("selectedQuery"); + } + } ]), Store; + }(EventEmitter); + module.exports = Store; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), decorate = __webpack_require__(39), _require = __webpack_require__(36), sansSerif = _require.sansSerif, QueryList = __webpack_require__(502), QueryViewer = __webpack_require__(504), SplitPane = __webpack_require__(477), QueriesTab = function(_React$Component) { + function QueriesTab() { + return _classCallCheck(this, QueriesTab), _possibleConstructorReturn(this, (QueriesTab.__proto__ || Object.getPrototypeOf(QueriesTab)).apply(this, arguments)); + } + return _inherits(QueriesTab, _React$Component), _createClass(QueriesTab, [ { + key: "render", + value: function() { + var contents; + return contents = this.props.isSplit ? React.createElement(SplitPane, { + initialWidth: 500, + initialHeight: 500, + left: function() { + return React.createElement(QueryList, null); + }, + right: function() { + return React.createElement(QueryViewer, null); + }, + isVertical: !1 + }) : React.createElement(QueryList, null), React.createElement("div", { + style: styles.container + }, contents); + } + } ]), QueriesTab; + }(React.Component), styles = { + container: { + fontFamily: sansSerif.family, + fontSize: sansSerif.sizes.normal, + flex: 1, + display: "flex" + } + }; + module.exports = decorate({ + store: "relayStore", + listeners: function() { + return [ "selectedQuery" ]; + }, + props: function(store) { + return { + isSplit: !!store.selectedQuery + }; + } + }, QueriesTab); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), decorate = __webpack_require__(39), _require = __webpack_require__(36), sansSerif = _require.sansSerif, Query = __webpack_require__(503), QueryList = function(_React$Component) { + function QueryList() { + return _classCallCheck(this, QueryList), _possibleConstructorReturn(this, (QueryList.__proto__ || Object.getPrototypeOf(QueryList)).apply(this, arguments)); + } + return _inherits(QueryList, _React$Component), _createClass(QueryList, [ { + key: "render", + value: function() { + var _this2 = this; + if (!this.props.queries.count()) return React.createElement("div", { + style: styles.empty + }, "No Relay Queries logged"); + var rows = [], odd = !1, lastRequestNumber = -1; + return this.props.queries.forEach(function(query) { + var requestNumber = query.get("requestNumber"); + lastRequestNumber !== requestNumber && (lastRequestNumber = requestNumber, rows.push(React.createElement("tr", { + key: "request" + requestNumber + }, React.createElement("td", { + colSpan: "4", + style: styles.grouper + }, "Request ", requestNumber))), odd = !1), rows.push(React.createElement(Query, { + data: query, + isSelected: query.get("id") === _this2.props.selectedQuery, + key: query.get("id"), + oddRow: odd, + onSelect: function() { + return _this2.props.selectQuery(query.get("id")); + } + })), odd = !odd; + }), React.createElement("div", { + style: styles.container + }, React.createElement("table", { + style: styles.table + }, React.createElement("tbody", null, rows))); + } + } ]), QueryList; + }(React.Component), styles = { + container: { + position: "relative", + flex: 1, + overflow: "scroll" + }, + table: { + flex: 1, + borderCollapse: "collapse", + width: "100%" + }, + grouper: { + fontWeight: "bold", + fontSize: sansSerif.sizes.normal + }, + empty: { + flex: 1, + padding: 50, + textAlign: "center" + } + }; + module.exports = decorate({ + store: "relayStore", + listeners: function() { + return [ "queries", "selectedQuery" ]; + }, + props: function(store, _props) { + return { + queries: store.queries, + selectQuery: function(id) { + return store.selectQuery(id); + }, + selectedQuery: store.selectedQuery + }; + } + }, QueryList); +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + } + return target; + }, _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _require = __webpack_require__(36), sansSerif = _require.sansSerif, React = __webpack_require__(7), Query = function(_React$Component) { + function Query() { + return _classCallCheck(this, Query), _possibleConstructorReturn(this, (Query.__proto__ || Object.getPrototypeOf(Query)).apply(this, arguments)); + } + return _inherits(Query, _React$Component), _createClass(Query, [ { + key: "render", + value: function() { + var theme = this.context.theme, data = this.props.data, containerStyle = baseContainer; + this.props.isSelected ? containerStyle = containerSelectedStyle(theme) : this.props.oddRow && (containerStyle = containeroOddRowStyle(theme)); + var status = data.get("status"), start = data.get("start"), end = data.get("end"); + return React.createElement("tr", { + onClick: this.props.onSelect, + style: containerStyle + }, React.createElement("td", { + style: tdFirstStyle(theme) + }, React.createElement("span", { + style: statusStyle(status), + title: status + })), React.createElement("td", { + style: tdNameStyle(theme) + }, data.get("name")), React.createElement("td", { + style: baseTDStyle(theme) + }, Math.round(start) / 1e3, "s"), React.createElement("td", { + style: baseTDStyle(theme) + }, Math.round(end - start), "ms")); + } + } ]), Query; + }(React.Component); + Query.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var baseContainer = { + cursor: "pointer", + fontSize: sansSerif.sizes.normal, + height: 21, + lineHeight: "21px", + fontFamily: sansSerif.family + }, baseTDStyle = function(theme) { + return { + whiteSpace: "nowrap", + padding: "1px 4px", + lineHeight: "17px", + borderLeft: "1px solid " + theme.base01 + }; + }, tdFirstStyle = function(theme) { + return _extends({}, baseTDStyle(theme), { + borderLeft: "" + }); + }, tdNameStyle = function(theme) { + return _extends({}, baseTDStyle(theme), { + width: "100%" + }); + }, containeroOddRowStyle = function(theme) { + return _extends({}, baseContainer, { + backgroundColor: theme.base01 + }); + }, containerSelectedStyle = function(theme) { + return _extends({}, baseContainer, { + backgroundColor: theme.state00, + color: theme.base04 + }); + }, statusColors = { + pending: "orange", + success: "green", + failure: "red", + error: "#aaa" + }, statusStyle = function(status) { + return { + display: "inline-block", + width: 11, + height: 11, + borderRadius: 6, + backgroundColor: statusColors[status] || statusColors.error + }; + }; + module.exports = Query; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), _DataView = __webpack_require__(43), _DataView2 = _interopRequireDefault(_DataView), _DetailPane = __webpack_require__(209), _DetailPane2 = _interopRequireDefault(_DetailPane), _DetailPaneSection = __webpack_require__(210), _DetailPaneSection2 = _interopRequireDefault(_DetailPaneSection), _Fonts = __webpack_require__(36), _react = __webpack_require__(7), _react2 = _interopRequireDefault(_react), _decorate = __webpack_require__(39), _decorate2 = _interopRequireDefault(_decorate), _tidyGraphQL = __webpack_require__(505), _tidyGraphQL2 = _interopRequireDefault(_tidyGraphQL), QueryViewer = function(_React$Component) { + function QueryViewer() { + return _classCallCheck(this, QueryViewer), _possibleConstructorReturn(this, (QueryViewer.__proto__ || Object.getPrototypeOf(QueryViewer)).apply(this, arguments)); + } + return _inherits(QueryViewer, _React$Component), _createClass(QueryViewer, [ { + key: "render", + value: function() { + var data = this.props.data, status = data.get("status"), resultBlock = null; + "success" === status ? resultBlock = _react2["default"].createElement(_DetailPaneSection2["default"], { + title: "Response" + }, _react2["default"].createElement(_DataView2["default"], { + data: data.get("response"), + readOnly: !0, + showMenu: !1, + inspect: this.props.inspect, + path: [ "response" ] + })) : "failure" === status && (resultBlock = _react2["default"].createElement(_DetailPaneSection2["default"], { + title: "Error" + }, _react2["default"].createElement(_DataView2["default"], { + data: data.get("error"), + readOnly: !0, + showMenu: !1, + inspect: this.props.inspect, + path: [ "error" ] + }))); + var start = data.get("start"), end = data.get("end"); + return _react2["default"].createElement(_DetailPane2["default"], { + header: data.get("type") + ": " + data.get("name") + }, _react2["default"].createElement(_DetailPaneSection2["default"], { + title: "Start" + }, _react2["default"].createElement("div", null, Math.round(start) / 1e3, "s since page load")), _react2["default"].createElement(_DetailPaneSection2["default"], { + title: "Status" + }, _react2["default"].createElement("div", null, status)), _react2["default"].createElement(_DetailPaneSection2["default"], { + title: "Duration" + }, _react2["default"].createElement("div", null, Math.round(end - start), "ms")), _react2["default"].createElement(_DetailPaneSection2["default"], { + title: "Query" + }, _react2["default"].createElement("div", { + style: styles.query + }, (0, _tidyGraphQL2["default"])(data.get("text")))), _react2["default"].createElement(_DetailPaneSection2["default"], { + title: "Variables" + }, _react2["default"].createElement(_DataView2["default"], { + data: data.get("variables"), + readOnly: !0, + showMenu: !1, + inspect: this.props.inspect, + path: [ "variables" ] + })), resultBlock); + } + } ]), QueryViewer; + }(_react2["default"].Component), styles = { + query: { + cursor: "text", + fontFamily: _Fonts.monospace.family, + fontSize: _Fonts.monospace.sizes.normal, + userSelect: "text", + MozUserSelect: "text", + WebkitUserSelect: "text", + whiteSpace: "pre", + wordWrap: "break-word" + } + }; + module.exports = (0, _decorate2["default"])({ + store: "relayStore", + listeners: function(props, store) { + return [ "selectedQuery", store.selectedQuery ]; + }, + props: function(store) { + return { + data: store.queries.get(store.selectedQuery), + inspect: store.inspect.bind(store, store.selectedQuery) + }; + } + }, QueryViewer); +}, function(module, exports) { + "use strict"; + function tidyGraphQL(input) { + for (var indent = "", lastWasNewline = !1, parenCount = 0, line = "", head = [], stack = [ head ], i = 0; i < input.length; i++) { + var c = input.charAt(i); + if ("(" == c ? parenCount++ : ")" == c && parenCount--, "{" == c) indent += " ", + lastWasNewline = !0, head.push(line + "{"), line = indent, head = [], stack.push(head); else if ("," == c && 0 == parenCount) head.push(line), + lastWasNewline = !0, line = indent; else if ("}" == c) indent = indent.substr(2), + head.push(line.replace(/ +$/, "")), head.sort(), line = head.join(",\n"), stack.pop(), + head = stack[stack.length - 1], line = head.pop() + "\n" + line + "\n" + indent + "}"; else { + if (" " == c && lastWasNewline) continue; + " " != c && i + 1 < input.length && "{" == input.charAt(i + 1) ? line += c + " " : (lastWasNewline = !1, + line += c); + } + } + return line.replace(/^} /gm, "}\n\n"); + } + module.exports = tidyGraphQL; +}, function(module, exports, __webpack_require__) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); + } + function _possibleConstructorReturn(self, call) { + if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return !call || "object" != typeof call && "function" != typeof call ? self : call; + } + function _inherits(subClass, superClass) { + if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass); + } + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, + "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps), + Constructor; + }; + }(), React = __webpack_require__(7), decorate = __webpack_require__(39), ElementPanel = function(_React$Component) { + function ElementPanel() { + return _classCallCheck(this, ElementPanel), _possibleConstructorReturn(this, (ElementPanel.__proto__ || Object.getPrototypeOf(ElementPanel)).apply(this, arguments)); + } + return _inherits(ElementPanel, _React$Component), _createClass(ElementPanel, [ { + key: "render", + value: function() { + var _this2 = this; + if (!this.props.dataIDs.length) return React.createElement("span", null); + var theme = this.context.theme; + return React.createElement("div", null, "Relay Nodes", React.createElement("ul", { + style: styles.dataIDs + }, this.props.dataIDs.map(function(_ref) { + var id = _ref.id, queries = _ref.queries; + return React.createElement("li", { + style: dataNodeStyle(theme) + }, React.createElement("div", { + style: dataIDStyle(theme), + onClick: function() { + return _this2.props.jumpToData(id); + } + }, "ID: ", id), React.createElement("ul", { + style: styles.queries + }, queries.map(function(query) { + return React.createElement("li", { + style: styles.queryID, + onClick: function() { + var queryID = query.get("id"); + queryID && _this2.props.jumpToQuery(queryID); + } + }, query.get("name")); + }), !queries.length && React.createElement("li", { + style: noQueriesStyle(theme) + }, "No Queries"))); + }))); + } + } ]), ElementPanel; + }(React.Component); + ElementPanel.contextTypes = { + theme: React.PropTypes.object.isRequired + }; + var dataNodeStyle = function(theme) { + return { + marginBottom: 5, + border: "1px solid " + theme.base02 + }; + }, dataIDStyle = function(theme) { + return { + cursor: "pointer", + padding: "2px 4px", + backgroundColor: theme.base02 + }; + }, noQueriesStyle = function(theme) { + return { + color: theme.base03, + padding: "2px 4px" + }; + }, styles = { + dataIDs: { + listStyle: "none", + padding: 0, + margin: 0 + }, + queries: { + listStyle: "none", + padding: 0, + margin: 0 + }, + queryID: { + cursor: "pointer", + padding: "2px 4px" + } + }; + module.exports = decorate({ + store: "relayStore", + listeners: function(props, store) { + return [ props.id ]; + }, + shouldUpdate: function(props, prevProps) { + return props.id !== prevProps.id; + }, + props: function(store, _props) { + var dataIDs = []; + if (store.nodesToDataIDs[_props.id]) { + var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0; + try { + for (var _step, _iterator = store.nodesToDataIDs[_props.id][Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) { + var id = _step.value; + dataIDs.push({ + id: id, + queries: (store.queriesByDataID[id] || []).map(function(qid) { + return store.queries.get(qid); + }) + }); + } + } catch (err) { + _didIteratorError = !0, _iteratorError = err; + } finally { + try { + !_iteratorNormalCompletion && _iterator["return"] && _iterator["return"](); + } finally { + if (_didIteratorError) throw _iteratorError; + } + } + } + return { + dataIDs: dataIDs, + jumpToData: function(dataID) { + return store.jumpToDataID(dataID); + }, + jumpToQuery: function(queryID) { + return store.jumpToQuery(queryID); + } + }; + } + }, ElementPanel); +} ]); \ No newline at end of file diff --git a/dev/react-dev-tools/icons/128-deadcode.png b/dev/react-dev-tools/icons/128-deadcode.png new file mode 100644 index 00000000..b6ecc88e Binary files /dev/null and b/dev/react-dev-tools/icons/128-deadcode.png differ diff --git a/dev/react-dev-tools/icons/128-development.png b/dev/react-dev-tools/icons/128-development.png new file mode 100644 index 00000000..b6ecc88e Binary files /dev/null and b/dev/react-dev-tools/icons/128-development.png differ diff --git a/dev/react-dev-tools/icons/128-disabled.png b/dev/react-dev-tools/icons/128-disabled.png new file mode 100644 index 00000000..67b1c9a3 Binary files /dev/null and b/dev/react-dev-tools/icons/128-disabled.png differ diff --git a/dev/react-dev-tools/icons/128-outdated.png b/dev/react-dev-tools/icons/128-outdated.png new file mode 100644 index 00000000..05792b76 Binary files /dev/null and b/dev/react-dev-tools/icons/128-outdated.png differ diff --git a/dev/react-dev-tools/icons/128-production.png b/dev/react-dev-tools/icons/128-production.png new file mode 100644 index 00000000..b9327946 Binary files /dev/null and b/dev/react-dev-tools/icons/128-production.png differ diff --git a/dev/react-dev-tools/icons/128-unminified.png b/dev/react-dev-tools/icons/128-unminified.png new file mode 100644 index 00000000..b6ecc88e Binary files /dev/null and b/dev/react-dev-tools/icons/128-unminified.png differ diff --git a/dev/react-dev-tools/icons/16-deadcode.png b/dev/react-dev-tools/icons/16-deadcode.png new file mode 100644 index 00000000..33d99798 Binary files /dev/null and b/dev/react-dev-tools/icons/16-deadcode.png differ diff --git a/dev/react-dev-tools/icons/16-development.png b/dev/react-dev-tools/icons/16-development.png new file mode 100644 index 00000000..33d99798 Binary files /dev/null and b/dev/react-dev-tools/icons/16-development.png differ diff --git a/dev/react-dev-tools/icons/16-disabled.png b/dev/react-dev-tools/icons/16-disabled.png new file mode 100644 index 00000000..2f0317ea Binary files /dev/null and b/dev/react-dev-tools/icons/16-disabled.png differ diff --git a/dev/react-dev-tools/icons/16-outdated.png b/dev/react-dev-tools/icons/16-outdated.png new file mode 100644 index 00000000..aa42bfe0 Binary files /dev/null and b/dev/react-dev-tools/icons/16-outdated.png differ diff --git a/dev/react-dev-tools/icons/16-production.png b/dev/react-dev-tools/icons/16-production.png new file mode 100644 index 00000000..1c253dca Binary files /dev/null and b/dev/react-dev-tools/icons/16-production.png differ diff --git a/dev/react-dev-tools/icons/16-unminified.png b/dev/react-dev-tools/icons/16-unminified.png new file mode 100644 index 00000000..33d99798 Binary files /dev/null and b/dev/react-dev-tools/icons/16-unminified.png differ diff --git a/dev/react-dev-tools/icons/32-deadcode.png b/dev/react-dev-tools/icons/32-deadcode.png new file mode 100644 index 00000000..c4a6bda3 Binary files /dev/null and b/dev/react-dev-tools/icons/32-deadcode.png differ diff --git a/dev/react-dev-tools/icons/32-development.png b/dev/react-dev-tools/icons/32-development.png new file mode 100644 index 00000000..c4a6bda3 Binary files /dev/null and b/dev/react-dev-tools/icons/32-development.png differ diff --git a/dev/react-dev-tools/icons/32-disabled.png b/dev/react-dev-tools/icons/32-disabled.png new file mode 100644 index 00000000..7c750453 Binary files /dev/null and b/dev/react-dev-tools/icons/32-disabled.png differ diff --git a/dev/react-dev-tools/icons/32-outdated.png b/dev/react-dev-tools/icons/32-outdated.png new file mode 100644 index 00000000..6eae901b Binary files /dev/null and b/dev/react-dev-tools/icons/32-outdated.png differ diff --git a/dev/react-dev-tools/icons/32-production.png b/dev/react-dev-tools/icons/32-production.png new file mode 100644 index 00000000..9192719e Binary files /dev/null and b/dev/react-dev-tools/icons/32-production.png differ diff --git a/dev/react-dev-tools/icons/32-unminified.png b/dev/react-dev-tools/icons/32-unminified.png new file mode 100644 index 00000000..c4a6bda3 Binary files /dev/null and b/dev/react-dev-tools/icons/32-unminified.png differ diff --git a/dev/react-dev-tools/icons/48-deadcode.png b/dev/react-dev-tools/icons/48-deadcode.png new file mode 100644 index 00000000..f3224021 Binary files /dev/null and b/dev/react-dev-tools/icons/48-deadcode.png differ diff --git a/dev/react-dev-tools/icons/48-development.png b/dev/react-dev-tools/icons/48-development.png new file mode 100644 index 00000000..f3224021 Binary files /dev/null and b/dev/react-dev-tools/icons/48-development.png differ diff --git a/dev/react-dev-tools/icons/48-disabled.png b/dev/react-dev-tools/icons/48-disabled.png new file mode 100644 index 00000000..372b6e00 Binary files /dev/null and b/dev/react-dev-tools/icons/48-disabled.png differ diff --git a/dev/react-dev-tools/icons/48-outdated.png b/dev/react-dev-tools/icons/48-outdated.png new file mode 100644 index 00000000..342fedea Binary files /dev/null and b/dev/react-dev-tools/icons/48-outdated.png differ diff --git a/dev/react-dev-tools/icons/48-production.png b/dev/react-dev-tools/icons/48-production.png new file mode 100644 index 00000000..9aac93a6 Binary files /dev/null and b/dev/react-dev-tools/icons/48-production.png differ diff --git a/dev/react-dev-tools/icons/48-unminified.png b/dev/react-dev-tools/icons/48-unminified.png new file mode 100644 index 00000000..f3224021 Binary files /dev/null and b/dev/react-dev-tools/icons/48-unminified.png differ diff --git a/dev/react-dev-tools/icons/deadcode.svg b/dev/react-dev-tools/icons/deadcode.svg new file mode 100644 index 00000000..ccd6e669 --- /dev/null +++ b/dev/react-dev-tools/icons/deadcode.svg @@ -0,0 +1 @@ +development780780 \ No newline at end of file diff --git a/dev/react-dev-tools/icons/development.svg b/dev/react-dev-tools/icons/development.svg new file mode 100644 index 00000000..ccd6e669 --- /dev/null +++ b/dev/react-dev-tools/icons/development.svg @@ -0,0 +1 @@ +development780780 \ No newline at end of file diff --git a/dev/react-dev-tools/icons/disabled.svg b/dev/react-dev-tools/icons/disabled.svg new file mode 100644 index 00000000..73c2bb51 --- /dev/null +++ b/dev/react-dev-tools/icons/disabled.svg @@ -0,0 +1 @@ +disabled \ No newline at end of file diff --git a/dev/react-dev-tools/icons/outdated.svg b/dev/react-dev-tools/icons/outdated.svg new file mode 100644 index 00000000..03b83c1e --- /dev/null +++ b/dev/react-dev-tools/icons/outdated.svg @@ -0,0 +1 @@ +outdated \ No newline at end of file diff --git a/dev/react-dev-tools/icons/production.svg b/dev/react-dev-tools/icons/production.svg new file mode 100644 index 00000000..1e974f51 --- /dev/null +++ b/dev/react-dev-tools/icons/production.svg @@ -0,0 +1 @@ +production \ No newline at end of file diff --git a/dev/react-dev-tools/main.html b/dev/react-dev-tools/main.html new file mode 100644 index 00000000..f1c96d4a --- /dev/null +++ b/dev/react-dev-tools/main.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/dev/react-dev-tools/manifest.json b/dev/react-dev-tools/manifest.json new file mode 100644 index 00000000..6dbc182d --- /dev/null +++ b/dev/react-dev-tools/manifest.json @@ -0,0 +1,52 @@ +{ +"update_url": "https://clients2.google.com/service/update2/crx", + + "manifest_version": 2, + "name": "React Developer Tools", + "description": "Adds React debugging tools to the Chrome Developer Tools.", + "version": "3.2.3", + + "minimum_chrome_version": "49", + + "icons": { + "16": "icons/16-production.png", + "32": "icons/32-production.png", + "48": "icons/48-production.png", + "128": "icons/128-production.png" + }, + + "browser_action": { + "default_icon": { + "16": "icons/16-disabled.png", + "32": "icons/32-disabled.png", + "48": "icons/48-disabled.png", + "128": "icons/128-disabled.png" + }, + + "default_popup": "popups/disabled.html" + }, + + "devtools_page": "main.html", + + "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'", + "web_accessible_resources": [ "main.html", "panel.html", "build/backend.js"], + + "background": { + "scripts": [ "build/background.js" ], + "persistent": false + }, + + "permissions": [ + "file:///*", + "http://*/*", + "https://*/*" + ], + + "content_scripts": [ + { + "matches": [""], + "js": ["build/inject.js"], + "run_at": "document_start" + } + ] +} diff --git a/dev/react-dev-tools/panel.html b/dev/react-dev-tools/panel.html new file mode 100644 index 00000000..60fd1bdf --- /dev/null +++ b/dev/react-dev-tools/panel.html @@ -0,0 +1,32 @@ + + + + + + + + +
Unable to find React on the page.
+ + + diff --git a/dev/react-dev-tools/popups/deadcode.html b/dev/react-dev-tools/popups/deadcode.html new file mode 100644 index 00000000..5e74dc06 --- /dev/null +++ b/dev/react-dev-tools/popups/deadcode.html @@ -0,0 +1,32 @@ + + +

+ This page includes an extra development build of React. 🚧 +

+

+ The React build on this page includes both development and production versions because dead code elimination has not been applied correctly. +
+
+ This makes its size larger, and causes React to run slower. +
+
+ Make sure to set up dead code elimination before deployment. +

+
+

+ Open the developer tools, and the React tab will appear to the right. +

diff --git a/dev/react-dev-tools/popups/development.html b/dev/react-dev-tools/popups/development.html new file mode 100644 index 00000000..9c2089cc --- /dev/null +++ b/dev/react-dev-tools/popups/development.html @@ -0,0 +1,28 @@ + + +

+ This page is using the development build of React. 🚧 +

+

+ Note that the development build is not suitable for production. +
+ Make sure to use the production build before deployment. +

+
+

+ Open the developer tools, and the React tab will appear to the right. +

diff --git a/dev/react-dev-tools/popups/disabled.html b/dev/react-dev-tools/popups/disabled.html new file mode 100644 index 00000000..a89b178d --- /dev/null +++ b/dev/react-dev-tools/popups/disabled.html @@ -0,0 +1,21 @@ + + +

+ This page doesn’t appear to be using React. +
+ If this seems wrong, follow the troubleshooting instructions. +

diff --git a/dev/react-dev-tools/popups/outdated.html b/dev/react-dev-tools/popups/outdated.html new file mode 100644 index 00000000..a6ec12bc --- /dev/null +++ b/dev/react-dev-tools/popups/outdated.html @@ -0,0 +1,29 @@ + + +

+ This page is using an outdated version of React. ⌛ +

+

+ We recommend updating React to ensure that you receive important bugfixes and performance improvements. +
+
+ You can find the upgrade instructions on the React blog. +

+
+

+ Open the developer tools, and the React tab will appear to the right. +

diff --git a/dev/react-dev-tools/popups/production.html b/dev/react-dev-tools/popups/production.html new file mode 100644 index 00000000..1b65eb5b --- /dev/null +++ b/dev/react-dev-tools/popups/production.html @@ -0,0 +1,21 @@ + + +

+ This page is using the production build of React. ✅ +
+ Open the developer tools, and the React tab will appear to the right. +

diff --git a/dev/react-dev-tools/popups/shared.js b/dev/react-dev-tools/popups/shared.js new file mode 100644 index 00000000..e4f5eaa9 --- /dev/null +++ b/dev/react-dev-tools/popups/shared.js @@ -0,0 +1,22 @@ +/* globals chrome */ + +document.addEventListener('DOMContentLoaded', function() { + // Make links work + var links = document.getElementsByTagName('a'); + for (var i = 0; i < links.length; i++) { + (function() { + var ln = links[i]; + var location = ln.href; + ln.onclick = function() { + chrome.tabs.create({active: true, url: location}); + }; + })(); + } + + // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=428044 + document.body.style.opacity = 0; + document.body.style.transition = 'opacity ease-out .4s'; + requestAnimationFrame(function() { + document.body.style.opacity = 1; + }); +}); diff --git a/dev/react-dev-tools/popups/unminified.html b/dev/react-dev-tools/popups/unminified.html new file mode 100644 index 00000000..553c9ac6 --- /dev/null +++ b/dev/react-dev-tools/popups/unminified.html @@ -0,0 +1,31 @@ + + +

+ This page is using an unminified build of React. 🚧 +

+

+ The React build on this page appears to be unminified. +
+ This makes its size larger, and causes React to run slower. +
+
+ Make sure to set up minification before deployment. +

+
+

+ Open the developer tools, and the React tab will appear to the right. +

diff --git a/elements/button.js b/elements/button.js deleted file mode 100644 index 70c24451..00000000 --- a/elements/button.js +++ /dev/null @@ -1,203 +0,0 @@ -'use strict' - -const html = require('choo/html') -const assert = require('assert') -const css = require('sheetify') -const xtend = require('xtend') - -const baseStyles = css` - :host { - text-transform: uppercase; - letter-spacing: .025em; - cursor: pointer; - background-color: transparent; - .btn-inner-wrapper { - display: flex; - flex-wrap: nowrap; - flex-direction: row; - justify-content: center; - align-items: center; - } - } - .icon-only { - .btn-text { display: none } - } -` - -var greenStyles = css` - :host { - padding: .5rem .75rem; - font-size: .75rem; - background-color: var(--color-green); - color: var(--color-neutral-04); - } - :host:hover, - :host:focus { - background-color: var(--color-green-hover); - color: var(--color-white); - } -` - -var redStyles = css` - :host { - padding: .5rem .75rem; - font-size: .75rem; - background-color: var(--color-red); - color: var(--color-neutral-04); - } - :host:hover, - :host:focus { - background-color: var(--color-red-hover); - color: var(--color-white); - } -` - -var headerStyles = css` - :host { - color: var(--color-neutral-30); - height:2rem; - } - :host:hover, - :host:focus { - color: var(--color-white); - } -` - -var plainStyles = css` - :host { - padding: .5rem .75rem; - font-size: .75rem; - background-color: transparent; - color: var(--color-neutral-40); - } - :host:hover, - :host:focus { - color: var(--color-neutral-70); - } -` - -plainButton.green = greenButton -plainButton.icon = iconButton -plainButton.red = redButton -plainButton.header = headerButton -module.exports = plainButton - -// States: -// - Text only -// - Text and icon -function buttonElement (innerText, opts) { - if (!opts) { - opts = innerText - innerText = '' - } - - var icon = opts.icon - var innerHTML = null - - if (innerText && !icon) { - innerHTML = html` -
- ${innerText} -
- ` - } else { - innerHTML = html` -
- ${icon} - ${innerText} -
- ` - } - - var defaultProps = { - 'aria-label': innerText, - 'title': innerText - } - - var buttonProps = xtend(defaultProps, opts) - buttonProps.class = baseStyles + ' ' + buttonProps.class - - return html` - - ` -} - -// - Icon only -function iconButton (innerText, opts) { - assert.equal(typeof innerText, 'string', 'elements/button: innerText should by type string') - assert.ok(innerText.length, 'elements/button: innerText should have a length >= 0') - assert.equal(typeof opts, 'object', 'elements/button: opts should by type object') - assert.ok(opts.icon, 'elements/button: opts.icon should exist') - - var icon = opts.icon - opts.class = (opts.class) - ? opts.class - : '' - - var innerHTML = html` -
- ${icon} -
- ` - - var defaultProps = { - 'aria-label': innerText, - 'title': innerText - } - - var buttonProps = xtend(defaultProps, opts) - buttonProps.class = baseStyles + ' ' + buttonProps.class - buttonProps.icon = null - - return html` - - ` -} - -function greenButton (innerText, opts) { - if (!opts) { - opts = innerText - innerText = '' - } - - opts = opts || {} - opts.class = (opts.class) ? greenStyles + ' ' + opts.class : greenStyles - return buttonElement(innerText, opts) -} - -function redButton (innerText, opts) { - if (!opts) { - opts = innerText - innerText = '' - } - - opts = opts || {} - opts.class = (opts.class) ? redStyles + ' ' + opts.class : redStyles - return buttonElement(innerText, opts) -} - -function headerButton (innerText, opts) { - if (!opts) { - opts = innerText - innerText = '' - } - - opts = opts || {} - opts.class = (opts.class) ? headerStyles + ' ' + opts.class : headerStyles - return buttonElement(innerText, opts) -} - -function plainButton (innerText, opts) { - if (!opts && typeof innerText === 'object') { - opts = innerText - innerText = '' - } - - opts = opts || {} - opts.class = (opts.class) ? plainStyles + ' ' + opts.class : plainStyles - return buttonElement(innerText, opts) -} diff --git a/elements/dat-import.js b/elements/dat-import.js deleted file mode 100644 index be88825d..00000000 --- a/elements/dat-import.js +++ /dev/null @@ -1,96 +0,0 @@ -'use strict' - -const microcomponent = require('microcomponent') -const html = require('choo/html') -const assert = require('assert') -const css = require('sheetify') -const icon = require('./icon') - -module.exports = DatImportElement - -const prefix = css` - :host { - --icon-height: 1.2rem; - color: var(--color-neutral-30); - .icon-link { - padding-top: .42rem; - padding-left: .5rem; - pointer-events: none; - width: var(--icon-height); - height: var(--icon-height); - } - input { - height: 2rem; - width: 7.5rem; - padding-right: .5rem; - padding-left: 2rem; - border-radius:2px; - border: 1px solid transparent; - background-color: transparent; - color: var(--color-neutral-30); - opacity: 1; - text-transform: uppercase; - letter-spacing: .025em; - transition-property: width; - transition-duration: .15s; - transition-timing-function: ease-in; - &::-webkit-input-placeholder { - color: var(--color-neutral-30); - opacity: 1; - } - &:hover, - &:hover::-webkit-input-placeholder, - &:hover + svg { - color: var(--color-white); - } - &:focus, - &:active { - width: 14rem; - outline: none; - background-color: var(--color-white); - color: var(--color-neutral); - } - &:focus::-webkit-input-placeholder, - &:active::-webkit-input-placeholder, - &:focus + svg, - &:active + svg { - color: var(--color-neutral-50); - } - } - } -` - -function DatImportElement () { - var component = microcomponent({ name: 'dat-import' }) - component.on('render', render) - component.on('update', update) - return component - - function render () { - const onsubmit = this.props.onsubmit - - assert.equal(typeof onsubmit, 'function', 'dat-import: onsubmit should be type function') - - return html` - - ` - - function onKeyDown (e) { - const value = e.target.value - if (e.key !== 'Enter' || !value) return - e.target.value = '' - onsubmit(value) - } - } - - function update () { - return false - } -} diff --git a/elements/download.js b/elements/download.js deleted file mode 100644 index 9505740b..00000000 --- a/elements/download.js +++ /dev/null @@ -1,185 +0,0 @@ -'use strict' - -var microcomponent = require('microcomponent') -var dialog = require('electron').remote.dialog -var bytes = require('prettier-bytes') -var FileList = require('./file-list') -var html = require('choo/html') -var css = require('sheetify') -var icon = require('./icon') -var button = require('./button') -var os = require('os') - -var detailHeader = css` - :host { - height: 4rem; - flex-shrink: 0; - border-bottom: 1px solid var(--color-neutral-20); - } -` - -var detailFooter = css` - :host { - flex-shrink: 0; - border-top: 1px solid var(--color-neutral-20); - } -` - -var label = css` - :host { - font-size: .75rem; - min-width: 8rem; - color: var(--color-neutral-60); - } -` - -module.exports = function () { - var component = microcomponent({ - name: 'download', - state: { - fileList: FileList() - } - }) - component.on('render', render) - component.on('update', update) - return component - - function render () { - var { key, oncancel, err, dat, ondownload, onupdate } = this.props - var { fileList } = this.state - var location = this.state.location || `${os.homedir()}/Downloads` - - var title = dat - ? dat.metadata - ? dat.metadata.title - : key - : 'Fetching metadata …' - var author = dat - ? dat.metadata - ? dat.metadata.author - : 'N/A' - : '…' - var description = dat - ? dat.metadata - ? dat.metadata.description - : 'N/A' - : '…' - var size = dat - ? dat.archive.content - ? bytes(dat.archive.content.byteLength) - : 'N/A' - : '…' - var peers = dat - ? dat.network.connected - : '…' - - function onChangeLocation () { - var files = dialog.showOpenDialog({ - properties: ['openDirectory'], - defaultPath: location - }) - if (!files || !files.length) return - component.state.location = files[0] - onupdate() - } - - return html` -
- ${err - ? html` -

There was an error: ${err.message}

- ` - : html` -
-
-
- ${icon('hexagon-down', {class: 'w2 center color-neutral-30'})} -
-

- ${title} -

-
-
-
-
- Link: -
-
- ${key} -
-
-
-
- Size: -
-
- ${size} -
-
-
-
- Peers: -
-
- ${peers} -
-
-
-
- Author: -
-
- ${author} -
-
-
-
- Description: -
-
- ${description} -
-
-
-
- Download to: -
-
-
-                      ${location}
-                    
- ${button('Change…', { - class: '', - onclick: onChangeLocation - })} -
-
-
-
- Files: -
- ${fileList.render({ dat, onupdate })} -
-
-
- ` - } -
-

Download this Dat now?

-
- ${button.green('Download', { - onclick: () => ondownload({ key, location }) - })} - ${button('Cancel', { - onclick: oncancel - })} -
-
-
- ` - } - - function update (props) { - return true - } -} diff --git a/elements/empty.js b/elements/empty.js deleted file mode 100644 index 9ff18c4d..00000000 --- a/elements/empty.js +++ /dev/null @@ -1,79 +0,0 @@ -var html = require('choo/html') -var css = require('sheetify') - -var icon = require('../elements/icon') - -module.exports = EmptyState - -const skeleton = css` - :host { - position: relative; - .skeleton { - position: fixed; - top: 3.5rem; - left: 1.25rem; - width: 232px; - max-width: 100vw; - } - .dotted-lines { - position: absolute; - top: .25rem; - right: 5.5rem; - width: 17rem; - z-index: 3; - } - .create-new-dat, - .link { - position: absolute; - width: 15rem; - color: var(--color-neutral-30); - svg { - display: inline-block; - width: 2rem; - height: 2rem; - } - } - .create-new-dat { - top: 14.5rem; - right: 4rem; - } - .link { - top: 6rem; - right: 8.5rem; - svg { - margin-bottom: -.75rem; - } - } - } -` - -function EmptyState () { - return html` -
- -
- - -
- ${icon('create-new-dat')} -

Share a Folder

-

- … and sync changes by sharing -
- the link with someone else. -

-
-
-
- ` -} diff --git a/elements/file-list.js b/elements/file-list.js deleted file mode 100644 index 2dd3aa64..00000000 --- a/elements/file-list.js +++ /dev/null @@ -1,103 +0,0 @@ -var microcomponent = require('microcomponent') -var bytes = require('prettier-bytes') -var mirror = require('mirror-folder') -var html = require('choo/html') -var css = require('sheetify') - -var fileListContainer = css` - :host { - min-height: 5rem; - } -` - -var fileList = css` - :host { - td { - padding: .25rem .5rem; - } - tr:odd td { - background-color: var(--color-neutral-04); - } - } -` - -module.exports = function () { - var component = microcomponent({ - name: 'file-list', - state: { - update: true - } - }) - component.on('render', render) - component.on('update', update) - return component - - function render () { - var { dat, onupdate } = this.props - - if (dat) { - if (dat.files) { - this.state.update = false - } else { - if (dat.archive) { - dat.files = [] - if (dat.archive.content) walk() - else dat.archive.on('content', walk) - } - } - } - - function walk () { - var fs = { name: '/', fs: dat.archive } - var progress = mirror(fs, '/', { dryRun: true }) - progress.on('put', function (file) { - file.name = file.name.slice(1) - if (file.name === '') return - dat.files.push({ - path: file.name, - stat: file.stat - }) - dat.files.sort(function (a, b) { - return a.path.localeCompare(b.path) - }) - component.state.update = true - onupdate() - }) - } - - return html` -
- ${dat && dat.files && dat.files.length - ? html` - - ${dat.files.map(file => { - var size = file.stat && file.stat.isFile() - ? ` ${bytes(file.stat.size)}` - : '' - return html` - - - - - ` - })} -
- ${file.path} - - ${size} -
- ` - : html` -
- N/A -
- ` - } -
- ` - } - - function update (props) { - return props.dat !== this.props.dat || this.state.update - } -} diff --git a/elements/header.js b/elements/header.js deleted file mode 100644 index b53f1e19..00000000 --- a/elements/header.js +++ /dev/null @@ -1,132 +0,0 @@ -'use strict' - -const microcomponent = require('microcomponent') -const html = require('choo/html') -const assert = require('assert') -const css = require('sheetify') -const version = require('../package.json').version - -const button = require('./button') -const DatImport = require('./dat-import') -const icon = require('./icon') - -module.exports = HeaderElement - -const header = css` - :host { - height: 2.5rem; - padding: .25rem .75rem; - background-color: var(--color-neutral); - color: var(--color-white); - -webkit-app-region: drag; - } -` - -const shareButtonIcon = css` - :host { - width: 1.2em; - } -` - -const menuButtonIcon = css` - :host { - width: 1.75em; - } -` - -function HeaderElement () { - var importButton = DatImport() - var component = microcomponent({ name: 'header' }) - component.on('render', render) - component.on('update', update) - return component - - function render () { - var { isReady, onimport, oncreate, onreport } = this.props - var { showMenu, willShowMenu } = this.state - - if (typeof willShowMenu === 'boolean') { - showMenu = this.state.showMenu = willShowMenu - this.state.willShowMenu = null - } - - assert.equal(typeof isReady, 'boolean', 'elements/header: isReady should be type boolean') - assert.equal(typeof onimport, 'function', 'elements/header: onimport should be type function') - assert.equal(typeof oncreate, 'function', 'elements/header: oncreate should be type function') - - if (!isReady) { - return html`
` - } - - var createButton = button.header('Share Folder', { - id: 'create-new-dat', - icon: icon('create-new-dat', { class: shareButtonIcon }), - class: 'b--transparent v-mid color-neutral-30 hover-color-white f7 f6-l', - onclick: oncreate - }) - - var loginButton = button.header('Log In', { - class: 'ml3 v-mid color-neutral-30 hover-color-white f7 f6-l dn' - }) - - var menuButton = button.icon('Open Menu', { - icon: icon('menu', { class: menuButtonIcon }), - class: 'ml2 v-mid color-neutral-20 hover-color-white pointer', - onclick: toggle - }) - - function toggle () { - if (component.state.showMenu) hide() - else show() - } - - function show () { - document.body.addEventListener('click', clickedOutside) - component.state.willShowMenu = true - component.render(component.props) - } - - function hide () { - document.body.removeEventListener('click', clickedOutside) - component.state.willShowMenu = false - component.render(component.props) - } - - function clickedOutside (e) { - if (!component._element.contains(e.target)) hide() - } - - return html` -
-
- ${importButton.render({ - onsubmit: onimport - })} - ${createButton} - ${loginButton} - ${menuButton} - ${showMenu - ? html` -
-

- Dat Desktop ${version} -

-

- Dat Desktop is a peer to peer sharing app built for humans by humans. -

-

- Report Bug -

-
- ` - : ''} -
-
- ` - } - - function update (props) { - return props.isReady !== this.props.isReady || - typeof this.state.willShowMenu === 'boolean' - } -} diff --git a/elements/icon.js b/elements/icon.js deleted file mode 100644 index 1ab2f6eb..00000000 --- a/elements/icon.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict' - -const html = require('choo/html') -const assert = require('assert') -const css = require('sheetify') - -var prefix = css` - :host { - display: block; - fill: currentColor; - } -` - -module.exports = iconElement - -function iconElement (iconName, opts) { - opts = opts || {} - - assert.equal(typeof iconName, 'string', 'elements/icon: iconName should be type string') - assert.equal(typeof opts, 'object', 'elements/icon: opts should be type object') - - var classNames = 'icon-' + iconName + ' ' + prefix - if (opts.class) classNames += (' ' + opts.class) - - return html` - - - - ` -} diff --git a/elements/inspect.js b/elements/inspect.js deleted file mode 100644 index 6ede7c48..00000000 --- a/elements/inspect.js +++ /dev/null @@ -1,158 +0,0 @@ -'use strict' - -var microcomponent = require('microcomponent') -var toStr = require('dat-encoding').toStr -var bytes = require('prettier-bytes') -var FileList = require('./file-list') -var button = require('./button') -var html = require('choo/html') -var css = require('sheetify') -var icon = require('./icon') - -var detailHeader = css` - :host { - height: 4rem; - flex-shrink: 0; - border-bottom: 1px solid var(--color-neutral-20); - } -` - -var detailFooter = css` - :host { - flex-shrink: 0; - border-top: 1px solid var(--color-neutral-20); - } -` - -var label = css` - :host { - font-size: .75rem; - min-width: 8rem; - color: var(--color-neutral-60); - } -` - -module.exports = function () { - var component = microcomponent({ - name: 'inspect', - state: { - fileList: FileList() - } - }) - component.on('render', render) - component.on('update', update) - return component - - function render () { - var { oncancel, onupdate, dat } = this.props - var { fileList } = this.state - - var title = dat - ? dat.metadata - ? dat.metadata.title - : dat.key - : 'Fetching metadata …' - var author = dat - ? dat.metadata - ? dat.metadata.author - : 'N/A' - : '…' - var description = dat - ? dat.metadata && dat.metadata.description - ? dat.metadata.description - : 'N/A' - : '…' - var size = dat - ? dat.archive.content - ? bytes(dat.archive.content.byteLength) - : 'N/A' - : '…' - var peers = dat - ? dat.network.connected - : '…' - - return html` -
-
-
-
- ${icon('hexagon-down', {class: 'w2 center color-neutral-30'})} -
-

- ${title} -

-
- -
-
- Link: -
-
- ${toStr(dat.key)} -
-
-
-
- Size: -
-
- ${size} -
-
-
-
- Peers: -
-
- ${peers} -
-
-
-
- Author: -
-
- ${author} -
-
-
-
- Description: -
-
- ${description} -
-
-
-
- Download to: -
-
-
-                  ${dat.path}
-                
-
-
-
-
- Files: -
- ${fileList.render({ dat, onupdate })} -
-
-
-
-
- ${button('← Back to Overview', { - onclick: oncancel - })} -
-
- - ` - } - - function update (props) { - return true - } -} diff --git a/elements/intro.js b/elements/intro.js deleted file mode 100644 index 45c5b31b..00000000 --- a/elements/intro.js +++ /dev/null @@ -1,179 +0,0 @@ -var html = require('choo/html') -var css = require('sheetify') -var microcomponent = require('microcomponent') - -var button = require('./button') - -module.exports = IntroScreen - -const intro = css` - :host { - position: relative; - height: 100vh; - background-color: var(--color-neutral); - color: var(--color-white); - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - -webkit-app-region: drag; - overflow: hidden; - } -` -const content = css` - :host { - position: relative; - flex: 1; - width: 100vw; - padding: 3rem 2rem; - } -` - -const footer = css` - :host { - position: relative; - width: 100vw; - padding: 1rem; - display: flex; - justify-content: space-between; - button { - min-width: 5rem; - } - } -` -const image = css` - :host { - max-width: 100vw; - max-height: 100vh; - } -` - -const dotsStyles = css` - :host { - display: flex; - justify-content: space-between; - align-items: center; - .dot { - width: .5rem; - height: .5rem; - margin: .25rem; - border-radius: 50%; - background-color: var(--color-black); - } - .active { - background-color: var(--color-blue); - } - } -` - -function dots (screen) { - return html` -
- ${Array(5).fill(null).map(function (_, i) { - var className = 'dot' - if (i === screen - 1) className += ' active' - return html `
` - })} -
- ` -} - -function IntroScreen () { - var component = microcomponent({ - name: 'intro', - state: { - screen: 0 - } - }) - component.on('render', render) - component.on('update', update) - component.on('load', load) - component.on('unload', unload) - return component - - function next () { - component.state.screen++ - component.state.nextScreen = true - component.props.onupdate() - } - - function render () { - var { onOpenHomepage, onexit } = this.props - var screen = this.state.screen - - function openHomepage (ev) { - ev.preventDefault() - onOpenHomepage() - } - - return html` -
- -
- ${{ - 1: html` -

- Hey there! This is a Dat. -

- `, - 2: html` -

- Think of it as a folder – with some magic. -

- `, - 3: html` -

- You can turn any folder on your computer into a Dat. -

- `, - 4: html` -

- Dats can be easily shared. - Just copy the unique dat link and securely share it. -

- `, - 5: html` -

- You can also import existing Dats. - Check out datproject.org to explore open datasets. -

- ` - }[screen]} -
- ${screen === 0 - ? button.green('Get Started', { onclick: next, class: 'mt2 mb5 relative' }) - : html` -
- ${button('Skip Intro', { onclick: onexit })} - ${dots(screen)} - ${screen < 5 - ? button.green('Next', { onclick: next }) - : button.green('Done', { onclick: onexit })} -
- `} -
- ` - } - - function update () { - if (this.state.nextScreen) { - this.state.nextScreen = false - return true - } - return false - } - - function load () { - window.addEventListener('keydown', onkeydown) - } - - function unload () { - window.removeEventListener('keydown', onkeydown) - } - - function onkeydown (ev) { - if (ev.code !== 'Escape') return - window.removeEventListener('keydown', onkeydown) - component.props.onexit() - } -} diff --git a/elements/modal.js b/elements/modal.js deleted file mode 100644 index fa53cf46..00000000 --- a/elements/modal.js +++ /dev/null @@ -1,397 +0,0 @@ -const remoteProcess = require('electron').remote.process -const clipboard = require('electron').clipboard -const Modal = require('base-elements/modal') -const app = require('electron').remote.app -const remote = require('electron').remote -const minimist = require('minimist') -const morph = require('nanomorph') -const html = require('choo/html') -const assert = require('assert') -const rimraf = require('rimraf') -const css = require('sheetify') -const path = require('path') -const fs = require('fs') -const os = require('os') - -const button = require('./button') -const icon = require('./icon') - -const prefix = css` - :host { - min-width: 25rem; - max-width: 32rem; - padding: 2rem 2.5rem 2rem; - background-color: var(--color-white); - box-shadow: 0 1.2rem 2.4rem rgba(0,0,0,.5); - } - :host .exit { - border: none; - color: var(--color-neutral-40); - } - :host .exit:hover, - :host .exit:focus { - color: var(--color-neutral); - } - :host .icon-cross { - vertical-align: middle; - width: 1.6em; - max-height: 1.6em; - transition: color .025s ease-out; - margin-right: auto; - margin-left: auto; - } -` - -const input = css` - :host { - --input-height: 3rem; - --icon-height: 1.2rem; - --button-width: 3rem; - height: var(--input-height); - border: 0; - .dat-input-button { - width: var(--button-width); - height: calc(var(--input-height) - 2px); - top: 1px; - right: 1px; - bottom: 1px; - background-color: var(--color-neutral-10); - border: none; - color: var(--color-neutral-30); - &:hover, - &:focus { - outline: none; - color: var(--color-green-hover); - } - } - - .icon-link, - .icon-clipboard { - position: absolute; - top: 0; - bottom: 0; - padding-top: calc(var(--icon-height) - .35rem); - padding-left: .75rem; - pointer-events: none; - display: block; - width: var(--icon-height); - height: var(--icon-height); - transition: color .025s ease-out; - } - .icon-link { - left: 0; - color: var(--color-neutral-30); - } - .icon-clipboard { - right: .8rem; - } - .dat-input-input { - width: 100%; - height: var(--input-height); - padding-right: var(--button-width); - padding-left: 2.5rem; - font-size: 1rem; - font-weight: 600; - border: 1px solid var(--color-neutral-20); - background-color: var(--color-white); - color: var(--color-green-hover); - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - &:hover, - &:focus { - outline: none; - } - } - - .dat-input-check { - color: var(--color-blue); - top: 2rem; - } - .icon-check { - width: var(--icon-height); - height: .875rem; - vertical-align: -.15rem; - display: inline-block; - } - .confirmation { - right: 0; - opacity: 0; - top: -.5rem; - color: var(--color-blue); - } - .show-confirmation { - top: -1.2rem; - opacity: 1; - transition: all .15s ease-out; - } - } -` - -module.exports.confirm = confirmModal -module.exports.crash = crashModal -module.exports.error = errorModal -module.exports.warn = warningModal -module.exports.link = linkModal - -function confirmModal () { - return Modal({ - render: render, - onexit: onexit, - class: 'modal' - }) - - function onexit () { - const el = document.querySelector('.modal') - if (el) el.parentNode.removeChild(el) - } - - function render (cb) { - assert.equal(typeof cb, 'function', 'elements/confirm-modal: cb should be a function') - - var deleteButton = button.green('Yes, Remove Dat', { - class: 'fr ml3 confirm-button', - onclick: ondelete, - onload: function () { - deleteButton.focus() - } - }) - - var exitButton = button('No, Cancel', { - class: 'fr cancel-button', - onclick: onexit - }) - - return html` -
-

- Remove Dat -

-

- Are you sure you want to remove this dat? -
- This can’t be undone. -

-

- ${deleteButton} - ${exitButton} -

- -
- ` - - function ondelete () { - cb() - onexit() - } - } -} - -function crashModal () { - return Modal({ render: render }) - - function render (onOk, onExit) { - return html` -
-
-

Unexpected issue

-

- There was an unexpected fatal issue. The app will now close. We - have received a bug report and will work to fix this as soon as - possible. -

-

- ${button.green('Exit Application', { - class: 'fr ml3', - onclick: onexit - })} -

-
-
-

- Danger Zone: If this error keeps occurring you can - try to clear the database or delete all data. These actions cannot - be reversed. -

-

- ${button.red('Clear Database & exit', { - class: 'fr ml3', - onclick: clearDatabase - })} - ${button.red('Delete All Data & exit', { - class: 'fr ml3', - onclick: deleteData - })} -

-
-
- ` - } - - function onexit () { - var window = remote.getCurrentWindow() - window.close() - } - - function deleteData () { - const argv = minimist(remoteProcess.argv.slice(2)) - const downloadsDir = (argv.data) - ? argv.data - : path.join(app.getPath('downloads'), '/dat') - rimraf(downloadsDir, onexit) - } - - function clearDatabase () { - const dbLocation = path.join(os.homedir(), '.dat-desktop') - const dbFile = path.join(dbLocation, 'dats.json') - fs.unlink(dbFile, onexit) - } -} - -function errorModal () { - return Modal({ - render: render, - onexit: onexit, - class: 'modal' - }) - - function render (message) { - var exitButton = button.green('Ok', { - class: 'fr ml3', - onclick: onexit, - onload: function () { - exitButton.focus() - } - }) - - return html` -
-
-

Oops, something went wrong

-

- ${message} -

-

- ${exitButton} -

-
-
- ` - } - - function onexit () { - const el = document.querySelector('.modal') - if (el) el.parentNode.removeChild(el) - } -} - -function warningModal () { - return Modal({ - render: render, - onexit: onexit, - class: 'modal' - }) - - function render (message) { - var exitButton = button.green('Ok', { - class: 'fr ml3', - onclick: onexit, - onload: function () { - exitButton.focus() - } - }) - - return html` -
-
-

Warning

-

- ${message} -

-

- ${exitButton} -

-
-
- ` - } - - function onexit () { - const el = document.querySelector('.modal') - if (el) el.parentNode.removeChild(el) - } -} - -function linkModal () { - let isCopied = false - let link = '' - let el = '' - - const modal = Modal({ - onunload: onunload, - onexit: onexit, - render: render, - class: 'modal' - }) - - return modal - - function onexit () { - const el = document.querySelector('.modal') - if (el) el.parentNode.removeChild(el) - } - - function onunload () { - isCopied = false - link = '' - el = null - } - - function render (newLink) { - if (!link) link = 'dat://' + newLink - const confirmClass = (isCopied) ? 'show-confirmation' : '' - - let _el = html` -
-

- Copy Dat Link -

- -

- Anyone with this link can view your Dat. -

- -
- ` - - if (!el) el = _el - return _el - - function onclick () { - isCopied = true - clipboard.writeText(link) - var _el = render() - morph(el, _el) - } - } -} diff --git a/elements/sprite.js b/elements/sprite.js deleted file mode 100644 index d971c46a..00000000 --- a/elements/sprite.js +++ /dev/null @@ -1,21 +0,0 @@ -const microcomponent = require('microcomponent') -const datIcons = require('dat-icons/raw') - -module.exports = svgSprite - -function svgSprite () { - const component = microcomponent({ name: 'svg-sprite' }) - component.on('render', render) - component.on('update', update) - return component - - function render () { - const _el = document.createElement('div') - _el.innerHTML = datIcons() - return _el.childNodes[0] - } - - function update () { - return false - } -} diff --git a/elements/status-bar.js b/elements/status-bar.js deleted file mode 100644 index 49f73f14..00000000 --- a/elements/status-bar.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict' - -const microcomponent = require('microcomponent') -const bytes = require('prettier-bytes') -const html = require('choo/html') -const css = require('sheetify') - -const style = css` - :host { - position: absolute; - bottom: 0; - width: 100%; - padding: .5rem 1rem .75rem; - background-color: var(--color-neutral-04); - color: var(--color-neutral-60); - } -` - -module.exports = function () { - const component = microcomponent({ - name: 'status bar', - pure: true - }) - component.on('render', render) - return component - - function render () { - const { up, down } = this.props - return html` -
- Download: ${bytes(down)}/s - Upload: ${bytes(up)}/s -
- ` - } -} diff --git a/elements/status.js b/elements/status.js deleted file mode 100644 index d348858e..00000000 --- a/elements/status.js +++ /dev/null @@ -1,131 +0,0 @@ -const bytes = require('prettier-bytes') -const html = require('choo/html') -const css = require('sheetify') - -const progressbar = css` - :host { - --progress-height: .5rem; - --bar-height: var(--progress-height); - --counter-width: 3.0rem; - --tile-width: 28px; - --stripe-width: 5px; - min-width: 8rem; - max-width: 24rem; - overflow: hidden; - padding-top: .4rem; - .bar { - height: var(--progress-height); - width: calc(100% - var(--counter-width)); - float: left; - overflow: hidden; - background-color: var(--color-neutral-20); - border-radius: 2px; - } - .line { - width: 0%; - height: var(--progress-height); - background-color: var(--color-blue); - border-radius: 2px; - } - .line-loading { - overflow: hidden; - position: relative; - height: var(--bar-height); - &:before { - content: ''; - width: 100%; - height: var(--bar-height); - position: absolute; - top: 0; - left: 0; - background-image: repeating-linear-gradient( - -45deg, - transparent, - transparent var(--stripe-width), - rgba(255,255,255,.1) var(--stripe-width), - rgba(255,255,255,.1) calc(2 * var(--stripe-width)) - ); - background-size: var(--tile-width) var(--bar-height); - animation: move-bg .75s linear infinite; - } - } - .line-complete { - background-color: var(--color-green); - } - .line-paused { - background-color: var(--color-neutral-40); - } - .counter { - float: right; - min-width: var(--counter-width); - margin-top: -.4rem; - text-align: right; - } - } - @keyframes move-bg { - 0% { - background-position: 28px 0; - } - 100% { - background-position: 0 0; - } - } -` - -const progressSubline = css` - :host { - .arrow { - vertical-align: top; - } - } -` - -module.exports = function (dat, stats) { - var progress = Math.floor((dat.progress || 0) * 100) - var progressbarLine = (stats.state === 'loading') - ? 'line-loading' - : (stats.state === 'paused' || stats.state === 'stale') - ? 'line-paused' - : 'line-complete' - var netStats = dat.stats.network - - var progressText - switch (stats.state) { - case 'complete': - progressText = `Complete. ↑ ${speed(netStats.uploadSpeed)}` - break - case 'loading': - progressText = html` - - ${speed(netStats.downloadSpeed)} ${speed(netStats.uploadSpeed)} - ` - break - case 'stale': - progressText = 'waiting for peers…' - break - default: - progressText = 'Paused.' - } - function speed (n) { - return `${bytes(n || 0)}/s` - } - - return html` -
-
-
- ${progress}% -
-
-
-
-
-
-

- - ${progressText} - -

-
- ` -} diff --git a/elements/table-row.js b/elements/table-row.js deleted file mode 100644 index 283bb1a4..00000000 --- a/elements/table-row.js +++ /dev/null @@ -1,407 +0,0 @@ -var microcomponent = require('microcomponent') -var encoding = require('dat-encoding') -var bytes = require('prettier-bytes') -var html = require('choo/html') -var css = require('sheetify') - -var TitleField = require('./table-title-field') -var button = require('./button') -var status = require('./status') -var icon = require('./icon') - -var cellStyles = css` - :host { - transition: background-color .025s ease-out; - &:hover, &:focus { - background-color: var(--color-neutral-04); - cursor: pointer; - } - .cell-1 { - width: 4rem; - } - .cell-2 { - width: 14rem; - max-width: 12rem; - @media (min-width: 768px) { - max-width: 20rem; - } - @media (min-width: 1280px) { - max-width: 24rem; - } - } - .cell-3 { - width: 15rem; - } - .cell-4 { - width: 4.5rem; - white-space: nowrap; - } - .cell-5 { - width: 4.5rem; - white-space: nowrap; - } - .cell-6 { - width: 10.25rem; - } - .cell-truncate { - width: 100%; - } - } -` - -var iconStyles = css` - :host { - .row-action { - height: 1.5rem; - display: inline-block; - color: var(--color-neutral-20); - svg { - vertical-align: middle; - width: 1.1em; - max-height: 1.6em; - @media (min-width: 960px) { - width: 1.4em; - } - } - &:hover, - &:focus { - outline: none; - color: var(--color-neutral-50); - } - &:first-child { - padding-left: 0; - } - &:last-child { - padding-right: 0; - } - } - .icon-network { - display: inline-block; - color: var(--color-neutral-20); - vertical-align: sub; - width: 1em; - svg polygon { - fill: inherit; - } - } - } -` - -var networkStyles = css` - :host { - vertical-align: top; - svg { - height: 1.5rem; - display: inline-block; - color: var(--color-neutral-20); - vertical-align: top; - width: 0.75em; - max-height: 1.6em; - margin-top: -0.05em; - margin-right: 5px; - } - .network-peers-many { - --polygon-1-color: var(--color-green); - --polygon-2-color: var(--color-green); - --polygon-3-color: var(--color-green); - } - .network-peers-1 { - --polygon-1-color: var(--color-yellow); - --polygon-2-color: var(--color-yellow); - } - .network-peers-0 { - --polygon-1-color: var(--color-red); - } - } -` - -module.exports = Row - -function Row () { - var hexContent = HexContent() - var finderButton = FinderButton() - var linkButton = LinkButton() - var deleteButton = DeleteButton() - var titleField = TitleField() - var networkIcon = NetworkIcon() - - var component = microcomponent({ name: 'table-row' }) - component.on('render', render) - component.on('update', update) - return component - - function render () { - var { dat, state, emit, highlight } = this.props - if (dat instanceof Error) return errorRow(dat, emit, deleteButton) - - var stats = dat.stats - var peers = dat.network ? dat.network.connected : 'N/A' - var key = encoding.encode(dat.key) - var styles = cellStyles - if (highlight) styles += ' fade-highlight' - - stats.size = dat.archive.content - ? bytes(dat.archive.content.byteLength) - : 'N/A' - stats.state = !dat.network - ? 'paused' - : dat.writable || dat.progress === 1 - ? 'complete' - : peers - ? 'loading' - : 'stale' - - function onclick () { - emit('dats:inspect', dat) - } - - return html` - - -
- ${hexContent.render({ dat, stats, emit })} -
- - -
- ${titleField.render({ dat, state, emit })} -

- ${dat.metadata.author || 'Anonymous'} • - - ${dat.writable ? 'Read & Write' : 'Read-only'} - -

-
- - - ${status(dat, stats)} - - - ${stats.size} - - - ${networkIcon.render({ dat, emit })} - ${peers} - - -
- ${finderButton.render({ dat, emit })} - ${linkButton.render({ dat, emit })} - ${deleteButton.render({ dat, emit })} -
- - - ` - } - - function update (props) { - return true - } -} - -function FinderButton () { - var component = microcomponent({ name: 'finder-button' }) - component.on('render', render) - component.on('update', update) - return component - - function render () { - var { dat, emit } = this.props - return button.icon('Open in Finder', { - icon: icon('open-in-finder'), - class: 'row-action', - onclick: function (e) { - e.preventDefault() - e.stopPropagation() - emit('dats:open', dat) - } - }) - } - - function update () { - return false - } -} - -function LinkButton () { - var component = microcomponent({ name: 'link-button' }) - component.on('render', render) - component.on('update', update) - return component - - function render () { - var { dat, emit } = this.props - return button.icon('Share Dat', { - icon: icon('link'), - class: 'row-action', - onclick: function (e) { - e.preventDefault() - e.stopPropagation() - emit('dats:share', dat) - } - }) - } - - function update () { - return false - } -} - -function DeleteButton () { - var component = microcomponent({ name: 'delete-button' }) - component.on('render', render) - component.on('update', update) - return component - - function render () { - var { dat, emit } = this.props - return button.icon('Remove Dat', { - icon: icon('delete'), - class: 'row-action delete mr2', - onclick: function (e) { - e.preventDefault() - e.stopPropagation() - emit('dats:remove', { key: dat.key || dat.data.key }) - } - }) - } - - function update () { - return false - } -} - -function NetworkIcon () { - var component = microcomponent({ - name: 'network-icon', - state: { - peerCount: 0 - } - }) - component.on('render', render) - component.on('update', update) - return component - - function render () { - var { dat } = this.props - var peerCount = this.state.peerCount = dat.network - ? dat.network.connected - : 0 - var iconClass = peerCount === 0 - ? 'network-peers-0' - : peerCount === 1 - ? 'network-peers-1' - : 'network-peers-many' - - return icon('network', { class: iconClass }) - } - - function update ({ dat, emit }) { - var newPeerCount = dat.network ? dat.network.connected : 0 - return this.state.peerCount !== newPeerCount - } -} - -// create a new hexcontent icon -function HexContent () { - var component = microcomponent({ name: 'hex-content' }) - component.on('render', render) - component.on('update', update) - return component - - function onmousemove (ev) { - if (!component.state.hover) return - if (component._element.contains(ev.target)) return - component.state.setHover = false - document.body.removeEventListener('mousemove', onmousemove) - component.render(component.props) - } - - function render () { - var state = this.state.state = this.props.stats.state - var { emit, dat } = this.props - - if (typeof this.state.setHover === 'boolean') { - if (this.state.setHover) document.body.addEventListener('mousemove', onmousemove) - this.state.hover = this.state.setHover - this.state.setHover = null - } - - if (this.state.hover) { - return button.icon('pause', { - icon: icon('hexagon-pause', {class: 'w2'}), - class: 'color-neutral-40 ph0', - onclick: togglePause - }) - } else if (state === 'loading') { - return button.icon('loading', { - icon: icon('hexagon-down', {class: 'w2'}), - class: 'color-blue hover-color-blue-hover ph0', - onclick: togglePause - }) - } else if (state === 'paused') { - return button.icon('paused', { - icon: icon('hexagon-resume', {class: 'w2'}), - class: 'color-neutral-30 hover-color-neutral-40 ph0', - onclick: togglePause - }) - } else if (state === 'complete') { - return button.icon('complete', { - icon: icon('hexagon-up', {class: 'w2'}), - class: 'color-green hover-color-green-hover ph0', - onclick: togglePause, - onmouseover: ev => { - this.state.setHover = true - this.render(this.props) - } - }) - } else { - return button.icon('stale', { - icon: icon('hexagon-x', {class: 'w2'}), - class: 'color-neutral-30 hover-color-neutral-40 ph0', - onclick: togglePause - }) - } - - function togglePause (e) { - e.preventDefault() - e.stopPropagation() - emit('dats:toggle-pause', dat) - } - } - - function update ({ dat, stats, emit }) { - return stats.state !== this.state.state || - typeof this.state.setHover === 'boolean' - } -} - -function errorRow (err, emit, deleteButton) { - var errorHexIcon = icon('hexagon-x', { - class: 'w2 color-red' - }) - return html` - - -
- ${errorHexIcon} -
- - -
-

- Error -

-

- Could not share ${err.data.dir} -

-
- - -
- ${deleteButton.render({ dat: err, emit })} -
- - - ` -} diff --git a/elements/table-title-field.js b/elements/table-title-field.js deleted file mode 100644 index 3630ed86..00000000 --- a/elements/table-title-field.js +++ /dev/null @@ -1,186 +0,0 @@ -var microcomponent = require('microcomponent') -var nanomorph = require('nanomorph') -var html = require('choo/html') -var css = require('sheetify') -var icon = require('./icon') -var button = require('./button') - -var overlay = css` - :host { - position: absolute; - top: 0; - left: 0; - width: 100vw; - height: 100vh; - background-color: rgba(0,0,0,.2); - } -` - -var editableField = css` - :host { - position: relative; - h2 { - position: relative; - } - .indicator { - position: absolute; - display: none; - top: .25rem; - right: 0; - width: .75rem; - } - &:hover, &:focus { - h2 { - color: var(--color-blue); - } - .indicator { - display: block; - } - } - } -` - -module.exports = TitleField - -// Creates an input field with an explicit save button. -// There's 2 modes: active and inactive. -// Only dats that you can write to can have an active input field. -// Inactive becomes active by clicking on the input field. -// Active becomes inactive by: -// - clicking anywhere outside the field -// - pressing escape -// - pressing enter (saving) -// - clicking the save button (saving) -function TitleField () { - var component = microcomponent({ - name: 'table-title-field', - state: resetState() - }) - component.on('render', render) - component.on('render:active', renderActive) - component.on('render:inactive', renderInactive) - component.on('update', update) - return component - - function update ({ dat }) { - return dat.writable !== this.state.writable || - dat.key.toString('hex') !== this.state.key || - this.state.title !== dat.metadata.title || '#' + this.state.key - } - - function resetState () { - return { - isEditing: false, - editTarget: null, - editValue: '', - title: null, - key: null - } - } - - function render () { - var dat = component.props.dat - var state = component.state - - if (dat) { - state.writable = dat.writable - state.key = dat.key.toString('hex') - state.title = dat.metadata.title || '' - state.placeholderTitle = '#' + state.key - } - - if (state.isEditing && state.writable) return component.emit('render:active') - else return component.emit('render:inactive') - } - - function renderInactive () { - var state = this.state - state.editValue = '' - - return state.writable - ? html` -
-

- ${state.title || state.placeholderTitle} - ${icon('edit', { class: 'absolute top-0 bottom-0 right-0 color-neutral-30 indicator' })} -

-
- ` - : html` -
-

- ${state.title || state.placeholderTitle} -

-
- ` - - function onclick (e) { - e.stopPropagation() - e.preventDefault() - state.isEditing = true - state.editValue = state.title - component.render(Object.assign({}, component.props)) - } - } - - function renderActive () { - setTimeout(function () { - var input = self._element.querySelector('input') - input.focus() - input.select() - }, 0) - - var self = this - var state = this.state - return html` -
-
-
- - ${renderButton()} -
-
- ` - - function handleKeypress (e) { - var oldValue = state.editValue - var newValue = e.target.value - state.editValue = newValue - e.stopPropagation() - - if (e.code === 'Escape') { - e.preventDefault() - deactivate() - } else if (e.code === 'Enter') { - e.preventDefault() - handleSave() - } else if (oldValue !== newValue) { - nanomorph(self._element.querySelector('button'), renderButton()) - } - } - - function renderButton () { - if (state.editValue === state.title) { - return button('Save', { onclick: deactivate }) - } else { - return button.green('Save', { onclick: handleSave }) - } - } - - function handleSave (e) { - if (e) { - e.stopPropagation() - e.preventDefault() - } - component.props.emit('dats:update-title', { key: self.state.key, title: self.state.editValue }) - deactivate() - } - - function deactivate (e) { - if (e) e.stopPropagation() - state.isEditing = false - component.render(Object.assign({}, component.props)) - } - } -} diff --git a/elements/table.js b/elements/table.js deleted file mode 100644 index b27a9782..00000000 --- a/elements/table.js +++ /dev/null @@ -1,117 +0,0 @@ -var microcomponent = require('microcomponent') -var nanolog = require('nanologger') -var html = require('choo/html') -var css = require('sheetify') - -var TableRow = require('./table-row') - -var tableStyles = css` - :host { - width: 100%; - max-width: 80rem; - margin: 0 auto; - border-collapse: collapse; - th, - td { - padding-right: .75rem; - padding-left: .75rem; - } - th { - height: 4rem; - font-size: .8125rem; - font-weight: normal; - color: var(--color-neutral-60); - border-bottom: 1px solid var(--color-neutral-20); - &:first-child { - width: 3rem; - padding: 0; - border: none; - } - &:last-child { - width: 8.25rem; - } - } - td { - height: 4rem; - vertical-align: top; - padding-top: 1rem; - } - tr:hover td { - background-color: var(--color-neutral--04); - } - } -` - -var tableHead = TableHead() -var tableRows = TableRows() - -module.exports = tableElement - -function tableElement (state, emit) { - var dats = state.dats.values - return html` -
- - ${tableHead.render()} - - ${tableRows(dats, state, emit)} - -
-
- ` -} - -function TableRows () { - var elements = {} - var log = nanolog('table-rows') - var initialLoad = true - log.debug('initialized') - - return function (dats, state, emit) { - log.debug('render', elements) - var usedKeys = [] - var renderedElements = dats.map(function (dat) { - var key = dat instanceof Error - ? dat.stack - : dat.key.toString('hex') - var row = elements[key] - usedKeys.push(key) - if (row) { - return row.render({ dat, state, emit }) - } else { - var highlight = !initialLoad - var newRow = TableRow() - elements[key] = newRow - return newRow.render({ dat, state, emit, highlight }) - } - }) - - Object.keys(elements).forEach(function (key) { - if (usedKeys.indexOf(key) === -1) elements[key] = null - }) - - initialLoad = false - return renderedElements - } -} - -function TableHead () { - return microcomponent({ - name: 'table-head', - pure: true - }) - .on('render', function () { - return html` - - - - Link - Status - Size - Peers - - - - ` - }) -} diff --git a/index.html b/index.html index ad41995e..3af27d85 100644 --- a/index.html +++ b/index.html @@ -2,10 +2,11 @@ Dat Desktop - + + + - +
- - + \ No newline at end of file diff --git a/index.js b/index.js index 5a43e538..11f5a115 100644 --- a/index.js +++ b/index.js @@ -1,46 +1,36 @@ -const defaultMenu = require('electron-default-menu') -const { app, shell, Menu, ipcMain } = require('electron') -const window = require('electron-window') -const Env = require('envobj') -const path = require('path') -const doctor = require('dat-doctor') -const Writable = require('stream').Writable +'use strict' +const { app, BrowserWindow, shell, Menu, ipcMain } = require('electron') +const { neutral } = require('dat-colors') const autoUpdater = require('./lib/auto-updater') -const colors = require('dat-colors') +const defaultMenu = require('electron-default-menu') +const doctor = require('dat-doctor') +const path = require('path') +const isDev = process.env.NODE_ENV === 'development' +const { Writable } = require('stream') -const delegateEvents = require('delegate-electron-events') +if (typeof process.env.NODE_V === 'string' && process.env.NODE_V !== process.version) { + console.error(` + WARNING: + You are using a different version of Node than is used in this electron release! + - Used Version: ${process.env.NODE_V} + - Electron's Node Version: ${process.version} + + We recommend running: + + $ nvm install ${process.version}; npm rebuild; -const windowStyles = { - width: 800, - height: 600, - titleBarStyle: 'hidden-inset', - minWidth: 640, - minHeight: 395, - backgroundColor: colors.neutral + `) } -const env = Env({ NODE_ENV: 'production' }) -const emitter = delegateEvents() // make sure we don't miss events while booting -let mainWindow - -const shouldQuit = app.makeSingleInstance(() => { - if (mainWindow) { - if (mainWindow.isMinimized()) mainWindow.restore() - mainWindow.focus() - } -}) - -if (shouldQuit) app.quit() - const menu = defaultMenu(app, shell) menu[menu.length - 1].submenu.push({ label: 'Doctor', click: () => { - mainWindow.webContents.openDevTools({ mode: 'detach' }) + win.webContents.openDevTools({ mode: 'detach' }) const out = Writable({ write (chunk, env, done) { - if (mainWindow) mainWindow.webContents.send('log', chunk.toString()) + if (win) win.webContents.send('log', chunk.toString()) done() } }) @@ -48,39 +38,90 @@ menu[menu.length - 1].submenu.push({ } }) -function onReady () { - mainWindow = window.createWindow(windowStyles) - const indexPath = path.join(__dirname, 'index.html') - const log = str => mainWindow.webContents.send('log', str) - - ipcMain.on('quit', () => app.quit()) // TODO: ping backend with error - ipcMain.on('progress', (ev, progress) => mainWindow.setProgressBar(progress)) - emitter.on('open-file', (file) => mainWindow.webContents.send('file', file)) - emitter.on('open-url', (url) => mainWindow.webContents.send('link', url)) +let win +let watchProcess - mainWindow.showUrl(indexPath, () => { - Menu.setApplicationMenu(Menu.buildFromTemplate(menu)) - if (env.NODE_ENV === 'development') { - mainWindow.webContents.openDevTools({ mode: 'detach' }) - } - if (env.NODE_ENV === 'production') { - autoUpdater({ log }) +app.on('ready', () => { + if (isDev) { + BrowserWindow.addDevToolsExtension(path.join(__dirname, 'dev', 'react-dev-tools')) + watchAndReload() + } + win = new BrowserWindow({ + // Extending the size of the browserwindow to make sure that the developer bar is visible. + width: 800 + (isDev ? 50 : 0), + height: 600 + (isDev ? 200 : 0), + titleBarStyle: 'hiddenInset', + minWidth: 640, + minHeight: 395, + backgroundColor: neutral, + webPreferences: { + nodeIntegration: false, + preload: `${__dirname}/preload.js` } }) + win.loadURL(`file://${__dirname}/index.html`) + Menu.setApplicationMenu(Menu.buildFromTemplate(menu)) - mainWindow.on('closed', () => { - mainWindow = null - }) -} + ipcMain.on('progress', (_, progress) => win && win.setProgressBar(progress)) -app.on('ready', () => { - if (env.NODE_ENV !== 'production') { - const browserify = require('./lib/browserify') - const b = browserify({ watch: true }) - b.once('written', onReady) + if (isDev) { + win.webContents.openDevTools() } else { - onReady() + const log = str => win && win.webContents.send('log', str) + autoUpdater({ log }) + } +}) + +app.on('will-finish-launching', () => { + app.on('open-url', (_, url) => win.webContents.send('link', url)) + app.on('open-file', (_, path) => win.webContents.send('file', path)) +}) + +app.on('window-all-closed', () => { + if (watchProcess) { + watchProcess.close() + watchProcess = null } + app.quit() +}) + +const quit = app.makeSingleInstance(() => { + if (!win) return + if (win.isMinimized()) win.restore() + win.focus() }) -app.on('window-all-closed', () => app.quit()) +if (quit) app.quit() + +function watchAndReload () { + let gaze + let first = true + try { + gaze = require('gaze') + } catch (e) { + console.warn('Gaze is not installed, wont be able to reload the app') + // In case dev dependencies are not installed + return + } + gaze([ + `preload.js`, + `static/**/*` + ], { + debounceDelay: 60, + cwd: __dirname + }, (err, process) => { + if (err) { + console.warn('Gaze doesnt run well, wont be able to reload the app') + console.warn(err) + return + } + watchProcess = process + watchProcess.on('all', () => { + if (first) { + first = false + return + } + win && win.reload() + }) + }) +} diff --git a/lib/auto-updater.js b/lib/auto-updater.js index 3093cebb..81c08712 100644 --- a/lib/auto-updater.js +++ b/lib/auto-updater.js @@ -1,35 +1,46 @@ const os = require('os') -const { app, dialog } = require('electron') -const { autoUpdater } = require('electron-auto-updater') +const { app, dialog, autoUpdater } = require('electron') const ms = require('ms') module.exports = ({ log }) => { - const onerror = err => err && log(err.stack) + const onerror = err => err && log(err.stack || err) const platform = `${os.platform()}_${os.arch()}` const version = app.getVersion() - autoUpdater.setFeedURL(`http://dat.land:6000/update/${platform}/${version}`) + try { + autoUpdater.setFeedURL(`http://dat.land:6000/update/${platform}/${version}`) + } catch (e) { + onerror(e) + return + } autoUpdater.on('error', onerror) autoUpdater.on('checking-for-update', () => log('checking for update')) - autoUpdater.on('update-available', () => log('update available, downloading…')) + autoUpdater.on('update-available', () => + log('update available, downloading…') + ) autoUpdater.on('update-not-available', () => log('update not available')) - autoUpdater.on('download-progress', p => log('download progress ' + p.percent)) + autoUpdater.on('download-progress', p => + log('download progress ' + p.percent) + ) autoUpdater.once('update-downloaded', (ev, notes, version) => { log('update downloaded') - dialog.showMessageBox({ - type: 'question', - buttons: ['Install and Relaunch', 'Dismiss'], - defaultId: 0, - title: 'A new version of Dat Desktop is ready to install!', - message: `Dat Desktop ${version} has been downloaded and is ready to use! Would you like to install it and relaunch Dat Desktop now?` - }, res => { - const update = res === 0 - if (!update) return log('dismiss') - log('updating…') - autoUpdater.quitAndInstall() - }) + dialog.showMessageBox( + { + type: 'question', + buttons: ['Install and Relaunch', 'Dismiss'], + defaultId: 0, + title: 'A new version of Dat Desktop is ready to install!', + message: `Dat Desktop ${version} has been downloaded and is ready to use! Would you like to install it and relaunch Dat Desktop now?` + }, + res => { + const update = res === 0 + if (!update) return log('dismiss') + log('updating…') + autoUpdater.quitAndInstall() + } + ) }) setTimeout(() => autoUpdater.checkForUpdates(), ms('10s')) diff --git a/lib/browserify.js b/lib/browserify.js deleted file mode 100644 index d6666407..00000000 --- a/lib/browserify.js +++ /dev/null @@ -1,64 +0,0 @@ -const browserify = require('browserify') -const envify = require('envify/custom') -const watchify = require('watchify') -const fs = require('fs') -const path = require('path') -const concat = require('concat-stream') - -module.exports = opts => { - const browserifyOpts = { - insertGlobals: true, - ignoreMissing: true, - builtins: false, - browserField: false, - insertGlobalVars: { - '__dirname': (file, basedir) => { - return '__dirname + "/" + ' + - JSON.stringify(path.dirname(path.relative(basedir, file))) - }, - '__filename': (file, basedir) => { - return '__dirname + "/" + ' + - JSON.stringify(path.relative(basedir, file)) - }, - 'process': undefined, - 'global': undefined, - 'Buffer': undefined, - 'Buffer.isBuffer': undefined - }, - postFilter: (id, file, pkg) => { - if (!file) return false - file = path.relative(path.join(__dirname, '..'), file) - if (file.indexOf('node_modules') > -1 && (file.indexOf('sheetify') === -1 || file.indexOf('electron') === -1)) { - return false - } - return true - } - } - - if (opts.watch) { - browserifyOpts.cache = {} - browserifyOpts.packageCache = {} - browserifyOpts.plugin = [watchify] - } - - const b = browserify(`${__dirname}/../app.js`, browserifyOpts) - - b.transform(envify({ NODE_ENV: process.env.NODE_ENV })) - b.transform('sheetify/transform', { use: ['sheetify-nested'] }) - - const bundle = () => { - process.stderr.write(`${new Date()} bundling…`) - - b.bundle().pipe(concat(js => { - fs.writeFile(`${__dirname}/../bundle.js`, js, err => { - if (err) throw err - b.emit('written') - process.stderr.write('ok!\n') - }) - })) - } - - b.on('update', bundle) - bundle() - return b -} diff --git a/lib/dat-json.js b/lib/dat-json.js deleted file mode 100644 index ba886a17..00000000 --- a/lib/dat-json.js +++ /dev/null @@ -1,45 +0,0 @@ -var stringKey = require('dat-encoding').toStr -var path = require('path') -var fs = require('fs') - -module.exports = function (dat) { - return { - read: function (cb) { - // dat.json - // reads to dat.meta if exists - // (TODO: move to module & validate dat.json) - fs.readFile(datJsonFile(dat), 'utf8', function (err, body) { - if (err) return cb(err) - if (!body) return cb(null, {}) - var meta - try { - meta = JSON.parse(body) - } catch (e) { - return cb(new Error('Error parsing the dat.json file.')) - } - cb(null, meta) - }) - }, - write: function (defaults, cb) { - if (typeof defaults === 'function') { - cb = defaults - defaults = {} - } - dat.metadata = { - title: defaults.title || path.basename(dat.path), - url: defaults.url, - author: defaults.author || 'Anonymous' - } - - if (dat.key) dat.metadata.url = 'dat://' + stringKey(dat.key) - fs.writeFile(datJsonFile(dat), JSON.stringify(dat.metadata), function (err) { - if (err) return cb(err) - cb(null, dat.metadata) - }) - } - } -} - -function datJsonFile (dat) { - return path.join(dat.path, 'dat.json') -} diff --git a/lib/dat-manager.js b/lib/dat-manager.js deleted file mode 100644 index 5a6ac5ea..00000000 --- a/lib/dat-manager.js +++ /dev/null @@ -1,201 +0,0 @@ -const ipc = require('electron').ipcRenderer -const encoding = require('dat-encoding') -const shell = require('electron').shell -const assert = require('assert') -const mkdirp = require('mkdirp') -const path = require('path') - -var datJson = require('./dat-json') - -module.exports = createManager - -// creates a wrapper for all dats. Handles stats, and updates choo's internal -// state whenever a mutation happens -function createManager ({ multidat, dbPaused }, onupdate) { - assert.ok(multidat, 'lib/dat-manager: multidat should exist') - assert.ok(dbPaused, 'lib/dat-manager: dbPaused should exist') - assert.ok(onupdate, 'lib/dat-manager: onupdate should exist') - - // add stats to all recreated dats - var dats = multidat.list() - var speed = { up: 0, down: 0 } - dats.forEach(initDat) - setImmediate(function () { - onupdate(null, dats, speed) - }) - - return { - create: create, - close: close, - disconnect: multidat.disconnect, - pause: pause, - resume: resume, - togglePause: togglePause - } - - function create (dir, opts, cb) { - if (!cb) { - cb = opts - opts = {} - } - - assert.equal(typeof dir, 'string', 'dat-manager: dir should be a string') - assert.equal(typeof opts, 'object', 'dat-manager: opts should be a object') - assert.equal(typeof cb, 'function', 'dat-manager: cb should be a function') - - mkdirp(dir, function (err) { - if (err) return cb(err) - - opts = Object.assign(opts, { - watch: true, - resume: true, - ignoreHidden: true, - compareFileContent: true - }) - - multidat.create(dir, opts, function (err, dat, duplicate) { - duplicate = duplicate || (err && /temporarily unavailable/.test(err.message)) - if (duplicate) { - err = new Error('Dat already exists') - err.warn = true - } - if (err) return cb(err) - initDat(dat) - update() - cb(null, dat) - }) - }) - } - - function close (key, cb) { - dbPaused.write(key, false, function (err) { - if (err) return cb(err) - multidat.close(key, function (err) { - if (err) return cb(err) - update() - cb() - }) - }) - } - - function pause (dat, cb) { - var key = encoding.toStr(dat.key) - dat.leaveNetwork() - dat.stats.emit('update') - dbPaused.write(key, true, cb) - } - - function resume (dat, cb) { - var key = encoding.toStr(dat.key) - dat.joinNetwork() - dat.stats.emit('update') - dbPaused.write(key, false, cb) - } - - function togglePause (dat, cb) { - var key = encoding.toStr(dat.key) - dbPaused.read(function (err, paused) { - if (err) return cb(err) - if (paused[key]) resume(dat, cb) - else pause(dat, cb) - }) - } - - function update () { - speed = { up: 0, down: 0 } - var dats = multidat.list().slice() - dats.forEach(function (dat) { - if (dat instanceof Error) return - speed.up += dat.stats.network.uploadSpeed - speed.down += dat.stats.network.downloadSpeed - var prevProgress = dat.progress - var stats = dat.stats.get() - dat.progress = (!stats) - ? 0 - : dat.writable - ? 1 - : Math.min(1, stats.downloaded / stats.length) - var unfinishedBefore = prevProgress < 1 && prevProgress > 0 - if (dat.progress === 1 && unfinishedBefore) { - var notification = new window.Notification('Download finished', { - body: dat.metadata.title || dat.key.toString('hex') - }) - notification.onclick = function () { - var pathname = 'file://' + path.resolve(dat.path) - shell.openExternal(pathname, function () {}) - } - } - }) - - var incomplete = dats.filter(function (dat) { - return !(dat instanceof Error) && dat.network && dat.progress < 1 - }) - var progress = incomplete.length - ? incomplete.reduce(function (acc, dat) { - return acc + dat.progress - }, 0) / incomplete.length - : 1 - if (progress === 1) progress = -1 // deactivate - - if (ipc) ipc.send('progress', progress) - onupdate(null, dats, speed) - } - - function initDat (dat) { - if (dat instanceof Error) return - - const key = encoding.toStr(dat.key) - dbPaused.read((err, paused) => { - if (err) throw err - if (dat._closed) return - if (!paused[key]) { - dat.joinNetwork() - dat.network.on('connection', function (connection) { - update() - connection.on('close', update) - }) - update() - } - }) - - dat.metadata = {} - - dat.archive.readFile('/dat.json', function (err, blob) { - if (err && !dat.writable) return - if (dat._closed) return - if (err) { - var json = datJson(dat) - json.write(next) - return - } - try { - next(null, JSON.parse(blob)) - } catch (_) { - return - } - - function next (err, metadata) { - if (err) return - Object.assign(dat.metadata, metadata) - update() - } - }) - - dat.archive.ready(function () { - update() - }) - - dat.archive.on('content', function () { - update() - }) - - if (dat.writable) dat.importFiles() - - dat.trackStats() - - var iv = setInterval(function () { - if (dat._closed) return clearInterval(iv) - update() - }, 1000) - } -} diff --git a/lib/monkeypatch.js b/lib/monkeypatch.js deleted file mode 100644 index 75753d92..00000000 --- a/lib/monkeypatch.js +++ /dev/null @@ -1,9 +0,0 @@ -// required for electron integration tests -if (process.env.RUNNING_IN_SPECTRON) { - const dialog = require('electron').remote.dialog - const path = require('path') - - dialog.showOpenDialog = (opts, cb) => { - return [path.join(__dirname, '..', 'tests', 'fixtures')] - } -} diff --git a/models/dats.js b/models/dats.js deleted file mode 100644 index ca98881e..00000000 --- a/models/dats.js +++ /dev/null @@ -1,169 +0,0 @@ -const remoteProcess = require('electron').remote.process -const dialog = require('electron').remote.dialog -const ipc = require('electron').ipcRenderer -const waterfall = require('run-waterfall') -const app = require('electron').remote.app -const encoding = require('dat-encoding') -const shell = require('electron').shell -const Multidat = require('multidat') -const minimist = require('minimist') -const toilet = require('toiletdb') -const mkdirp = require('mkdirp') -const assert = require('assert') -const Dat = require('dat-node') -const xtend = require('xtend') -const path = require('path') -const os = require('os') - -const Modal = require('../elements/modal') -const createManager = require('../lib/dat-manager') -var datJson = require('../lib/dat-json') - -var argv = minimist(remoteProcess.argv.slice(2)) -var downloadsDir = (argv.data) - ? argv.data - : path.join(app.getPath('downloads'), '/dat') - -module.exports = datsModel - -function datsModel (state, bus) { - state.dats = xtend({ - downloadsDir: downloadsDir, - removalKey: null, - ready: false, - values: [], - speed: { up: 0, down: 0 } - }, state.dats) - - var manager = null - - function onerror (err) { - if (err) bus.emit('error', err) - } - - // boot multidat, create the ~/Downloads/dat directory - var dbLocation = argv.db || path.join(os.homedir(), '.dat-desktop') - var dbMultidriveFile = path.join(dbLocation, 'dats.json') - var dbPausedFile = path.join(dbLocation, 'paused.json') - var dbMultidrive, dbPaused - - var tasks = [ - function (next) { - mkdirp(dbLocation, next) - }, - function (_, next) { - mkdirp(downloadsDir, next) - }, - function (_, next) { - dbMultidrive = toilet(dbMultidriveFile) - dbMultidrive.open(next) - }, - function (next) { - dbPaused = toilet(dbPausedFile) - dbPaused.open(next) - }, - function (next) { - Multidat(dbMultidrive, { dat: Dat }, next) - }, - function (multidat, done) { - manager = createManager({ - multidat, - dbPaused - }, function (err, dats, speed) { - if (err) return bus.emit('error', err) - state.dats.values = dats - state.dats.speed = speed - state.dats.ready = true - bus.emit('render') - bus.emit('dats:loaded') - done() - }) - } - ] - - waterfall(tasks, onerror) - - // open the dat archive in the native filesystem explorer - bus.on('dats:open', function (dat) { - var pathname = 'file://' + path.resolve(dat.path) - shell.openExternal(pathname, onerror) - }) - - // choose a directory and convert it to a dat archive - bus.on('dats:create', function (pathname) { - if (!pathname) { - var files = dialog.showOpenDialog({ - properties: ['openDirectory'] - }) - if (!files || !files.length) return - pathname = files[0] - } - manager.create(pathname, onerror) - }) - - bus.on('dats:clone', function ({ key, location }) { - cloneDat({ key, location }) - }) - - ipc.on('link', function (event, url) { - bus.emit('dats:download', url) - }) - - function cloneDat ({ key: _key, location }) { - try { - var key = encoding.toStr(_key) - } catch (e) { - return onerror(new Error("The value you entered doesn't appear to be a valid Dat link")) - } - - var opts = { key } - var dir = path.join(location, key) - manager.create(dir, opts, onerror) - } - - // copy a dat share link to clipboard and open a modal - bus.on('dats:share', function (dat) { - assert.ok(dat.key, 'dats-model.shareDat: data.key should exist') - const encodedKey = encoding.toStr(dat.key) - const modal = Modal.link()(encodedKey) - document.body.appendChild(modal) - }) - - bus.on('dats:toggle-pause', function (dat) { - manager.togglePause(dat, onerror) - }) - - bus.on('dats:remove', function (dat) { - const modal = Modal.confirm()(function () { - manager.close(dat.key, function (err) { - if (err) return onerror(err) - bus.emit('render') - }) - }) - document.body.appendChild(modal) - }) - - bus.on('dats:update-title', function (data) { - assert.equal(typeof data, 'object', 'dats:update-title: data should be type object') - assert.equal(typeof data.key, 'string', 'dats:update-title: data.key should be type string') - assert.equal(typeof data.title, 'string', 'dats:update-title: data.title should be type string') - - var newTitle = data.title - var key = data.key - var dat = state.dats.values.find(function (dat) { - return dat.key.toString('hex') === key - }) - assert.ok(dat, 'dats:update-title: no dat found for key ' + key) - - var values = Object.assign({}, dat.metadata, { title: newTitle }) - var edit = datJson(dat) - edit.write(values, function (err) { - if (err) return onerror(err) - bus.emit('render') - }) - }) - - // handle IPC events from the server - ipc.on('log', (ev, str) => console.log(str)) - ipc.send('ready') -} diff --git a/models/download.js b/models/download.js deleted file mode 100644 index 41d4cb65..00000000 --- a/models/download.js +++ /dev/null @@ -1,67 +0,0 @@ -var tmpdir = require('os').tmpdir -var Dat = require('dat-node') -var xtend = Object.assign - -module.exports = downloadModel - -function downloadModel (state, bus) { - var update = bus.emit.bind(bus, 'render') - - state.download = xtend({}, state.download, { - show: false, - dat: null - }) - - bus.on('dats:download', function (key) { - state.download.show = true - state.download.key = key - if (state.download.dat) { - state.download.dat.close() - state.download.dat = null - } - update() - - var dir = `${tmpdir()}/${Date.now()}` - Dat(dir, { - key, - sparse: true - }, function (err, dat) { - if (err) { - state.download.err = err - return - } - state.download.dat = dat - - dat.joinNetwork() - dat.network.on('connection', function (connection) { - update() - connection.on('close', update) - }) - - dat.trackStats() - dat.stats.on('update', update) - - dat.archive.readFile('dat.json', function (err, buf) { - if (err) return - try { - dat.metadata = JSON.parse(buf) - } catch (_) { - return - } - update() - }) - - dat.archive.on('content', update) - dat.archive.ready(update) - update() - }) - }) - - bus.on('download:hide', function () { - state.download.dat.close() - state.download.dat = null - state.download.show = false - state.download.key = null - bus.emit('render') - }) -} diff --git a/models/drag-drop.js b/models/drag-drop.js deleted file mode 100644 index 0007deda..00000000 --- a/models/drag-drop.js +++ /dev/null @@ -1,24 +0,0 @@ -const explain = require('explain-error') -const fs = require('fs') - -module.exports = dragDropModel - -function dragDropModel (state, bus) { - window.ondragover = function (e) { - e.preventDefault() - } - window.ondrop = function (e) { - e.preventDefault() - var dirname = e.dataTransfer && - e.dataTransfer.files && - e.dataTransfer.files[0] && - e.dataTransfer.files[0].path - if (!dirname) return - fs.stat(dirname, (err, stat) => { - if (err) return bus.emit('error', explain(err, 'models/window: fs.stat error on dirname')) - if (!stat.isDirectory()) return - bus.emit('dats:create', dirname) - }) - } -} - diff --git a/models/error.js b/models/error.js deleted file mode 100644 index 6efbf4ac..00000000 --- a/models/error.js +++ /dev/null @@ -1,43 +0,0 @@ -const ipc = require('electron').ipcRenderer -const xhr = require('xhr') -const version = require('../package.json').version -const Modal = require('../elements/modal') - -module.exports = errorModel - -function errorModel (state, bus) { - bus.on('error', function (err) { - const message = err.message || err - const modal = Modal.error()(message) - document.body.appendChild(modal) - }) - - process.on('uncaughtException', function (err) { - if (err._thrown) return - - const opts = { - uri: 'https://crash-reporter.dat.land/report', - method: 'PUT', - json: { - version: version, - timestamp: new Date(), - error: JSON.stringify({ - name: err.name, - stack: err.stack, - message: err.message - }) - } - } - xhr(opts, function (err) { - if (err) console.error(err) - }) - - const modal = Modal.crash()(function () { - ipc.sendSync('quit') - }) - document.body.appendChild(modal) - - err._thrown = true - throw err - }) -} diff --git a/models/inspect.js b/models/inspect.js deleted file mode 100644 index e814ab62..00000000 --- a/models/inspect.js +++ /dev/null @@ -1,24 +0,0 @@ -var xtend = Object.assign - -module.exports = inspectModel - -function inspectModel (state, bus) { - var update = bus.emit.bind(bus, 'render') - - state.inspect = xtend({}, state.inspect, { - show: false - }) - - bus.on('dats:inspect', function (dat) { - state.inspect.show = true - state.inspect.dat = dat - update() - dat.stats.on('update', update) - }) - - bus.on('inspect:hide', function () { - state.inspect.dat = null - state.inspect.show = false - bus.emit('render') - }) -} diff --git a/models/intro.js b/models/intro.js deleted file mode 100644 index 9e9ae4f3..00000000 --- a/models/intro.js +++ /dev/null @@ -1,27 +0,0 @@ -var shell = require('electron').shell -var xtend = Object.assign - -module.exports = introModel - -function introModel (state, bus) { - state.intro = xtend({ - show: false - }, state.intro) - - // FIXME: wait for DOMContentLoaded - // requires some sort of global load event first - bus.once('dats:loaded', function () { - if (state.dats.values.length) return - state.intro.show = true - bus.emit('render') - }) - - bus.on('intro:hide', function () { - state.intro.show = false - bus.emit('render') - }) - - bus.on('intro:open-homepage', function () { - shell.openExternal('https://datproject.org/') - }) -} diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 2033d611..00000000 --- a/package-lock.json +++ /dev/null @@ -1,11035 +0,0 @@ -{ - "name": "dat-desktop", - "version": "2.0.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "7zip-bin": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/7zip-bin/-/7zip-bin-2.2.7.tgz", - "integrity": "sha512-+rr4OgeTNrLuJAf09o3USdttEYiXvZshWMkhD6wR9v1ieXH0JM1Q2yT41/cJuJcqiPpSXlM/g3aR+Y5MWQdr0Q==", - "dev": true, - "requires": { - "7zip-bin-linux": "1.3.1", - "7zip-bin-mac": "1.0.1", - "7zip-bin-win": "2.1.1" - } - }, - "7zip-bin-linux": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/7zip-bin-linux/-/7zip-bin-linux-1.3.1.tgz", - "integrity": "sha512-Wv1uEEeHbTiS1+ycpwUxYNuIcyohU6Y6vEqY3NquBkeqy0YhVdsNUGsj0XKSRciHR6LoJSEUuqYUexmws3zH7Q==", - "dev": true, - "optional": true - }, - "7zip-bin-mac": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/7zip-bin-mac/-/7zip-bin-mac-1.0.1.tgz", - "integrity": "sha1-Pmh3i78JJq3GgVlCcHRQXUdVXAI=", - "dev": true, - "optional": true - }, - "7zip-bin-win": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/7zip-bin-win/-/7zip-bin-win-2.1.1.tgz", - "integrity": "sha512-6VGEW7PXGroTsoI2QW3b0ea95HJmbVBHvfANKLLMzSzFA1zKqVX5ybNuhmeGpf6vA0x8FJTt6twpprDANsY5WQ==", - "dev": true, - "optional": true - }, - "@types/node": { - "version": "7.0.48", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.48.tgz", - "integrity": "sha512-LLlXafM3BD52MH056tHxTXO8JFCnpJJQkdzIU3+m8ew+CXJY/5zIXgDNb4TK/QFvlI8QexLS5tL+sE0Qhegr1w==", - "dev": true - }, - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "dev": true, - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "abstract-random-access": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/abstract-random-access/-/abstract-random-access-1.1.2.tgz", - "integrity": "sha1-mo6sj/eYZvP5tLsUQ8p3jxWYrto=", - "requires": { - "inherits": "2.0.3" - } - }, - "acorn": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz", - "integrity": "sha512-jG0u7c4Ly+3QkkW18V+NRDN+4bWHdln30NL1ZL2AvFZZmQe/BfopYCtghCKKVBUSetZ4QKcyA0pY6/4Gw8Pv8w==" - }, - "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", - "dev": true, - "requires": { - "acorn": "3.3.0" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - } - } - }, - "ajv": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.0.tgz", - "integrity": "sha1-6yhAdG6dxIvV4GOjbj/UAMXqtak=", - "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, - "ajv-keywords": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", - "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", - "dev": true - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" - }, - "ansi-align": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-1.1.0.tgz", - "integrity": "sha1-LwwWWIKXOa3V67FeawxuNCPwFro=", - "dev": true, - "requires": { - "string-width": "1.0.2" - } - }, - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "requires": { - "micromatch": "2.3.11", - "normalize-path": "2.1.1" - } - }, - "ap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ap/-/ap-0.1.0.tgz", - "integrity": "sha1-2KPyZhU3k5ihtTymzBpmag+/4VA=" - }, - "append-tree": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/append-tree/-/append-tree-2.4.0.tgz", - "integrity": "sha512-ZexdvqbhzGNEggr7MtPhOr0CxrsiW1bjDzG2t0vPMh2G5mqF6OpNcgr1pMbt27Mi0JV2UdbLMY6DLd34VfNUfQ==", - "requires": { - "array-lru": "1.1.1", - "brfs": "1.4.3", - "codecs": "1.2.0", - "from2": "2.3.0", - "inherits": "2.0.3", - "mutexify": "1.2.0", - "process-nextick-args": "1.0.7", - "protocol-buffers": "3.2.1", - "varint": "5.0.0" - }, - "dependencies": { - "varint": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.0.tgz", - "integrity": "sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8=" - } - } - }, - "arch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.0.tgz", - "integrity": "sha1-NhOqRhSQZLPB8GB5Gb8dR4boKIk=", - "dev": true - }, - "archiver": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/archiver/-/archiver-1.3.0.tgz", - "integrity": "sha1-TyGU1tj5nfP1MeaIHxTxXVX6ryI=", - "dev": true, - "requires": { - "archiver-utils": "1.3.0", - "async": "2.6.0", - "buffer-crc32": "0.2.13", - "glob": "7.1.2", - "lodash": "4.17.4", - "readable-stream": "2.3.3", - "tar-stream": "1.5.5", - "walkdir": "0.0.11", - "zip-stream": "1.2.0" - } - }, - "archiver-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", - "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", - "dev": true, - "requires": { - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "lazystream": "1.0.0", - "lodash": "4.17.4", - "normalize-path": "2.1.1", - "readable-stream": "2.3.3" - } - }, - "argparse": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", - "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", - "requires": { - "sprintf-js": "1.0.3" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "requires": { - "arr-flatten": "1.1.0" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" - }, - "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-lru": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-lru/-/array-lru-1.1.1.tgz", - "integrity": "sha1-DH4bTgIq4Wb/HoRIxZXzGB/NMzc=" - }, - "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", - "dev": true - }, - "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "1.0.3" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true - }, - "asar-electron-builder": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/asar-electron-builder/-/asar-electron-builder-0.13.5.tgz", - "integrity": "sha1-TM1NEf18nTs8/8eC/ePe7Z75GvY=", - "dev": true, - "requires": { - "chromium-pickle-js": "0.2.0", - "commander": "2.12.2", - "cuint": "0.2.2", - "minimatch": "3.0.4", - "mkdirp": "0.5.1" - }, - "dependencies": { - "commander": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", - "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==", - "dev": true - } - } - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" - }, - "asn1.js": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.2.tgz", - "integrity": "sha512-b/OsSjvWEo8Pi8H0zsDd2P6Uqo2TK2pH8gNLSJtNLM2Db0v2QaAZ0pBQJXVjAn4gBuugeVDr7s63ZogpUIwWDg==", - "dev": true, - "requires": { - "bn.js": "4.11.8", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "astw": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", - "integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=", - "dev": true, - "requires": { - "acorn": "4.0.13" - }, - "dependencies": { - "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", - "dev": true - } - } - }, - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", - "dev": true, - "requires": { - "lodash": "4.17.4" - } - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "atob": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/atob/-/atob-1.1.3.tgz", - "integrity": "sha1-lfE2KbEsOlGl0hWr3OKqnzL4B3M=", - "dev": true - }, - "atomic-batcher": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/atomic-batcher/-/atomic-batcher-1.0.2.tgz", - "integrity": "sha1-0WkB0QzOxZUWwZe5zNiTBom4E7Q=" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "2.5.3", - "regenerator-runtime": "0.11.1" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "balloon-css": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/balloon-css/-/balloon-css-0.4.0.tgz", - "integrity": "sha1-DW7fi/WV8Wsh74impnbKpaQYuVU=" - }, - "base-elements": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/base-elements/-/base-elements-2.2.1.tgz", - "integrity": "sha1-aYWoFQenrIQbpV0dhAo99bV4/ZI=", - "requires": { - "balloon-css": "0.4.0", - "bel": "4.6.0", - "nanocomponent": "2.0.3", - "sheetify": "6.2.0", - "xtend": "4.0.1" - } - }, - "base64-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", - "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==", - "dev": true - }, - "base64-to-uint8array": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base64-to-uint8array/-/base64-to-uint8array-1.0.0.tgz", - "integrity": "sha512-drjWQcees55+XQSVHYxiUF05Fj6ko3XJUoxykZEXbm0BMmNz2ieWiZGJ+6TFWnjN2saucG6pI13LS92O4kaiAg==" - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "bel": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/bel/-/bel-4.6.0.tgz", - "integrity": "sha1-Ot4W4jarIgTY0cZurEvVc3k6yZk=", - "requires": { - "global": "4.3.2", - "hyperx": "2.3.2", - "on-load": "3.3.1" - } - }, - "bencode": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/bencode/-/bencode-1.0.0.tgz", - "integrity": "sha512-N+VOSP5MkoX+xgnp6Y056iCY5TmCZg9rgPNPQe0bIiXchxYFP4vs/Tf0dTdQ+qQhP7HM2gvfFq+sUVjQsGy5Zw==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", - "dev": true - }, - "bind-obj-methods": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/bind-obj-methods/-/bind-obj-methods-1.0.0.tgz", - "integrity": "sha1-T1l5ysFXk633DkiBYeRj4gnKUJw=", - "dev": true - }, - "bitfield-rle": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/bitfield-rle/-/bitfield-rle-2.1.0.tgz", - "integrity": "sha1-rinpOCp7pImN6fSLsj/TOMT73Pg=", - "requires": { - "varint": "4.0.1" - }, - "dependencies": { - "varint": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/varint/-/varint-4.0.1.tgz", - "integrity": "sha1-SQgpuULSSEY7KzUJeZXDv3NxmOk=" - } - } - }, - "bittorrent-dht": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/bittorrent-dht/-/bittorrent-dht-7.7.0.tgz", - "integrity": "sha512-SiyZeU36dk/JhekJBPPYk11r9mHxz/+li29vVhJIgKOJFEJz3gPV7hLT3KtFA++pE1kYcUZYTgpihAhzZIbYWg==", - "requires": { - "bencode": "1.0.0", - "buffer-equals": "1.0.4", - "debug": "3.1.0", - "inherits": "2.0.3", - "k-bucket": "3.3.0", - "k-rpc": "4.2.0", - "lru": "3.1.0", - "randombytes": "2.0.5", - "safe-buffer": "5.1.1", - "simple-sha1": "2.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "bl": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", - "integrity": "sha1-ysMo977kVzDUBLaSID/LWQ4XLV4=", - "dev": true, - "requires": { - "readable-stream": "2.3.3" - } - }, - "blake2b": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/blake2b/-/blake2b-2.1.2.tgz", - "integrity": "sha1-aIDt3KNc/t6SxPsnJCITNPmJFFo=", - "requires": { - "blake2b-wasm": "1.1.4", - "nanoassert": "1.1.0" - } - }, - "blake2b-wasm": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/blake2b-wasm/-/blake2b-wasm-1.1.4.tgz", - "integrity": "sha512-j7ZsvtE8wEXFnyt6TJwNUvBKBOHeNJMQSwIAriQkMcQU5/Ce03Y1kS4W7Sjx6WnhOZi8kVwcrVu9DgUcLHz24A==", - "requires": { - "base64-to-uint8array": "1.0.0", - "brfs": "1.4.3", - "nanoassert": "1.1.0" - } - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" - }, - "bluebird-lst-c": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/bluebird-lst-c/-/bluebird-lst-c-1.0.6.tgz", - "integrity": "sha1-gfiB0T+d9wD2fVd/E0gLwy2Eu6k=", - "requires": { - "bluebird": "3.5.1" - } - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, - "body": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/body/-/body-0.1.0.tgz", - "integrity": "sha1-5xT+KM2ISKo0zfLJ8kK74uFdHNg=", - "requires": { - "content-types": "0.1.0" - } - }, - "boom": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", - "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", - "requires": { - "hoek": "4.2.0" - } - }, - "boxen": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-0.6.0.tgz", - "integrity": "sha1-g2TUJIrDT/DvGy8r9JpsYM4NgbY=", - "dev": true, - "requires": { - "ansi-align": "1.1.0", - "camelcase": "2.1.1", - "chalk": "1.1.3", - "cli-boxes": "1.0.0", - "filled-array": "1.1.0", - "object-assign": "4.0.1", - "repeating": "2.0.1", - "string-width": "1.0.2", - "widest-line": "1.0.0" - } - }, - "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" - } - }, - "brfs": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/brfs/-/brfs-1.4.3.tgz", - "integrity": "sha1-22ddb16SPm3wh/ylhZyQkKrtMhY=", - "requires": { - "quote-stream": "1.0.2", - "resolve": "1.5.0", - "static-module": "1.5.0", - "through2": "2.0.3" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browser-pack": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz", - "integrity": "sha1-+GzWzvT1MAyOY+B6TVEvZfv/RTE=", - "dev": true, - "requires": { - "JSONStream": "1.3.1", - "combine-source-map": "0.7.2", - "defined": "1.0.0", - "through2": "2.0.3", - "umd": "3.0.1" - } - }, - "browser-resolve": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", - "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", - "dev": true, - "requires": { - "resolve": "1.1.7" - }, - "dependencies": { - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - } - } - }, - "browserify": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-13.3.0.tgz", - "integrity": "sha1-tanJAgJD8McORnW+yCI7xifkFc4=", - "dev": true, - "requires": { - "JSONStream": "1.3.1", - "assert": "1.4.1", - "browser-pack": "6.0.2", - "browser-resolve": "1.11.2", - "browserify-zlib": "0.1.4", - "buffer": "4.9.1", - "cached-path-relative": "1.0.1", - "concat-stream": "1.5.2", - "console-browserify": "1.1.0", - "constants-browserify": "1.0.0", - "crypto-browserify": "3.12.0", - "defined": "1.0.0", - "deps-sort": "2.0.0", - "domain-browser": "1.1.7", - "duplexer2": "0.1.4", - "events": "1.1.1", - "glob": "7.1.2", - "has": "1.0.1", - "htmlescape": "1.1.1", - "https-browserify": "0.0.1", - "inherits": "2.0.3", - "insert-module-globals": "7.0.1", - "labeled-stream-splicer": "2.0.0", - "module-deps": "4.1.1", - "os-browserify": "0.1.2", - "parents": "1.0.1", - "path-browserify": "0.0.0", - "process": "0.11.10", - "punycode": "1.4.1", - "querystring-es3": "0.2.1", - "read-only-stream": "2.0.0", - "readable-stream": "2.3.3", - "resolve": "1.5.0", - "shasum": "1.0.2", - "shell-quote": "1.6.1", - "stream-browserify": "2.0.1", - "stream-http": "2.7.2", - "string_decoder": "0.10.31", - "subarg": "1.0.0", - "syntax-error": "1.3.0", - "through2": "2.0.3", - "timers-browserify": "1.4.2", - "tty-browserify": "0.0.0", - "url": "0.11.0", - "util": "0.10.3", - "vm-browserify": "0.0.4", - "xtend": "4.0.1" - }, - "dependencies": { - "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.0.6", - "typedarray": "0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "0.10.31", - "util-deprecate": "1.0.2" - } - } - } - }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, - "requires": { - "readable-stream": "2.3.3" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "browserify-aes": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz", - "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==", - "dev": true, - "requires": { - "buffer-xor": "1.0.3", - "cipher-base": "1.0.4", - "create-hash": "1.1.3", - "evp_bytestokey": "1.0.3", - "inherits": "2.0.3", - "safe-buffer": "5.1.1" - } - }, - "browserify-cipher": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", - "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", - "dev": true, - "requires": { - "browserify-aes": "1.1.1", - "browserify-des": "1.0.0", - "evp_bytestokey": "1.0.3" - } - }, - "browserify-des": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", - "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", - "dev": true, - "requires": { - "cipher-base": "1.0.4", - "des.js": "1.0.0", - "inherits": "2.0.3" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "4.11.8", - "randombytes": "2.0.5" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "elliptic": "6.4.0", - "inherits": "2.0.3", - "parse-asn1": "5.1.0" - } - }, - "browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", - "dev": true, - "requires": { - "pako": "0.2.9" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "1.2.1", - "ieee754": "1.1.8", - "isarray": "1.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - } - } - }, - "buffer-alloc-unsafe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.0.0.tgz", - "integrity": "sha1-R0qojzTnvHX6MR0uZFdAnFhGw/4=" - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true - }, - "buffer-equal": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", - "integrity": "sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs=" - }, - "buffer-equals": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/buffer-equals/-/buffer-equals-1.0.4.tgz", - "integrity": "sha1-A1O1T9B/2VZBcGca5vZrnPENJ/U=" - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "builtins": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", - "dev": true - }, - "bulk-write-stream": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/bulk-write-stream/-/bulk-write-stream-1.1.3.tgz", - "integrity": "sha1-0pyjhfvVPzV67lvT0wKHMrYq4nU=", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "cached-path-relative": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", - "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=", - "dev": true - }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "requires": { - "callsites": "0.2.0" - } - }, - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" - } - }, - "capture-stack-trace": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", - "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "1.3.2", - "async-each": "1.0.1", - "fsevents": "1.1.3", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" - } - }, - "choo": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/choo/-/choo-6.6.0.tgz", - "integrity": "sha512-4WtzJhVVQFQm5SFc0Wfkbe0jOJK/hrUSG6Rxt68JE5Ctdg+fBucCM/PcM9Pg+1d8frOAn2qLX6z7SL6BeAiHJg==", - "requires": { - "bel": "5.1.5", - "document-ready": "2.0.1", - "nanobus": "4.3.1", - "nanohref": "3.0.1", - "nanolocation": "1.0.0", - "nanomorph": "5.1.3", - "nanoquery": "1.2.0", - "nanoraf": "3.0.1", - "nanorouter": "2.1.0", - "nanotiming": "6.1.5", - "scroll-to-anchor": "1.1.0", - "xtend": "4.0.1" - }, - "dependencies": { - "bel": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/bel/-/bel-5.1.5.tgz", - "integrity": "sha512-t9R67SKL3lRygFqhrsHfw5w3lAi541pyQD+xdxpClTpxKN+ooW8WcqNXTysoIYQda0qu7aqJVZruwHm4WaQ8mw==", - "requires": { - "hyperx": "2.3.2", - "is-electron": "2.1.0", - "pelo": "0.0.4" - } - } - } - }, - "choo-expose": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/choo-expose/-/choo-expose-1.3.1.tgz", - "integrity": "sha1-TUBQ/Y3tUllKh7ayFEONYrN+H2Q=", - "requires": { - "on-idle": "3.1.4", - "plucker": "0.0.0", - "remove-array-items": "1.0.0", - "state-copy": "1.0.2" - } - }, - "choo-log": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/choo-log/-/choo-log-6.1.2.tgz", - "integrity": "sha1-6rBVOUyzHKjCxr4NfJVfvRgx0GQ=", - "requires": { - "nanologger": "1.3.1" - } - }, - "choo-persist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/choo-persist/-/choo-persist-3.0.2.tgz", - "integrity": "sha1-53zj+9IscdFSlDRGA1Yx/ElddxE=", - "requires": { - "xtend": "4.0.1" - } - }, - "chromium-pickle-js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz", - "integrity": "sha1-BKEGZywYsIWrd02YPfo+oTjyIgU=", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.1" - } - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", - "dev": true - }, - "clean-yaml-object": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", - "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=", - "dev": true - }, - "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", - "dev": true - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true, - "requires": { - "restore-cursor": "1.0.1" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "clipboardy": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-1.2.2.tgz", - "integrity": "sha512-16KrBOV7bHmHdxcQiCvfUFYVFyEah4FI8vYT1Fr7CGSA4G+xBWMEfUEQJS1hxeHGtI9ju1Bzs9uXSbj5HZKArw==", - "dev": true, - "requires": { - "arch": "2.1.0", - "execa": "0.8.0" - } - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - } - }, - "clone": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", - "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=", - "dev": true - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "codecs": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/codecs/-/codecs-1.2.0.tgz", - "integrity": "sha1-UUhUnj0VbF+gU9fLtBlxWgz0PRY=" - }, - "color-convert": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz", - "integrity": "sha1-vbbGnOZg+t/+CwAHzER+G59ygr0=", - "dev": true - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, - "combine-errors": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/combine-errors/-/combine-errors-3.0.1.tgz", - "integrity": "sha1-eaBMItuKbFhGqVHcQeiDj5Lhwek=", - "requires": { - "custom-error-instance": "2.1.1" - } - }, - "combine-source-map": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz", - "integrity": "sha1-CHAxKFazB6h8xKxIbzqaYq7MwJ4=", - "dev": true, - "requires": { - "convert-source-map": "1.1.3", - "inline-source-map": "0.6.2", - "lodash.memoize": "3.0.4", - "source-map": "0.5.7" - } - }, - "combined-stream": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", - "requires": { - "delayed-stream": "1.0.0" - } - }, - "commander": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.5.0.tgz", - "integrity": "sha1-13e2pNhH1CPl1HXahkKUrB/1qp0=" - }, - "compare-version": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/compare-version/-/compare-version-0.1.2.tgz", - "integrity": "sha1-AWLsLZNR9d3VmpICy6k1NmpyUIA=", - "dev": true - }, - "component-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-type/-/component-type-1.2.1.tgz", - "integrity": "sha1-ikeQFwAjjk/DIml3EjAibyS0Fak=" - }, - "compress-commons": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz", - "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=", - "dev": true, - "requires": { - "buffer-crc32": "0.2.13", - "crc32-stream": "2.0.0", - "normalize-path": "2.1.1", - "readable-stream": "2.3.3" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "typedarray": "0.0.6" - } - }, - "configstore": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-2.1.0.tgz", - "integrity": "sha1-c3o6cDbpiGECqmCZ5HuzOrGroaE=", - "dev": true, - "requires": { - "dot-prop": "3.0.0", - "graceful-fs": "4.1.11", - "mkdirp": "0.5.1", - "object-assign": "4.0.1", - "os-tmpdir": "1.0.2", - "osenv": "0.1.4", - "uuid": "2.0.3", - "write-file-atomic": "1.3.4", - "xdg-basedir": "2.0.0" - }, - "dependencies": { - "uuid": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", - "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", - "dev": true - } - } - }, - "connections": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/connections/-/connections-1.4.2.tgz", - "integrity": "sha1-eJBIK/XHGvbFyhkr4xNq7XRCiq0=" - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "0.1.4" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "content-types": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/content-types/-/content-types-0.1.0.tgz", - "integrity": "sha1-DnkLOr/vkPbst3roWF25CZyvdXg=", - "requires": { - "iterators": "0.1.0" - } - }, - "convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", - "dev": true - }, - "copy-text-to-clipboard": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-1.0.3.tgz", - "integrity": "sha1-aWYs0wVJPJJcAqOEy8rnbWQtd/M=" - }, - "core-js": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", - "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "corsify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/corsify/-/corsify-2.1.0.tgz", - "integrity": "sha1-EaRbxHqzDFTQC7hp6hgC+82aCdA=", - "requires": { - "http-methods": "0.1.0" - } - }, - "coveralls": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-2.13.3.tgz", - "integrity": "sha512-iiAmn+l1XqRwNLXhW8Rs5qHZRFMYp9ZIPjEOVRpC/c4so6Y/f4/lFi0FfR5B9cCqgyhkJ5cZmbvcVRfP8MHchw==", - "dev": true, - "requires": { - "js-yaml": "3.6.1", - "lcov-parse": "0.0.10", - "log-driver": "1.2.5", - "minimist": "1.2.0", - "request": "2.79.0" - }, - "dependencies": { - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", - "dev": true - }, - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", - "dev": true - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "requires": { - "boom": "2.10.1" - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" - } - }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "commander": "2.13.0", - "is-my-json-valid": "2.16.1", - "pinkie-promise": "2.0.1" - } - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" - } - }, - "js-yaml": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz", - "integrity": "sha1-bl/mfYsgXOTSL60Ft3geja3MSzA=", - "dev": true, - "requires": { - "argparse": "1.0.9", - "esprima": "2.7.3" - } - }, - "qs": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", - "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", - "dev": true - }, - "request": { - "version": "2.79.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", - "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", - "dev": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.11.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "2.0.6", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "qs": "6.3.2", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.4.3", - "uuid": "3.1.0" - } - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", - "dev": true - } - } - }, - "crc": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/crc/-/crc-3.5.0.tgz", - "integrity": "sha1-mLi6fUiWZbo5efWbITgTdBAaGWQ=", - "dev": true - }, - "crc32-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", - "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", - "dev": true, - "requires": { - "crc": "3.5.0", - "readable-stream": "2.3.3" - } - }, - "create-ecdh": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", - "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", - "dev": true, - "requires": { - "bn.js": "4.11.8", - "elliptic": "6.4.0" - } - }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "dev": true, - "requires": { - "capture-stack-trace": "1.0.0" - } - }, - "create-hash": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", - "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", - "dev": true, - "requires": { - "cipher-base": "1.0.4", - "inherits": "2.0.3", - "ripemd160": "2.0.1", - "sha.js": "2.4.9" - } - }, - "create-hmac": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", - "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", - "dev": true, - "requires": { - "cipher-base": "1.0.4", - "create-hash": "1.1.3", - "inherits": "2.0.3", - "ripemd160": "2.0.1", - "safe-buffer": "5.1.1", - "sha.js": "2.4.9" - } - }, - "cross-env": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.1.1.tgz", - "integrity": "sha512-Wtvr+z0Z06KO1JxjfRRsPC+df7biIOiuV4iZ73cThjFGkH+ULBZq1MkBdywEcJC4cTDbO6c8IjgRjfswx3YTBA==", - "dev": true, - "requires": { - "cross-spawn": "5.1.0", - "is-windows": "1.0.1" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" - } - }, - "cryptiles": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", - "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", - "requires": { - "boom": "5.2.0" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", - "requires": { - "hoek": "4.2.0" - } - } - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "1.0.0", - "browserify-sign": "4.0.4", - "create-ecdh": "4.0.0", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "diffie-hellman": "5.0.2", - "inherits": "2.0.3", - "pbkdf2": "3.0.14", - "public-encrypt": "4.0.0", - "randombytes": "2.0.5", - "randomfill": "1.0.3" - } - }, - "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", - "dev": true - }, - "css": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/css/-/css-2.2.1.tgz", - "integrity": "sha1-c6TIHehdtmTU7mdPfUcIXjstVdw=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "source-map": "0.1.43", - "source-map-resolve": "0.3.1", - "urix": "0.1.0" - }, - "dependencies": { - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "requires": { - "amdefine": "1.0.1" - } - } - } - }, - "css-parse": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-2.0.0.tgz", - "integrity": "sha1-pGjuZnwW2BzPBcWMONKpfHgNv9Q=", - "dev": true, - "requires": { - "css": "2.2.1" - } - }, - "css-value": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/css-value/-/css-value-0.0.1.tgz", - "integrity": "sha1-Xv1sLupeof1rasV+wEJ7GEUkJOo=", - "dev": true - }, - "cuint": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", - "integrity": "sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "1.0.2" - } - }, - "custom-error-instance": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/custom-error-instance/-/custom-error-instance-2.1.1.tgz", - "integrity": "sha1-PPY5FIemYppiR+sMoM4ACBt+Nho=" - }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "dev": true, - "requires": { - "es5-ext": "0.10.37" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "1.0.0" - } - }, - "dat-colors": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/dat-colors/-/dat-colors-3.5.1.tgz", - "integrity": "sha1-VRS8FOA6zNCzkNUe9MLpc+2RD6I=" - }, - "dat-dns": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dat-dns/-/dat-dns-1.3.2.tgz", - "integrity": "sha512-Tbk9UacyHcnxWXOeU3UHYkMfnH5VyxcuKXLFjZcUddRqOO4aTA5MV4l3mLmYNnb8TXvsG7ED+7rhfVtFiTXlPQ==", - "requires": { - "call-me-maybe": "1.0.1", - "concat-stream": "1.6.0", - "debug": "2.6.9" - } - }, - "dat-doctor": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dat-doctor/-/dat-doctor-1.3.1.tgz", - "integrity": "sha512-cykONhsZMVOB1/B/WcGCAiibNa1NyzgZYhgKMIKzSUpdCmXrM0JWlro+pXQMunS3zQbKVEu+dquRtK+YsXXHUg==", - "requires": { - "datland-swarm-defaults": "1.0.2", - "debug": "2.6.9", - "discovery-swarm": "4.4.2", - "dns-discovery": "5.6.1", - "minimist": "1.2.0", - "pump": "1.0.3", - "thunky": "1.0.2" - } - }, - "dat-encoding": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/dat-encoding/-/dat-encoding-4.0.2.tgz", - "integrity": "sha1-sBBo/g0IDz0+SYWgxK0ht8FGdfY=", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "dat-icons": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/dat-icons/-/dat-icons-2.5.1.tgz", - "integrity": "sha1-/pDYWYF5lV2Vbmya9J2REqdY5ko=", - "requires": { - "bel": "4.6.0", - "brfs": "1.4.3" - } - }, - "dat-ignore": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dat-ignore/-/dat-ignore-2.0.0.tgz", - "integrity": "sha512-aPYJYMymfBrkF62wFBVej8p4mbPOB0Z+A5jwHarTMNeq7wYHtSKHoXrmOeUzWdSTtK09+JMuu4+FHfSzY1d0dA==", - "requires": { - "anymatch": "1.3.2", - "xtend": "4.0.1" - } - }, - "dat-link-resolve": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/dat-link-resolve/-/dat-link-resolve-1.1.1.tgz", - "integrity": "sha512-xwzZ9/8j+Pn8td4NKYRTafchQxJWKvr/0BLnEmCI8DwyqhCsFtwzhHBLHKXWK761+nm2hElu+xYfkA8ym9c81A==", - "requires": { - "dat-dns": "1.3.2", - "dat-encoding": "4.0.2", - "debug": "2.6.9", - "nets": "3.2.0" - } - }, - "dat-node": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/dat-node/-/dat-node-3.5.5.tgz", - "integrity": "sha512-CBWdoUodDmlbwIJHtN/4aAqZWIPSEnRk3SEBPK5p8et4VJUwnsHgqEX0QiU3gVy62uB57l3SocIlk558CHHKUA==", - "requires": { - "dat-ignore": "2.0.0", - "dat-link-resolve": "1.1.1", - "dat-storage": "1.0.3", - "dat-swarm-defaults": "1.0.0", - "debug": "3.1.0", - "discovery-swarm": "4.4.2", - "hyperdrive": "9.12.0", - "hyperdrive-http": "4.2.2", - "hyperdrive-network-speed": "2.0.1", - "mirror-folder": "2.1.1", - "multicb": "1.2.2", - "random-access-file": "1.8.1", - "random-access-memory": "2.4.0", - "sparse-bitfield": "3.0.3", - "speedometer": "1.0.0", - "stream-each": "1.2.2", - "untildify": "3.0.2", - "xtend": "4.0.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "dat-secret-storage": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/dat-secret-storage/-/dat-secret-storage-4.0.0.tgz", - "integrity": "sha1-AbIZpbwWGe/A9YEio8bOux64tAo=", - "requires": { - "os-homedir": "1.0.2", - "random-access-file": "1.8.1" - } - }, - "dat-storage": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dat-storage/-/dat-storage-1.0.3.tgz", - "integrity": "sha512-6qTeWDLCbn4DG5NmTSnCAikivjXXn5ukMLafEbqBn/15zcqdpNgsOx/QnCqXdDoAeP1WWXjJp3GBDtls/et3bA==", - "requires": { - "append-tree": "2.4.0", - "dat-secret-storage": "4.0.0", - "hyperdrive": "9.12.0", - "multi-random-access": "2.1.1", - "random-access-file": "1.8.1" - } - }, - "dat-swarm-defaults": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dat-swarm-defaults/-/dat-swarm-defaults-1.0.0.tgz", - "integrity": "sha1-un1YwwnPYMOSSvrYabdRkrYf41Q=", - "requires": { - "xtend": "4.0.1" - } - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "datland-swarm-defaults": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/datland-swarm-defaults/-/datland-swarm-defaults-1.0.2.tgz", - "integrity": "sha1-J3uJWjnxqn+WpJWgL7NmKl7Z8uA=", - "requires": { - "xtend": "4.0.1" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "debug-log": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", - "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", - "dev": true - }, - "debuglog": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", - "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=", - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "deepmerge": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.0.1.tgz", - "integrity": "sha512-VIPwiMJqJ13ZQfaCsIFnp5Me9tnjURiaIFxfz7EH0Ci0dTSQpZtSLrqOicXqEd/z2r+z+Klk9GzmnRsgpgbOsQ==", - "dev": true - }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "dev": true, - "requires": { - "clone": "1.0.3" - } - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, - "deglob": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/deglob/-/deglob-1.1.2.tgz", - "integrity": "sha1-dtV3wl/j9zKUEqK1nq3qV6xQDj8=", - "dev": true, - "requires": { - "find-root": "1.1.0", - "glob": "7.1.2", - "ignore": "3.3.7", - "pkg-config": "1.1.1", - "run-parallel": "1.1.6", - "uniq": "1.0.1", - "xtend": "4.0.1" - } - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "dev": true, - "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "object-assign": "4.0.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "delegate-electron-events": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/delegate-electron-events/-/delegate-electron-events-1.0.1.tgz", - "integrity": "sha1-2ZHCSy4tSxow4+Z6hC4dIA4nAmU=" - }, - "dependency-check": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/dependency-check/-/dependency-check-2.9.1.tgz", - "integrity": "sha1-Iovbp2jjv4GaKmjDbz9qdzxCbr8=", - "dev": true, - "requires": { - "async": "2.6.0", - "builtins": "1.0.3", - "debug": "2.6.9", - "detective": "4.6.0", - "is-relative": "0.2.1", - "minimist": "1.2.0", - "read-package-json": "2.0.12", - "resolve": "1.5.0" - } - }, - "deps-sort": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", - "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", - "dev": true, - "requires": { - "JSONStream": "1.3.1", - "shasum": "1.0.2", - "subarg": "1.0.0", - "through2": "2.0.3" - } - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" - } - }, - "detective": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.6.0.tgz", - "integrity": "sha512-bvuiWqtm2RYtEnfjAuRw9XTJhUbfbOfsmtIRXQcNgMyUplxJP611EzoVxObkSvaSnfBUEjoKVzaUzdtIRMcCXg==", - "dev": true, - "requires": { - "acorn": "5.2.1", - "defined": "1.0.0" - } - }, - "dev-null": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dev-null/-/dev-null-0.1.1.tgz", - "integrity": "sha1-WiBc48Ky73e2I41roXnrdMag6Bg=", - "dev": true - }, - "dezalgo": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", - "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", - "dev": true, - "requires": { - "asap": "2.0.6", - "wrappy": "1.0.2" - } - }, - "diff": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", - "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", - "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", - "dev": true, - "requires": { - "bn.js": "4.11.8", - "miller-rabin": "4.0.1", - "randombytes": "2.0.5" - } - }, - "directory-index-html": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/directory-index-html/-/directory-index-html-2.1.0.tgz", - "integrity": "sha1-TVr8UYftumfsarDlX2QioOLLczg=" - }, - "discovery-channel": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/discovery-channel/-/discovery-channel-5.4.6.tgz", - "integrity": "sha1-Gw8l5YEkUH6GG23D7LdENmu1PK0=", - "requires": { - "bittorrent-dht": "7.7.0", - "debug": "2.6.9", - "dns-discovery": "5.6.1", - "pretty-hash": "1.0.1", - "thunky": "0.1.0" - }, - "dependencies": { - "thunky": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-0.1.0.tgz", - "integrity": "sha1-vzAUaCTituZ7Dy16Ssi+smkIaE4=" - } - } - }, - "discovery-swarm": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/discovery-swarm/-/discovery-swarm-4.4.2.tgz", - "integrity": "sha1-XTFgpGAZ5Q6HQZV2XffWAe5VqBM=", - "requires": { - "buffer-equals": "1.0.4", - "connections": "1.4.2", - "debug": "2.6.9", - "discovery-channel": "5.4.6", - "length-prefixed-message": "3.0.3", - "pump": "1.0.3", - "to-buffer": "1.1.0", - "utp-native": "1.6.2" - } - }, - "dns-discovery": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/dns-discovery/-/dns-discovery-5.6.1.tgz", - "integrity": "sha512-r27fv3lDuZXCqmb5b04tV2aDxVbwVJaSyPzwPlOYCUbk9F7JvsY+n7EBfY2Z952bGx5TZt3SLQ+ELFjfqyLVoA==", - "requires": { - "debug": "2.6.9", - "dns-socket": "1.6.2", - "dns-txt": "2.0.2", - "lru": "2.0.1", - "minimist": "1.2.0", - "multicast-dns": "6.2.1", - "network-address": "1.1.2", - "unordered-set": "1.1.0" - }, - "dependencies": { - "lru": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/lru/-/lru-2.0.1.tgz", - "integrity": "sha1-+XmHHhYuP1yiVL5GhExT1MU2RUQ=", - "requires": { - "inherits": "2.0.3" - } - } - } - }, - "dns-packet": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.2.2.tgz", - "integrity": "sha512-kN+DjfGF7dJGUL7nWRktL9Z18t1rWP3aQlyZdY8XlpvU3Nc6GeFTQApftcjtWKxAZfiggZSGrCEoszNgvnpwDg==", - "requires": { - "ip": "1.1.5", - "safe-buffer": "5.1.1" - } - }, - "dns-socket": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/dns-socket/-/dns-socket-1.6.2.tgz", - "integrity": "sha512-Ztbaf5fToBfm/4+sVEJi7mT2mJOLYYpI+TpgOhxwp5l28UwunTpHMccVhTe9L0F6pQ2cUF0ja9ukuTCtzYq2Ig==", - "requires": { - "dns-packet": "1.2.2" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "requires": { - "buffer-indexof": "1.1.1" - } - }, - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", - "dev": true, - "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - } - } - }, - "document-ready": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/document-ready/-/document-ready-2.0.1.tgz", - "integrity": "sha1-PjvzHTI1uU4jLnssX6GmNOhzuuQ=" - }, - "dom-walk": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", - "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" - }, - "domain-browser": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", - "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", - "dev": true - }, - "dot-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", - "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", - "dev": true, - "requires": { - "is-obj": "1.0.1" - } - }, - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", - "dev": true - }, - "duplexer2": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", - "requires": { - "readable-stream": "1.1.14" - }, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, - "duplexify": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", - "integrity": "sha512-j5goxHTwVED1Fpe5hh3q9R93Kip0Bg2KVAt4f8CEYM3UEwYcPSvWbXaUQOzdX/HtiNomipv+gU7ASQPDbV7pGQ==", - "requires": { - "end-of-stream": "1.4.0", - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "stream-shift": "1.0.0" - } - }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "ejs": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.7.tgz", - "integrity": "sha1-zIcsFoiArjxxiXYv1f/ACJbJUYo=", - "dev": true - }, - "electron": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/electron/-/electron-1.7.11.tgz", - "integrity": "sha1-mTtqp54OeafPzDafTIE/vZoLCNk=", - "dev": true, - "requires": { - "@types/node": "7.0.48", - "electron-download": "3.3.0", - "extract-zip": "1.6.6" - } - }, - "electron-auto-updater": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/electron-auto-updater/-/electron-auto-updater-0.9.2.tgz", - "integrity": "sha1-KZofKZevUOze43osjdFIUm2JFyg=", - "requires": { - "bluebird-lst-c": "1.0.6", - "debug": "2.6.9", - "electron-builder-http": "10.17.3", - "fs-extra-p": "3.1.0", - "js-yaml": "3.10.0", - "semver": "5.4.1", - "source-map-support": "0.4.18" - } - }, - "electron-builder": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-8.7.0.tgz", - "integrity": "sha1-TUcGLKRcOqpRyOTMUReBNZtzdVg=", - "dev": true, - "requires": { - "7zip-bin": "2.2.7", - "ansi-escapes": "1.4.0", - "archiver": "1.3.0", - "archiver-utils": "1.3.0", - "asar-electron-builder": "0.13.5", - "bluebird-lst-c": "1.0.6", - "chalk": "1.1.3", - "chromium-pickle-js": "0.2.0", - "cli-cursor": "1.0.2", - "cuint": "0.2.2", - "debug": "2.6.9", - "electron-download-tf": "3.1.0", - "electron-macos-sign": "1.0.1", - "fs-extra-p": "2.0.7", - "hosted-git-info": "2.5.0", - "ini": "1.3.5", - "isbinaryfile": "3.0.2", - "js-yaml": "3.10.0", - "lodash.template": "4.4.0", - "mime": "1.6.0", - "minimatch": "3.0.4", - "node-emoji": "1.8.1", - "normalize-package-data": "2.4.0", - "parse-color": "1.0.0", - "plist": "2.1.0", - "pretty-ms": "2.1.0", - "progress": "1.1.8", - "progress-stream": "1.2.0", - "read-installed": "4.0.3", - "sanitize-filename": "1.6.1", - "semver": "5.4.1", - "source-map-support": "0.4.18", - "tunnel-agent": "0.4.3", - "update-notifier": "1.0.3", - "uuid-1345": "0.99.6", - "yargs": "6.6.0" - }, - "dependencies": { - "electron-download-tf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/electron-download-tf/-/electron-download-tf-3.1.0.tgz", - "integrity": "sha1-xtYsDgpMY7ZylfV7a2ZRTBO47Y0=", - "dev": true, - "requires": { - "debug": "2.6.9", - "fs-extra": "1.0.0", - "minimist": "1.2.0", - "nugget": "2.0.1", - "path-exists": "3.0.0", - "rc": "1.2.2", - "semver": "5.4.1", - "sumchecker": "1.3.1" - } - }, - "fs-extra": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz", - "integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "2.4.0", - "klaw": "1.3.1" - } - }, - "fs-extra-p": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fs-extra-p/-/fs-extra-p-2.0.7.tgz", - "integrity": "sha1-UlqG7hJQUQIQ3v4eo59HPCPs+pY=", - "dev": true, - "requires": { - "bluebird-lst-c": "1.0.6", - "fs-extra-tf": "1.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", - "dev": true - } - } - }, - "electron-builder-http": { - "version": "10.17.3", - "resolved": "https://registry.npmjs.org/electron-builder-http/-/electron-builder-http-10.17.3.tgz", - "integrity": "sha1-Aa44r6sNY6kY23Ewv4Y1Eem6YJ4=", - "requires": { - "fs-extra-p": "3.1.0" - } - }, - "electron-chromedriver": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/electron-chromedriver/-/electron-chromedriver-1.8.0.tgz", - "integrity": "sha512-m1f3nle5MaGp94bcDTtMZZMMOgPO54+TXoPBlTbBSUjfINR5SJ46yQXLfuE79/qsFfJKslZB1UzWURDDFIRmpQ==", - "dev": true, - "requires": { - "electron-download": "4.1.0", - "extract-zip": "1.6.6" - }, - "dependencies": { - "electron-download": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-4.1.0.tgz", - "integrity": "sha1-v5MsdG8vh//MCdHdRy8v9rkYeEU=", - "dev": true, - "requires": { - "debug": "2.6.9", - "env-paths": "1.0.0", - "fs-extra": "2.1.2", - "minimist": "1.2.0", - "nugget": "2.0.1", - "path-exists": "3.0.0", - "rc": "1.2.2", - "semver": "5.4.1", - "sumchecker": "2.0.2" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "sumchecker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-2.0.2.tgz", - "integrity": "sha1-D0LBDl0F2l1C7qPlbDOZo31sWz4=", - "dev": true, - "requires": { - "debug": "2.6.9" - } - } - } - }, - "electron-default-menu": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/electron-default-menu/-/electron-default-menu-1.0.1.tgz", - "integrity": "sha1-MXPFAY61B0BP7GO987eMOO7bqAg=" - }, - "electron-download": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-3.3.0.tgz", - "integrity": "sha1-LP1U1pZsAZxNSa1l++Zcyc3vaMg=", - "dev": true, - "requires": { - "debug": "2.6.9", - "fs-extra": "0.30.0", - "home-path": "1.0.5", - "minimist": "1.2.0", - "nugget": "2.0.1", - "path-exists": "2.1.0", - "rc": "1.2.2", - "semver": "5.4.1", - "sumchecker": "1.3.1" - }, - "dependencies": { - "fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "2.4.0", - "klaw": "1.3.1", - "path-is-absolute": "1.0.1", - "rimraf": "2.6.2" - } - } - } - }, - "electron-macos-sign": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/electron-macos-sign/-/electron-macos-sign-1.0.1.tgz", - "integrity": "sha1-aJ3F3V3/cTWFqowLxjGGPyh7hvQ=", - "dev": true, - "requires": { - "bluebird": "3.5.1", - "compare-version": "0.1.2", - "debug": "2.6.9", - "isbinaryfile": "3.0.2", - "minimist": "1.2.0", - "plist": "2.1.0", - "tempfile": "1.1.1" - } - }, - "electron-window": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/electron-window/-/electron-window-0.8.1.tgz", - "integrity": "sha1-FsoYfrSHCwZ5J0/IKZxZYOarLF4=", - "requires": { - "is-electron-renderer": "2.0.1" - } - }, - "elliptic": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", - "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", - "dev": true, - "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0", - "hash.js": "1.1.3", - "hmac-drbg": "1.0.1", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0", - "minimalistic-crypto-utils": "1.0.1" - } - }, - "end-of-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", - "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", - "requires": { - "once": "1.4.0" - }, - "dependencies": { - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1.0.2" - } - } - } - }, - "env-paths": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz", - "integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=", - "dev": true - }, - "envify": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/envify/-/envify-4.1.0.tgz", - "integrity": "sha512-IKRVVoAYr4pIx4yIWNsz9mOsboxlNXiu7TNBnem/K/uTHdkyzXWDzHCK7UTolqBbgaBz0tQHsD3YNls0uIIjiw==", - "dev": true, - "requires": { - "esprima": "4.0.0", - "through": "2.3.8" - }, - "dependencies": { - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", - "dev": true - } - } - }, - "envobj": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/envobj/-/envobj-1.0.4.tgz", - "integrity": "sha512-Be10O8laMT2Rj3YnHVtX8ztIFdxYoI7msaV/rkPl96XRsJqd+OTTEh39GpH3bmDSXs5kWmH4fdK+xjjKiZSQJQ==", - "requires": { - "combine-errors": "3.0.1", - "component-type": "1.2.1", - "envvar": "1.1.0", - "localenv": "0.2.2", - "object-assign": "4.0.1" - } - }, - "envvar": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/envvar/-/envvar-1.1.0.tgz", - "integrity": "sha1-wloIZu2uhwRtl2yNsDdIlVFjm5Q=" - }, - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", - "dev": true, - "requires": { - "is-arrayish": "0.2.1" - } - }, - "es5-ext": { - "version": "0.10.37", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.37.tgz", - "integrity": "sha1-DudB0Ui4AGm6J9AgOTdWryV978M=", - "dev": true, - "requires": { - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37", - "es6-symbol": "3.1.1" - } - }, - "es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "dev": true, - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37", - "es6-iterator": "2.0.3", - "es6-set": "0.1.5", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" - } - }, - "es6-promise": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz", - "integrity": "sha512-OaU1hHjgJf+b0NzsxCg7NdIYERD6Hy/PEmFLTjw+b65scuisG3Kt4QoTvJ66BBkPZ581gr0kpoVzKnxniM8nng==", - "dev": true - }, - "es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "dev": true, - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" - } - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true, - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37" - } - }, - "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", - "dev": true, - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "escodegen": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.0.tgz", - "integrity": "sha512-v0MYvNQ32bzwoG2OSFzWAkuahDQHK92JBN0pTAALJ4RIxEZe766QJPDR8Hqy7XNUy5K3fnVL76OqYAdc4TZEIw==", - "requires": { - "esprima": "3.1.3", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.5.7" - } - }, - "escope": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", - "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", - "dev": true, - "requires": { - "es6-map": "0.1.5", - "es6-weak-map": "2.0.2", - "esrecurse": "4.2.0", - "estraverse": "4.2.0" - } - }, - "eslint": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-2.10.2.tgz", - "integrity": "sha1-sjCUgv7wQ9MgM2WjIShebM4Bw9c=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "concat-stream": "1.6.0", - "debug": "2.6.9", - "doctrine": "1.5.0", - "es6-map": "0.1.5", - "escope": "3.6.0", - "espree": "3.1.4", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "file-entry-cache": "1.3.1", - "glob": "7.1.2", - "globals": "9.18.0", - "ignore": "3.3.7", - "imurmurhash": "0.1.4", - "inquirer": "0.12.0", - "is-my-json-valid": "2.16.1", - "is-resolvable": "1.0.0", - "js-yaml": "3.10.0", - "json-stable-stringify": "1.0.1", - "lodash": "4.17.4", - "mkdirp": "0.5.1", - "optionator": "0.8.2", - "path-is-absolute": "1.0.1", - "path-is-inside": "1.0.2", - "pluralize": "1.2.1", - "progress": "1.1.8", - "require-uncached": "1.0.3", - "shelljs": "0.6.1", - "strip-json-comments": "1.0.4", - "table": "3.8.3", - "text-table": "0.2.0", - "user-home": "2.0.0" - }, - "dependencies": { - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "1.0.5", - "object-assign": "4.1.1" - } - }, - "inquirer": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", - "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", - "dev": true, - "requires": { - "ansi-escapes": "1.4.0", - "ansi-regex": "2.1.1", - "chalk": "1.1.3", - "cli-cursor": "1.0.2", - "cli-width": "2.2.0", - "figures": "1.7.0", - "lodash": "4.17.4", - "readline2": "1.0.1", - "run-async": "0.1.0", - "rx-lite": "3.1.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "through": "2.3.8" - } - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "run-async": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", - "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", - "dev": true, - "requires": { - "once": "1.3.3" - } - }, - "rx-lite": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", - "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", - "dev": true - }, - "strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", - "dev": true - } - } - }, - "eslint-config-standard": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-5.3.1.tgz", - "integrity": "sha1-WRyWkVF0QTL1YdO5FagS6kE/5JA=", - "dev": true - }, - "eslint-config-standard-jsx": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-1.2.1.tgz", - "integrity": "sha1-DRmxcF8K1INj7yqLv6cd8BLZibM=", - "dev": true - }, - "eslint-plugin-promise": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-1.3.2.tgz", - "integrity": "sha1-/OMy1vX/UjIApTdwSGPsPCQiunw=", - "dev": true - }, - "eslint-plugin-react": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-5.2.2.tgz", - "integrity": "sha1-fbBo4fVIf2hx5N7vNqOBwwPqwWE=", - "dev": true, - "requires": { - "doctrine": "1.5.0", - "jsx-ast-utils": "1.4.1" - } - }, - "eslint-plugin-standard": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-1.3.3.tgz", - "integrity": "sha1-owhUUVI0MedvQJxwy4+U4yvw7H8=", - "dev": true - }, - "espree": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.1.4.tgz", - "integrity": "sha1-BybXrIOvl6fISY2ps2OjYJ0qaKE=", - "dev": true, - "requires": { - "acorn": "3.3.0", - "acorn-jsx": "3.0.1" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - } - } - }, - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - }, - "esrecurse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", - "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", - "dev": true, - "requires": { - "estraverse": "4.2.0", - "object-assign": "4.0.1" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "dev": true, - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.37" - } - }, - "event-stream": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", - "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", - "dev": true, - "requires": { - "duplexer": "0.1.1", - "from": "0.1.7", - "map-stream": "0.1.0", - "pause-stream": "0.0.11", - "split": "0.3.3", - "stream-combiner": "0.0.4", - "through": "2.3.8" - } - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "events-to-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", - "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=", - "dev": true - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "1.3.4", - "safe-buffer": "5.1.1" - } - }, - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "dev": true, - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - } - }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", - "dev": true - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "requires": { - "is-posix-bracket": "0.1.1" - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "requires": { - "fill-range": "2.2.3" - } - }, - "explain-error": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/explain-error/-/explain-error-1.0.4.tgz", - "integrity": "sha1-p5PTrAytTGq1cemWj7urbLJTKSk=" - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "external-editor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", - "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", - "dev": true, - "requires": { - "chardet": "0.4.2", - "iconv-lite": "0.4.19", - "tmp": "0.0.33" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "requires": { - "is-extglob": "1.0.0" - } - }, - "extract-zip": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.6.tgz", - "integrity": "sha1-EpDt6NINCHK0Kf0/NRyhKOxe+Fw=", - "dev": true, - "requires": { - "concat-stream": "1.6.0", - "debug": "2.6.9", - "mkdirp": "0.5.0", - "yauzl": "2.4.1" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", - "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "falafel": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.1.0.tgz", - "integrity": "sha1-lrsXdh2rqU9G0AFzizzt86Z/4Gw=", - "requires": { - "acorn": "5.2.1", - "foreach": "2.0.5", - "isarray": "0.0.1", - "object-keys": "1.0.11" - } - }, - "fast-deep-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" - }, - "fast-json-parse": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/fast-json-parse/-/fast-json-parse-1.0.3.tgz", - "integrity": "sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw==" - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "fast-safe-stringify": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-1.2.1.tgz", - "integrity": "sha512-g2UqeO0yyYjTSpiH4zJQk+IycRxyYRABjSf+TpmeMOn9uByzFIoX0y/HnweCFhKb+uuPwjIvqXuK/LTteEBhow==" - }, - "fd-read-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-read-stream/-/fd-read-stream-1.1.0.tgz", - "integrity": "sha1-0wPMv+4CqaVqNJP7CLy1lpGqU7E=", - "requires": { - "readable-stream": "2.3.3" - } - }, - "fd-slicer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", - "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", - "dev": true, - "requires": { - "pend": "1.2.0" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "1.0.5" - } - }, - "file-entry-cache": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz", - "integrity": "sha1-RMYepgeuS+nBQC9B9EJwy/4zT/g=", - "dev": true, - "requires": { - "flat-cache": "1.3.0", - "object-assign": "4.0.1" - } - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" - }, - "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", - "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" - } - }, - "filled-array": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/filled-array/-/filled-array-1.1.0.tgz", - "integrity": "sha1-w8T2xmO5I0WamqKZEtLQMfFQf4Q=", - "dev": true - }, - "find-root": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "dev": true - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - }, - "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", - "dev": true, - "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" - } - }, - "flat-tree": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/flat-tree/-/flat-tree-1.6.0.tgz", - "integrity": "sha1-/KMM3bkAb7ZW6168ea6ydOf96e0=" - }, - "flatten": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", - "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=" - }, - "for-each": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.2.tgz", - "integrity": "sha1-LEBFC5NI6X8oEyJZO6lnBLmr1NQ=", - "requires": { - "is-function": "1.0.1" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "requires": { - "for-in": "1.0.2" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, - "foreground-child": { - "version": "1.5.6", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", - "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", - "dev": true, - "requires": { - "cross-spawn": "4.0.2", - "signal-exit": "3.0.2" - }, - "dependencies": { - "cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", - "dev": true, - "requires": { - "lru-cache": "4.1.1", - "which": "1.3.0" - } - } - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", - "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" - } - }, - "from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "fs-exists-cached": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz", - "integrity": "sha1-zyVVTKBQ3EmuZla0HeQiWJidy84=", - "dev": true - }, - "fs-extra": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", - "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", - "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "2.4.0" - } - }, - "fs-extra-p": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/fs-extra-p/-/fs-extra-p-3.1.0.tgz", - "integrity": "sha1-7d97uNk4XXkBTeyyH0Wx0MV5ANM=", - "requires": { - "bluebird-lst-c": "1.0.6", - "fs-extra": "2.1.2" - } - }, - "fs-extra-tf": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-extra-tf/-/fs-extra-tf-1.0.0.tgz", - "integrity": "sha1-d9PX3CGZ+8YYpC/l6oETfble6y4=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "2.4.0", - "klaw": "1.3.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", - "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", - "dev": true, - "optional": true, - "requires": { - "nan": "2.8.0", - "node-pre-gyp": "0.6.39" - }, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.2.9" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true, - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.7", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } - }, - "buffer-shims": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true - }, - "co": { - "version": "4.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "dev": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "dev": true, - "optional": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "1.1.1", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "dev": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true, - "dev": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.4", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "jsprim": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true, - "dev": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "dev": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "node-pre-gyp": { - "version": "0.6.39", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "1.0.2", - "hawk": "3.1.3", - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true, - "dev": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.2.9", - "bundled": true, - "dev": true, - "requires": { - "buffer-shims": "1.0.0", - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", - "util-deprecate": "1.0.2" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, - "dev": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true, - "dev": true - }, - "semver": { - "version": "5.3.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sshpk": { - "version": "1.13.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "dev": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "dev": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "verror": { - "version": "1.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "function-loop": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-1.0.1.tgz", - "integrity": "sha1-gHa7MF6OajzO7ikgdl8zDRkPNAw=", - "dev": true - }, - "gaze": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz", - "integrity": "sha1-hHIkZ3rbiHDWeSV+0ziP22HkAQU=", - "dev": true, - "requires": { - "globule": "1.2.0" - } - }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=" - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", - "requires": { - "is-property": "1.0.2" - } - }, - "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", - "dev": true - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "1.0.0" - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.3.3", - "path-is-absolute": "1.0.1" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "requires": { - "is-glob": "2.0.1" - } - }, - "global": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", - "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", - "requires": { - "min-document": "2.19.0", - "process": "0.5.2" - } - }, - "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", - "dev": true, - "requires": { - "ini": "1.3.5" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "dev": true, - "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.0.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - }, - "globule": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz", - "integrity": "sha1-HcScaCLdnoovoAuiopUAboZkvQk=", - "dev": true, - "requires": { - "glob": "7.1.2", - "lodash": "4.17.4", - "minimatch": "3.0.4" - } - }, - "got": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-5.7.1.tgz", - "integrity": "sha1-X4FjWmHkplifGAVp6k44FoClHzU=", - "dev": true, - "requires": { - "create-error-class": "3.0.2", - "duplexer2": "0.1.4", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.0", - "node-status-codes": "1.0.0", - "object-assign": "4.0.1", - "parse-json": "2.2.0", - "pinkie-promise": "2.0.1", - "read-all-stream": "3.1.0", - "readable-stream": "2.3.3", - "timed-out": "3.1.3", - "unzip-response": "1.0.2", - "url-parse-lax": "1.0.0" - }, - "dependencies": { - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, - "requires": { - "readable-stream": "2.3.3" - } - } - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "requires": { - "ajv": "5.5.0", - "har-schema": "2.0.0" - } - }, - "has": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", - "requires": { - "function-bind": "1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" - }, - "hash-base": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", - "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" - } - }, - "hawk": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", - "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", - "requires": { - "boom": "4.3.1", - "cryptiles": "3.1.2", - "hoek": "4.2.0", - "sntp": "2.1.0" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "1.1.3", - "minimalistic-assert": "1.0.0", - "minimalistic-crypto-utils": "1.0.1" - } - }, - "hoek": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", - "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" - }, - "home-path": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/home-path/-/home-path-1.0.5.tgz", - "integrity": "sha1-eIspgVsS1Tus9XVkhHbm+QQdEz8=", - "dev": true - }, - "hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", - "dev": true - }, - "htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", - "dev": true - }, - "http-methods": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/http-methods/-/http-methods-0.1.0.tgz", - "integrity": "sha1-KWkbb8WPT36Bo2BdyoJoKwaORDA=", - "requires": { - "body": "0.1.0", - "content-types": "0.1.0" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" - } - }, - "https-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", - "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", - "dev": true - }, - "hypercore": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/hypercore/-/hypercore-6.11.0.tgz", - "integrity": "sha512-upk8UvbeJZc921Bi+kW3rLJgdrbfVkVBlB8M4QM4X3IFWz15UbCYnSWgRgN3jf7Qr5t9TF3H4rBZPI68U5wEMA==", - "requires": { - "array-lru": "1.1.1", - "atomic-batcher": "1.0.2", - "bitfield-rle": "2.1.0", - "buffer-equals": "1.0.4", - "bulk-write-stream": "1.1.3", - "codecs": "1.2.0", - "flat-tree": "1.6.0", - "from2": "2.3.0", - "hypercore-protocol": "6.4.2", - "inherits": "2.0.3", - "last-one-wins": "1.0.4", - "memory-pager": "1.1.0", - "merkle-tree-stream": "3.0.3", - "process-nextick-args": "1.0.7", - "random-access-file": "1.8.1", - "sodium-universal": "2.0.0", - "sparse-bitfield": "3.0.3", - "thunky": "1.0.2", - "uint64be": "2.0.1", - "unordered-array-remove": "1.0.2", - "unordered-set": "2.0.0" - }, - "dependencies": { - "unordered-set": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unordered-set/-/unordered-set-2.0.0.tgz", - "integrity": "sha1-mFon6XW6oguCY66np5HpMAlBqew=" - } - } - }, - "hypercore-protocol": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/hypercore-protocol/-/hypercore-protocol-6.4.2.tgz", - "integrity": "sha512-xx8byjQnan/9+Epoi/1bpSS/dU2yVJy081nMX5Leh3z5CDDwOcpb5Q11UkUyyiRnUoxtv7uzpAAD7RWvW3lODw==", - "requires": { - "brfs": "1.4.3", - "inherits": "2.0.3", - "protocol-buffers": "3.2.1", - "readable-stream": "2.3.3", - "sodium-universal": "2.0.0", - "sorted-indexof": "1.0.0", - "varint": "5.0.0" - }, - "dependencies": { - "varint": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.0.tgz", - "integrity": "sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8=" - } - } - }, - "hyperdrive": { - "version": "9.12.0", - "resolved": "https://registry.npmjs.org/hyperdrive/-/hyperdrive-9.12.0.tgz", - "integrity": "sha512-vlB0haK2Vucu+mXz6hiq75wejL8b8WrX2QC5Bj3O63YNId2RSzrOSvYZUgNT2dGhMERUtdPSViiHkpvro3VbkA==", - "requires": { - "append-tree": "2.4.0", - "duplexify": "3.5.1", - "from2": "2.3.0", - "hypercore": "6.11.0", - "inherits": "2.0.3", - "mutexify": "1.2.0", - "protocol-buffers": "3.2.1", - "random-access-file": "1.8.1", - "sodium-universal": "2.0.0", - "stream-collector": "1.0.1", - "stream-each": "1.2.2", - "thunky": "1.0.2", - "uint64be": "2.0.1", - "unixify": "1.0.0" - } - }, - "hyperdrive-http": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/hyperdrive-http/-/hyperdrive-http-4.2.2.tgz", - "integrity": "sha512-NgfZGxfQoYIEIuYat+dki/GAWpjmM/X+5YL5faTrX3VgXdGObVOhKEHQISk855T8C+R4aPP8QpF1YR8adUVBNw==", - "requires": { - "corsify": "2.1.0", - "directory-index-html": "2.1.0", - "mime": "1.6.0", - "pump": "1.0.3", - "range-parser": "1.2.0" - } - }, - "hyperdrive-network-speed": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/hyperdrive-network-speed/-/hyperdrive-network-speed-2.0.1.tgz", - "integrity": "sha1-QNr4LjG511Pyrm368IGGYe0k/hU=", - "requires": { - "debug": "2.6.9", - "speedometer": "1.0.0" - } - }, - "hyperscript-attribute-to-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hyperscript-attribute-to-property/-/hyperscript-attribute-to-property-1.0.0.tgz", - "integrity": "sha1-glMI1Ju44pV5I/cxmBvMgRytev8=" - }, - "hyperx": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/hyperx/-/hyperx-2.3.2.tgz", - "integrity": "sha512-fYFJn0kVMHpkLJKzqGXfs0+p26NH0R3PsLWQGZ5Enbp1jcyEK9U9uJGnsRKPgBCoQ6bVzkV+srwHVFc2+pHfYQ==", - "requires": { - "hyperscript-attribute-to-property": "1.0.0" - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", - "dev": true - }, - "ieee754": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=", - "dev": true - }, - "ignore": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==", - "dev": true - }, - "ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", - "dev": true - }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "2.0.1" - } - }, - "indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=" - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "1.3.3", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "inline-source-map": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", - "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", - "dev": true, - "requires": { - "source-map": "0.5.7" - } - }, - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", - "dev": true, - "requires": { - "ansi-escapes": "3.0.0", - "chalk": "2.3.0", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.1.0", - "figures": "2.0.0", - "lodash": "4.17.4", - "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rx-lite": "4.0.8", - "rx-lite-aggregates": "4.0.8", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", - "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "dev": true, - "requires": { - "color-convert": "1.9.1" - } - }, - "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", - "dev": true, - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" - } - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "2.0.0" - } - }, - "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "1.1.0" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "2.0.0" - } - } - } - }, - "insert-css": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/insert-css/-/insert-css-2.0.0.tgz", - "integrity": "sha1-610Ql7dUL0x56jBg067gfQU4gPQ=" - }, - "insert-module-globals": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz", - "integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=", - "dev": true, - "requires": { - "JSONStream": "1.3.1", - "combine-source-map": "0.7.2", - "concat-stream": "1.5.2", - "is-buffer": "1.1.6", - "lexical-scope": "1.2.0", - "process": "0.11.10", - "through2": "2.0.3", - "xtend": "4.0.1" - }, - "dependencies": { - "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.0.6", - "typedarray": "0.0.6" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "0.10.31", - "util-deprecate": "1.0.2" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "insert-styles": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/insert-styles/-/insert-styles-1.2.1.tgz", - "integrity": "sha1-nNhMIJa9VB6j4ZI2Ere2BMnB1TI=" - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "1.11.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "1.1.1" - } - }, - "is-dom": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/is-dom/-/is-dom-1.0.9.tgz", - "integrity": "sha1-SDgy1SlyBz3hK5/j9gMghw2oNw0=" - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" - }, - "is-electron": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.1.0.tgz", - "integrity": "sha512-dkg5xT383+M6zIbbXW/z7n2nz4SFUi2OSyhntnFYkRdtV+HVEfdjEK+5AWisfYgkpe3WYjTIuh7toaKmSfFVWw==" - }, - "is-electron-renderer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-electron-renderer/-/is-electron-renderer-2.0.1.tgz", - "integrity": "sha1-pGnQVvl1aXxYyYxgI+sKp5r4laI=" - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "requires": { - "is-primitive": "2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-function": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", - "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "1.0.0" - } - }, - "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", - "dev": true, - "requires": { - "global-dirs": "0.1.1", - "is-path-inside": "1.0.1" - } - }, - "is-my-json-valid": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz", - "integrity": "sha512-ochPsqWS1WXj8ZnMIV0vnNXooaMhp7cyL4FMSIPKTtnV0Ha/T19G2b9kkhcNsabV9bxYkze7/aLZJb/bYuFduQ==", - "dev": true, - "requires": { - "generate-function": "2.0.0", - "generate-object-property": "1.2.0", - "jsonpointer": "4.0.1", - "xtend": "4.0.1" - } - }, - "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", - "dev": true - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "requires": { - "kind-of": "3.2.2" - } - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", - "dev": true, - "requires": { - "is-path-inside": "1.0.1" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "1.0.2" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" - }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", - "dev": true - }, - "is-relative": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", - "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", - "dev": true, - "requires": { - "is-unc-path": "0.1.2" - } - }, - "is-resolvable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", - "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", - "dev": true, - "requires": { - "tryit": "1.0.3" - } - }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-unc-path": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", - "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", - "dev": true, - "requires": { - "unc-path-regex": "0.1.2" - } - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-windows": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.1.tgz", - "integrity": "sha1-MQ23D3QtJZoWo2kgK1GvhCMzENk=", - "dev": true - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "isbinaryfile": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz", - "integrity": "sha1-Sj6XTsDLqQBNP8bN5yCeppNopiE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - } - } - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "iterators": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/iterators/-/iterators-0.1.0.tgz", - "integrity": "sha1-0D9mbKTmEwE4VlmXys6lQWQgMVY=", - "requires": { - "ap": "0.1.0" - } - }, - "js-base64": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.0.tgz", - "integrity": "sha512-Wehd+7Pf9tFvGb+ydPm9TjYjV8X1YHOVyG8QyELZxEMqOhemVwGRmoG8iQ/soqI3n8v4xn59zaLxiCJiaaRzKA==" - }, - "js-yaml": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", - "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", - "requires": { - "argparse": "1.0.9", - "esprima": "4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" - } - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true - }, - "json-parse-better-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", - "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" - }, - "json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", - "dev": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "requires": { - "graceful-fs": "4.1.11" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true - }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "jsx-ast-utils": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz", - "integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE=", - "dev": true - }, - "juliangruber-shallow-equal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/juliangruber-shallow-equal/-/juliangruber-shallow-equal-1.0.4.tgz", - "integrity": "sha1-JqQhSCNXVPlCuDwGYfZKsS0245g=" - }, - "k-bucket": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/k-bucket/-/k-bucket-3.3.0.tgz", - "integrity": "sha512-WIAQ54LfNjzt4viUIEVnXo9cr7ALS9Yocg+USLoiO89Uvbf9hz0OBtqmfzSr49kT3vbnhlzFfsJHFQ0xnp7LbA==", - "requires": { - "buffer-equals": "1.0.4", - "inherits": "2.0.3", - "randombytes": "2.0.5" - } - }, - "k-rpc": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/k-rpc/-/k-rpc-4.2.0.tgz", - "integrity": "sha512-w+Dwo4nYWvV6aeuaMI7JPwrofjzUdN2rX6gONvsQF3g6CNV0UnKpiPqzDGUjX3ginPEkKYKUIpmJZiHmzpM9kg==", - "requires": { - "buffer-equals": "1.0.4", - "k-bucket": "3.3.0", - "k-rpc-socket": "1.7.1", - "randombytes": "2.0.5", - "safe-buffer": "5.1.1" - } - }, - "k-rpc-socket": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/k-rpc-socket/-/k-rpc-socket-1.7.1.tgz", - "integrity": "sha512-FmHDmrT6sIs2MM/uMYW0Jmjd01wk2NxzPd6+9iH7onvutqhWXZ8PoZ9p/mVS58SQILC7jKZacC72V5QNkvAXew==", - "requires": { - "bencode": "1.0.0", - "safe-buffer": "5.1.1" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11" - } - }, - "labeled-stream-splicer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz", - "integrity": "sha1-pS4dE4AkwAuGscDJH2d5GLiuClk=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "isarray": "0.0.1", - "stream-splicer": "2.0.0" - } - }, - "last-one-wins": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/last-one-wins/-/last-one-wins-1.0.4.tgz", - "integrity": "sha1-wb/Qy8tGeQ7JFWuNGu6Py4bNoio=" - }, - "latest-version": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-2.0.0.tgz", - "integrity": "sha1-VvjWE5YghHuAF/jx9NeOIRMkFos=", - "dev": true, - "requires": { - "package-json": "2.4.0" - } - }, - "lazy-req": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/lazy-req/-/lazy-req-1.1.0.tgz", - "integrity": "sha1-va6+rTD42CQDnODOFJ1Nqge6H6w=", - "dev": true - }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "dev": true, - "requires": { - "readable-stream": "2.3.3" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "1.0.0" - } - }, - "lcov-parse": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", - "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", - "dev": true - }, - "length-prefixed-message": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/length-prefixed-message/-/length-prefixed-message-3.0.3.tgz", - "integrity": "sha1-JFR01pq8BhTco2jcNaqAdJgqI6w=", - "requires": { - "varint": "3.0.1" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" - } - }, - "lexical-scope": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", - "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=", - "dev": true, - "requires": { - "astw": "2.2.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" - } - }, - "localenv": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/localenv/-/localenv-0.2.2.tgz", - "integrity": "sha1-xQjynTSFvck0HT6tF/YcWr0bC6s=", - "requires": { - "commander": "2.5.0" - } - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", - "dev": true - }, - "lodash._baseassign": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", - "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", - "dev": true, - "requires": { - "lodash._basecopy": "3.0.1", - "lodash.keys": "3.1.2" - } - }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._bindcallback": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", - "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", - "dev": true - }, - "lodash._createassigner": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", - "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=", - "dev": true, - "requires": { - "lodash._bindcallback": "3.0.1", - "lodash._isiterateecall": "3.0.9", - "lodash.restparam": "3.6.1" - } - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash.assign": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz", - "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=", - "dev": true, - "requires": { - "lodash._baseassign": "3.2.0", - "lodash._createassigner": "3.1.1", - "lodash.keys": "3.1.2" - } - }, - "lodash.defaults": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-3.1.2.tgz", - "integrity": "sha1-xzCLGNv4vJNy1wGnNJPGEZK9Liw=", - "dev": true, - "requires": { - "lodash.assign": "3.2.0", - "lodash.restparam": "3.6.1" - } - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "3.9.1", - "lodash.isarguments": "3.1.0", - "lodash.isarray": "3.0.4" - } - }, - "lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", - "dev": true - }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, - "lodash.template": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", - "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", - "dev": true, - "requires": { - "lodash._reinterpolate": "3.0.0", - "lodash.templatesettings": "4.1.0" - } - }, - "lodash.templatesettings": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", - "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", - "dev": true, - "requires": { - "lodash._reinterpolate": "3.0.0" - } - }, - "lodash.toarray": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", - "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=", - "dev": true - }, - "log-driver": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz", - "integrity": "sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY=", - "dev": true - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" - } - }, - "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", - "dev": true - }, - "lru": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lru/-/lru-3.1.0.tgz", - "integrity": "sha1-6n+4VG2DczOWoTCR12z+tMBoN9U=", - "requires": { - "inherits": "2.0.3" - } - }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "dev": true, - "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" - } - }, - "macaddress": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.2.8.tgz", - "integrity": "sha1-WQTcU3w57G2+/q6QIycTX6hRHxI=", - "dev": true - }, - "make-dir": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.1.0.tgz", - "integrity": "sha512-0Pkui4wLJ7rxvmfUvs87skoEaxmu0hCUApF8nonzpl7q//FWp9zu8W61Scz4sd/kUiqDxvUhtoam2efDyiBzcA==", - "dev": true, - "requires": { - "pify": "3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "map-limit": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/map-limit/-/map-limit-0.0.1.tgz", - "integrity": "sha1-63lhAxwPDo0AG/LVb6toXViCLzg=", - "requires": { - "once": "1.3.3" - } - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "map-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", - "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", - "dev": true - }, - "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", - "dev": true, - "requires": { - "hash-base": "3.0.4", - "inherits": "2.0.3" - }, - "dependencies": { - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.1" - } - } - } - }, - "memory-pager": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.1.0.tgz", - "integrity": "sha512-Mf9OHV/Y7h6YWDxTzX/b4ZZ4oh9NSXblQL8dtPCOomOtZciEHxePR78+uHFLLlsk01A6jVHhHsQZZ/WcIPpnzg==" - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.0.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" - } - }, - "merkle-tree-stream": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/merkle-tree-stream/-/merkle-tree-stream-3.0.3.tgz", - "integrity": "sha1-+KBkdg0355eK1fn208EZpJT1cIE=", - "requires": { - "flat-tree": "1.6.0", - "readable-stream": "2.3.3" - } - }, - "microcomponent": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/microcomponent/-/microcomponent-3.1.6.tgz", - "integrity": "sha1-C9QBOlcEJCHscGbU2OYKx2v99Ms=", - "requires": { - "juliangruber-shallow-equal": "1.0.4", - "nanocomponent": "5.0.3", - "nanologger": "1.3.1", - "nanomorph": "5.1.3" - }, - "dependencies": { - "nanocomponent": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/nanocomponent/-/nanocomponent-5.0.3.tgz", - "integrity": "sha1-pc5nwmCBh7PTfsTqjHyiN1agLcc=", - "requires": { - "on-load": "3.3.1" - } - } - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" - }, - "mime-types": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", - "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", - "requires": { - "mime-db": "1.30.0" - } - }, - "mimic-fn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", - "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", - "dev": true - }, - "min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", - "requires": { - "dom-walk": "0.1.1" - } - }, - "minimalistic-assert": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", - "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.8" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "minipass": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.1.tgz", - "integrity": "sha512-u1aUllxPJUI07cOqzR7reGmQxmCqlH88uIIsf6XZFEWgw7gXKpJdR+5R9Y3KEDmWYkdIz9wXZs3C0jOPxejk/Q==", - "dev": true, - "requires": { - "yallist": "3.0.2" - }, - "dependencies": { - "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", - "dev": true - } - } - }, - "mirror-folder": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/mirror-folder/-/mirror-folder-2.1.1.tgz", - "integrity": "sha1-GtO3d7OeQDzCe/UghsI+Qe9MlgQ=", - "requires": { - "fd-read-stream": "1.1.0", - "recursive-watch": "1.1.2" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } - } - }, - "module-deps": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", - "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", - "dev": true, - "requires": { - "JSONStream": "1.3.1", - "browser-resolve": "1.11.2", - "cached-path-relative": "1.0.1", - "concat-stream": "1.5.2", - "defined": "1.0.0", - "detective": "4.6.0", - "duplexer2": "0.1.4", - "inherits": "2.0.3", - "parents": "1.0.1", - "readable-stream": "2.3.3", - "resolve": "1.5.0", - "stream-combiner2": "1.1.1", - "subarg": "1.0.0", - "through2": "2.0.3", - "xtend": "4.0.1" - }, - "dependencies": { - "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.0.6", - "typedarray": "0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "0.10.31", - "util-deprecate": "1.0.2" - } - } - } - }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, - "requires": { - "readable-stream": "2.3.3" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "ms": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.3.tgz", - "integrity": "sha1-cIFVpeROM/X9D8U+gdDUCpG+H/8=" - }, - "multi-random-access": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/multi-random-access/-/multi-random-access-2.1.1.tgz", - "integrity": "sha1-ZGLxsgQQnMxkRgFlARCoKEQ9ZuI=", - "requires": { - "abstract-random-access": "1.1.2", - "inherits": "2.0.3", - "sorted-array-functions": "1.0.0" - } - }, - "multicast-dns": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.1.tgz", - "integrity": "sha512-uV3/ckdsffHx9IrGQrx613mturMdMqQ06WTq+C09NsStJ9iNG6RcUWgPKs1Rfjy+idZT6tfQoXEusGNnEZhT3w==", - "requires": { - "dns-packet": "1.2.2", - "thunky": "0.1.0" - }, - "dependencies": { - "thunky": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-0.1.0.tgz", - "integrity": "sha1-vzAUaCTituZ7Dy16Ssi+smkIaE4=" - } - } - }, - "multicb": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/multicb/-/multicb-1.2.2.tgz", - "integrity": "sha512-PZM4dhYFmCF6uZGWpEmoPMUqJBywS9IcAgybT2GmSpYI1BvGvoWSdbio+ik+q/YD2vodhvslESWIS3NnkKYdqQ==" - }, - "multidat": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/multidat/-/multidat-5.1.0.tgz", - "integrity": "sha512-SGRyp4I8ElZv/lbdo9t6tyii13Xd14uPtRglIw3ptFgsBNKq6PH3OYmV9MMfv3LjsjiLimjaO8ZIdQ07wbIv5w==", - "requires": { - "dat-node": "3.5.5", - "explain-error": "1.0.4", - "fast-json-parse": "1.0.3", - "multidrive": "5.2.0", - "xtend": "4.0.1" - } - }, - "multidrive": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/multidrive/-/multidrive-5.2.0.tgz", - "integrity": "sha512-3uEuwoR/O0xxI2Do7AewEdk/uOTABcYmBAqAj1YbuEUx8O07v1PNPy7sKEWV4gr70GC+pJNwhIob95ULBfgitg==", - "requires": { - "debug": "2.6.9", - "map-limit": "0.0.1" - } - }, - "multiline": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/multiline/-/multiline-1.0.2.tgz", - "integrity": "sha1-abHyX/B00oKJBPJE3dBrfZbvbJM=", - "dev": true, - "requires": { - "strip-indent": "1.0.1" - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "mutexify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mutexify/-/mutexify-1.2.0.tgz", - "integrity": "sha512-oprzxd2zhfrJqEuB98qc1dRMMonClBQ57UPDjnbcrah4orEMTq1jq3+AcdFe5ePzdbJXI7zmdhfftIdMnhYFoQ==" - }, - "nan": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", - "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=", - "optional": true - }, - "nanoassert": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-1.1.0.tgz", - "integrity": "sha1-TzFS4JVA/eKMdvRLGbvNHVpCR40=" - }, - "nanobus": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/nanobus/-/nanobus-4.3.1.tgz", - "integrity": "sha512-fCWDlth+flNm4qfodfsQxLedeYzKWqURFd00sm6HcAkJtP12s6y9SrNWuu2+vXRUxiTIbBU+9TQjla8cKLyJqA==", - "requires": { - "nanotiming": "6.1.5", - "remove-array-items": "1.0.0" - } - }, - "nanocomponent": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/nanocomponent/-/nanocomponent-2.0.3.tgz", - "integrity": "sha1-yupqOad9l+T3HanCo15hl8cLcus=", - "requires": { - "observe-resize": "1.1.3", - "on-intersect": "1.1.0", - "on-load": "3.3.1", - "polite-element": "1.0.5", - "yo-yoify": "3.7.3" - } - }, - "nanohref": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/nanohref/-/nanohref-3.0.1.tgz", - "integrity": "sha512-YfDhNcglFDIISfKVnXHovDaaglTauD2ThidaTZuyV6NE0lQMvGs5UfSoa1GvX6Nd9p2TfFeYzzc+TtjH+htu+Q==" - }, - "nanolocation": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/nanolocation/-/nanolocation-1.0.0.tgz", - "integrity": "sha1-FbXHrwWJXRqfIfDRNkldmURQaGs=" - }, - "nanologger": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/nanologger/-/nanologger-1.3.1.tgz", - "integrity": "sha1-2oFniH8h7l8tiBv+Wwdc62xZXKk=", - "requires": { - "xtend": "4.0.1" - } - }, - "nanomorph": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/nanomorph/-/nanomorph-5.1.3.tgz", - "integrity": "sha512-VydkKjFWU/DAO0R10awFASRNXQKHrZUMdMIiNcdmWm+IhuifuPOw/dDtpiQ1cNROF8f3ATPrcKRVarEayQJOqA==", - "requires": { - "nanoassert": "1.1.0" - } - }, - "nanoquery": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/nanoquery/-/nanoquery-1.2.0.tgz", - "integrity": "sha512-o4JC1cLsNSu8gLMLeALBFPzILMPyc3HltXT0727vncM29N1qB802oQyza3lQRjI9iylRRK0X5jjTjiPZyCw0gg==", - "requires": { - "nanoassert": "1.1.0" - } - }, - "nanoraf": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/nanoraf/-/nanoraf-3.0.1.tgz", - "integrity": "sha1-q5+5wle5rcxx2CmCy1jY+jUDdko=" - }, - "nanorouter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/nanorouter/-/nanorouter-2.1.0.tgz", - "integrity": "sha1-T8r5YgOgCJjaiRiLG/9aj8Bu9P8=", - "requires": { - "wayfarer": "6.6.2" - } - }, - "nanotiming": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/nanotiming/-/nanotiming-6.1.5.tgz", - "integrity": "sha512-cMM+WkW9wqx3Kr3vKAhWKXN5vK4eElE8ooKEoLsfmxByCV+zob0fNJexG07sBa8vpFYAgXRlLhxcZ3b5k9yWrw==" - }, - "nets": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/nets/-/nets-3.2.0.tgz", - "integrity": "sha1-1RH7q3rxHaAT8huX7pF0fTOFLTg=", - "requires": { - "request": "2.83.0", - "xhr": "2.4.0" - } - }, - "network-address": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/network-address/-/network-address-1.1.2.tgz", - "integrity": "sha1-Sqe/1D8D8LgclwKxPWqFjdsybz4=" - }, - "node-emoji": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.8.1.tgz", - "integrity": "sha512-+ktMAh1Jwas+TnGodfCfjUbJKoANqPaJFN0z0iqh41eqD8dvguNzcitVSBSVK1pidz0AqGbLKcoVuVLRVZ/aVg==", - "dev": true, - "requires": { - "lodash.toarray": "4.4.0" - } - }, - "node-gyp-build": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.2.2.tgz", - "integrity": "sha512-t8W/0UqFGl1c+5ORA3NoT3npU+PxWBL9iPhY7ZySSTszodj3RWexmu8niayWBE0v+0DLARvOXsjaAvfmSEQOyQ==", - "optional": true - }, - "node-status-codes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz", - "integrity": "sha1-WuVUHQJGRdMqWPzdyc7s6nrjrC8=", - "dev": true - }, - "nodemon": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.12.1.tgz", - "integrity": "sha1-mWpW3EnZ8Wu/G3ik3gjxNjSzh40=", - "dev": true, - "requires": { - "chokidar": "1.7.0", - "debug": "2.6.9", - "es6-promise": "3.3.1", - "ignore-by-default": "1.0.1", - "lodash.defaults": "3.1.2", - "minimatch": "3.0.4", - "ps-tree": "1.1.0", - "touch": "3.1.0", - "undefsafe": "0.0.3", - "update-notifier": "2.3.0" - }, - "dependencies": { - "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", - "dev": true, - "requires": { - "string-width": "2.1.1" - } - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "dev": true, - "requires": { - "color-convert": "1.9.1" - } - }, - "boxen": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.2.2.tgz", - "integrity": "sha1-Px1AMsMP/qnUsCwyLq8up0HcvOU=", - "dev": true, - "requires": { - "ansi-align": "2.0.0", - "camelcase": "4.1.0", - "chalk": "2.3.0", - "cli-boxes": "1.0.0", - "string-width": "2.1.1", - "term-size": "1.2.0", - "widest-line": "1.0.0" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", - "dev": true, - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" - } - }, - "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "configstore": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", - "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", - "dev": true, - "requires": { - "dot-prop": "4.2.0", - "graceful-fs": "4.1.11", - "make-dir": "1.1.0", - "unique-string": "1.0.0", - "write-file-atomic": "2.3.0", - "xdg-basedir": "3.0.0" - } - }, - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, - "requires": { - "is-obj": "1.0.1" - } - }, - "es6-promise": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", - "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", - "dev": true - }, - "got": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", - "dev": true, - "requires": { - "create-error-class": "3.0.2", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.0", - "safe-buffer": "5.1.1", - "timed-out": "4.0.1", - "unzip-response": "2.0.1", - "url-parse-lax": "1.0.0" - } - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", - "dev": true, - "requires": { - "package-json": "4.0.1" - } - }, - "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", - "dev": true, - "requires": { - "got": "6.7.1", - "registry-auth-token": "3.3.1", - "registry-url": "3.1.0", - "semver": "5.4.1" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "2.0.0" - } - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true - }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", - "dev": true - }, - "update-notifier": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", - "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", - "dev": true, - "requires": { - "boxen": "1.2.2", - "chalk": "2.3.0", - "configstore": "3.1.1", - "import-lazy": "2.1.0", - "is-installed-globally": "0.1.0", - "is-npm": "1.0.0", - "latest-version": "3.1.0", - "semver-diff": "2.1.0", - "xdg-basedir": "3.0.0" - } - }, - "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "signal-exit": "3.0.2" - } - }, - "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", - "dev": true - } - } - }, - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", - "dev": true, - "requires": { - "abbrev": "1.1.1" - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "requires": { - "remove-trailing-separator": "1.1.0" - } - }, - "npm-install-package": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/npm-install-package/-/npm-install-package-2.1.0.tgz", - "integrity": "sha1-1+/jz816sAYUuJbqUxGdyaslkSU=", - "dev": true - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "2.0.1" - } - }, - "nugget": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", - "integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=", - "dev": true, - "requires": { - "debug": "2.6.9", - "minimist": "1.2.0", - "pretty-bytes": "1.0.4", - "progress-stream": "1.2.0", - "request": "2.83.0", - "single-line-log": "1.1.2", - "throttleit": "0.0.2" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "nyc": { - "version": "11.4.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.4.1.tgz", - "integrity": "sha512-5eCZpvaksFVjP2rt1r60cfXmt3MUtsQDw8bAzNqNEr4WLvUMLgiVENMf/B9bE9YAX0mGVvaGA3v9IS9ekNqB1Q==", - "dev": true, - "requires": { - "archy": "1.0.0", - "arrify": "1.0.1", - "caching-transform": "1.0.1", - "convert-source-map": "1.5.1", - "debug-log": "1.0.1", - "default-require-extensions": "1.0.0", - "find-cache-dir": "0.1.1", - "find-up": "2.1.0", - "foreground-child": "1.5.6", - "glob": "7.1.2", - "istanbul-lib-coverage": "1.1.1", - "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.9.1", - "istanbul-lib-report": "1.1.2", - "istanbul-lib-source-maps": "1.2.2", - "istanbul-reports": "1.1.3", - "md5-hex": "1.3.0", - "merge-source-map": "1.0.4", - "micromatch": "2.3.11", - "mkdirp": "0.5.1", - "resolve-from": "2.0.0", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "spawn-wrap": "1.4.2", - "test-exclude": "4.1.1", - "yargs": "10.0.3", - "yargs-parser": "8.0.0" - }, - "dependencies": { - "align-text": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" - } - }, - "amdefine": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "bundled": true, - "dev": true - }, - "append-transform": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "requires": { - "default-require-extensions": "1.0.0" - } - }, - "archy": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "arr-diff": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "arr-flatten": "1.1.0" - } - }, - "arr-flatten": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "array-unique": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "arrify": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "async": { - "version": "1.5.2", - "bundled": true, - "dev": true - }, - "babel-code-frame": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" - } - }, - "babel-generator": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.4", - "source-map": "0.5.7", - "trim-right": "1.0.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "6.26.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "core-js": "2.5.3", - "regenerator-runtime": "0.11.1" - } - }, - "babel-template": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "bundled": true, - "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.4", - "to-fast-properties": "1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "bundled": true, - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.8", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "1.8.5", - "bundled": true, - "dev": true, - "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" - } - }, - "builtin-modules": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "caching-transform": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" - } - }, - "camelcase": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true - }, - "center-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" - } - }, - "chalk": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "cliui": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "commondir": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "convert-source-map": { - "version": "1.5.1", - "bundled": true, - "dev": true - }, - "core-js": { - "version": "2.5.3", - "bundled": true, - "dev": true - }, - "cross-spawn": { - "version": "4.0.2", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "4.1.1", - "which": "1.3.0" - } - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "debug-log": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "default-require-extensions": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "strip-bom": "2.0.0" - } - }, - "detect-indent": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "repeating": "2.0.1" - } - }, - "error-ex": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "is-arrayish": "0.2.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "esutils": { - "version": "2.0.2", - "bundled": true, - "dev": true - }, - "execa": { - "version": "0.7.0", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" - } - } - } - }, - "expand-brackets": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "requires": { - "is-posix-bracket": "0.1.1" - } - }, - "expand-range": { - "version": "1.8.2", - "bundled": true, - "dev": true, - "requires": { - "fill-range": "2.2.3" - } - }, - "extglob": { - "version": "0.3.2", - "bundled": true, - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - }, - "filename-regex": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "fill-range": { - "version": "2.2.3", - "bundled": true, - "dev": true, - "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" - } - }, - "find-cache-dir": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "requires": { - "commondir": "1.0.1", - "mkdirp": "0.5.1", - "pkg-dir": "1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "2.0.0" - } - }, - "for-in": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "for-own": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "requires": { - "for-in": "1.0.2" - } - }, - "foreground-child": { - "version": "1.5.6", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "4.0.2", - "signal-exit": "3.0.2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "get-caller-file": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "glob-base": { - "version": "0.3.0", - "bundled": true, - "dev": true, - "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" - } - }, - "glob-parent": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-glob": "2.0.1" - } - }, - "globals": { - "version": "9.18.0", - "bundled": true, - "dev": true - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "handlebars": { - "version": "4.0.11", - "bundled": true, - "dev": true, - "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "amdefine": "1.0.1" - } - } - } - }, - "has-ansi": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "has-flag": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "hosted-git-info": { - "version": "2.5.0", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "invariant": { - "version": "2.2.2", - "bundled": true, - "dev": true, - "requires": { - "loose-envify": "1.3.1" - } - }, - "invert-kv": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-buffer": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "builtin-modules": "1.1.1" - } - }, - "is-dotfile": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "requires": { - "is-primitive": "2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-extglob": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-finite": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-glob": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-extglob": "1.0.0" - } - }, - "is-number": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "isobject": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "istanbul-lib-coverage": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "istanbul-lib-hook": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "append-transform": "0.4.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.9.1", - "bundled": true, - "dev": true, - "requires": { - "babel-generator": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.1.1", - "semver": "5.4.1" - } - }, - "istanbul-lib-report": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" - }, - "dependencies": { - "supports-color": { - "version": "3.2.3", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "1.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "1.2.2", - "bundled": true, - "dev": true, - "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "istanbul-reports": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "requires": { - "handlebars": "4.0.11" - } - }, - "js-tokens": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "jsesc": { - "version": "1.3.0", - "bundled": true, - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - }, - "lazy-cache": { - "version": "1.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "invert-kv": "1.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - } - } - }, - "lodash": { - "version": "4.17.4", - "bundled": true, - "dev": true - }, - "longest": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "loose-envify": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "js-tokens": "3.0.2" - } - }, - "lru-cache": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" - } - }, - "md5-hex": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "md5-o-matic": "0.1.1" - } - }, - "md5-o-matic": { - "version": "0.1.1", - "bundled": true, - "dev": true - }, - "mem": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "mimic-fn": "1.1.0" - } - }, - "merge-source-map": { - "version": "1.0.4", - "bundled": true, - "dev": true, - "requires": { - "source-map": "0.5.7" - } - }, - "micromatch": { - "version": "2.3.11", - "bundled": true, - "dev": true, - "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" - } - }, - "mimic-fn": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "1.1.8" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "normalize-package-data": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "remove-trailing-separator": "1.1.0" - } - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "path-key": "2.0.1" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "object.omit": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "optimist": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-limit": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "p-locate": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "1.1.0" - } - }, - "parse-glob": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" - } - }, - "parse-json": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "requires": { - "error-ex": "1.3.1" - } - }, - "path-exists": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "pinkie-promise": "2.0.1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "path-type": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - }, - "pify": { - "version": "2.3.0", - "bundled": true, - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "bundled": true, - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "pinkie": "2.0.4" - } - }, - "pkg-dir": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "find-up": "1.1.2" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - } - } - }, - "preserve": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "randomatic": { - "version": "1.1.7", - "bundled": true, - "dev": true, - "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "read-pkg": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - } - } - }, - "regenerator-runtime": { - "version": "0.11.1", - "bundled": true, - "dev": true - }, - "regex-cache": { - "version": "0.4.4", - "bundled": true, - "dev": true, - "requires": { - "is-equal-shallow": "0.1.3" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "repeat-element": { - "version": "1.1.2", - "bundled": true, - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "bundled": true, - "dev": true - }, - "repeating": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "requires": { - "is-finite": "1.0.2" - } - }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "resolve-from": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "right-align": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "align-text": "0.1.4" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "requires": { - "glob": "7.1.2" - } - }, - "semver": { - "version": "5.4.1", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "shebang-regex": "1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "slide": { - "version": "1.1.6", - "bundled": true, - "dev": true - }, - "source-map": { - "version": "0.5.7", - "bundled": true, - "dev": true - }, - "spawn-wrap": { - "version": "1.4.2", - "bundled": true, - "dev": true, - "requires": { - "foreground-child": "1.5.6", - "mkdirp": "0.5.1", - "os-homedir": "1.0.2", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "which": "1.3.0" - } - }, - "spdx-correct": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "spdx-license-ids": "1.2.2" - } - }, - "spdx-expression-parse": { - "version": "1.0.4", - "bundled": true, - "dev": true - }, - "spdx-license-ids": { - "version": "1.2.2", - "bundled": true, - "dev": true - }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-bom": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-utf8": "0.2.1" - } - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "supports-color": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "test-exclude": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "requires": { - "arrify": "1.0.1", - "micromatch": "2.3.11", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "require-main-filename": "1.0.1" - } - }, - "to-fast-properties": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "trim-right": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "uglify-js": { - "version": "2.8.29", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" - }, - "dependencies": { - "yargs": { - "version": "3.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "validate-npm-package-license": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" - } - }, - "which": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "isexe": "2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "window-size": { - "version": "0.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "wordwrap": { - "version": "0.0.3", - "bundled": true, - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "write-file-atomic": { - "version": "1.3.4", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" - } - }, - "y18n": { - "version": "3.2.1", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true, - "dev": true - }, - "yargs": { - "version": "10.0.3", - "bundled": true, - "dev": true, - "requires": { - "cliui": "3.2.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "8.0.0" - }, - "dependencies": { - "cliui": { - "version": "3.2.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } - } - } - } - }, - "yargs-parser": { - "version": "8.0.0", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true, - "dev": true - } - } - } - } - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" - }, - "object-assign": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.0.1.tgz", - "integrity": "sha1-mVBEVsNZi1ytT8WcJuipuxB/4L0=" - }, - "object-inspect": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-0.4.0.tgz", - "integrity": "sha1-9RV8EWwUVbJDsG7pdwM5LFrYn+w=" - }, - "object-keys": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" - } - }, - "observe-resize": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/observe-resize/-/observe-resize-1.1.3.tgz", - "integrity": "sha1-k09PqDbdesjXhSlxpiwZBnSZohw=", - "requires": { - "insert-styles": "1.2.1", - "is-dom": "1.0.9" - } - }, - "on-idle": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/on-idle/-/on-idle-3.1.4.tgz", - "integrity": "sha512-oWzEGcC2/Ar9aaZ2HdEfVrHyvkaeUCxL0P2f2a6emibez2mANaPM/tEO3Bosl4uyvLeyPOie1+7AHrh9aFez6w==", - "requires": { - "nanoassert": "1.1.0" - } - }, - "on-intersect": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/on-intersect/-/on-intersect-1.1.0.tgz", - "integrity": "sha1-jYPf+XD8DScvyQg6U3c+gxY/9zc=", - "requires": { - "global": "4.3.2", - "is-dom": "1.0.9" - } - }, - "on-load": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/on-load/-/on-load-3.3.1.tgz", - "integrity": "sha1-izj1t46ITuRXwFFpmdMB2BSw/qA=", - "requires": { - "global": "4.3.2", - "nanoassert": "1.1.0" - } - }, - "once": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", - "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", - "requires": { - "wrappy": "1.0.2" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "opener": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz", - "integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg=", - "dev": true - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "0.0.10", - "wordwrap": "0.0.3" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - } - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" - } - }, - "os-browserify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", - "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "osenv": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", - "dev": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "outpipe": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz", - "integrity": "sha1-UM+GFjZeh+Ax4ppeyTOaPaRyX6I=", - "dev": true, - "requires": { - "shell-quote": "1.6.1" - } - }, - "own-or": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz", - "integrity": "sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw=", - "dev": true - }, - "own-or-env": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.0.tgz", - "integrity": "sha1-nvkg/IHi5jz1nUEQElg2jPT8pPs=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "package-json": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-2.4.0.tgz", - "integrity": "sha1-DRW9Z9HLvduyyiIv8u24a8sxqLs=", - "dev": true, - "requires": { - "got": "5.7.1", - "registry-auth-token": "3.3.1", - "registry-url": "3.1.0", - "semver": "5.4.1" - } - }, - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", - "dev": true - }, - "parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", - "dev": true, - "requires": { - "path-platform": "0.11.15" - } - }, - "parse-asn1": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", - "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", - "dev": true, - "requires": { - "asn1.js": "4.9.2", - "browserify-aes": "1.1.1", - "create-hash": "1.1.3", - "evp_bytestokey": "1.0.3", - "pbkdf2": "3.0.14" - } - }, - "parse-color": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-color/-/parse-color-1.0.0.tgz", - "integrity": "sha1-e3SLlag/A/FqlPU15S1/PZRlhhk=", - "dev": true, - "requires": { - "color-convert": "0.5.3" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" - } - }, - "parse-headers": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.1.tgz", - "integrity": "sha1-aug6eqJanZtwCswoaYzR8e1+lTY=", - "requires": { - "for-each": "0.3.2", - "trim": "0.0.1" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "1.3.1" - } - }, - "parse-ms": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", - "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=", - "dev": true - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "2.0.1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" - }, - "path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", - "dev": true - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - }, - "pause-stream": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", - "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", - "dev": true, - "requires": { - "through": "2.3.8" - } - }, - "pbkdf2": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", - "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==", - "dev": true, - "requires": { - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "ripemd160": "2.0.1", - "safe-buffer": "5.1.1", - "sha.js": "2.4.9" - } - }, - "pelo": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/pelo/-/pelo-0.0.4.tgz", - "integrity": "sha1-yjDI1ZpmnTtDptFMKGgcohtgSw8=" - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "2.0.4" - } - }, - "pkg-config": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz", - "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", - "dev": true, - "requires": { - "debug-log": "1.0.1", - "find-root": "1.1.0", - "xtend": "4.0.1" - } - }, - "plist": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/plist/-/plist-2.1.0.tgz", - "integrity": "sha1-V8zbeggh3yGDEhejytVOPhRqECU=", - "dev": true, - "requires": { - "base64-js": "1.2.0", - "xmlbuilder": "8.2.2", - "xmldom": "0.1.27" - }, - "dependencies": { - "base64-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz", - "integrity": "sha1-o5mS1yNYSBGYK+XikLtqU9hnAPE=", - "dev": true - } - } - }, - "plucker": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/plucker/-/plucker-0.0.0.tgz", - "integrity": "sha1-L/ok4Dqyz/pOda3B33DyViPEXQk=" - }, - "plur": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/plur/-/plur-1.0.0.tgz", - "integrity": "sha1-24XGgU9eXlo7Se/CjWBP7GKXUVY=", - "dev": true - }, - "pluralize": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", - "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=", - "dev": true - }, - "polite-element": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/polite-element/-/polite-element-1.0.5.tgz", - "integrity": "sha1-HdpDV7Jui6exagmI6RAyAfkT7lQ=", - "requires": { - "global": "4.3.2", - "nanomorph": "4.0.5" - }, - "dependencies": { - "nanomorph": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/nanomorph/-/nanomorph-4.0.5.tgz", - "integrity": "sha1-fifMXiigXfDCePU7pDDyU/OsP6w=" - } - } - }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", - "requires": { - "chalk": "1.1.3", - "js-base64": "2.4.0", - "source-map": "0.5.7", - "supports-color": "3.2.3" - } - }, - "postcss-nested": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-1.0.1.tgz", - "integrity": "sha1-kfKPTm4j1WckGsFUVYoM+rTMDY8=", - "dev": true, - "requires": { - "postcss": "5.2.18" - } - }, - "postcss-prefix": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/postcss-prefix/-/postcss-prefix-2.1.1.tgz", - "integrity": "sha512-S1G40iScgg/V/P6MPqPH0+B0KDc5LpN2zoEERQGywftZ3IbIESJDsz984n3ZPDFycT2NZ1nGJx/eC6oJX8xKTg==", - "requires": { - "postcss": "5.2.18", - "postcss-selector-parser": "1.3.3" - } - }, - "postcss-selector-parser": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-1.3.3.tgz", - "integrity": "sha1-0u4Z33pk+O8hwacchvfUg1yIwoE=", - "requires": { - "flatten": "1.0.2", - "indexes-of": "1.0.1", - "uniq": "1.0.1" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" - }, - "prettier-bytes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prettier-bytes/-/prettier-bytes-1.0.4.tgz", - "integrity": "sha1-mUsCqkb2mcULYle1+qp/4lV+YtY=" - }, - "pretty-bytes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", - "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", - "dev": true, - "requires": { - "get-stdin": "4.0.1", - "meow": "3.7.0" - } - }, - "pretty-hash": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pretty-hash/-/pretty-hash-1.0.1.tgz", - "integrity": "sha1-FuBXkYje9WvbVliSvNBaXWUySAc=" - }, - "pretty-ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-2.1.0.tgz", - "integrity": "sha1-QlfCVt8/sLRR1q/6qwIYhBJpgdw=", - "dev": true, - "requires": { - "is-finite": "1.0.2", - "parse-ms": "1.0.1", - "plur": "1.0.0" - } - }, - "process": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", - "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "progress": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", - "dev": true - }, - "progress-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz", - "integrity": "sha1-LNPP6jO6OonJwSHsM0er6asSX3c=", - "dev": true, - "requires": { - "speedometer": "0.1.4", - "through2": "0.2.3" - }, - "dependencies": { - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "speedometer": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz", - "integrity": "sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0=", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "through2": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", - "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", - "dev": true, - "requires": { - "readable-stream": "1.1.14", - "xtend": "2.1.2" - } - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "0.4.0" - } - } - } - }, - "protocol-buffers": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/protocol-buffers/-/protocol-buffers-3.2.1.tgz", - "integrity": "sha1-NyWOF+JKCC8G67F3MekoUdHHaIk=", - "requires": { - "brfs": "1.4.3", - "generate-function": "2.0.0", - "generate-object-property": "1.2.0", - "protocol-buffers-schema": "3.3.2", - "signed-varint": "2.0.1", - "varint": "5.0.0" - }, - "dependencies": { - "varint": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.0.tgz", - "integrity": "sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8=" - } - } - }, - "protocol-buffers-schema": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.3.2.tgz", - "integrity": "sha512-Xdayp8sB/mU+sUV4G7ws8xtYMGdQnxbeIfLjyO9TZZRJdztBGhlmbI5x1qcY4TG5hBkIKGnc28i7nXxaugu88w==" - }, - "ps-tree": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz", - "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=", - "dev": true, - "requires": { - "event-stream": "3.3.4" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "public-encrypt": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", - "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", - "dev": true, - "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "parse-asn1": "5.1.0", - "randombytes": "2.0.5" - } - }, - "pump": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", - "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", - "requires": { - "end-of-stream": "1.4.0", - "once": "1.3.3" - } - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "quote-stream": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz", - "integrity": "sha1-hJY/jJwmuULhU/7rU6rnRlK34LI=", - "requires": { - "buffer-equal": "0.0.1", - "minimist": "1.2.0", - "through2": "2.0.3" - } - }, - "random-access-file": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/random-access-file/-/random-access-file-1.8.1.tgz", - "integrity": "sha512-+Uhk0Of+dWHWjpbL2hizcwSV1UomcN3S0iUGV6BTZ2Js1BP9jHx3E5CT7y0eLbqTQNkVi4iehkHmia7Mdqa47w==", - "requires": { - "buffer-alloc-unsafe": "1.0.0", - "debug": "2.6.9", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "thunky": "1.0.2" - } - }, - "random-access-memory": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/random-access-memory/-/random-access-memory-2.4.0.tgz", - "integrity": "sha1-cvPYZbS1WiWYeUc+L7LeNWnGnuI=", - "requires": { - "process-nextick-args": "1.0.7" - } - }, - "randomatic": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", - "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "randombytes": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", - "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "randomfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz", - "integrity": "sha512-YL6GrhrWoic0Eq8rXVbMptH7dAxCs0J+mh5Y0euNekPPYaxEmdVGim6GdoxoRzKW2yJoU8tueifS7mYxvcFDEQ==", - "dev": true, - "requires": { - "randombytes": "2.0.5", - "safe-buffer": "5.1.1" - } - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" - }, - "rc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.2.tgz", - "integrity": "sha1-2M6ctX6NZNnHut2YdsfDTL48cHc=", - "dev": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - } - }, - "read-all-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz", - "integrity": "sha1-NcPhd/IHjveJ7kv6+kNzB06u9Po=", - "dev": true, - "requires": { - "pinkie-promise": "2.0.1", - "readable-stream": "2.3.3" - } - }, - "read-installed": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", - "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", - "dev": true, - "requires": { - "debuglog": "1.0.1", - "graceful-fs": "4.1.11", - "read-package-json": "2.0.12", - "readdir-scoped-modules": "1.0.2", - "semver": "5.4.1", - "slide": "1.1.6", - "util-extend": "1.0.3" - } - }, - "read-only-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", - "dev": true, - "requires": { - "readable-stream": "2.3.3" - } - }, - "read-package-json": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.12.tgz", - "integrity": "sha512-m7/I0+tP6D34EVvSlzCtuVA4D/dHL6OpLcn2e4XVP5X57pCKGUy1JjRSBVKHWpB+vUU91sL85h84qX0MdXzBSw==", - "dev": true, - "requires": { - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "json-parse-better-errors": "1.0.1", - "normalize-package-data": "2.4.0", - "slash": "1.0.0" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" - } - }, - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - } - } - }, - "readdir-scoped-modules": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz", - "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", - "dev": true, - "requires": { - "debuglog": "1.0.1", - "dezalgo": "1.0.3", - "graceful-fs": "4.1.11", - "once": "1.3.3" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.3", - "set-immediate-shim": "1.0.1" - } - }, - "readline2": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", - "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "mute-stream": "0.0.5" - }, - "dependencies": { - "mute-stream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", - "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", - "dev": true - } - } - }, - "recursive-watch": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/recursive-watch/-/recursive-watch-1.1.2.tgz", - "integrity": "sha1-kS4tYqg8iziNKIxDQ0lfJHvEP44=", - "requires": { - "ttl": "1.3.1" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" - } - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "requires": { - "is-equal-shallow": "0.1.3" - } - }, - "registry-auth-token": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.1.tgz", - "integrity": "sha1-+w0yie4Nmtosu1KvXf5mywcNMAY=", - "dev": true, - "requires": { - "rc": "1.2.2", - "safe-buffer": "5.1.1" - } - }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", - "dev": true, - "requires": { - "rc": "1.2.2" - } - }, - "remove-array-items": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/remove-array-items/-/remove-array-items-1.0.0.tgz", - "integrity": "sha1-B79CyzMvTPboXq2DteToltIyayE=" - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "1.0.2" - } - }, - "request": { - "version": "2.83.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", - "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", - "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.1", - "har-validator": "5.0.3", - "hawk": "6.0.2", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.1", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "3.1.0" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" - } - }, - "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", - "requires": { - "path-parse": "1.0.5" - } - }, - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true, - "requires": { - "exit-hook": "1.1.1", - "onetime": "1.1.0" - } - }, - "rgb2hex": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/rgb2hex/-/rgb2hex-0.1.0.tgz", - "integrity": "sha1-zNVfhgrgxcTqN1BLlY5ELY0SMls=", - "dev": true - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - }, - "ripemd160": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", - "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", - "dev": true, - "requires": { - "hash-base": "2.0.2", - "inherits": "2.0.3" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "2.1.0" - } - }, - "run-parallel": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.6.tgz", - "integrity": "sha1-KQA8miFj4B4tLfyQV18sbB1hoDk=", - "dev": true - }, - "run-waterfall": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/run-waterfall/-/run-waterfall-1.1.3.tgz", - "integrity": "sha1-2W/A9TYby9vUOFKdyKS0L8Z2ESM=" - }, - "rusha": { - "version": "0.8.7", - "resolved": "https://registry.npmjs.org/rusha/-/rusha-0.8.7.tgz", - "integrity": "sha1-MGc7fpX6/g6+H+JN1tlf1gX5Tt4=" - }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "dev": true, - "requires": { - "rx-lite": "4.0.8" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "sanitize-filename": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.1.tgz", - "integrity": "sha1-YS2hyWRz+gLczaktzVtKsWSmdyo=", - "dev": true, - "requires": { - "truncate-utf8-bytes": "1.0.2" - } - }, - "scroll-to-anchor": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/scroll-to-anchor/-/scroll-to-anchor-1.1.0.tgz", - "integrity": "sha1-yZuNLl2VBWdSeHyngJWrdbUgs/0=" - }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" - }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", - "dev": true, - "requires": { - "semver": "5.4.1" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "sha.js": { - "version": "2.4.9", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz", - "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==", - "dev": true, - "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.1" - } - }, - "shallow-copy": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/shallow-copy/-/shallow-copy-0.0.1.tgz", - "integrity": "sha1-QV9CcC1z2BAzApLMXuhurhoRoXA=" - }, - "shasum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", - "dev": true, - "requires": { - "json-stable-stringify": "0.0.1", - "sha.js": "2.4.9" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "sheetify": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/sheetify/-/sheetify-6.2.0.tgz", - "integrity": "sha512-Weod7zQDyD43hpazr5ANsYsNvbcbo/4oK3aSPIaCY05LOasRQMX9hwM+0++dOmMSVq6e/+jyB1lKusO3v038cQ==", - "requires": { - "falafel": "2.1.0", - "insert-css": "2.0.0", - "map-limit": "0.0.1", - "postcss": "5.2.18", - "postcss-prefix": "2.1.1", - "resolve": "1.5.0", - "stack-trace": "0.0.9", - "static-eval": "1.1.1", - "style-resolve": "1.0.1", - "through2": "2.0.3", - "xtend": "4.0.1" - } - }, - "sheetify-nested": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/sheetify-nested/-/sheetify-nested-1.0.2.tgz", - "integrity": "sha1-aJVml4A5H+nVmv2emtkXzc3q0gQ=", - "dev": true, - "requires": { - "postcss": "5.2.18", - "postcss-nested": "1.0.1" - } - }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "dev": true, - "requires": { - "array-filter": "0.0.1", - "array-map": "0.0.0", - "array-reduce": "0.0.0", - "jsonify": "0.0.0" - } - }, - "shelljs": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.1.tgz", - "integrity": "sha1-7GIRvtGSBEIIj+D3Cyg3Iy7SyKg=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "signed-varint": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/signed-varint/-/signed-varint-2.0.1.tgz", - "integrity": "sha1-UKmYnafJjCxh2tEZvJdHDvhSgSk=", - "requires": { - "varint": "5.0.0" - }, - "dependencies": { - "varint": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.0.tgz", - "integrity": "sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8=" - } - } - }, - "simple-sha1": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/simple-sha1/-/simple-sha1-2.1.0.tgz", - "integrity": "sha1-lCe7lv8SY8wQqEFM7dUaGLkZ6LM=", - "requires": { - "rusha": "0.8.7" - } - }, - "single-line-log": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz", - "integrity": "sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q=", - "dev": true, - "requires": { - "string-width": "1.0.2" - } - }, - "siphash24": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/siphash24/-/siphash24-1.1.0.tgz", - "integrity": "sha512-nDCEEZKb6m7OxxG/5wwaLy2R+KpyLcOnGjTJlFXG+14FUmpDD1FCFV/MjsYATjShsqPkSkl1BVevI0TCehdsTw==", - "requires": { - "nanoassert": "1.1.0" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", - "dev": true - }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", - "dev": true - }, - "sntp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", - "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", - "requires": { - "hoek": "4.2.0" - } - }, - "sodium-javascript": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/sodium-javascript/-/sodium-javascript-0.5.4.tgz", - "integrity": "sha512-YEQtgtDpDlKYGinla+F1HfZ1e3CtYCnsvJ5n2llbFFXmMDeIac4auOIkxuvt7dN9G0/ELBDAEgbzHKbEoP6GWw==", - "requires": { - "blake2b": "2.1.2", - "nanoassert": "1.1.0", - "siphash24": "1.1.0", - "xsalsa20": "1.0.2" - } - }, - "sodium-native": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-2.0.1.tgz", - "integrity": "sha512-3xi2SbjeEUivlH4zPaBIaxQtpAInq4T3zX9kaeDquzgXRv96QLbTR0AcJeqXj3JeKdhwJ6YiLS3XFrnMp4tc+w==", - "optional": true, - "requires": { - "nan": "2.8.0", - "node-gyp-build": "3.2.2" - } - }, - "sodium-universal": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sodium-universal/-/sodium-universal-2.0.0.tgz", - "integrity": "sha512-csdVyakzHJRyCevY4aZC2Eacda8paf+4nmRGF2N7KxCLKY2Ajn72JsExaQlJQ2BiXJncp44p3T+b80cU+2TTsg==", - "requires": { - "sodium-javascript": "0.5.4", - "sodium-native": "2.0.1" - } - }, - "sorted-array-functions": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.0.0.tgz", - "integrity": "sha1-wLVU2ecJr/y+VtNMGyUUGX/Tgnk=" - }, - "sorted-indexof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/sorted-indexof/-/sorted-indexof-1.0.0.tgz", - "integrity": "sha1-F8dC/3zxh+L1mhXfm4HxemLOCJk=" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "source-map-resolve": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.3.1.tgz", - "integrity": "sha1-YQ9hIqRFuN1RU1oqcbeD38Ekh2E=", - "dev": true, - "requires": { - "atob": "1.1.3", - "resolve-url": "0.2.1", - "source-map-url": "0.3.0", - "urix": "0.1.0" - } - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "requires": { - "source-map": "0.5.7" - } - }, - "source-map-url": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.3.0.tgz", - "integrity": "sha1-fsrxO1e80J2opAxdJp2zN5nUqvk=", - "dev": true - }, - "sparse-bitfield": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", - "requires": { - "memory-pager": "1.1.0" - } - }, - "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", - "dev": true, - "requires": { - "spdx-license-ids": "1.2.2" - } - }, - "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", - "dev": true - }, - "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", - "dev": true - }, - "spectron": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/spectron/-/spectron-3.8.0.tgz", - "integrity": "sha512-fQ7gFp6UuEaONjXFLifLeIUI022pOsm3b+NFAm696r2umUkSZ9IbnEgHwrvBX+pJ3QUDyCEs5bPHUieYU7FvaQ==", - "dev": true, - "requires": { - "dev-null": "0.1.1", - "electron-chromedriver": "1.8.0", - "request": "2.83.0", - "split": "1.0.1", - "webdriverio": "4.10.1" - }, - "dependencies": { - "split": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", - "dev": true, - "requires": { - "through": "2.3.8" - } - } - } - }, - "speedometer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/speedometer/-/speedometer-1.0.0.tgz", - "integrity": "sha1-zWccsGdSwivKM3Di8zREC+T8YuI=" - }, - "split": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", - "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", - "dev": true, - "requires": { - "through": "2.3.8" - } - }, - "spok": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/spok/-/spok-0.7.0.tgz", - "integrity": "sha1-nbF/aOMz71PkeFxUB1/Vx+M9rz0=", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - } - }, - "stack-trace": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", - "integrity": "sha1-qPbq7KkGdMMz58Q5U/J1tFFRBpU=" - }, - "stack-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", - "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=", - "dev": true - }, - "standard": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/standard/-/standard-7.1.2.tgz", - "integrity": "sha1-QBZu7sJAUGXRpPDj8VurxuJ0YH4=", - "dev": true, - "requires": { - "eslint": "2.10.2", - "eslint-config-standard": "5.3.1", - "eslint-config-standard-jsx": "1.2.1", - "eslint-plugin-promise": "1.3.2", - "eslint-plugin-react": "5.2.2", - "eslint-plugin-standard": "1.3.3", - "standard-engine": "4.1.3" - } - }, - "standard-engine": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-4.1.3.tgz", - "integrity": "sha1-ejGq1U8D2fOTVfQzic4GlPQJQVU=", - "dev": true, - "requires": { - "defaults": "1.0.3", - "deglob": "1.1.2", - "find-root": "1.1.0", - "get-stdin": "5.0.1", - "minimist": "1.2.0", - "multiline": "1.0.2", - "pkg-config": "1.1.1", - "xtend": "4.0.1" - }, - "dependencies": { - "get-stdin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", - "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", - "dev": true - } - } - }, - "state-copy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/state-copy/-/state-copy-1.0.2.tgz", - "integrity": "sha512-BnV/HsPmbkcU1CjsFCBPeI0McWdRpCvTlJ/X/4Od3P6q8B6z0dikSZpgmg2aDpm6LXCdze7m8ZIUO3aZ+ETjlg==", - "requires": { - "copy-text-to-clipboard": "1.0.3", - "fast-safe-stringify": "1.2.1" - } - }, - "static-eval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-1.1.1.tgz", - "integrity": "sha1-yoEwIQNUzxPZpyK8fpI3eEV7sZI=", - "requires": { - "escodegen": "1.9.0" - } - }, - "static-module": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/static-module/-/static-module-1.5.0.tgz", - "integrity": "sha1-J9qYg8QajNCSNvhC8MHrxu32PYY=", - "requires": { - "concat-stream": "1.6.0", - "duplexer2": "0.0.2", - "escodegen": "1.3.3", - "falafel": "2.1.0", - "has": "1.0.1", - "object-inspect": "0.4.0", - "quote-stream": "0.0.0", - "readable-stream": "1.0.34", - "shallow-copy": "0.0.1", - "static-eval": "0.2.4", - "through2": "0.4.2" - }, - "dependencies": { - "escodegen": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.3.3.tgz", - "integrity": "sha1-8CQBb1qI4Eb9EgBQVek5gC5sXyM=", - "requires": { - "esprima": "1.1.1", - "estraverse": "1.5.1", - "esutils": "1.0.0", - "source-map": "0.1.43" - } - }, - "esprima": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.1.1.tgz", - "integrity": "sha1-W28VR/TRAuZw4UDFCb5ncdautUk=" - }, - "estraverse": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.5.1.tgz", - "integrity": "sha1-hno+jlip+EYYr7bC3bzZFrfLr3E=" - }, - "esutils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.0.0.tgz", - "integrity": "sha1-gVHTWOIMisx/t0XnRywAJf5JZXA=" - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" - }, - "quote-stream": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-0.0.0.tgz", - "integrity": "sha1-zeKelMQJsW4Z3HCYuJtmWPlyHTs=", - "requires": { - "minimist": "0.0.8", - "through2": "0.4.2" - } - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "optional": true, - "requires": { - "amdefine": "1.0.1" - } - }, - "static-eval": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-0.2.4.tgz", - "integrity": "sha1-t9NNg4k3uWn5ZBygfUj47eJj6ns=", - "requires": { - "escodegen": "0.0.28" - }, - "dependencies": { - "escodegen": { - "version": "0.0.28", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-0.0.28.tgz", - "integrity": "sha1-Dk/xcV8yh3XWyrUaxEpAbNer/9M=", - "requires": { - "esprima": "1.0.4", - "estraverse": "1.3.2", - "source-map": "0.1.43" - } - }, - "esprima": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", - "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=" - }, - "estraverse": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.3.2.tgz", - "integrity": "sha1-N8K4k+8T1yPydth41g2FNRUqbEI=" - } - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, - "through2": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz", - "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=", - "requires": { - "readable-stream": "1.0.34", - "xtend": "2.1.2" - } - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "requires": { - "object-keys": "0.4.0" - } - } - } - }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "stream-collector": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-collector/-/stream-collector-1.0.1.tgz", - "integrity": "sha1-TU5V8XE1YSGyxfZVn5RHBaso2xU=", - "requires": { - "once": "1.3.3" - } - }, - "stream-combiner": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", - "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", - "dev": true, - "requires": { - "duplexer": "0.1.1" - } - }, - "stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", - "dev": true, - "requires": { - "duplexer2": "0.1.4", - "readable-stream": "2.3.3" - }, - "dependencies": { - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, - "requires": { - "readable-stream": "2.3.3" - } - } - } - }, - "stream-each": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", - "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", - "requires": { - "end-of-stream": "1.4.0", - "stream-shift": "1.0.0" - } - }, - "stream-http": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", - "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", - "dev": true, - "requires": { - "builtin-status-codes": "3.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "to-arraybuffer": "1.0.1", - "xtend": "4.0.1" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=" - }, - "stream-splicer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", - "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "0.2.1" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "4.0.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "style-resolve": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/style-resolve/-/style-resolve-1.0.1.tgz", - "integrity": "sha1-LSBnyUTV+39VPKdcTnlH30N5b64=", - "requires": { - "resolve": "1.5.0", - "xtend": "4.0.1" - } - }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "dev": true, - "requires": { - "minimist": "1.2.0" - } - }, - "sumchecker": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-1.3.1.tgz", - "integrity": "sha1-ebs7RFbdBPGOvbwNcDodHa7FEF0=", - "dev": true, - "requires": { - "debug": "2.6.9", - "es6-promise": "4.1.1" - } - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "requires": { - "has-flag": "1.0.0" - } - }, - "syntax-error": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz", - "integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=", - "dev": true, - "requires": { - "acorn": "4.0.13" - }, - "dependencies": { - "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", - "dev": true - } - } - }, - "table": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", - "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", - "dev": true, - "requires": { - "ajv": "4.11.8", - "ajv-keywords": "1.5.1", - "chalk": "1.1.3", - "lodash": "4.17.4", - "slice-ansi": "0.0.4", - "string-width": "2.1.1" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - } - } - }, - "tachyons": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/tachyons/-/tachyons-4.9.0.tgz", - "integrity": "sha512-bq40Dxl0Q9LFcFsoU4BmTlR4Y9Ta/9AClAhmKhBBdXN0isup9dXtYmFIJGYHz2EOVOf/gO/FONEH0BDa/iNYkg==" - }, - "tap": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/tap/-/tap-11.0.1.tgz", - "integrity": "sha512-YfrPp7FFxASC4tK4DEAKnnTxyg+J7T8kh8NiOmICNhiGvSojPAV34Ir4DDElFvnIiDEMzDP7233lw3WacFvIFQ==", - "dev": true, - "requires": { - "bind-obj-methods": "1.0.0", - "bluebird": "3.5.1", - "clean-yaml-object": "0.1.0", - "color-support": "1.1.3", - "coveralls": "2.13.3", - "foreground-child": "1.5.6", - "fs-exists-cached": "1.0.0", - "function-loop": "1.0.1", - "glob": "7.1.2", - "isexe": "2.0.0", - "js-yaml": "3.10.0", - "minipass": "2.2.1", - "mkdirp": "0.5.1", - "nyc": "11.4.1", - "opener": "1.4.3", - "os-homedir": "1.0.2", - "own-or": "1.0.0", - "own-or-env": "1.0.0", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "source-map-support": "0.4.18", - "stack-utils": "1.0.1", - "tap-mocha-reporter": "3.0.6", - "tap-parser": "7.0.0", - "tmatch": "3.1.0", - "trivial-deferred": "1.0.1", - "tsame": "1.1.2", - "write-file-atomic": "2.3.0", - "yapool": "1.0.0" - }, - "dependencies": { - "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "signal-exit": "3.0.2" - } - } - } - }, - "tap-mocha-reporter": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-3.0.6.tgz", - "integrity": "sha512-UImgw3etckDQCoqZIAIKcQDt0w1JLVs3v0yxLlmwvGLZl6MGFxF7JME5PElXjAoDklVDU42P3vVu5jgr37P4Yg==", - "dev": true, - "requires": { - "color-support": "1.1.3", - "debug": "2.6.9", - "diff": "1.4.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "js-yaml": "3.10.0", - "readable-stream": "2.3.3", - "tap-parser": "5.4.0", - "unicode-length": "1.0.3" - }, - "dependencies": { - "tap-parser": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-5.4.0.tgz", - "integrity": "sha512-BIsIaGqv7uTQgTW1KLTMNPSEQf4zDDPgYOBRdgOfuB+JFOLRBfEu6cLa/KvMvmqggu1FKXDfitjLwsq4827RvA==", - "dev": true, - "requires": { - "events-to-array": "1.1.2", - "js-yaml": "3.10.0", - "readable-stream": "2.3.3" - } - } - } - }, - "tap-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-7.0.0.tgz", - "integrity": "sha512-05G8/LrzqOOFvZhhAk32wsGiPZ1lfUrl+iV7+OkKgfofZxiceZWMHkKmow71YsyVQ8IvGBP2EjcIjE5gL4l5lA==", - "dev": true, - "requires": { - "events-to-array": "1.1.2", - "js-yaml": "3.10.0", - "minipass": "2.2.1" - } - }, - "tar-stream": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.5.tgz", - "integrity": "sha512-mQdgLPc/Vjfr3VWqWbfxW8yQNiJCbAZ+Gf6GDu1Cy0bdb33ofyiNGBtAY96jHFhDuivCwgW1H9DgTON+INiXgg==", - "dev": true, - "requires": { - "bl": "1.2.1", - "end-of-stream": "1.4.0", - "readable-stream": "2.3.3", - "xtend": "4.0.1" - } - }, - "tempfile": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-1.1.1.tgz", - "integrity": "sha1-W8xOrsxKsscH2LwR2ZzMmiyyh/I=", - "dev": true, - "requires": { - "os-tmpdir": "1.0.2", - "uuid": "2.0.3" - }, - "dependencies": { - "uuid": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", - "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", - "dev": true - } - } - }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "0.7.0" - }, - "dependencies": { - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - } - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "throttleit": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", - "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" - } - }, - "thunky": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", - "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=" - }, - "timed-out": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-3.1.3.tgz", - "integrity": "sha1-lYYL/MXHbCd/j4Mm/Q9bLiDrohc=", - "dev": true - }, - "timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", - "dev": true, - "requires": { - "process": "0.11.10" - }, - "dependencies": { - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - } - } - }, - "tmatch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/tmatch/-/tmatch-3.1.0.tgz", - "integrity": "sha512-W3MSATOCN4pVu2qFxmJLIArSifeSOFqnfx9hiUaVgOmeRoI2NbU7RNga+6G+L8ojlFeQge+ZPCclWyUpQ8UeNQ==", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "1.0.2" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-buffer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.0.tgz", - "integrity": "sha1-N1vAPtrlw1qPoLP+laHzmF2x3Po=" - }, - "toiletdb": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/toiletdb/-/toiletdb-1.4.0.tgz", - "integrity": "sha1-bG+HGDSyIXjFSQ+fgytYw8fLqFI=", - "requires": { - "debug": "2.6.9", - "last-one-wins": "1.0.4" - } - }, - "touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", - "dev": true, - "requires": { - "nopt": "1.0.10" - } - }, - "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", - "requires": { - "punycode": "1.4.1" - } - }, - "trim": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", - "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - }, - "trivial-deferred": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.0.1.tgz", - "integrity": "sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM=", - "dev": true - }, - "truncate-utf8-bytes": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", - "integrity": "sha1-QFkjkJWS1W94pYGENLC3hInKXys=", - "dev": true, - "requires": { - "utf8-byte-length": "1.0.4" - } - }, - "tryit": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz", - "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", - "dev": true - }, - "tsame": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/tsame/-/tsame-1.1.2.tgz", - "integrity": "sha512-ovCs24PGjmByVPr9tSIOs/yjUX9sJl0grEmOsj9dZA/UknQkgPOKcUqM84aSCvt9awHuhc/boMzTg3BHFalxWw==", - "dev": true - }, - "ttl": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/ttl/-/ttl-1.3.1.tgz", - "integrity": "sha512-+bGy9iDAqg3WSfc2ZrprToSPJhZjqy7vUv9wupQzsiv+BVPVx1T2a6G4T0290SpQj+56Toaw9BiLO5j5Bd7QzA==" - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "1.1.2" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "uint64be": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uint64be/-/uint64be-2.0.1.tgz", - "integrity": "sha1-oxDZTk5eCwKpXWeOMzI/gCvchCg=" - }, - "umd": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", - "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=", - "dev": true - }, - "unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", - "dev": true - }, - "undefsafe": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-0.0.3.tgz", - "integrity": "sha1-7Mo6A+VrmvFzhbqsgSrIO5lKli8=", - "dev": true - }, - "unicode-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-1.0.3.tgz", - "integrity": "sha1-Wtp6f+1RhBpBijKM8UlHisg1irs=", - "dev": true, - "requires": { - "punycode": "1.4.1", - "strip-ansi": "3.0.1" - } - }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" - }, - "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", - "dev": true, - "requires": { - "crypto-random-string": "1.0.0" - } - }, - "unixify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unixify/-/unixify-1.0.0.tgz", - "integrity": "sha1-OmQcjC/7zk2mg6XHDwOkYpQMIJA=", - "requires": { - "normalize-path": "2.1.1" - } - }, - "unordered-array-remove": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unordered-array-remove/-/unordered-array-remove-1.0.2.tgz", - "integrity": "sha1-xUbo+I4xegzyZEyX7LV9umbSUO8=" - }, - "unordered-set": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unordered-set/-/unordered-set-1.1.0.tgz", - "integrity": "sha1-K6fvMW7dC5WQzFR8dPdqLxZP7Mo=" - }, - "untildify": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.2.tgz", - "integrity": "sha1-fx8wIFWz/qDz6B3HjrNnZstl4/E=" - }, - "unzip-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz", - "integrity": "sha1-uYTwh3/AqJwsdzzB73tbIytbBv4=", - "dev": true - }, - "update-notifier": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-1.0.3.tgz", - "integrity": "sha1-j5LFFUgr1oMbfJMBPnD4dVLHz1o=", - "dev": true, - "requires": { - "boxen": "0.6.0", - "chalk": "1.1.3", - "configstore": "2.1.0", - "is-npm": "1.0.0", - "latest-version": "2.0.0", - "lazy-req": "1.1.0", - "semver-diff": "2.1.0", - "xdg-basedir": "2.0.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "requires": { - "prepend-http": "1.0.4" - } - }, - "user-home": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", - "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", - "dev": true, - "requires": { - "os-homedir": "1.0.2" - } - }, - "utf8-byte-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz", - "integrity": "sha1-9F8VDExm7uloGGUFq5P8u4rWv2E=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "util-extend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", - "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=", - "dev": true - }, - "utp-native": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/utp-native/-/utp-native-1.6.2.tgz", - "integrity": "sha512-z724NhTLcRQeBBM0W9npDpwCZvsj2veD3/NKFjKfdS5AlTr4EQRIzl85JupKNAc1PjlhjOWIzObvJrQq3FjLqg==", - "optional": true, - "requires": { - "nan": "2.8.0", - "node-gyp-build": "3.2.2", - "readable-stream": "2.3.3" - } - }, - "uuid": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" - }, - "uuid-1345": { - "version": "0.99.6", - "resolved": "https://registry.npmjs.org/uuid-1345/-/uuid-1345-0.99.6.tgz", - "integrity": "sha1-sScK4BWnchx63sbEbsFpxgmK7UA=", - "dev": true, - "requires": { - "macaddress": "0.2.8" - } - }, - "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", - "dev": true, - "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" - } - }, - "validator": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/validator/-/validator-9.1.2.tgz", - "integrity": "sha512-1Tml6crNdsSC61jHssWksQxq6C7MmSFCCmf99Eb+l/V/cwVlw4/Pg3YXBP1WKcHLsyqe3E+iJXUZgoTTQFcqQg==", - "dev": true - }, - "varint": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/varint/-/varint-3.0.1.tgz", - "integrity": "sha1-nT9T4DbAqxIACnS8LSTL8JOlgdk=" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "1.3.0" - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, - "walkdir": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", - "integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=", - "dev": true - }, - "watchify": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/watchify/-/watchify-3.9.0.tgz", - "integrity": "sha1-8HX9LoqGrN6Eztum5cKgvt1SPZ4=", - "dev": true, - "requires": { - "anymatch": "1.3.2", - "browserify": "14.5.0", - "chokidar": "1.7.0", - "defined": "1.0.0", - "outpipe": "1.1.1", - "through2": "2.0.3", - "xtend": "4.0.1" - }, - "dependencies": { - "browserify": { - "version": "14.5.0", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-14.5.0.tgz", - "integrity": "sha512-gKfOsNQv/toWz+60nSPfYzuwSEdzvV2WdxrVPUbPD/qui44rAkB3t3muNtmmGYHqrG56FGwX9SUEQmzNLAeS7g==", - "dev": true, - "requires": { - "JSONStream": "1.3.1", - "assert": "1.4.1", - "browser-pack": "6.0.2", - "browser-resolve": "1.11.2", - "browserify-zlib": "0.2.0", - "buffer": "5.0.8", - "cached-path-relative": "1.0.1", - "concat-stream": "1.5.2", - "console-browserify": "1.1.0", - "constants-browserify": "1.0.0", - "crypto-browserify": "3.12.0", - "defined": "1.0.0", - "deps-sort": "2.0.0", - "domain-browser": "1.1.7", - "duplexer2": "0.1.4", - "events": "1.1.1", - "glob": "7.1.2", - "has": "1.0.1", - "htmlescape": "1.1.1", - "https-browserify": "1.0.0", - "inherits": "2.0.3", - "insert-module-globals": "7.0.1", - "labeled-stream-splicer": "2.0.0", - "module-deps": "4.1.1", - "os-browserify": "0.3.0", - "parents": "1.0.1", - "path-browserify": "0.0.0", - "process": "0.11.10", - "punycode": "1.4.1", - "querystring-es3": "0.2.1", - "read-only-stream": "2.0.0", - "readable-stream": "2.3.3", - "resolve": "1.5.0", - "shasum": "1.0.2", - "shell-quote": "1.6.1", - "stream-browserify": "2.0.1", - "stream-http": "2.7.2", - "string_decoder": "1.0.3", - "subarg": "1.0.0", - "syntax-error": "1.3.0", - "through2": "2.0.3", - "timers-browserify": "1.4.2", - "tty-browserify": "0.0.0", - "url": "0.11.0", - "util": "0.10.3", - "vm-browserify": "0.0.4", - "xtend": "4.0.1" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "1.0.6" - } - }, - "buffer": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.0.8.tgz", - "integrity": "sha512-xXvjQhVNz50v2nPeoOsNqWCLGfiv4ji/gXZM28jnVwdLJxH4mFyqgqCKfaK9zf1KUbG6zTkjLOy7ou+jSMarGA==", - "dev": true, - "requires": { - "base64-js": "1.2.1", - "ieee754": "1.1.8" - } - }, - "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.0.6", - "typedarray": "0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "0.10.31", - "util-deprecate": "1.0.2" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, - "requires": { - "readable-stream": "2.3.3" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - } - } - }, - "wayfarer": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/wayfarer/-/wayfarer-6.6.2.tgz", - "integrity": "sha512-jwIufUN6EYfMeCJYBA8r0YytqHaSGACLtOddMeBtdq5gTo2F2XgK+t7eEXSPUBF9vm+hdI/iPOtSz1EJOd01dQ==", - "requires": { - "xtend": "4.0.1" - } - }, - "wdio-dot-reporter": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/wdio-dot-reporter/-/wdio-dot-reporter-0.0.9.tgz", - "integrity": "sha1-kpsq2v1J1rBTT9oGjocxm0fjj+U=", - "dev": true - }, - "webdriverio": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-4.10.1.tgz", - "integrity": "sha1-Qvekh7czebJ0Oi+uULMUJhX2EXA=", - "dev": true, - "requires": { - "archiver": "2.1.1", - "babel-runtime": "6.26.0", - "css-parse": "2.0.0", - "css-value": "0.0.1", - "deepmerge": "2.0.1", - "ejs": "2.5.7", - "gaze": "1.1.2", - "glob": "7.1.2", - "inquirer": "3.3.0", - "json-stringify-safe": "5.0.1", - "mkdirp": "0.5.1", - "npm-install-package": "2.1.0", - "optimist": "0.6.1", - "q": "1.5.1", - "request": "2.83.0", - "rgb2hex": "0.1.0", - "safe-buffer": "5.1.1", - "supports-color": "5.0.1", - "url": "0.11.0", - "validator": "9.1.2", - "wdio-dot-reporter": "0.0.9", - "wgxpath": "1.0.0" - }, - "dependencies": { - "archiver": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/archiver/-/archiver-2.1.1.tgz", - "integrity": "sha1-/2YrSnggFJSj7lRNOjP+dJZQnrw=", - "dev": true, - "requires": { - "archiver-utils": "1.3.0", - "async": "2.6.0", - "buffer-crc32": "0.2.13", - "glob": "7.1.2", - "lodash": "4.17.4", - "readable-stream": "2.3.3", - "tar-stream": "1.5.5", - "zip-stream": "1.2.0" - } - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "supports-color": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.0.1.tgz", - "integrity": "sha512-7FQGOlSQ+AQxBNXJpVDj8efTA/FtyB5wcNE1omXXJ0cq6jm1jjDwuROlYDbnzHqdNPqliWFhcioCWSyav+xBnA==", - "dev": true, - "requires": { - "has-flag": "2.0.0" - } - } - } - }, - "wgxpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wgxpath/-/wgxpath-1.0.0.tgz", - "integrity": "sha1-7vikudVYzEla06mit1FZfs2a9pA=", - "dev": true - }, - "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", - "dev": true, - "requires": { - "isexe": "2.0.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "widest-line": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz", - "integrity": "sha1-DAnIXCqUaD0Nfq+O4JfVZL8OEFw=", - "dev": true, - "requires": { - "string-width": "1.0.2" - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "dev": true, - "requires": { - "mkdirp": "0.5.1" - } - }, - "write-file-atomic": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", - "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" - } - }, - "xdg-basedir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz", - "integrity": "sha1-7byQPMOF/ARSPZZqM1UEtVBNG9I=", - "dev": true, - "requires": { - "os-homedir": "1.0.2" - } - }, - "xhr": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.4.0.tgz", - "integrity": "sha1-4W5mpF+GmGHu76tBbV7/ci3ECZM=", - "requires": { - "global": "4.3.2", - "is-function": "1.0.1", - "parse-headers": "2.0.1", - "xtend": "4.0.1" - } - }, - "xmlbuilder": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz", - "integrity": "sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=", - "dev": true - }, - "xmldom": { - "version": "0.1.27", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", - "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=", - "dev": true - }, - "xsalsa20": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.0.2.tgz", - "integrity": "sha512-g1DFmZ5JJ9Qzvt4dMw6m9IydqoCSP381ucU5zm46Owbk3bwmqAr8eEJirOPc7PrXRn45drzOpAyDp8jsnoyXyw==" - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "yapool": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yapool/-/yapool-1.0.0.tgz", - "integrity": "sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o=", - "dev": true - }, - "yargs": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", - "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", - "dev": true, - "requires": { - "camelcase": "3.0.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", - "y18n": "3.2.1", - "yargs-parser": "4.2.1" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - } - } - }, - "yargs-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", - "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", - "dev": true, - "requires": { - "camelcase": "3.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - } - } - }, - "yauzl": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", - "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", - "dev": true, - "requires": { - "fd-slicer": "1.0.1" - } - }, - "yo-yoify": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/yo-yoify/-/yo-yoify-3.7.3.tgz", - "integrity": "sha1-yNGoBL4J+lFbJRksH33lAIpmMBE=", - "requires": { - "acorn": "5.2.1", - "falafel": "2.1.0", - "hyperx": "2.3.2", - "on-load": "3.3.1", - "through2": "2.0.3" - } - }, - "zip-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", - "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", - "dev": true, - "requires": { - "archiver-utils": "1.3.0", - "compress-commons": "1.2.2", - "lodash": "4.17.4", - "readable-stream": "2.3.3" - } - } - } -} diff --git a/package.json b/package.json index 6edfe5b8..5210cdd0 100644 --- a/package.json +++ b/package.json @@ -5,83 +5,93 @@ "license": "MIT", "repository": "datproject/dat-desktop", "description": "Dat Desktop App", - "author": "Dat Team", - "dependencies": { - "base-elements": "^2.2.1", - "choo": "^6.6.0", - "choo-expose": "^1.0.0", - "choo-log": "^6.0.0", - "choo-persist": "^3.0.0", - "dat-colors": "^3.5.0", - "dat-doctor": "^1.2.2", - "dat-encoding": "^4.0.1", - "dat-icons": "^2.2.0", - "dat-node": "^3.2.3", - "delegate-electron-events": "^1.0.1", - "electron-auto-updater": "^0.9.2", - "electron-default-menu": "^1.0.0", - "electron-window": "^0.8.1", - "envobj": "^1.0.2", - "explain-error": "^1.0.3", - "microcomponent": "^3.1.6", - "minimist": "^1.2.0", - "mirror-folder": "^2.1.0", - "mkdirp": "^0.5.1", - "ms": "^0.7.2", - "multidat": "^5.1.0", - "nanologger": "^1.0.2", - "nanomorph": "^5.0.0", - "prettier-bytes": "^1.0.3", - "rimraf": "^2.5.4", - "run-waterfall": "^1.1.3", - "sheetify": "^6.0.0", - "tachyons": "^4.7.2", - "toiletdb": "^1.4.0", - "xhr": "^2.3.3", - "xtend": "^4.0.1" - }, + "author": "Dat Team ", "scripts": { - "bundle": "node scripts/build.js bundle", - "watch": "node scripts/browserify.js watch", - "deps": "dependency-check . --entry app.js && dependency-check . --entry app.js --extra -i tachyons -i dat-colors -i cross-env --no-dev", - "rebuild": "node scripts/build.js rebuild", - "burnthemall": "rm -rf ~/.electron && npm run clean && npm install && npm run bundle", - "clean": "rm -rf node_modules/", - "build-background": "node scripts/build.js background", - "start": "cross-env NODE_ENV=development electron .", - "test": "standard && npm run deps && npm run test:unit && npm run test:integration", - "test:integration": "node ./tests/index.js", - "test:unit": "electron ./tests/dat-manager.js && node ./tests/intro.js", - "postinstall": "node scripts/build.js postinstall", - "pack": "build --dir", - "dist": "build --publish=onTagOrDraft" + "prestart": "npm run build:dev", + "start": "cross-env NODE_ENV=development npm-run-all -p start:watch start:electron", + "start:electron": "cross-env NODE_V=\"$(node -v)\" NODE_ENV=development electron .", + "start:watch": "webpack --watch --mode=development", + "test": "npm run test:deps && npm run test:lint && npm run test:unit", + "test:deps": "cross-env DEBUG=* dependency-check . --detective precinct --entry app/index.js", + "test:lint": "prettier-standard 'app/**/*.js' 'tests/**/*.js' 'lib/**/*.js' 'unit-tests/*.js' && standard", + "test:unit": "cross-env NODE_ENV=test babel-tape-runner -r ./unit-tests/_helpers/*.js unit-tests/*.js", + "clean": "npm run clean:git && npm run clean:dirs", + "clean:git": "git clean -dfX", + "clean:dirs": "rm -rf ~/.electron && rm -f package-lock.json", + "update-rdt": "rm -rf dev/react-dev-tools && ced fmkadmapgofadopljbjfkapdkoienihi dev/react-dev-tools", + "build:dev": "webpack --mode=development", + "build:prod": "webpack --mode=production", + "pack": "npm run build:prod && npm run pack:all", + "pack:os": "build --dir", + "pack:all": "npm run pack:os -- --linux --mac --win", + "dist": "npm run build:prod && npm run dist:os", + "dist:os": "build", + "dist:all": "npm run dist:os -- --linux --mac --win" + }, + "standard": { + "ignore": [ + "dev/**" + ] }, "devDependencies": { - "browserify": "^13.3.0", - "clipboardy": "^1.1.2", - "concat-stream": "^1.6.0", - "cross-env": "^5.1.1", - "del": "^2.2.2", - "dependency-check": "^2.6.0", - "electron": "^1.7.11", - "electron-builder": "^8.6.0", - "envify": "^4.0.0", - "nodemon": "^1.9.2", - "npm-run-path": "^2.0.2", - "sheetify-nested": "^1.0.2", - "spectron": "^3.8.0", - "spok": "^0.7.0", - "standard": "^7.1.2", - "tap": "^11.0.1", - "through2": "^2.0.3", - "watchify": "^3.7.0" + "@leichtgewicht/chrome-ext-downloader": "^1.1.0", + "babel-core": "^6.26.3", + "babel-loader": "^7.1.4", + "babel-plugin-transform-object-rest-spread": "^6.26.0", + "babel-preset-env": "^1.7.0", + "babel-preset-react": "^6.24.1", + "babel-tape-runner": "^2.0.1", + "cross-env": "^5.1.6", + "dependency-check": "^3.1.0", + "electron": "^2.0.1", + "electron-builder": "^20.15.1", + "enzyme": "^3.3.0", + "enzyme-adapter-react-16": "^1.1.1", + "enzyme-adapter-react-helper": "^1.2.3", + "gaze": "^1.1.3", + "npm-run-all": "^4.1.3", + "precinct": "^4.2.0", + "prettier-standard": "^8.0.1", + "standard": "^11.0.1", + "tape": "^4.9.0", + "webpack": "^4.20.2", + "webpack-cli": "^3.1.1", + "webpack-node-externals": "^1.7.2" + }, + "dependencies": { + "dat-colors": "^3.5.1", + "dat-doctor": "^1.4.0", + "dat-encoding": "^5.0.1", + "dat-icons": "^2.5.2", + "dat-node": "^3.5.8", + "electron-default-menu": "^1.0.1", + "electron-drag": "github:martinheidegger/electron-drag#f432d168f0a4f7f53aa9272793dd4c6793072ea0", + "minimist": "^1.2.0", + "mirror-folder": "^3.0.0", + "mkdirp-promise": "^5.0.1", + "ms": "^2.1.1", + "polished": "^1.9.2", + "prettier-bytes": "^1.0.4", + "react": "^16.3.2", + "react-dom": "^16.3.2", + "react-file-drop": "^0.2.4", + "react-redux": "^5.0.7", + "react-swap": "^2.0.2", + "redux": "^4.0.0", + "redux-logger": "^3.0.6", + "redux-thunk": "^2.2.0", + "styled-components": "^3.2.6", + "tachyons": "^4.9.1", + "util-promisify": "^2.1.0" }, "build": { "appId": "com.datproject.dat", "mac": { - "category": "public.app-category.utilities" + "category": "public.app-category.utilities", + "icon": "build/icon.icns" }, "dmg": { + "icon": "build/icon.icns", "contents": [ { "x": 220, @@ -95,6 +105,17 @@ } ] }, + "linux": { + "category": "Utility", + "target": [ + "AppImage", + "deb" + ] + }, + "win": { + "target": "NSIS", + "icon": "build/icon.png" + }, "protocols": [ { "name": "Dat Link", diff --git a/pages/main.js b/pages/main.js deleted file mode 100644 index 6434a2a8..00000000 --- a/pages/main.js +++ /dev/null @@ -1,112 +0,0 @@ -'use strict' - -const html = require('choo/html') -const shell = require('electron').shell - -const StatusBar = require('../elements/status-bar') -const Download = require('../elements/download') -const Inspect = require('../elements/inspect') -const Header = require('../elements/header') -const Sprite = require('../elements/sprite') -const Table = require('../elements/table') -const Intro = require('../elements/intro') -const Empty = require('../elements/empty') - -module.exports = mainView - -const statusBar = StatusBar() -const download = Download() -const inspect = Inspect() -const header = Header() -const sprite = Sprite() -const intro = Intro() - -// render the main view -// (obj, obj, fn) -> html -function mainView (state, emit) { - const showIntroScreen = state.intro.show - const showInspectScreen = state.inspect.show - const showDownloadScreen = state.download.show - const dats = state.dats.values - const isReady = state.dats.ready - const headerProps = { - isReady: isReady, - oncreate: () => emit('dats:create'), - onimport: (link) => emit('dats:download', link), - onreport: () => shell.openExternal('https://github.com/datproject/dat-desktop/issues') - } - - document.title = 'Dat Desktop' - - if (showDownloadScreen) { - return html` -
- ${sprite.render()} - ${header.render(headerProps)} - ${download.render(Object.assign({}, state.download, { - oncancel: () => emit('download:hide'), - ondownload: ({ key, location }) => { - emit('dats:clone', { key, location }) - emit('download:hide') - }, - onupdate: () => { - emit('render') - } - }))} -
- ` - } - - if (showInspectScreen) { - return html` -
- ${sprite.render()} - ${header.render(headerProps)} - ${inspect.render(Object.assign({}, state.inspect, { - oncancel: () => emit('inspect:hide'), - onupdate: () => emit('render') - }))} -
- ` - } - - if (showIntroScreen) { - document.title = 'Dat Desktop | Welcome' - return html` -
- ${sprite.render()} - ${intro.render({ - onexit: () => { - emit('intro:hide') - }, - onOpenHomepage: () => { - emit('intro:open-homepage') - }, - onupdate: () => { - emit('render') - } - })} -
- ` - } - - if (!dats.length) { - return html` -
- ${sprite.render()} - ${header.render(headerProps)} - ${Empty()} - ${statusBar.render(state.dats.speed)} -
- ` - } - - return html` -
- ${sprite.render()} - ${header.render(headerProps)} - ${Table(state, emit)} - ${statusBar.render(state.dats.speed)} -
- ` -} diff --git a/preload.js b/preload.js new file mode 100644 index 00000000..37101103 --- /dev/null +++ b/preload.js @@ -0,0 +1,31 @@ +'use strict' +/** + * This file exists for security reasons! + * + * It prepares by removing dangerous scripts from the global scopes + * Before running the app. + * + * See: https://electronjs.org/docs/tutorial/security + * & https://eslint.org/docs/rules/no-implied-eval + */ +// eslint-disable-next-line no-eval +window.eval = global.eval = function () { + throw new Error('Sorry, this app does not support window.eval().') +} +const setTimeout = global.setTimeout +window.setTimeout = global.setTimeout = function (fn, ms) { + if (typeof fn !== 'function') { + throw new Error('Sorry, this app does not support setTimeout() with a string') + } + return setTimeout(fn, ms) +} +const setInterval = global.setInterval +window.setInterval = global.setInterval = function (fn, ms) { + if (typeof fn !== 'function') { + throw new Error('Sorry, this app does not support setInterval() with a string') + } + return setInterval(fn, ms) +} +process.once('loaded', () => { + document.addEventListener('DOMContentLoaded', () => require('./static/bundle')) +}) diff --git a/scripts/browserify.js b/scripts/browserify.js deleted file mode 100755 index 5f57e905..00000000 --- a/scripts/browserify.js +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env node - -const browserify = require('../lib/browserify') - -const watch = process.argv[2] === 'watch' -browserify({ watch }) diff --git a/scripts/build.js b/scripts/build.js deleted file mode 100644 index 8c81eddf..00000000 --- a/scripts/build.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict' - -const {execSync} = require('child_process') -const npmRunPath = require('npm-run-path') -const {platform} = require('os') - -const usage = () => { - console.error('Usage: scripts/build [-h]') -} - -const exec = cmd => execSync(cmd, { env: npmRunPath.env(), encoding: 'utf8' }) - -const rebuild = () => { - const electronVersion = exec('electron --version').trim().slice(1) - const electronAbi = exec('electron --abi').trim() - console.error('[scripts/build] rebuilding native deps') - console.error('[scripts/build] detected electron=%s abi=%s', electronVersion, electronAbi) - exec(`npm rebuild \ - --runtime=electron \ - --target="${electronVersion}" \ - --disturl=https://atom.io/download/atom-shell \ - --abi="${electronAbi}"`) -} - -const buildBackground = () => { - console.error('[scripts/build] building background') - console.error(exec('tiffutil \\' + - '-cathidpicheck \\' + - 'build/background.png build/background@2x.png \\' + - '-out build/background.tiff')) -} - -const bundle = () => { - console.error('[scripts/build] bundling javascript') - console.error(exec('node scripts/browserify.js')) -} - -const postinstall = () => { - if (platform() === 'darwin') buildBackground() - rebuild() - bundle() -} - -// parse CLI flags -switch (process.argv[2]) { - case 'rebuild': rebuild(); break - case 'css': break - case 'background': buildBackground(); break - case 'bundle': bundle(); break - case 'postinstall': postinstall(); break - default: usage(); break -} diff --git a/static/base.css b/static/base.css new file mode 100644 index 00000000..50a63d7a --- /dev/null +++ b/static/base.css @@ -0,0 +1,96 @@ +@font-face { + font-family: 'SourceSansPro'; + src: url('fonts/SourceSansPro-Regular.ttf') format('truetype') +} + +@font-face { + font-family: 'SourceCodePro'; + src: url('fonts/SourceCodePro-Regular.ttf') format('truetype') +} + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; +} + +html { + overflow: auto; +} + +body { + line-height: 1.5; + overflow: hidden; + min-width: 800px; +} + +main { + overflow-y: auto; + height: calc(100vh - 5rem); /* height of header + status bar */ + background-color: var(--color-white); +} + +body, input, textarea, select, button { + font-family: 'SourceSansPro', sans-serif; + &:focus { + outline: none; + } +} + +pre, code { + font-family: 'SourceCodePro', monospace; +} + +input, textarea, select, button { + -webkit-user-drag: none; +} + +html { + -webkit-user-select: none; + -webkit-user-drag: none; + cursor: default; +} + +h1, h2, h3, h4, h5, h6 { + font-size: 1rem; + font-weight: bold; +} + +img { + -webkit-user-drag: none; +} + +button { + border: none; +} + +.is-selectable { + -webkit-user-select: auto; + cursor: auto; +} + +.is-draggable { + -webkit-app-region: drag; +} + +/* fading animation to highlight new dats */ +.fade-highlight { + animation: fade-highlight 2.25s ease-in-out; +} +@keyframes fade-highlight { + 0% { background-color: rgba(42,202,75,.2); } + 35% { background-color: rgba(42,202,75,.2); } + 100% { background-color: rgba(42,202,75,0); } +} \ No newline at end of file diff --git a/assets/fonts/SourceCodePro-Regular.ttf b/static/fonts/SourceCodePro-Regular.ttf similarity index 100% rename from assets/fonts/SourceCodePro-Regular.ttf rename to static/fonts/SourceCodePro-Regular.ttf diff --git a/assets/fonts/SourceSansPro-Regular.ttf b/static/fonts/SourceSansPro-Regular.ttf similarity index 100% rename from assets/fonts/SourceSansPro-Regular.ttf rename to static/fonts/SourceSansPro-Regular.ttf diff --git a/tests/dat-manager.js b/tests/dat-manager.js deleted file mode 100755 index f6a674be..00000000 --- a/tests/dat-manager.js +++ /dev/null @@ -1,278 +0,0 @@ -#!/usr/bin/env node node_modules/.bin/electron -var tap = require('tap') -var test = tap.test -var Multidat = require('multidat') -var toilet = require('toiletdb/inmemory') - -var Manager = require('../lib/dat-manager') -tap.on('result', function (res) { - process.exit(res.ok ? 0 : 1) -}) - -function setup (db, dbPaused, cb) { - if (typeof db === 'function') { - dbPaused = db - db = null - } - if (typeof dbPaused === 'function') { - cb = dbPaused - dbPaused = null - } - if (!db) db = toilet() - if (!dbPaused) dbPaused = toilet() - Multidat(db, function (err, multidat) { - if (err) return cb(err) - cb(null, { multidat, dbPaused }) - }) -} - -test('dat-manager', function (t) { - t.test('Manager({ multidat, dbPaused, onupdate })', function (t) { - t.test('assert arguments', function (t) { - setup(function (err, { multidat, dbPaused }) { - t.error(err) - var onupdate = function () {} - t.throws(Manager.bind(null)) - t.throws(Manager.bind(null, { multidat })) - t.throws(Manager.bind(null, { multidat, dbPaused })) - t.throws(Manager.bind(null, { multidat }, onupdate)) - var manager = Manager({ multidat, dbPaused }, onupdate) - t.ok(manager) - manager.disconnect(function (err) { - t.error(err) - t.end() - }) - }) - }) - t.test('load existing dats', function (t) { - var db = toilet() - var dbPaused = toilet() - setup(db, dbPaused, function (err, { multidat, dbPaused }) { - t.error(err) - function onupdate () {} - var manager = Manager({ multidat, dbPaused }, onupdate) - manager.create(`/tmp/${Math.random()}`, function (err) { - t.error(err) - manager.disconnect(function () { - t.error(err) - secondTime() - }) - }) - }) - function secondTime () { - setup(db, dbPaused, function (err, { multidat, dbPaused }) { - t.error(err) - var manager = Manager({ multidat, dbPaused }, onupdate) - var ended = false - function onupdate (err, dats) { - if (ended || dats.length !== 1) return - ended = true - t.error(err) - t.equal(dats.length, 1, 'The dat should exist the second time around') - manager.disconnect(function (err) { - t.error(err) - t.end() - }) - } - }) - } - }) - t.end() - }) - - t.test('.create(dir, opts, cb)', function (t) { - t.test('assert arguments', function (t) { - setup(function (err, { multidat, dbPaused }) { - t.error(err) - function onupdate () {} - var manager = Manager({ multidat, dbPaused }, onupdate) - var dir = `/tmp/${Math.random()}` - t.throws(manager.create.bind(manager)) - t.throws(manager.create.bind(manager, dir)) - t.throws(manager.create.bind(manager, dir, {})) - manager.create(dir, {}, function () {}) - manager.create(dir, function () {}) - manager.disconnect(function (err) { - t.error(err) - t.end() - }) - }) - }) - t.test('create a dat', function (t) { - setup(function (err, { multidat, dbPaused }) { - t.error(err) - var ended = false - function onupdate (err, dats) { - if (ended) return - t.error(err) - var dat = dats[0] - if (dat && dat.network && dat.metadata && dat.metadata.title && dat.stats && typeof dat.progress === 'number') { - t.equal(dat.metadata.title, basename) - t.equal(dat.metadata.author, 'Anonymous') - manager.disconnect(function (err) { - t.error(err) - t.end() - }) - } - } - var manager = Manager({ multidat, dbPaused }, onupdate) - var basename = String(Math.random()) - var dir = `/tmp/${basename}` - manager.create(dir, function (err, dat) { - t.error(err) - t.ok(dat) - }) - }) - }) - t.end() - }) - - t.test('.close(key, cb)', function (t) { - t.test('close a dat', function (t) { - t.plan(6) - setup(function (err, { multidat, dbPaused }) { - t.error(err, 'setup') - var closing = false - var ended = false - function onupdate (err, dats) { - if (!ended && closing && dats.length === 0) { - t.error(err) - t.ok(true, 'onupdate') - } - } - var manager = Manager({ multidat, dbPaused }, onupdate) - manager.create(`/tmp/${Math.random()}`, function (err, dat) { - t.error(err, 'dat created') - closing = true - manager.close(dat.key, function (err) { - t.error(err, 'dat closed') - ended = true - manager.disconnect(function (err) { - t.error(err) - }) - }) - }) - }) - }) - t.end() - }) - - t.test('.pause(dat, cb)', function (t) { - t.test('pause a dat', function (t) { - setup(function (err, { multidat, dbPaused }) { - t.error(err) - function onupdate (err, dats) { - if (!dats.length || t.ended) return - t.error(err) - var dat = dats[0] - if (!dat) return - t.notOk(dat.network) - manager.disconnect(function (err) { - t.error(err) - t.end() - }) - } - var manager = Manager({ multidat, dbPaused }, onupdate) - manager.create(`/tmp/${Math.random()}`, function (err, dat) { - t.error(err) - manager.pause(dat, function (err) { - t.error(err) - }) - }) - }) - }) - t.end() - }) - - t.test('.resume(dat, cb)', function (t) { - t.test('resume a dat', function (t) { - setup(function (err, { multidat, dbPaused }) { - t.error(err) - var resuming = false - var ended = false - function onupdate (err, dats) { - if (!dats.length || !resuming || ended) return - ended = true - t.error(err) - var dat = dats[0] - t.ok(dat.network) - manager.disconnect(function (err) { - t.error(err) - t.end() - }) - } - var manager = Manager({ multidat, dbPaused }, onupdate) - manager.create(`/tmp/${Math.random()}`, function (err, dat) { - t.error(err) - manager.pause(dat, function (err) { - t.error(err) - resuming = true - manager.resume(dat, function (err) { - t.error(err) - }) - }) - }) - }) - }) - t.end() - }) - - t.test('.togglePause(dat, cb)', function (t) { - t.test('pause a dat', function (t) { - setup(function (err, { multidat, dbPaused }) { - t.error(err) - var ended = false - function onupdate (err, dats) { - if (!dats.length || ended) return - ended = true - t.error(err) - var dat = dats[0] - t.notOk(dat.network) - manager.disconnect(function (err) { - t.error(err) - t.end() - }) - } - var manager = Manager({ multidat, dbPaused }, onupdate) - manager.create(`/tmp/${Math.random()}`, function (err, dat) { - t.error(err) - manager.togglePause(dat, function (err) { - t.error(err) - }) - }) - }) - }) - t.test('resume a dat', function (t) { - setup(function (err, { multidat, dbPaused }) { - t.error(err) - var resuming = false - var ended = false - function onupdate (err, dats) { - if (!dats.length || !resuming || ended) return - ended = true - t.error(err) - var dat = dats[0] - t.ok(dat.network) - manager.disconnect(function (err) { - t.error(err) - t.end() - }) - } - var manager = Manager({ multidat, dbPaused }, onupdate) - manager.create(`/tmp/${Math.random()}`, function (err, dat) { - t.error(err) - manager.togglePause(dat, function (err) { - t.error(err) - resuming = true - manager.togglePause(dat, function (err) { - t.error(err) - }) - }) - }) - }) - }) - t.end() - }) - - t.end() -}) diff --git a/tests/index.js b/tests/index.js index 1d48952a..d0aa758e 100755 --- a/tests/index.js +++ b/tests/index.js @@ -2,119 +2,218 @@ var clipboard = require('clipboardy') var spectron = require('spectron') var path = require('path') -var tap = require('tap').test +var test = require('tape').test var del = require('del') -var { execSync } = require('child_process') +var { exec } = require('child_process') +var props = require('bluebird').props var waitForAndClick = require('./utils/waitForAndClick') var waitForMatch = require('./utils/waitForMatch') var wait = require('./utils/wait') var TEST_DATA = path.join(__dirname, 'test_data') var TEST_DATA_DB = path.join(TEST_DATA, 'multidat.json') +var FIXTURES = path.join(__dirname, 'fixtures') -tap('init', function (t) { +test('init', function (t) { t.test('should be able to boot up the app', function (t) { - var app = createApp() - return waitForLoad(app) - .then(() => Promise.all([ - t.resolveMatch(app.browserWindow.isVisible(), true, 'isVisible'), - t.resolveMatch(app.client.getWindowCount(), 1, 'getWindowCount'), - t.resolveMatch(app.browserWindow.isMinimized(), false, 'isMinimized'), - t.resolveMatch(app.browserWindow.isDevToolsOpened(), false, 'isDevToolsOpened'), - t.resolveMatch(app.browserWindow.isVisible(), true, 'isVisible'), - t.resolveMatch(app.browserWindow.isFocused(), true, 'isFocused'), - t.resolveMatch(app.browserWindow.getBounds().then(bounds => bounds.width !== 0), true, 'getBounds'), - t.resolveMatch(app.browserWindow.getBounds().then(bounds => bounds.height !== 0), true, 'getBounds') - ])) + const app = createApp() + return init(app, t) + .then(() => + props({ + getWindowCount: app.client.getWindowCount(), + isMinimized: app.browserWindow.isMinimized(), + isDevToolsOpened: app.browserWindow.isDevToolsOpened(), + isFocused: app.browserWindow.isFocused(), + bounds: app.browserWindow + .getBounds() + .then(bounds => ({ width: bounds.width, height: bounds.height })) + }) + ) + .then(props => + t.deepEquals( + props, + { + getWindowCount: 1, + isMinimized: false, + isDevToolsOpened: false, + isFocused: true, + bounds: { + width: 800, + height: 600 + } + }, + 'All settings match' + ) + ) .catch(e => t.fail(e)) - .then(() => endTest(app)) + .then(() => endTest(app, t)) }) t.end() }) -tap('onboarding', function (t) { - t.test('intro should show every time you open the app as long as you have no dats', function (t) { - var app = createApp() - return waitForLoad(app) - .then(() => t.resolveMatch(app.browserWindow.isVisible(), true, 'isVisible')) - .then(() => t.resolveMatch(app.browserWindow.getTitle(), 'Dat Desktop | Welcome', 'correct title')) - .then(() => app.client.click('button')) - .then(() => wait(200)) - .then(() => waitForAndClick(t, app, 'button[title="Skip Intro"]')) - .then(() => t.resolveMatch(app.browserWindow.getTitle(), 'Dat Desktop', 'correct title')) - .then(() => app.stop()) - .then(() => Promise.resolve(app = createApp())) - .then(() => waitForLoad(app)) - .then(() => app.browserWindow.isVisible()) - .then(() => app.client.click('button')) - .then(() => app.client.waitForExist('button[title="Skip Intro"]')) - .catch(e => t.fail(e)) - .then(() => endTest(app)) - }) +test('onboarding', function (t) { + t.test( + 'intro should show every time you open the app as long as you have no dats', + function (t) { + var app = createApp() + return initAndSkipIntro(app, t) + .then(() => app.stop()) + .then(() => Promise.resolve((app = createApp()))) + .then(() => waitForLoad(app, t)) + .then(() => + app.browserWindow + .isVisible() + .then(isVisible => t.ok(isVisible, 'App is visible.')) + ) + .then(() => waitForAndClick(t, app, '.btn-get-started')) + .then(() => app.client.waitForExist('.btn-skip')) + .catch(e => t.fail(e)) + .then(() => endTest(app, t)) + } + ) t.end() }) -tap('working with dats', function (t) { +function initAndSkipIntro (app, t) { + return init(app, t) + .then(() => + app.browserWindow + .getTitle() + .then(title => + t.equals( + title, + 'Dat Desktop | Welcome', + 'intro title shown in the beginning' + ) + ) + ) + .then(() => waitForAndClick(t, app, '.btn-get-started')) + .then(() => waitForAndClick(t, app, '.btn-skip')) + .then(() => + app.browserWindow + .getTitle() + .then(title => + t.equals(title, 'Dat Desktop', 'dat title shown after the intro') + ) + ) +} + +test('working with dats', function (t) { var app = createApp() - return waitForLoad(app) - .then(() => t.resolveMatch(app.browserWindow.isVisible(), true, 'isVisible')) - .then(() => waitForAndClick(t, app, 'button[title="Get Started"]')) - .then(() => waitForAndClick(t, app, 'button[title="Skip Intro"]')) - .then(() => waitForAndClick(t, app, 'button')) - .then(() => waitForMatch(t, app, '.size', /(126|52) B/) - .then(() => waitForMatch(t, app, '.network', /0/))) - .then(() => clipboard.write('')) - .then(() => app.client.click('button[title="Share Dat"]')) - .then(() => app.client.click('button[title="Copy to Clipboard"]')) + return initAndSkipIntro(app, t) + .then(() => waitForAndClick(t, app, '.btn-share-folder')) + .then(() => + Promise.all([ + waitForMatch(t, app, '.network', /0/), + waitForMatch(t, app, '.size', /(126|52) B/, 'contains correct size') + ]) + ) + .then(() => + Promise.all([ + clipboard.write('').then(() => t.ok(true, 'Cleared clipboard')), + waitForAndClick(t, app, '.btn-link') + ]) + ) + .then(() => waitForAndClick(t, app, '.btn-copy-to-clipboard')) .then(() => wait(200)) - .then(() => t.resolveMatch(clipboard.read(), /^dat:\/\/[0-9a-f]{32}/, 'link copied to clipboard')) + .then(() => + clipboard + .read() + .then(text => + t.ok( + text.match(/^dat:\/\/[0-9a-f]{32}/), + 'link copied to clipboard: ' + text + ) + ) + ) .then(() => app.stop()) - .then(() => Promise.resolve(app = createApp())) - .then(() => waitForLoad(app)) - .then(() => app.browserWindow.isVisible()) - .then((isVisible) => t.equal(isVisible, true, 'reloaded and is visible')) - .then(() => waitForMatch(t, app, '.size', /(126|52) B/)) - .then(() => waitForAndClick(t, app, 'button.delete')) - .then(() => app.client.click('button.cancel-button')) - .then(() => app.client.click('button.delete')) - .then(() => app.client.click('button.confirm-button')) - .then(() => waitForMatch(t, app, '.tutorial', /share/i)) // now the dat is gone and welcome screen is back + .then(() => Promise.resolve((app = createApp()))) + .then(() => waitForLoad(app, t)) + .then(() => + app.browserWindow + .isVisible() + .then(isVisible => t.equal(isVisible, true, 'reloaded and is visible')) + ) + .then(() => + waitForMatch(t, app, '.size', /(126|52) B/, 'contains correct size') + ) + .then(() => waitForAndClick(t, app, '.btn-delete')) + .then(() => waitForAndClick(t, app, '.btn-cancel')) + .then(() => waitForAndClick(t, app, '.btn-delete')) + .then(() => waitForAndClick(t, app, '.btn-confirm')) + .then(() => + waitForMatch( + t, + app, + '.tutorial', + /share/i, + 'now the dat is gone and welcome screen is back' + ) + ) // now the dat is gone and welcome screen is back .catch(e => t.fail(e)) - .then(() => endTest(app)) + .then(() => endTest(app, t)) }) // Create a new app instance -function createApp () { +function createApp (t) { var app = new spectron.Application({ path: path.join(__dirname, '../node_modules/.bin/electron'), - args: [path.join(__dirname, '../index.js'), '--data', TEST_DATA, '--db', TEST_DATA_DB], - env: { NODE_ENV: 'test', RUNNING_IN_SPECTRON: true } + args: [ + path.join(__dirname, '../index.js'), + '--data', + TEST_DATA, + '--db', + TEST_DATA_DB + ], + env: { + NODE_ENV: 'test', + RUNNING_IN_SPECTRON: true, + OPEN_RESULT: FIXTURES + } }) process.on('SIGTERM', () => endTest(app)) return app } +function clear () { + return Promise.all([ + new Promise((resolve, reject) => + exec( + `git checkout -- "${FIXTURES}"`, + error => (error ? reject(error) : resolve()) + ) + ), + del(FIXTURES), + del(TEST_DATA) + ]) +} + +function init (app, t) { + return clear().then(() => waitForLoad(app, t)) +} + // Starts the app, waits for it to load, returns a promise function waitForLoad (app, t) { - return app.start().then(function () { - return app.client.waitUntilWindowLoaded() - }).then(function () { - // Switch to the main window - return app.client.windowByIndex(0) - }).then(function () { - return app.client.waitUntilWindowLoaded() - }) + return app + .start() + .then(() => app.client.waitUntilWindowLoaded()) + .then(function () { + // Switch to the main window + return app.client.windowByIndex(0) + }) + .then(() => app.client.waitUntilWindowLoaded()) + .then(() => + app.browserWindow + .isVisible() + .then(isVisible => t.ok(isVisible, 'isVisible')) + ) + .then(() => app) } // Quit the app, end the test, either in success (!err) or failure (err) -function endTest (app) { - var fixPath = path.join(__dirname, 'fixtures') - return Promise.all([ - del(fixPath), - del(TEST_DATA) - ]) - .then(() => { - execSync(`git checkout -- "${fixPath}"`) - return app.stop() - }) +function endTest (app, t) { + return app + .stop() + .then(() => clear()) + .then(() => t && t.end()) } diff --git a/tests/intro.js b/tests/intro.js deleted file mode 100755 index 93611292..00000000 --- a/tests/intro.js +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env node -var EventEmitter = require('events').EventEmitter -var test = require('tap').test -var spok = require('spok') - -var intro = require('../models/intro') - -test('models/intro: should initialize with a default state', function (t) { - var state = {} - var emitter = new EventEmitter() - intro(state, emitter) - spok(t, state, { - intro: { - show: false - } - }) - t.end() -}) - -test('should show intro screen if there are no dats', function (t) { - var state = { - dats: { - values: [] - }, - intro: { - show: true - } - } - var emitter = new EventEmitter() - intro(state, emitter) - emitter.emit('dats:loaded') - spok(t, state, { - intro: { - show: true - } - }) - t.end() -}) - -test('should be able to hide the intro screen', function (t) { - var state = { - intro: { - show: true - } - } - var emitter = new EventEmitter() - intro(state, emitter) - emitter.emit('intro:hide') - spok(t, state, { - intro: { - show: false - } - }) - t.end() -}) diff --git a/tests/utils/waitForAndClick.js b/tests/utils/waitForAndClick.js index 8f14bf76..c15f907b 100644 --- a/tests/utils/waitForAndClick.js +++ b/tests/utils/waitForAndClick.js @@ -1,10 +1,9 @@ +const waitForVisible = require('./waitForVisible') + module.exports = function waitForAndClick (t, app, selector, ms, reverse) { - return app.client.waitForExist(selector, ms, reverse) - .then(function () { - t.ok(true, selector + ' exists.') + return waitForVisible(t, app, selector, ms, reverse) + .then(selector => { return app.client.click(selector) - .then(function () { - t.ok(true, selector + ' clicked.') - }) }) + .then(() => t.ok(true, selector + ' clicked.')) } diff --git a/tests/utils/waitForMatch.js b/tests/utils/waitForMatch.js index 9a6dedba..8c2ed9a7 100644 --- a/tests/utils/waitForMatch.js +++ b/tests/utils/waitForMatch.js @@ -13,21 +13,28 @@ module.exports = function waitForMatch (t, app, selector, regexp, ms, reverse) { var end = Date.now() + ms function check () { if (Date.now() > end) { - return Promise.reject(new Error('Timeout after ' + ms + 'ms tryin to match "' + selector + '" with ' + String(regexp) + '; last value: ' + lastValue)) + return Promise.reject( + new Error( + `Timeout after ${ms}ms tryin to match "${selector}" with ${String( + regexp + )}; last value: ${lastValue}` + ) + ) } - return app.client.getText(selector) - .then(function (text) { - lastValue = text - var match = regexp.test(text) ? !reverse : reverse - if (!match) { - return Promise.reject(new Error('no-match')) - } - t.ok(true, '"' + selector + '" matches ' + String(regexp)) - return Promise.resolve(text) - }) - .catch(function (e) { - return wait(100).then(check) - }) + return app.client + .getText(selector) + .then(function (text) { + lastValue = text + var match = regexp.test(text) ? !reverse : reverse + if (!match) { + return Promise.reject(new Error('no-match')) + } + t.ok(true, '"' + selector + '" matches ' + String(regexp)) + return Promise.resolve(text) + }) + .catch(function (e) { + return wait(100).then(check) + }) } return check() } diff --git a/tests/utils/waitForVisible.js b/tests/utils/waitForVisible.js new file mode 100644 index 00000000..7c76a4a2 --- /dev/null +++ b/tests/utils/waitForVisible.js @@ -0,0 +1,6 @@ +module.exports = function waitForVisible (t, app, selector, ms, reverse) { + return app.client.waitForVisible(selector, ms, reverse).then(() => { + t.ok(true, selector + ' exists.') + return selector + }) +} diff --git a/unit-tests/_helpers/enzymeSetup.js b/unit-tests/_helpers/enzymeSetup.js new file mode 100644 index 00000000..17aeb935 --- /dev/null +++ b/unit-tests/_helpers/enzymeSetup.js @@ -0,0 +1,3 @@ +import configure from 'enzyme-adapter-react-helper' + +configure({ disableLifecycleMethods: true }) diff --git a/unit-tests/_helpers/mockWindow.js b/unit-tests/_helpers/mockWindow.js new file mode 100644 index 00000000..26fa93f9 --- /dev/null +++ b/unit-tests/_helpers/mockWindow.js @@ -0,0 +1,3 @@ +global.window = { + addEventListener: function () {} +} diff --git a/unit-tests/dat-import.js b/unit-tests/dat-import.js new file mode 100644 index 00000000..41fd4ae8 --- /dev/null +++ b/unit-tests/dat-import.js @@ -0,0 +1,14 @@ +import test from 'tape' +import React from 'react' +import { shallow } from 'enzyme' +import DatImport from '../app/components/dat-import' +import Icon from '../app/components/icon' + +test('dat import should render input element and icon', t => { + const wrapper = shallow( {}} />) + + t.equal(wrapper.find('input').length, 1) + t.equal(wrapper.find(Icon).length, 1) + + t.end() +}) diff --git a/unit-tests/file-list.js b/unit-tests/file-list.js new file mode 100644 index 00000000..f017d549 --- /dev/null +++ b/unit-tests/file-list.js @@ -0,0 +1,75 @@ +import test from 'tape' +import React from 'react' +import { render } from 'enzyme' +import FileList from '../app/components/file-list' + +test('file list should render div with class pa2', t => { + const files = [] + const wrapper = render( + + ) + + t.equal(wrapper.find('.pa2').length, 1) + + t.end() +}) + +test('file list should render tr(s) equal to number of files in dat', t => { + const files = [ + { + path: '/foo', + size: 30, + isFile: true + }, + { + path: '/bar', + size: 30, + isFile: true + }, + { + path: '/baz', + size: 30, + isFile: false + } + ] + const wrapper = render( + + ) + + t.equal(wrapper.find('tr').length, files.length) + + t.end() +}) + +test('file list should render a tr(s) even if directories without isEditing and size property given', t => { + const files = [ + { + path: '/foo' + }, + { + path: '/bar' + }, + { + path: '/baz' + } + ] + const wrapper = render( + + ) + + t.equal(wrapper.find('tr').length, files.length) + + t.end() +}) diff --git a/unit-tests/hex-content.js b/unit-tests/hex-content.js new file mode 100644 index 00000000..8a40159d --- /dev/null +++ b/unit-tests/hex-content.js @@ -0,0 +1,64 @@ +import test from 'tape' +import React from 'react' +import { shallow } from 'enzyme' +import HexContent from '../app/components/hex-content' + +test('hexagon should be blue when loading dat', t => { + const wrapper = shallow( + + ) + + t.equal(wrapper.find('.color-blue.hover-color-blue-hover').length, 2) + + t.end() +}) + +test('hexagon should be neutral colored when dat is paused', t => { + const wrapper = shallow( + + ) + + t.equal(wrapper.find('.color-neutral-30.hover-color-neutral-40').length, 2) + + t.end() +}) + +test('hexagon should be green colored when dat is completed', t => { + const wrapper = shallow( + + ) + + t.equal(wrapper.find('.color-green.hover-color-green-hover').length, 1) + + t.end() +}) + +test('hexagon should be neutral colored when dat is resumed but neighter loading nor completed', t => { + const wrapper = shallow( + + ) + + t.equal(wrapper.find('.color-neutral-30.hover-color-neutral-40').length, 1) + + t.end() +}) diff --git a/unit-tests/inspect.js b/unit-tests/inspect.js new file mode 100644 index 00000000..0ef8c691 --- /dev/null +++ b/unit-tests/inspect.js @@ -0,0 +1,96 @@ +import test from 'tape' +import React from 'react' +import { shallow } from 'enzyme' +import Inspect from '../app/components/inspect' + +test('should render an empty div component', t => { + const wrapper = shallow( + {}} addFilesToDat={() => {}} /> + ) + + t.equal(wrapper.find('div').length, 1) + + t.end() +}) + +test('should set title to dat key when metadata is not present on dat', t => { + const key = '40a7f6b6147ae695bcbcff432f684c7bb5291ea339c28c1755196cdeb80bd3f8' + const wrapper = shallow( + {}} + addFilesToDat={() => {}} + /> + ) + + t.equal(wrapper.find('h2').text(), key) + + t.end() +}) + +test('should show default values when metadata is not present on dat ', t => { + const defaultAuthor = 'N/A' + const defaultDescription = 'N/A' + const defaultSize = '0' + + const key = '40a7f6b6147ae695bcbcff432f684c7bb5291ea339c28c1755196cdeb80bd3f8' + const wrapper = shallow( + {}} + addFilesToDat={() => {}} + /> + ) + + const selectableNodes = wrapper.find('.is-selectable') + + t.equal(selectableNodes.at(1).text(), defaultSize) + t.equal(selectableNodes.at(3).text(), defaultAuthor) + t.equal(selectableNodes.at(4).text(), defaultDescription) + + t.end() +}) + +test('should show info when present on dat', t => { + const key = '40a7f6b6147ae695bcbcff432f684c7bb5291ea339c28c1755196cdeb80bd3f8' + const wrapper = shallow( + {}} + addFilesToDat={() => {}} + /> + ) + + const selectableNodes = wrapper.find('.is-selectable') + + t.equal(selectableNodes.at(0).text(), key) + t.equal(selectableNodes.at(1).text(), '9 B') + t.equal(selectableNodes.at(2).text(), '2') + t.equal(selectableNodes.at(3).text(), 'A-author') + t.equal(selectableNodes.at(4).text(), 'A-desc') + t.equal(selectableNodes.at(5).text(), 'A-path') + + t.end() +}) diff --git a/unit-tests/intro.js b/unit-tests/intro.js new file mode 100644 index 00000000..76d157e9 --- /dev/null +++ b/unit-tests/intro.js @@ -0,0 +1,88 @@ +import test from 'tape' +import React from 'react' +import { shallow } from 'enzyme' +import Intro from '../app/components/intro' +import { + Green as GreenButton, + Plain as PlainButton +} from '../app/components/button' + +test('intro screen should render only empty div when show is false', t => { + const wrapper = shallow() + + t.equal(wrapper.find('div').length, 1) + + t.end() +}) + +test('intro screen should render only one

element when screen given', t => { + const fn = () => {} + const show = true + const wrapper = shallow( + + ) + + t.equal(wrapper.find('p').length, 1) + + t.end() +}) + +test('intro screen should not render plain button when screen is 1', t => { + const fn = () => {} + const show = true + const wrapper = shallow( + + ) + + t.equal(wrapper.find(PlainButton).length, 0) + + t.end() +}) + +test('intro screen should render plain button when screen is not 1', t => { + const fn = () => {} + const show = true + const wrapper = shallow( + + ) + + t.equal(wrapper.find(PlainButton).length, 1) + + t.end() +}) + +test('intro screen should render Done button when screen is not less than 5', t => { + const fn = () => {} + const show = true + const wrapper = shallow( + + ) + + t.equal( + wrapper + .find(GreenButton) + .children() + .text(), + 'Done' + ) + + t.end() +}) + +test('intro screen should render Next button when screen is less than 5', t => { + const fn = () => {} + const show = true + const wrapper = shallow( + + ) + + t.equal( + wrapper + .find(GreenButton) + .children() + .text(), + 'Next' + ) + + t.end() +}) diff --git a/unit-tests/status-bar.js b/unit-tests/status-bar.js new file mode 100644 index 00000000..5c160bcd --- /dev/null +++ b/unit-tests/status-bar.js @@ -0,0 +1,21 @@ +import test from 'tape' +import React from 'react' +import { shallow } from 'enzyme' +import StatusBar from '../app/components/status-bar' + +test('status bar should render a fragment with single child (div) when show is false', t => { + const wrapper = shallow() + + t.equal(wrapper.find('div').length, 1) + + t.end() +}) + +test('status bar should render a Bar with two childrens when show is true', t => { + const show = true + const wrapper = shallow() + + t.equal(wrapper.find('span').length, 2) + + t.end() +}) diff --git a/unit-tests/status.js b/unit-tests/status.js new file mode 100644 index 00000000..c459c0fd --- /dev/null +++ b/unit-tests/status.js @@ -0,0 +1,116 @@ +import test from 'tape' +import React from 'react' +import { shallow } from 'enzyme' +import Status from '../app/components/status' + +test('progress text should read "Paused" when dat is paused', t => { + const wrapper = shallow( + + ) + + t.equal( + wrapper + .find('.f7.f6-l') + .children() + .children() + .text(), + 'Paused.' + ) + + t.end() +}) + +test('progress text should show upload speed when dat is completed', t => { + const wrapper = shallow( + + ) + + t.equal( + wrapper + .find('.f7.f6-l') + .children() + .children() + .text(), + 'Complete. ↑ 30 B/s' + ) + + t.end() +}) + +test('progress text should show wait message when dat is stale', t => { + const wrapper = shallow( + + ) + + t.equal( + wrapper + .find('.f7.f6-l') + .children() + .children() + .text(), + 'waiting for peers…' + ) + + t.end() +}) + +test('progress text should show up/down speed when dat is loading', t => { + const wrapper = shallow( + + ) + + t.equal( + wrapper + .find('.f7.f6-l') + .children() + .children() + .text(), + '↓ 40 B/s↑ 30 B/s' + ) + + t.end() +}) diff --git a/unit-tests/table-row.js b/unit-tests/table-row.js new file mode 100644 index 00000000..651a9c85 --- /dev/null +++ b/unit-tests/table-row.js @@ -0,0 +1,155 @@ +import test from 'tape' +import React from 'react' +import { shallow } from 'enzyme' +import TableRow from '../app/components/table-row' + +test('table row should render author as Anonymous if not present on dat', t => { + const fn = () => {} + const wrapper = shallow( + + ) + + t.equal(wrapper.find('.author').text(), 'Anonymous • ') + + t.end() +}) + +test('table row should render author name if present on dat', t => { + const fn = () => {} + const wrapper = shallow( + + ) + + t.equal(wrapper.find('.author').text(), 'A-author • ') + + t.end() +}) + +test('table row should render writable state as Read-only if not present on dat', t => { + const fn = () => {} + const wrapper = shallow( + + ) + + t.equal(wrapper.find('.title').text(), 'Read-only') + + t.end() +}) + +test('table row should render writable state as Read & Write if dat is writable', t => { + const fn = () => {} + const wrapper = shallow( + + ) + + t.equal(wrapper.find('.title').text(), 'Read & Write') + + t.end() +}) + +test('table row should render size equals to 0 when length is not defined on dat', t => { + const fn = () => {} + const wrapper = shallow( + + ) + + t.equal(wrapper.find('.size').text(), '0 B') + + t.end() +}) + +test('table row should render size equals to length property on stats', t => { + const fn = () => {} + const wrapper = shallow( + + ) + + t.equal(wrapper.find('.size').text(), '40 B') + + t.end() +}) + +test('table row should render peers', t => { + const fn = () => {} + const wrapper = shallow( + + ) + + t.equal(wrapper.find('.network').text(), '2') + + t.end() +}) diff --git a/unit-tests/table.js b/unit-tests/table.js new file mode 100644 index 00000000..d51d33ff --- /dev/null +++ b/unit-tests/table.js @@ -0,0 +1,25 @@ +import test from 'tape' +import React from 'react' +import { shallow } from 'enzyme' +import Table from '../app/components/table' +import TableRowContainer from '../app/containers/table-row' + +test('table should render columns (Link, Status, Size, Peers)', t => { + const show = true + const wrapper = shallow() + + const columns = wrapper.find('.tl').map(node => node.text().toLowerCase()) + + t.deepLooseEqual(columns.sort(), ['link', 'status', 'size', 'peers'].sort()) + + t.end() +}) + +test('table should render same number of table rows as given dats', t => { + const show = true + const wrapper = shallow(
) + + t.equal(wrapper.find(TableRowContainer).length, 3) + + t.end() +}) diff --git a/unit-tests/title-field.js b/unit-tests/title-field.js new file mode 100644 index 00000000..0b98012e --- /dev/null +++ b/unit-tests/title-field.js @@ -0,0 +1,54 @@ +import test from 'tape' +import React from 'react' +import { shallow } from 'enzyme' +import TitleField from '../app/components/title-field' +import { + Plain as PlainButton, + Green as GreenButton +} from '../app/components/button' +import Icon from '../app/components/icon' + +test('title field show not be editable if dat is not writable', t => { + const wrapper = shallow() + + t.equal(wrapper.find(PlainButton).length, 0) + t.equal(wrapper.find(GreenButton).length, 0) + + t.end() +}) + +test('title field show edit button if dat is editable and is not editing', t => { + const wrapper = shallow() + + t.equal(wrapper.find(Icon).length, 1) + + t.end() +}) + +test('title field show plain button if title value is equal to input field value when editing', async t => { + const field = + const wrapper = shallow(field) + wrapper.setState({ + editing: true, + modified: false + }) + + t.equal(wrapper.find(PlainButton).length, 1) + t.equal(wrapper.find(GreenButton).length, 0) + + t.end() +}) + +test('title field show green button if title value is not equal to input field value when editing', t => { + const field = + const wrapper = shallow(field) + wrapper.setState({ + editing: true, + modified: true + }) + + t.equal(wrapper.find(PlainButton).length, 0) + t.equal(wrapper.find(GreenButton).length, 1) + + t.end() +}) diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 00000000..d3150abe --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,36 @@ +const nodeExternals = require('webpack-node-externals') +const path = require('path') +module.exports = (_, argv) => ({ + entry: path.normalize(`${__dirname}/app/index.js`), + target: 'electron-main', + externals: [nodeExternals({ + whitelist: /react-file-drop/ + })], + output: { + path: path.normalize(`${__dirname}/static`), + filename: 'bundle.js', + libraryTarget: 'commonjs2' + }, + optimization: { + nodeEnv: argv.mode + }, + devtool: 'inline-source-map', + node: { + __dirname: true + }, + module: { + rules: [ + { + test: /\.js$/, + include: path.normalize(`${__dirname}/app`), + loader: 'babel-loader', + query: { + presets: ['react'], + plugins: [ + 'transform-object-rest-spread' + ] + } + } + ] + } +})