react-modal
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -0,1 +1,7 @@ | ||
v1.1.1 - Fri, 15 Apr 2016 05:30:45 GMT | ||
-------------------------------------- | ||
- | ||
v1.1.0 - Tue, 12 Apr 2016 13:03:08 GMT | ||
@@ -2,0 +8,0 @@ -------------------------------------- |
@@ -1,1870 +0,17 @@ | ||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ReactModal = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
var React = (typeof window !== "undefined" ? window['React'] : typeof global !== "undefined" ? global['React'] : null); | ||
var ReactDOM = (typeof window !== "undefined" ? window['ReactDOM'] : typeof global !== "undefined" ? global['ReactDOM'] : null); | ||
var ExecutionEnvironment = require('exenv'); | ||
var ModalPortal = React.createFactory(require('./ModalPortal')); | ||
var ariaAppHider = require('../helpers/ariaAppHider'); | ||
var elementClass = require('element-class'); | ||
var renderSubtreeIntoContainer = (typeof window !== "undefined" ? window['ReactDOM'] : typeof global !== "undefined" ? global['ReactDOM'] : null).unstable_renderSubtreeIntoContainer; | ||
var Assign = require('lodash.assign'); | ||
var SafeHTMLElement = ExecutionEnvironment.canUseDOM ? window.HTMLElement : {}; | ||
var AppElement = ExecutionEnvironment.canUseDOM ? document.body : {appendChild: function() {}}; | ||
var Modal = React.createClass({ | ||
displayName: 'Modal', | ||
statics: { | ||
setAppElement: function(element) { | ||
AppElement = ariaAppHider.setElement(element); | ||
}, | ||
injectCSS: function() { | ||
"production" !== "production" | ||
&& console.warn('React-Modal: injectCSS has been deprecated ' + | ||
'and no longer has any effect. It will be removed in a later version'); | ||
} | ||
}, | ||
propTypes: { | ||
isOpen: React.PropTypes.bool.isRequired, | ||
style: React.PropTypes.shape({ | ||
content: React.PropTypes.object, | ||
overlay: React.PropTypes.object | ||
}), | ||
appElement: React.PropTypes.instanceOf(SafeHTMLElement), | ||
onAfterOpen: React.PropTypes.func, | ||
onRequestClose: React.PropTypes.func, | ||
closeTimeoutMS: React.PropTypes.number, | ||
ariaHideApp: React.PropTypes.bool, | ||
shouldCloseOnOverlayClick: React.PropTypes.bool | ||
}, | ||
getDefaultProps: function () { | ||
return { | ||
isOpen: false, | ||
ariaHideApp: true, | ||
closeTimeoutMS: 0, | ||
shouldCloseOnOverlayClick: true | ||
}; | ||
}, | ||
componentDidMount: function() { | ||
this.node = document.createElement('div'); | ||
this.node.className = 'ReactModalPortal'; | ||
AppElement.appendChild(this.node); | ||
this.renderPortal(this.props); | ||
}, | ||
componentWillReceiveProps: function(newProps) { | ||
this.renderPortal(newProps); | ||
}, | ||
componentWillUnmount: function() { | ||
ReactDOM.unmountComponentAtNode(this.node); | ||
AppElement.removeChild(this.node); | ||
elementClass(document.body).remove('ReactModal__Body--open'); | ||
}, | ||
renderPortal: function(props) { | ||
if (props.isOpen) { | ||
elementClass(document.body).add('ReactModal__Body--open'); | ||
} else { | ||
elementClass(document.body).remove('ReactModal__Body--open'); | ||
} | ||
if (props.ariaHideApp) { | ||
ariaAppHider.toggle(props.isOpen, props.appElement); | ||
} | ||
sanitizeProps(props); | ||
this.portal = renderSubtreeIntoContainer(this, ModalPortal(Assign({}, props, {defaultStyles: Modal.defaultStyles})), this.node); | ||
}, | ||
render: function () { | ||
return React.DOM.noscript(); | ||
} | ||
}); | ||
Modal.defaultStyles = { | ||
overlay: { | ||
position : 'fixed', | ||
top : 0, | ||
left : 0, | ||
right : 0, | ||
bottom : 0, | ||
backgroundColor : 'rgba(255, 255, 255, 0.75)' | ||
}, | ||
content: { | ||
position : 'absolute', | ||
top : '40px', | ||
left : '40px', | ||
right : '40px', | ||
bottom : '40px', | ||
border : '1px solid #ccc', | ||
background : '#fff', | ||
overflow : 'auto', | ||
WebkitOverflowScrolling : 'touch', | ||
borderRadius : '4px', | ||
outline : 'none', | ||
padding : '20px' | ||
} | ||
} | ||
module.exports = Modal | ||
function sanitizeProps(props) { | ||
delete props.ref; | ||
} | ||
},{"../helpers/ariaAppHider":3,"./ModalPortal":2,"element-class":8,"exenv":9,"lodash.assign":16}],2:[function(require,module,exports){ | ||
var React = (typeof window !== "undefined" ? window['React'] : typeof global !== "undefined" ? global['React'] : null); | ||
var div = React.DOM.div; | ||
var focusManager = require('../helpers/focusManager'); | ||
var scopeTab = require('../helpers/scopeTab'); | ||
var Assign = require('lodash.assign'); | ||
// so that our CSS is statically analyzable | ||
var CLASS_NAMES = { | ||
overlay: { | ||
base: 'ReactModal__Overlay', | ||
afterOpen: 'ReactModal__Overlay--after-open', | ||
beforeClose: 'ReactModal__Overlay--before-close' | ||
}, | ||
content: { | ||
base: 'ReactModal__Content', | ||
afterOpen: 'ReactModal__Content--after-open', | ||
beforeClose: 'ReactModal__Content--before-close' | ||
} | ||
}; | ||
var ModalPortal = module.exports = React.createClass({ | ||
displayName: 'ModalPortal', | ||
getDefaultProps: function() { | ||
return { | ||
style: { | ||
overlay: {}, | ||
content: {} | ||
} | ||
}; | ||
}, | ||
getInitialState: function() { | ||
return { | ||
afterOpen: false, | ||
beforeClose: false | ||
}; | ||
}, | ||
componentDidMount: function() { | ||
// Focus needs to be set when mounting and already open | ||
if (this.props.isOpen) { | ||
this.setFocusAfterRender(true); | ||
this.open(); | ||
} | ||
}, | ||
componentWillUnmount: function() { | ||
clearTimeout(this.closeTimer); | ||
}, | ||
componentWillReceiveProps: function(newProps) { | ||
// Focus only needs to be set once when the modal is being opened | ||
if (!this.props.isOpen && newProps.isOpen) { | ||
this.setFocusAfterRender(true); | ||
this.open(); | ||
} else if (this.props.isOpen && !newProps.isOpen) { | ||
this.close(); | ||
} | ||
}, | ||
componentDidUpdate: function () { | ||
if (this.focusAfterRender) { | ||
this.focusContent(); | ||
this.setFocusAfterRender(false); | ||
} | ||
}, | ||
setFocusAfterRender: function (focus) { | ||
this.focusAfterRender = focus; | ||
}, | ||
open: function() { | ||
focusManager.setupScopedFocus(this.node); | ||
focusManager.markForFocusLater(); | ||
this.setState({isOpen: true}, function() { | ||
this.setState({afterOpen: true}); | ||
if (this.props.isOpen && this.props.onAfterOpen) { | ||
this.props.onAfterOpen(); | ||
} | ||
}.bind(this)); | ||
}, | ||
close: function() { | ||
if (!this.ownerHandlesClose()) | ||
return; | ||
if (this.props.closeTimeoutMS > 0) | ||
this.closeWithTimeout(); | ||
else | ||
this.closeWithoutTimeout(); | ||
}, | ||
focusContent: function() { | ||
this.refs.content.focus(); | ||
}, | ||
closeWithTimeout: function() { | ||
this.setState({beforeClose: true}, function() { | ||
this.closeTimer = setTimeout(this.closeWithoutTimeout, this.props.closeTimeoutMS); | ||
}.bind(this)); | ||
}, | ||
closeWithoutTimeout: function() { | ||
this.setState({ | ||
afterOpen: false, | ||
beforeClose: false | ||
}, this.afterClose); | ||
}, | ||
afterClose: function() { | ||
focusManager.returnFocus(); | ||
focusManager.teardownScopedFocus(); | ||
}, | ||
handleKeyDown: function(event) { | ||
if (event.keyCode == 9 /*tab*/) scopeTab(this.refs.content, event); | ||
if (event.keyCode == 27 /*esc*/) { | ||
event.preventDefault(); | ||
this.requestClose(); | ||
} | ||
}, | ||
handleOverlayClick: function(event) { | ||
var node = event.target | ||
while (node) { | ||
if (node === this.refs.content) return | ||
node = node.parentNode | ||
} | ||
if (this.props.shouldCloseOnOverlayClick) { | ||
if (this.ownerHandlesClose()) | ||
this.requestClose(); | ||
else | ||
this.focusContent(); | ||
} | ||
}, | ||
requestClose: function() { | ||
if (this.ownerHandlesClose()) | ||
this.props.onRequestClose(); | ||
}, | ||
ownerHandlesClose: function() { | ||
return this.props.onRequestClose; | ||
}, | ||
shouldBeClosed: function() { | ||
return !this.props.isOpen && !this.state.beforeClose; | ||
}, | ||
buildClassName: function(which, additional) { | ||
var className = CLASS_NAMES[which].base; | ||
if (this.state.afterOpen) | ||
className += ' '+CLASS_NAMES[which].afterOpen; | ||
if (this.state.beforeClose) | ||
className += ' '+CLASS_NAMES[which].beforeClose; | ||
return additional ? className + ' ' + additional : className; | ||
}, | ||
render: function() { | ||
var contentStyles = (this.props.className) ? {} : this.props.defaultStyles.content; | ||
var overlayStyles = (this.props.overlayClassName) ? {} : this.props.defaultStyles.overlay; | ||
return this.shouldBeClosed() ? div() : ( | ||
div({ | ||
ref: "overlay", | ||
className: this.buildClassName('overlay', this.props.overlayClassName), | ||
style: Assign({}, overlayStyles, this.props.style.overlay || {}), | ||
onClick: this.handleOverlayClick | ||
}, | ||
div({ | ||
ref: "content", | ||
style: Assign({}, contentStyles, this.props.style.content || {}), | ||
className: this.buildClassName('content', this.props.className), | ||
tabIndex: "-1", | ||
onKeyDown: this.handleKeyDown | ||
}, | ||
this.props.children | ||
) | ||
) | ||
); | ||
} | ||
}); | ||
},{"../helpers/focusManager":4,"../helpers/scopeTab":5,"lodash.assign":16}],3:[function(require,module,exports){ | ||
var _element = typeof document !== 'undefined' ? document.body : null; | ||
function setElement(element) { | ||
if (typeof element === 'string') { | ||
var el = document.querySelectorAll(element); | ||
element = 'length' in el ? el[0] : el; | ||
} | ||
_element = element || _element; | ||
return _element; | ||
} | ||
function hide(appElement) { | ||
validateElement(appElement); | ||
(appElement || _element).setAttribute('aria-hidden', 'true'); | ||
} | ||
function show(appElement) { | ||
validateElement(appElement); | ||
(appElement || _element).removeAttribute('aria-hidden'); | ||
} | ||
function toggle(shouldHide, appElement) { | ||
if (shouldHide) | ||
hide(appElement); | ||
else | ||
show(appElement); | ||
} | ||
function validateElement(appElement) { | ||
if (!appElement && !_element) | ||
throw new Error('react-modal: You must set an element with `Modal.setAppElement(el)` to make this accessible'); | ||
} | ||
function resetForTesting() { | ||
_element = document.body; | ||
} | ||
exports.toggle = toggle; | ||
exports.setElement = setElement; | ||
exports.show = show; | ||
exports.hide = hide; | ||
exports.resetForTesting = resetForTesting; | ||
},{}],4:[function(require,module,exports){ | ||
var findTabbable = require('../helpers/tabbable'); | ||
var modalElement = null; | ||
var focusLaterElement = null; | ||
var needToFocus = false; | ||
function handleBlur(event) { | ||
needToFocus = true; | ||
} | ||
function handleFocus(event) { | ||
if (needToFocus) { | ||
needToFocus = false; | ||
if (!modalElement) { | ||
return; | ||
} | ||
// need to see how jQuery shims document.on('focusin') so we don't need the | ||
// setTimeout, firefox doesn't support focusin, if it did, we could focus | ||
// the element outside of a setTimeout. Side-effect of this implementation | ||
// is that the document.body gets focus, and then we focus our element right | ||
// after, seems fine. | ||
setTimeout(function() { | ||
if (modalElement.contains(document.activeElement)) | ||
return; | ||
var el = (findTabbable(modalElement)[0] || modalElement); | ||
el.focus(); | ||
}, 0); | ||
} | ||
} | ||
exports.markForFocusLater = function() { | ||
focusLaterElement = document.activeElement; | ||
}; | ||
exports.returnFocus = function() { | ||
try { | ||
focusLaterElement.focus(); | ||
} | ||
catch (e) { | ||
console.warn('You tried to return focus to '+focusLaterElement+' but it is not in the DOM anymore'); | ||
} | ||
focusLaterElement = null; | ||
}; | ||
exports.setupScopedFocus = function(element) { | ||
modalElement = element; | ||
if (window.addEventListener) { | ||
window.addEventListener('blur', handleBlur, false); | ||
document.addEventListener('focus', handleFocus, true); | ||
} else { | ||
window.attachEvent('onBlur', handleBlur); | ||
document.attachEvent('onFocus', handleFocus); | ||
} | ||
}; | ||
exports.teardownScopedFocus = function() { | ||
modalElement = null; | ||
if (window.addEventListener) { | ||
window.removeEventListener('blur', handleBlur); | ||
document.removeEventListener('focus', handleFocus); | ||
} else { | ||
window.detachEvent('onBlur', handleBlur); | ||
document.detachEvent('onFocus', handleFocus); | ||
} | ||
}; | ||
},{"../helpers/tabbable":6}],5:[function(require,module,exports){ | ||
var findTabbable = require('../helpers/tabbable'); | ||
module.exports = function(node, event) { | ||
var tabbable = findTabbable(node); | ||
if (!tabbable.length) { | ||
event.preventDefault(); | ||
return; | ||
} | ||
var finalTabbable = tabbable[event.shiftKey ? 0 : tabbable.length - 1]; | ||
var leavingFinalTabbable = ( | ||
finalTabbable === document.activeElement || | ||
// handle immediate shift+tab after opening with mouse | ||
node === document.activeElement | ||
); | ||
if (!leavingFinalTabbable) return; | ||
event.preventDefault(); | ||
var target = tabbable[event.shiftKey ? tabbable.length - 1 : 0]; | ||
target.focus(); | ||
}; | ||
},{"../helpers/tabbable":6}],6:[function(require,module,exports){ | ||
/*! | ||
* Adapted from jQuery UI core | ||
* | ||
* http://jqueryui.com | ||
* | ||
* Copyright 2014 jQuery Foundation and other contributors | ||
* Released under the MIT license. | ||
* http://jquery.org/license | ||
* | ||
* http://api.jqueryui.com/category/ui-core/ | ||
*/ | ||
function focusable(element, isTabIndexNotNaN) { | ||
var nodeName = element.nodeName.toLowerCase(); | ||
return (/input|select|textarea|button|object/.test(nodeName) ? | ||
!element.disabled : | ||
"a" === nodeName ? | ||
element.href || isTabIndexNotNaN : | ||
isTabIndexNotNaN) && visible(element); | ||
} | ||
function hidden(el) { | ||
return (el.offsetWidth <= 0 && el.offsetHeight <= 0) || | ||
el.style.display === 'none'; | ||
} | ||
function visible(element) { | ||
while (element) { | ||
if (element === document.body) break; | ||
if (hidden(element)) return false; | ||
element = element.parentNode; | ||
} | ||
return true; | ||
} | ||
function tabbable(element) { | ||
var tabIndex = element.getAttribute('tabindex'); | ||
if (tabIndex === null) tabIndex = undefined; | ||
var isTabIndexNaN = isNaN(tabIndex); | ||
return (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN); | ||
} | ||
function findTabbableDescendants(element) { | ||
return [].slice.call(element.querySelectorAll('*'), 0).filter(function(el) { | ||
return tabbable(el); | ||
}); | ||
} | ||
module.exports = findTabbableDescendants; | ||
},{}],7:[function(require,module,exports){ | ||
module.exports = require('./components/Modal'); | ||
},{"./components/Modal":1}],8:[function(require,module,exports){ | ||
module.exports = function(opts) { | ||
return new ElementClass(opts) | ||
} | ||
function indexOf(arr, prop) { | ||
if (arr.indexOf) return arr.indexOf(prop) | ||
for (var i = 0, len = arr.length; i < len; i++) | ||
if (arr[i] === prop) return i | ||
return -1 | ||
} | ||
function ElementClass(opts) { | ||
if (!(this instanceof ElementClass)) return new ElementClass(opts) | ||
var self = this | ||
if (!opts) opts = {} | ||
// similar doing instanceof HTMLElement but works in IE8 | ||
if (opts.nodeType) opts = {el: opts} | ||
this.opts = opts | ||
this.el = opts.el || document.body | ||
if (typeof this.el !== 'object') this.el = document.querySelector(this.el) | ||
} | ||
ElementClass.prototype.add = function(className) { | ||
var el = this.el | ||
if (!el) return | ||
if (el.className === "") return el.className = className | ||
var classes = el.className.split(' ') | ||
if (indexOf(classes, className) > -1) return classes | ||
classes.push(className) | ||
el.className = classes.join(' ') | ||
return classes | ||
} | ||
ElementClass.prototype.remove = function(className) { | ||
var el = this.el | ||
if (!el) return | ||
if (el.className === "") return | ||
var classes = el.className.split(' ') | ||
var idx = indexOf(classes, className) | ||
if (idx > -1) classes.splice(idx, 1) | ||
el.className = classes.join(' ') | ||
return classes | ||
} | ||
ElementClass.prototype.has = function(className) { | ||
var el = this.el | ||
if (!el) return | ||
var classes = el.className.split(' ') | ||
return indexOf(classes, className) > -1 | ||
} | ||
ElementClass.prototype.toggle = function(className) { | ||
var el = this.el | ||
if (!el) return | ||
if (this.has(className)) this.remove(className) | ||
else this.add(className) | ||
} | ||
},{}],9:[function(require,module,exports){ | ||
/*! | ||
Copyright (c) 2015 Jed Watson. | ||
Based on code that is Copyright 2013-2015, Facebook, Inc. | ||
All rights reserved. | ||
*/ | ||
(function () { | ||
'use strict'; | ||
var canUseDOM = !!( | ||
typeof window !== 'undefined' && | ||
window.document && | ||
window.document.createElement | ||
); | ||
var ExecutionEnvironment = { | ||
canUseDOM: canUseDOM, | ||
canUseWorkers: typeof Worker !== 'undefined', | ||
canUseEventListeners: | ||
canUseDOM && !!(window.addEventListener || window.attachEvent), | ||
canUseViewport: canUseDOM && !!window.screen | ||
}; | ||
if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) { | ||
define(function () { | ||
return ExecutionEnvironment; | ||
}); | ||
} else if (typeof module !== 'undefined' && module.exports) { | ||
module.exports = ExecutionEnvironment; | ||
} else { | ||
window.ExecutionEnvironment = ExecutionEnvironment; | ||
} | ||
}()); | ||
},{}],10:[function(require,module,exports){ | ||
/** | ||
* lodash 3.2.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
var baseCopy = require('lodash._basecopy'), | ||
keys = require('lodash.keys'); | ||
/** | ||
* The base implementation of `_.assign` without support for argument juggling, | ||
* multiple sources, and `customizer` functions. | ||
* | ||
* @private | ||
* @param {Object} object The destination object. | ||
* @param {Object} source The source object. | ||
* @returns {Object} Returns `object`. | ||
*/ | ||
function baseAssign(object, source) { | ||
return source == null | ||
? object | ||
: baseCopy(source, keys(source), object); | ||
} | ||
module.exports = baseAssign; | ||
},{"lodash._basecopy":11,"lodash.keys":19}],11:[function(require,module,exports){ | ||
/** | ||
* lodash 3.0.1 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
/** | ||
* Copies properties of `source` to `object`. | ||
* | ||
* @private | ||
* @param {Object} source The object to copy properties from. | ||
* @param {Array} props The property names to copy. | ||
* @param {Object} [object={}] The object to copy properties to. | ||
* @returns {Object} Returns `object`. | ||
*/ | ||
function baseCopy(source, props, object) { | ||
object || (object = {}); | ||
var index = -1, | ||
length = props.length; | ||
while (++index < length) { | ||
var key = props[index]; | ||
object[key] = source[key]; | ||
} | ||
return object; | ||
} | ||
module.exports = baseCopy; | ||
},{}],12:[function(require,module,exports){ | ||
/** | ||
* lodash 3.0.1 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
/** | ||
* A specialized version of `baseCallback` which only supports `this` binding | ||
* and specifying the number of arguments to provide to `func`. | ||
* | ||
* @private | ||
* @param {Function} func The function to bind. | ||
* @param {*} thisArg The `this` binding of `func`. | ||
* @param {number} [argCount] The number of arguments to provide to `func`. | ||
* @returns {Function} Returns the callback. | ||
*/ | ||
function bindCallback(func, thisArg, argCount) { | ||
if (typeof func != 'function') { | ||
return identity; | ||
} | ||
if (thisArg === undefined) { | ||
return func; | ||
} | ||
switch (argCount) { | ||
case 1: return function(value) { | ||
return func.call(thisArg, value); | ||
}; | ||
case 3: return function(value, index, collection) { | ||
return func.call(thisArg, value, index, collection); | ||
}; | ||
case 4: return function(accumulator, value, index, collection) { | ||
return func.call(thisArg, accumulator, value, index, collection); | ||
}; | ||
case 5: return function(value, other, key, object, source) { | ||
return func.call(thisArg, value, other, key, object, source); | ||
}; | ||
} | ||
return function() { | ||
return func.apply(thisArg, arguments); | ||
}; | ||
} | ||
/** | ||
* This method returns the first argument provided to it. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Utility | ||
* @param {*} value Any value. | ||
* @returns {*} Returns `value`. | ||
* @example | ||
* | ||
* var object = { 'user': 'fred' }; | ||
* | ||
* _.identity(object) === object; | ||
* // => true | ||
*/ | ||
function identity(value) { | ||
return value; | ||
} | ||
module.exports = bindCallback; | ||
},{}],13:[function(require,module,exports){ | ||
/** | ||
* lodash 3.1.1 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
var bindCallback = require('lodash._bindcallback'), | ||
isIterateeCall = require('lodash._isiterateecall'), | ||
restParam = require('lodash.restparam'); | ||
/** | ||
* Creates a function that assigns properties of source object(s) to a given | ||
* destination object. | ||
* | ||
* **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`. | ||
* | ||
* @private | ||
* @param {Function} assigner The function to assign values. | ||
* @returns {Function} Returns the new assigner function. | ||
*/ | ||
function createAssigner(assigner) { | ||
return restParam(function(object, sources) { | ||
var index = -1, | ||
length = object == null ? 0 : sources.length, | ||
customizer = length > 2 ? sources[length - 2] : undefined, | ||
guard = length > 2 ? sources[2] : undefined, | ||
thisArg = length > 1 ? sources[length - 1] : undefined; | ||
if (typeof customizer == 'function') { | ||
customizer = bindCallback(customizer, thisArg, 5); | ||
length -= 2; | ||
} else { | ||
customizer = typeof thisArg == 'function' ? thisArg : undefined; | ||
length -= (customizer ? 1 : 0); | ||
} | ||
if (guard && isIterateeCall(sources[0], sources[1], guard)) { | ||
customizer = length < 3 ? undefined : customizer; | ||
length = 1; | ||
} | ||
while (++index < length) { | ||
var source = sources[index]; | ||
if (source) { | ||
assigner(object, source, customizer); | ||
} | ||
} | ||
return object; | ||
}); | ||
} | ||
module.exports = createAssigner; | ||
},{"lodash._bindcallback":12,"lodash._isiterateecall":15,"lodash.restparam":20}],14:[function(require,module,exports){ | ||
/** | ||
* lodash 3.9.1 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
/** `Object#toString` result references. */ | ||
var funcTag = '[object Function]'; | ||
/** Used to detect host constructors (Safari > 5). */ | ||
var reIsHostCtor = /^\[object .+?Constructor\]$/; | ||
/** | ||
* Checks if `value` is object-like. | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`. | ||
*/ | ||
function isObjectLike(value) { | ||
return !!value && typeof value == 'object'; | ||
} | ||
/** Used for native method references. */ | ||
var objectProto = Object.prototype; | ||
/** Used to resolve the decompiled source of functions. */ | ||
var fnToString = Function.prototype.toString; | ||
/** Used to check objects for own properties. */ | ||
var hasOwnProperty = objectProto.hasOwnProperty; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
*/ | ||
var objToString = objectProto.toString; | ||
/** Used to detect if a method is native. */ | ||
var reIsNative = RegExp('^' + | ||
fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') | ||
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' | ||
); | ||
/** | ||
* Gets the native function at `key` of `object`. | ||
* | ||
* @private | ||
* @param {Object} object The object to query. | ||
* @param {string} key The key of the method to get. | ||
* @returns {*} Returns the function if it's native, else `undefined`. | ||
*/ | ||
function getNative(object, key) { | ||
var value = object == null ? undefined : object[key]; | ||
return isNative(value) ? value : undefined; | ||
} | ||
/** | ||
* Checks if `value` is classified as a `Function` object. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | ||
* @example | ||
* | ||
* _.isFunction(_); | ||
* // => true | ||
* | ||
* _.isFunction(/abc/); | ||
* // => false | ||
*/ | ||
function isFunction(value) { | ||
// The use of `Object#toString` avoids issues with the `typeof` operator | ||
// in older versions of Chrome and Safari which return 'function' for regexes | ||
// and Safari 8 equivalents which return 'object' for typed array constructors. | ||
return isObject(value) && objToString.call(value) == funcTag; | ||
} | ||
/** | ||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. | ||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is an object, else `false`. | ||
* @example | ||
* | ||
* _.isObject({}); | ||
* // => true | ||
* | ||
* _.isObject([1, 2, 3]); | ||
* // => true | ||
* | ||
* _.isObject(1); | ||
* // => false | ||
*/ | ||
function isObject(value) { | ||
// Avoid a V8 JIT bug in Chrome 19-20. | ||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details. | ||
var type = typeof value; | ||
return !!value && (type == 'object' || type == 'function'); | ||
} | ||
/** | ||
* Checks if `value` is a native function. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is a native function, else `false`. | ||
* @example | ||
* | ||
* _.isNative(Array.prototype.push); | ||
* // => true | ||
* | ||
* _.isNative(_); | ||
* // => false | ||
*/ | ||
function isNative(value) { | ||
if (value == null) { | ||
return false; | ||
} | ||
if (isFunction(value)) { | ||
return reIsNative.test(fnToString.call(value)); | ||
} | ||
return isObjectLike(value) && reIsHostCtor.test(value); | ||
} | ||
module.exports = getNative; | ||
},{}],15:[function(require,module,exports){ | ||
/** | ||
* lodash 3.0.9 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
/** Used to detect unsigned integer values. */ | ||
var reIsUint = /^\d+$/; | ||
/** | ||
* Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) | ||
* of an array-like value. | ||
*/ | ||
var MAX_SAFE_INTEGER = 9007199254740991; | ||
/** | ||
* The base implementation of `_.property` without support for deep paths. | ||
* | ||
* @private | ||
* @param {string} key The key of the property to get. | ||
* @returns {Function} Returns the new function. | ||
*/ | ||
function baseProperty(key) { | ||
return function(object) { | ||
return object == null ? undefined : object[key]; | ||
}; | ||
} | ||
/** | ||
* Gets the "length" property value of `object`. | ||
* | ||
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) | ||
* that affects Safari on at least iOS 8.1-8.3 ARM64. | ||
* | ||
* @private | ||
* @param {Object} object The object to query. | ||
* @returns {*} Returns the "length" value. | ||
*/ | ||
var getLength = baseProperty('length'); | ||
/** | ||
* Checks if `value` is array-like. | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is array-like, else `false`. | ||
*/ | ||
function isArrayLike(value) { | ||
return value != null && isLength(getLength(value)); | ||
} | ||
/** | ||
* Checks if `value` is a valid array-like index. | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. | ||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`. | ||
*/ | ||
function isIndex(value, length) { | ||
value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; | ||
length = length == null ? MAX_SAFE_INTEGER : length; | ||
return value > -1 && value % 1 == 0 && value < length; | ||
} | ||
/** | ||
* Checks if the provided arguments are from an iteratee call. | ||
* | ||
* @private | ||
* @param {*} value The potential iteratee value argument. | ||
* @param {*} index The potential iteratee index or key argument. | ||
* @param {*} object The potential iteratee object argument. | ||
* @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. | ||
*/ | ||
function isIterateeCall(value, index, object) { | ||
if (!isObject(object)) { | ||
return false; | ||
} | ||
var type = typeof index; | ||
if (type == 'number' | ||
? (isArrayLike(object) && isIndex(index, object.length)) | ||
: (type == 'string' && index in object)) { | ||
var other = object[index]; | ||
return value === value ? (value === other) : (other !== other); | ||
} | ||
return false; | ||
} | ||
/** | ||
* Checks if `value` is a valid array-like length. | ||
* | ||
* **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`. | ||
*/ | ||
function isLength(value) { | ||
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; | ||
} | ||
/** | ||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. | ||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is an object, else `false`. | ||
* @example | ||
* | ||
* _.isObject({}); | ||
* // => true | ||
* | ||
* _.isObject([1, 2, 3]); | ||
* // => true | ||
* | ||
* _.isObject(1); | ||
* // => false | ||
*/ | ||
function isObject(value) { | ||
// Avoid a V8 JIT bug in Chrome 19-20. | ||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details. | ||
var type = typeof value; | ||
return !!value && (type == 'object' || type == 'function'); | ||
} | ||
module.exports = isIterateeCall; | ||
},{}],16:[function(require,module,exports){ | ||
/** | ||
* lodash 3.2.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
var baseAssign = require('lodash._baseassign'), | ||
createAssigner = require('lodash._createassigner'), | ||
keys = require('lodash.keys'); | ||
/** | ||
* A specialized version of `_.assign` for customizing assigned values without | ||
* support for argument juggling, multiple sources, and `this` binding `customizer` | ||
* functions. | ||
* | ||
* @private | ||
* @param {Object} object The destination object. | ||
* @param {Object} source The source object. | ||
* @param {Function} customizer The function to customize assigned values. | ||
* @returns {Object} Returns `object`. | ||
*/ | ||
function assignWith(object, source, customizer) { | ||
var index = -1, | ||
props = keys(source), | ||
length = props.length; | ||
while (++index < length) { | ||
var key = props[index], | ||
value = object[key], | ||
result = customizer(value, source[key], key, object, source); | ||
if ((result === result ? (result !== value) : (value === value)) || | ||
(value === undefined && !(key in object))) { | ||
object[key] = result; | ||
} | ||
} | ||
return object; | ||
} | ||
/** | ||
* Assigns own enumerable properties of source object(s) to the destination | ||
* object. Subsequent sources overwrite property assignments of previous sources. | ||
* If `customizer` is provided it is invoked to produce the assigned values. | ||
* The `customizer` is bound to `thisArg` and invoked with five arguments: | ||
* (objectValue, sourceValue, key, object, source). | ||
* | ||
* **Note:** This method mutates `object` and is based on | ||
* [`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @alias extend | ||
* @category Object | ||
* @param {Object} object The destination object. | ||
* @param {...Object} [sources] The source objects. | ||
* @param {Function} [customizer] The function to customize assigned values. | ||
* @param {*} [thisArg] The `this` binding of `customizer`. | ||
* @returns {Object} Returns `object`. | ||
* @example | ||
* | ||
* _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); | ||
* // => { 'user': 'fred', 'age': 40 } | ||
* | ||
* // using a customizer callback | ||
* var defaults = _.partialRight(_.assign, function(value, other) { | ||
* return _.isUndefined(value) ? other : value; | ||
* }); | ||
* | ||
* defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); | ||
* // => { 'user': 'barney', 'age': 36 } | ||
*/ | ||
var assign = createAssigner(function(object, source, customizer) { | ||
return customizer | ||
? assignWith(object, source, customizer) | ||
: baseAssign(object, source); | ||
}); | ||
module.exports = assign; | ||
},{"lodash._baseassign":10,"lodash._createassigner":13,"lodash.keys":19}],17:[function(require,module,exports){ | ||
/** | ||
* lodash 3.0.8 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="npm" -o ./` | ||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
/** Used as references for various `Number` constants. */ | ||
var MAX_SAFE_INTEGER = 9007199254740991; | ||
/** `Object#toString` result references. */ | ||
var argsTag = '[object Arguments]', | ||
funcTag = '[object Function]', | ||
genTag = '[object GeneratorFunction]'; | ||
/** Used for built-in method references. */ | ||
var objectProto = Object.prototype; | ||
/** Used to check objects for own properties. */ | ||
var hasOwnProperty = objectProto.hasOwnProperty; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
*/ | ||
var objectToString = objectProto.toString; | ||
/** Built-in value references. */ | ||
var propertyIsEnumerable = objectProto.propertyIsEnumerable; | ||
/** | ||
* The base implementation of `_.property` without support for deep paths. | ||
* | ||
* @private | ||
* @param {string} key The key of the property to get. | ||
* @returns {Function} Returns the new function. | ||
*/ | ||
function baseProperty(key) { | ||
return function(object) { | ||
return object == null ? undefined : object[key]; | ||
}; | ||
} | ||
/** | ||
* Gets the "length" property value of `object`. | ||
* | ||
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) | ||
* that affects Safari on at least iOS 8.1-8.3 ARM64. | ||
* | ||
* @private | ||
* @param {Object} object The object to query. | ||
* @returns {*} Returns the "length" value. | ||
*/ | ||
var getLength = baseProperty('length'); | ||
/** | ||
* Checks if `value` is likely an `arguments` object. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | ||
* @example | ||
* | ||
* _.isArguments(function() { return arguments; }()); | ||
* // => true | ||
* | ||
* _.isArguments([1, 2, 3]); | ||
* // => false | ||
*/ | ||
function isArguments(value) { | ||
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. | ||
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && | ||
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); | ||
} | ||
/** | ||
* Checks if `value` is array-like. A value is considered array-like if it's | ||
* not a function and has a `value.length` that's an integer greater than or | ||
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is array-like, else `false`. | ||
* @example | ||
* | ||
* _.isArrayLike([1, 2, 3]); | ||
* // => true | ||
* | ||
* _.isArrayLike(document.body.children); | ||
* // => true | ||
* | ||
* _.isArrayLike('abc'); | ||
* // => true | ||
* | ||
* _.isArrayLike(_.noop); | ||
* // => false | ||
*/ | ||
function isArrayLike(value) { | ||
return value != null && isLength(getLength(value)) && !isFunction(value); | ||
} | ||
/** | ||
* This method is like `_.isArrayLike` except that it also checks if `value` | ||
* is an object. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. | ||
* @example | ||
* | ||
* _.isArrayLikeObject([1, 2, 3]); | ||
* // => true | ||
* | ||
* _.isArrayLikeObject(document.body.children); | ||
* // => true | ||
* | ||
* _.isArrayLikeObject('abc'); | ||
* // => false | ||
* | ||
* _.isArrayLikeObject(_.noop); | ||
* // => false | ||
*/ | ||
function isArrayLikeObject(value) { | ||
return isObjectLike(value) && isArrayLike(value); | ||
} | ||
/** | ||
* Checks if `value` is classified as a `Function` object. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | ||
* @example | ||
* | ||
* _.isFunction(_); | ||
* // => true | ||
* | ||
* _.isFunction(/abc/); | ||
* // => false | ||
*/ | ||
function isFunction(value) { | ||
// The use of `Object#toString` avoids issues with the `typeof` operator | ||
// in Safari 8 which returns 'object' for typed array and weak map constructors, | ||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances. | ||
var tag = isObject(value) ? objectToString.call(value) : ''; | ||
return tag == funcTag || tag == genTag; | ||
} | ||
/** | ||
* Checks if `value` is a valid array-like length. | ||
* | ||
* **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`. | ||
* @example | ||
* | ||
* _.isLength(3); | ||
* // => true | ||
* | ||
* _.isLength(Number.MIN_VALUE); | ||
* // => false | ||
* | ||
* _.isLength(Infinity); | ||
* // => false | ||
* | ||
* _.isLength('3'); | ||
* // => false | ||
*/ | ||
function isLength(value) { | ||
return typeof value == 'number' && | ||
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; | ||
} | ||
/** | ||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. | ||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is an object, else `false`. | ||
* @example | ||
* | ||
* _.isObject({}); | ||
* // => true | ||
* | ||
* _.isObject([1, 2, 3]); | ||
* // => true | ||
* | ||
* _.isObject(_.noop); | ||
* // => true | ||
* | ||
* _.isObject(null); | ||
* // => false | ||
*/ | ||
function isObject(value) { | ||
var type = typeof value; | ||
return !!value && (type == 'object' || type == 'function'); | ||
} | ||
/** | ||
* Checks if `value` is object-like. A value is object-like if it's not `null` | ||
* and has a `typeof` result of "object". | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`. | ||
* @example | ||
* | ||
* _.isObjectLike({}); | ||
* // => true | ||
* | ||
* _.isObjectLike([1, 2, 3]); | ||
* // => true | ||
* | ||
* _.isObjectLike(_.noop); | ||
* // => false | ||
* | ||
* _.isObjectLike(null); | ||
* // => false | ||
*/ | ||
function isObjectLike(value) { | ||
return !!value && typeof value == 'object'; | ||
} | ||
module.exports = isArguments; | ||
},{}],18:[function(require,module,exports){ | ||
/** | ||
* lodash 3.0.4 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
/** `Object#toString` result references. */ | ||
var arrayTag = '[object Array]', | ||
funcTag = '[object Function]'; | ||
/** Used to detect host constructors (Safari > 5). */ | ||
var reIsHostCtor = /^\[object .+?Constructor\]$/; | ||
/** | ||
* Checks if `value` is object-like. | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is object-like, else `false`. | ||
*/ | ||
function isObjectLike(value) { | ||
return !!value && typeof value == 'object'; | ||
} | ||
/** Used for native method references. */ | ||
var objectProto = Object.prototype; | ||
/** Used to resolve the decompiled source of functions. */ | ||
var fnToString = Function.prototype.toString; | ||
/** Used to check objects for own properties. */ | ||
var hasOwnProperty = objectProto.hasOwnProperty; | ||
/** | ||
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* of values. | ||
*/ | ||
var objToString = objectProto.toString; | ||
/** Used to detect if a method is native. */ | ||
var reIsNative = RegExp('^' + | ||
fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') | ||
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' | ||
); | ||
/* Native method references for those with the same name as other `lodash` methods. */ | ||
var nativeIsArray = getNative(Array, 'isArray'); | ||
/** | ||
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) | ||
* of an array-like value. | ||
*/ | ||
var MAX_SAFE_INTEGER = 9007199254740991; | ||
/** | ||
* Gets the native function at `key` of `object`. | ||
* | ||
* @private | ||
* @param {Object} object The object to query. | ||
* @param {string} key The key of the method to get. | ||
* @returns {*} Returns the function if it's native, else `undefined`. | ||
*/ | ||
function getNative(object, key) { | ||
var value = object == null ? undefined : object[key]; | ||
return isNative(value) ? value : undefined; | ||
} | ||
/** | ||
* Checks if `value` is a valid array-like length. | ||
* | ||
* **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`. | ||
*/ | ||
function isLength(value) { | ||
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; | ||
} | ||
/** | ||
* Checks if `value` is classified as an `Array` object. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | ||
* @example | ||
* | ||
* _.isArray([1, 2, 3]); | ||
* // => true | ||
* | ||
* _.isArray(function() { return arguments; }()); | ||
* // => false | ||
*/ | ||
var isArray = nativeIsArray || function(value) { | ||
return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; | ||
}; | ||
/** | ||
* Checks if `value` is classified as a `Function` object. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | ||
* @example | ||
* | ||
* _.isFunction(_); | ||
* // => true | ||
* | ||
* _.isFunction(/abc/); | ||
* // => false | ||
*/ | ||
function isFunction(value) { | ||
// The use of `Object#toString` avoids issues with the `typeof` operator | ||
// in older versions of Chrome and Safari which return 'function' for regexes | ||
// and Safari 8 equivalents which return 'object' for typed array constructors. | ||
return isObject(value) && objToString.call(value) == funcTag; | ||
} | ||
/** | ||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. | ||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is an object, else `false`. | ||
* @example | ||
* | ||
* _.isObject({}); | ||
* // => true | ||
* | ||
* _.isObject([1, 2, 3]); | ||
* // => true | ||
* | ||
* _.isObject(1); | ||
* // => false | ||
*/ | ||
function isObject(value) { | ||
// Avoid a V8 JIT bug in Chrome 19-20. | ||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details. | ||
var type = typeof value; | ||
return !!value && (type == 'object' || type == 'function'); | ||
} | ||
/** | ||
* Checks if `value` is a native function. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is a native function, else `false`. | ||
* @example | ||
* | ||
* _.isNative(Array.prototype.push); | ||
* // => true | ||
* | ||
* _.isNative(_); | ||
* // => false | ||
*/ | ||
function isNative(value) { | ||
if (value == null) { | ||
return false; | ||
} | ||
if (isFunction(value)) { | ||
return reIsNative.test(fnToString.call(value)); | ||
} | ||
return isObjectLike(value) && reIsHostCtor.test(value); | ||
} | ||
module.exports = isArray; | ||
},{}],19:[function(require,module,exports){ | ||
/** | ||
* lodash 3.1.2 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
var getNative = require('lodash._getnative'), | ||
isArguments = require('lodash.isarguments'), | ||
isArray = require('lodash.isarray'); | ||
/** Used to detect unsigned integer values. */ | ||
var reIsUint = /^\d+$/; | ||
/** Used for native method references. */ | ||
var objectProto = Object.prototype; | ||
/** Used to check objects for own properties. */ | ||
var hasOwnProperty = objectProto.hasOwnProperty; | ||
/* Native method references for those with the same name as other `lodash` methods. */ | ||
var nativeKeys = getNative(Object, 'keys'); | ||
/** | ||
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) | ||
* of an array-like value. | ||
*/ | ||
var MAX_SAFE_INTEGER = 9007199254740991; | ||
/** | ||
* The base implementation of `_.property` without support for deep paths. | ||
* | ||
* @private | ||
* @param {string} key The key of the property to get. | ||
* @returns {Function} Returns the new function. | ||
*/ | ||
function baseProperty(key) { | ||
return function(object) { | ||
return object == null ? undefined : object[key]; | ||
}; | ||
} | ||
/** | ||
* Gets the "length" property value of `object`. | ||
* | ||
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) | ||
* that affects Safari on at least iOS 8.1-8.3 ARM64. | ||
* | ||
* @private | ||
* @param {Object} object The object to query. | ||
* @returns {*} Returns the "length" value. | ||
*/ | ||
var getLength = baseProperty('length'); | ||
/** | ||
* Checks if `value` is array-like. | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is array-like, else `false`. | ||
*/ | ||
function isArrayLike(value) { | ||
return value != null && isLength(getLength(value)); | ||
} | ||
/** | ||
* Checks if `value` is a valid array-like index. | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. | ||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`. | ||
*/ | ||
function isIndex(value, length) { | ||
value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; | ||
length = length == null ? MAX_SAFE_INTEGER : length; | ||
return value > -1 && value % 1 == 0 && value < length; | ||
} | ||
/** | ||
* Checks if `value` is a valid array-like length. | ||
* | ||
* **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`. | ||
*/ | ||
function isLength(value) { | ||
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; | ||
} | ||
/** | ||
* A fallback implementation of `Object.keys` which creates an array of the | ||
* own enumerable property names of `object`. | ||
* | ||
* @private | ||
* @param {Object} object The object to query. | ||
* @returns {Array} Returns the array of property names. | ||
*/ | ||
function shimKeys(object) { | ||
var props = keysIn(object), | ||
propsLength = props.length, | ||
length = propsLength && object.length; | ||
var allowIndexes = !!length && isLength(length) && | ||
(isArray(object) || isArguments(object)); | ||
var index = -1, | ||
result = []; | ||
while (++index < propsLength) { | ||
var key = props[index]; | ||
if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { | ||
result.push(key); | ||
} | ||
} | ||
return result; | ||
} | ||
/** | ||
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. | ||
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is an object, else `false`. | ||
* @example | ||
* | ||
* _.isObject({}); | ||
* // => true | ||
* | ||
* _.isObject([1, 2, 3]); | ||
* // => true | ||
* | ||
* _.isObject(1); | ||
* // => false | ||
*/ | ||
function isObject(value) { | ||
// Avoid a V8 JIT bug in Chrome 19-20. | ||
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details. | ||
var type = typeof value; | ||
return !!value && (type == 'object' || type == 'function'); | ||
} | ||
/** | ||
* Creates an array of the own enumerable property names of `object`. | ||
* | ||
* **Note:** Non-object values are coerced to objects. See the | ||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) | ||
* for more details. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Object | ||
* @param {Object} object The object to query. | ||
* @returns {Array} Returns the array of property names. | ||
* @example | ||
* | ||
* function Foo() { | ||
* this.a = 1; | ||
* this.b = 2; | ||
* } | ||
* | ||
* Foo.prototype.c = 3; | ||
* | ||
* _.keys(new Foo); | ||
* // => ['a', 'b'] (iteration order is not guaranteed) | ||
* | ||
* _.keys('hi'); | ||
* // => ['0', '1'] | ||
*/ | ||
var keys = !nativeKeys ? shimKeys : function(object) { | ||
var Ctor = object == null ? undefined : object.constructor; | ||
if ((typeof Ctor == 'function' && Ctor.prototype === object) || | ||
(typeof object != 'function' && isArrayLike(object))) { | ||
return shimKeys(object); | ||
} | ||
return isObject(object) ? nativeKeys(object) : []; | ||
}; | ||
/** | ||
* Creates an array of the own and inherited enumerable property names of `object`. | ||
* | ||
* **Note:** Non-object values are coerced to objects. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Object | ||
* @param {Object} object The object to query. | ||
* @returns {Array} Returns the array of property names. | ||
* @example | ||
* | ||
* function Foo() { | ||
* this.a = 1; | ||
* this.b = 2; | ||
* } | ||
* | ||
* Foo.prototype.c = 3; | ||
* | ||
* _.keysIn(new Foo); | ||
* // => ['a', 'b', 'c'] (iteration order is not guaranteed) | ||
*/ | ||
function keysIn(object) { | ||
if (object == null) { | ||
return []; | ||
} | ||
if (!isObject(object)) { | ||
object = Object(object); | ||
} | ||
var length = object.length; | ||
length = (length && isLength(length) && | ||
(isArray(object) || isArguments(object)) && length) || 0; | ||
var Ctor = object.constructor, | ||
index = -1, | ||
isProto = typeof Ctor == 'function' && Ctor.prototype === object, | ||
result = Array(length), | ||
skipIndexes = length > 0; | ||
while (++index < length) { | ||
result[index] = (index + ''); | ||
} | ||
for (var key in object) { | ||
if (!(skipIndexes && isIndex(key, length)) && | ||
!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { | ||
result.push(key); | ||
} | ||
} | ||
return result; | ||
} | ||
module.exports = keys; | ||
},{"lodash._getnative":14,"lodash.isarguments":17,"lodash.isarray":18}],20:[function(require,module,exports){ | ||
/** | ||
* lodash 3.6.1 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
* Available under MIT license <https://lodash.com/license> | ||
*/ | ||
/** Used as the `TypeError` message for "Functions" methods. */ | ||
var FUNC_ERROR_TEXT = 'Expected a function'; | ||
/* Native method references for those with the same name as other `lodash` methods. */ | ||
var nativeMax = Math.max; | ||
/** | ||
* Creates a function that invokes `func` with the `this` binding of the | ||
* created function and arguments from `start` and beyond provided as an array. | ||
* | ||
* **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @category Function | ||
* @param {Function} func The function to apply a rest parameter to. | ||
* @param {number} [start=func.length-1] The start position of the rest parameter. | ||
* @returns {Function} Returns the new function. | ||
* @example | ||
* | ||
* var say = _.restParam(function(what, names) { | ||
* return what + ' ' + _.initial(names).join(', ') + | ||
* (_.size(names) > 1 ? ', & ' : '') + _.last(names); | ||
* }); | ||
* | ||
* say('hello', 'fred', 'barney', 'pebbles'); | ||
* // => 'hello fred, barney, & pebbles' | ||
*/ | ||
function restParam(func, start) { | ||
if (typeof func != 'function') { | ||
throw new TypeError(FUNC_ERROR_TEXT); | ||
} | ||
start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); | ||
return function() { | ||
var args = arguments, | ||
index = -1, | ||
length = nativeMax(args.length - start, 0), | ||
rest = Array(length); | ||
while (++index < length) { | ||
rest[index] = args[start + index]; | ||
} | ||
switch (start) { | ||
case 0: return func.call(this, rest); | ||
case 1: return func.call(this, args[0], rest); | ||
case 2: return func.call(this, args[0], args[1], rest); | ||
} | ||
var otherArgs = Array(start + 1); | ||
index = -1; | ||
while (++index < start) { | ||
otherArgs[index] = args[index]; | ||
} | ||
otherArgs[start] = rest; | ||
return func.apply(this, otherArgs); | ||
}; | ||
} | ||
module.exports = restParam; | ||
},{}]},{},[7])(7) | ||
}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactModal=t(require("react"),require("react-dom")):e.ReactModal=t(e.react,e["react-dom"])}(this,function(e,t){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="/",t(0)}([function(e,t,n){"use strict";e.exports=n(6)},function(e,t){"use strict";/*! | ||
* Adapted from jQuery UI core | ||
* | ||
* http://jqueryui.com | ||
* | ||
* Copyright 2014 jQuery Foundation and other contributors | ||
* Released under the MIT license. | ||
* http://jquery.org/license | ||
* | ||
* http://api.jqueryui.com/category/ui-core/ | ||
*/ | ||
function n(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&r(e)}function o(e){return e.offsetWidth<=0&&e.offsetHeight<=0||"none"===e.style.display}function r(e){for(;e&&e!==document.body;){if(o(e))return!1;e=e.parentNode}return!0}function i(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var o=isNaN(t);return(o||t>=0)&&n(e,!o)}function s(e){return[].slice.call(e.querySelectorAll("*"),0).filter(function(e){return i(e)})}e.exports=s},function(e,t,n){function o(e,t,n){for(var o=-1,r=s(t),i=r.length;++o<i;){var u=r[o],c=e[u],a=n(c,t[u],u,e,t);(a===a?a===c:c!==c)&&(void 0!==c||u in e)||(e[u]=a)}return e}var r=n(13),i=n(16),s=n(3),u=i(function(e,t,n){return n?o(e,t,n):r(e,t)});e.exports=u},function(e,t,n){function o(e){return function(t){return null==t?void 0:t[e]}}function r(e){return null!=e&&s(b(e))}function i(e,t){return e="number"==typeof e||d.test(e)?+e:-1,t=null==t?m:t,e>-1&&e%1==0&&t>e}function s(e){return"number"==typeof e&&e>-1&&e%1==0&&m>=e}function u(e){for(var t=a(e),n=t.length,o=n&&e.length,r=!!o&&s(o)&&(p(e)||f(e)),u=-1,c=[];++u<n;){var l=t[u];(r&&i(l,o)||v.call(e,l))&&c.push(l)}return c}function c(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){if(null==e)return[];c(e)||(e=Object(e));var t=e.length;t=t&&s(t)&&(p(e)||f(e))&&t||0;for(var n=e.constructor,o=-1,r="function"==typeof n&&n.prototype===e,u=Array(t),a=t>0;++o<t;)u[o]=o+"";for(var l in e)a&&i(l,t)||"constructor"==l&&(r||!v.call(e,l))||u.push(l);return u}var l=n(17),f=n(19),p=n(20),d=/^\d+$/,h=Object.prototype,v=h.hasOwnProperty,y=l(Object,"keys"),m=9007199254740991,b=o("length"),w=y?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&r(e)?u(e):c(e)?y(e):[]}:u;e.exports=w},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";function o(e){delete e.ref}var r=n(4),i=n(5),s=n(12),u=r.createFactory(n(7)),c=n(8),a=n(11),l=n(5).unstable_renderSubtreeIntoContainer,f=n(2),p=s.canUseDOM?window.HTMLElement:{},d=s.canUseDOM?document.body:{appendChild:function(){}},h=r.createClass({displayName:"Modal",statics:{setAppElement:function(e){d=c.setElement(e)},injectCSS:function(){console.warn("React-Modal: injectCSS has been deprecated and no longer has any effect. It will be removed in a later version")}},propTypes:{isOpen:r.PropTypes.bool.isRequired,style:r.PropTypes.shape({content:r.PropTypes.object,overlay:r.PropTypes.object}),appElement:r.PropTypes.instanceOf(p),onAfterOpen:r.PropTypes.func,onRequestClose:r.PropTypes.func,closeTimeoutMS:r.PropTypes.number,ariaHideApp:r.PropTypes.bool,shouldCloseOnOverlayClick:r.PropTypes.bool},getDefaultProps:function(){return{isOpen:!1,ariaHideApp:!0,closeTimeoutMS:0,shouldCloseOnOverlayClick:!0}},componentDidMount:function(){this.node=document.createElement("div"),this.node.className="ReactModalPortal",d.appendChild(this.node),this.renderPortal(this.props)},componentWillReceiveProps:function(e){this.renderPortal(e)},componentWillUnmount:function(){i.unmountComponentAtNode(this.node),d.removeChild(this.node),a(document.body).remove("ReactModal__Body--open")},renderPortal:function(e){e.isOpen?a(document.body).add("ReactModal__Body--open"):a(document.body).remove("ReactModal__Body--open"),e.ariaHideApp&&c.toggle(e.isOpen,e.appElement),o(e),this.portal=l(this,u(f({},e,{defaultStyles:h.defaultStyles})),this.node)},render:function(){return r.DOM.noscript()}});h.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},e.exports=h},function(e,t,n){"use strict";var o=n(4),r=o.DOM.div,i=n(9),s=n(10),u=n(2),c={overlay:{base:"ReactModal__Overlay",afterOpen:"ReactModal__Overlay--after-open",beforeClose:"ReactModal__Overlay--before-close"},content:{base:"ReactModal__Content",afterOpen:"ReactModal__Content--after-open",beforeClose:"ReactModal__Content--before-close"}};e.exports=o.createClass({displayName:"ModalPortal",getDefaultProps:function(){return{style:{overlay:{},content:{}}}},getInitialState:function(){return{afterOpen:!1,beforeClose:!1}},componentDidMount:function(){this.props.isOpen&&(this.setFocusAfterRender(!0),this.open())},componentWillUnmount:function(){clearTimeout(this.closeTimer)},componentWillReceiveProps:function(e){!this.props.isOpen&&e.isOpen?(this.setFocusAfterRender(!0),this.open()):this.props.isOpen&&!e.isOpen&&this.close()},componentDidUpdate:function(){this.focusAfterRender&&(this.focusContent(),this.setFocusAfterRender(!1))},setFocusAfterRender:function(e){this.focusAfterRender=e},open:function(){i.setupScopedFocus(this.node),i.markForFocusLater(),this.setState({isOpen:!0},function(){this.setState({afterOpen:!0}),this.props.isOpen&&this.props.onAfterOpen&&this.props.onAfterOpen()}.bind(this))},close:function(){this.ownerHandlesClose()&&(this.props.closeTimeoutMS>0?this.closeWithTimeout():this.closeWithoutTimeout())},focusContent:function(){this.refs.content.focus()},closeWithTimeout:function(){this.setState({beforeClose:!0},function(){this.closeTimer=setTimeout(this.closeWithoutTimeout,this.props.closeTimeoutMS)}.bind(this))},closeWithoutTimeout:function(){this.setState({afterOpen:!1,beforeClose:!1},this.afterClose)},afterClose:function(){i.returnFocus(),i.teardownScopedFocus()},handleKeyDown:function(e){9==e.keyCode&&s(this.refs.content,e),27==e.keyCode&&(e.preventDefault(),this.requestClose())},handleOverlayClick:function(e){for(var t=e.target;t;){if(t===this.refs.content)return;t=t.parentNode}this.props.shouldCloseOnOverlayClick&&(this.ownerHandlesClose()?this.requestClose():this.focusContent())},requestClose:function(){this.ownerHandlesClose()&&this.props.onRequestClose()},ownerHandlesClose:function(){return this.props.onRequestClose},shouldBeClosed:function(){return!this.props.isOpen&&!this.state.beforeClose},buildClassName:function(e,t){var n=c[e].base;return this.state.afterOpen&&(n+=" "+c[e].afterOpen),this.state.beforeClose&&(n+=" "+c[e].beforeClose),t?n+" "+t:n},render:function(){var e=this.props.className?{}:this.props.defaultStyles.content,t=this.props.overlayClassName?{}:this.props.defaultStyles.overlay;return this.shouldBeClosed()?r():r({ref:"overlay",className:this.buildClassName("overlay",this.props.overlayClassName),style:u({},t,this.props.style.overlay||{}),onClick:this.handleOverlayClick},r({ref:"content",style:u({},e,this.props.style.content||{}),className:this.buildClassName("content",this.props.className),tabIndex:"-1",onKeyDown:this.handleKeyDown},this.props.children))}})},function(e,t){"use strict";function n(e){if("string"==typeof e){var t=document.querySelectorAll(e);e="length"in t?t[0]:t}return c=e||c}function o(e){s(e),(e||c).setAttribute("aria-hidden","true")}function r(e){s(e),(e||c).removeAttribute("aria-hidden")}function i(e,t){e?o(t):r(t)}function s(e){if(!e&&!c)throw new Error("react-modal: You must set an element with `Modal.setAppElement(el)` to make this accessible")}function u(){c=document.body}var c="undefined"!=typeof document?document.body:null;t.toggle=i,t.setElement=n,t.show=r,t.hide=o,t.resetForTesting=u},function(e,t,n){"use strict";function o(e){c=!0}function r(e){if(c){if(c=!1,!s)return;setTimeout(function(){if(!s.contains(document.activeElement)){var e=i(s)[0]||s;e.focus()}},0)}}var i=n(1),s=null,u=null,c=!1;t.markForFocusLater=function(){u=document.activeElement},t.returnFocus=function(){try{u.focus()}catch(e){console.warn("You tried to return focus to "+u+" but it is not in the DOM anymore")}u=null},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",o,!1),document.addEventListener("focus",r,!0)):(window.attachEvent("onBlur",o),document.attachEvent("onFocus",r))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",o),document.removeEventListener("focus",r)):(window.detachEvent("onBlur",o),document.detachEvent("onFocus",r))}},function(e,t,n){"use strict";var o=n(1);e.exports=function(e,t){var n=o(e);if(!n.length)return void t.preventDefault();var r=n[t.shiftKey?0:n.length-1],i=r===document.activeElement||e===document.activeElement;if(i){t.preventDefault();var s=n[t.shiftKey?n.length-1:0];s.focus()}}},function(e,t){function n(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;o>n;n++)if(e[n]===t)return n;return-1}function o(e){if(!(this instanceof o))return new o(e);e||(e={}),e.nodeType&&(e={el:e}),this.opts=e,this.el=e.el||document.body,"object"!=typeof this.el&&(this.el=document.querySelector(this.el))}e.exports=function(e){return new o(e)},o.prototype.add=function(e){var t=this.el;if(t){if(""===t.className)return t.className=e;var o=t.className.split(" ");return n(o,e)>-1?o:(o.push(e),t.className=o.join(" "),o)}},o.prototype.remove=function(e){var t=this.el;if(t&&""!==t.className){var o=t.className.split(" "),r=n(o,e);return r>-1&&o.splice(r,1),t.className=o.join(" "),o}},o.prototype.has=function(e){var t=this.el;if(t){var o=t.className.split(" ");return n(o,e)>-1}},o.prototype.toggle=function(e){var t=this.el;t&&(this.has(e)?this.remove(e):this.add(e))}},function(e,t,n){var o;/*! | ||
Copyright (c) 2015 Jed Watson. | ||
Based on code that is Copyright 2013-2015, Facebook, Inc. | ||
All rights reserved. | ||
*/ | ||
!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};o=function(){return i}.call(t,n,t,e),!(void 0!==o&&(e.exports=o))}()},function(e,t,n){function o(e,t){return null==t?e:r(t,i(t),e)}var r=n(14),i=n(3);e.exports=o},function(e,t){function n(e,t,n){n||(n={});for(var o=-1,r=t.length;++o<r;){var i=t[o];n[i]=e[i]}return n}e.exports=n},function(e,t){function n(e,t,n){if("function"!=typeof e)return o;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,o,r){return e.call(t,n,o,r)};case 4:return function(n,o,r,i){return e.call(t,n,o,r,i)};case 5:return function(n,o,r,i,s){return e.call(t,n,o,r,i,s)}}return function(){return e.apply(t,arguments)}}function o(e){return e}e.exports=n},function(e,t,n){function o(e){return s(function(t,n){var o=-1,s=null==t?0:n.length,u=s>2?n[s-2]:void 0,c=s>2?n[2]:void 0,a=s>1?n[s-1]:void 0;for("function"==typeof u?(u=r(u,a,5),s-=2):(u="function"==typeof a?a:void 0,s-=u?1:0),c&&i(n[0],n[1],c)&&(u=3>s?void 0:u,s=1);++o<s;){var l=n[o];l&&e(t,l,u)}return t})}var r=n(15),i=n(18),s=n(21);e.exports=o},function(e,t){function n(e){return!!e&&"object"==typeof e}function o(e,t){var n=null==e?void 0:e[t];return s(n)?n:void 0}function r(e){return i(e)&&p.call(e)==u}function i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){return null==e?!1:r(e)?d.test(l.call(e)):n(e)&&c.test(e)}var u="[object Function]",c=/^\[object .+?Constructor\]$/,a=Object.prototype,l=Function.prototype.toString,f=a.hasOwnProperty,p=a.toString,d=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=o},function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}function o(e){return null!=e&&s(l(e))}function r(e,t){return e="number"==typeof e||c.test(e)?+e:-1,t=null==t?a:t,e>-1&&e%1==0&&t>e}function i(e,t,n){if(!u(n))return!1;var i=typeof t;if("number"==i?o(n)&&r(t,n.length):"string"==i&&t in n){var s=n[t];return e===e?e===s:s!==s}return!1}function s(e){return"number"==typeof e&&e>-1&&e%1==0&&a>=e}function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var c=/^\d+$/,a=9007199254740991,l=n("length");e.exports=i},function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}function o(e){return i(e)&&v.call(e,"callee")&&(!m.call(e,"callee")||y.call(e)==f)}function r(e){return null!=e&&u(b(e))&&!s(e)}function i(e){return a(e)&&r(e)}function s(e){var t=c(e)?y.call(e):"";return t==p||t==d}function u(e){return"number"==typeof e&&e>-1&&e%1==0&&l>=e}function c(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){return!!e&&"object"==typeof e}var l=9007199254740991,f="[object Arguments]",p="[object Function]",d="[object GeneratorFunction]",h=Object.prototype,v=h.hasOwnProperty,y=h.toString,m=h.propertyIsEnumerable,b=n("length");e.exports=o},function(e,t){function n(e){return!!e&&"object"==typeof e}function o(e,t){var n=null==e?void 0:e[t];return u(n)?n:void 0}function r(e){return"number"==typeof e&&e>-1&&e%1==0&&m>=e}function i(e){return s(e)&&h.call(e)==a}function s(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function u(e){return null==e?!1:i(e)?v.test(p.call(e)):n(e)&&l.test(e)}var c="[object Array]",a="[object Function]",l=/^\[object .+?Constructor\]$/,f=Object.prototype,p=Function.prototype.toString,d=f.hasOwnProperty,h=f.toString,v=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=o(Array,"isArray"),m=9007199254740991,b=y||function(e){return n(e)&&r(e.length)&&h.call(e)==c};e.exports=b},function(e,t){function n(e,t){if("function"!=typeof e)throw new TypeError(o);return t=r(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,o=-1,i=r(n.length-t,0),s=Array(i);++o<i;)s[o]=n[t+o];switch(t){case 0:return e.call(this,s);case 1:return e.call(this,n[0],s);case 2:return e.call(this,n[0],n[1],s)}var u=Array(t+1);for(o=-1;++o<t;)u[o]=n[o];return u[t]=s,e.apply(this,u)}}var o="Expected a function",r=Math.max;e.exports=n}])}); |
@@ -1,1 +0,17 @@ | ||
!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.ReactModal=f()}}(function(){var define;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){function sanitizeProps(props){delete props.ref}var React="undefined"!=typeof window?window.React:"undefined"!=typeof global?global.React:null,ReactDOM="undefined"!=typeof window?window.ReactDOM:"undefined"!=typeof global?global.ReactDOM:null,ExecutionEnvironment=require("exenv"),ModalPortal=React.createFactory(require("./ModalPortal")),ariaAppHider=require("../helpers/ariaAppHider"),elementClass=require("element-class"),renderSubtreeIntoContainer=("undefined"!=typeof window?window.ReactDOM:"undefined"!=typeof global?global.ReactDOM:null).unstable_renderSubtreeIntoContainer,Assign=require("lodash.assign"),SafeHTMLElement=ExecutionEnvironment.canUseDOM?window.HTMLElement:{},AppElement=ExecutionEnvironment.canUseDOM?document.body:{appendChild:function(){}},Modal=React.createClass({displayName:"Modal",statics:{setAppElement:function(element){AppElement=ariaAppHider.setElement(element)},injectCSS:function(){}},propTypes:{isOpen:React.PropTypes.bool.isRequired,style:React.PropTypes.shape({content:React.PropTypes.object,overlay:React.PropTypes.object}),appElement:React.PropTypes.instanceOf(SafeHTMLElement),onAfterOpen:React.PropTypes.func,onRequestClose:React.PropTypes.func,closeTimeoutMS:React.PropTypes.number,ariaHideApp:React.PropTypes.bool,shouldCloseOnOverlayClick:React.PropTypes.bool},getDefaultProps:function(){return{isOpen:!1,ariaHideApp:!0,closeTimeoutMS:0,shouldCloseOnOverlayClick:!0}},componentDidMount:function(){this.node=document.createElement("div"),this.node.className="ReactModalPortal",AppElement.appendChild(this.node),this.renderPortal(this.props)},componentWillReceiveProps:function(newProps){this.renderPortal(newProps)},componentWillUnmount:function(){ReactDOM.unmountComponentAtNode(this.node),AppElement.removeChild(this.node),elementClass(document.body).remove("ReactModal__Body--open")},renderPortal:function(props){props.isOpen?elementClass(document.body).add("ReactModal__Body--open"):elementClass(document.body).remove("ReactModal__Body--open"),props.ariaHideApp&&ariaAppHider.toggle(props.isOpen,props.appElement),sanitizeProps(props),this.portal=renderSubtreeIntoContainer(this,ModalPortal(Assign({},props,{defaultStyles:Modal.defaultStyles})),this.node)},render:function(){return React.DOM.noscript()}});Modal.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},module.exports=Modal},{"../helpers/ariaAppHider":3,"./ModalPortal":2,"element-class":8,exenv:9,"lodash.assign":16}],2:[function(require,module,exports){var React="undefined"!=typeof window?window.React:"undefined"!=typeof global?global.React:null,div=React.DOM.div,focusManager=require("../helpers/focusManager"),scopeTab=require("../helpers/scopeTab"),Assign=require("lodash.assign"),CLASS_NAMES={overlay:{base:"ReactModal__Overlay",afterOpen:"ReactModal__Overlay--after-open",beforeClose:"ReactModal__Overlay--before-close"},content:{base:"ReactModal__Content",afterOpen:"ReactModal__Content--after-open",beforeClose:"ReactModal__Content--before-close"}};module.exports=React.createClass({displayName:"ModalPortal",getDefaultProps:function(){return{style:{overlay:{},content:{}}}},getInitialState:function(){return{afterOpen:!1,beforeClose:!1}},componentDidMount:function(){this.props.isOpen&&(this.setFocusAfterRender(!0),this.open())},componentWillUnmount:function(){clearTimeout(this.closeTimer)},componentWillReceiveProps:function(newProps){!this.props.isOpen&&newProps.isOpen?(this.setFocusAfterRender(!0),this.open()):this.props.isOpen&&!newProps.isOpen&&this.close()},componentDidUpdate:function(){this.focusAfterRender&&(this.focusContent(),this.setFocusAfterRender(!1))},setFocusAfterRender:function(focus){this.focusAfterRender=focus},open:function(){focusManager.setupScopedFocus(this.node),focusManager.markForFocusLater(),this.setState({isOpen:!0},function(){this.setState({afterOpen:!0}),this.props.isOpen&&this.props.onAfterOpen&&this.props.onAfterOpen()}.bind(this))},close:function(){this.ownerHandlesClose()&&(this.props.closeTimeoutMS>0?this.closeWithTimeout():this.closeWithoutTimeout())},focusContent:function(){this.refs.content.focus()},closeWithTimeout:function(){this.setState({beforeClose:!0},function(){this.closeTimer=setTimeout(this.closeWithoutTimeout,this.props.closeTimeoutMS)}.bind(this))},closeWithoutTimeout:function(){this.setState({afterOpen:!1,beforeClose:!1},this.afterClose)},afterClose:function(){focusManager.returnFocus(),focusManager.teardownScopedFocus()},handleKeyDown:function(event){9==event.keyCode&&scopeTab(this.refs.content,event),27==event.keyCode&&(event.preventDefault(),this.requestClose())},handleOverlayClick:function(event){for(var node=event.target;node;){if(node===this.refs.content)return;node=node.parentNode}this.props.shouldCloseOnOverlayClick&&(this.ownerHandlesClose()?this.requestClose():this.focusContent())},requestClose:function(){this.ownerHandlesClose()&&this.props.onRequestClose()},ownerHandlesClose:function(){return this.props.onRequestClose},shouldBeClosed:function(){return!this.props.isOpen&&!this.state.beforeClose},buildClassName:function(which,additional){var className=CLASS_NAMES[which].base;return this.state.afterOpen&&(className+=" "+CLASS_NAMES[which].afterOpen),this.state.beforeClose&&(className+=" "+CLASS_NAMES[which].beforeClose),additional?className+" "+additional:className},render:function(){var contentStyles=this.props.className?{}:this.props.defaultStyles.content,overlayStyles=this.props.overlayClassName?{}:this.props.defaultStyles.overlay;return this.shouldBeClosed()?div():div({ref:"overlay",className:this.buildClassName("overlay",this.props.overlayClassName),style:Assign({},overlayStyles,this.props.style.overlay||{}),onClick:this.handleOverlayClick},div({ref:"content",style:Assign({},contentStyles,this.props.style.content||{}),className:this.buildClassName("content",this.props.className),tabIndex:"-1",onKeyDown:this.handleKeyDown},this.props.children))}})},{"../helpers/focusManager":4,"../helpers/scopeTab":5,"lodash.assign":16}],3:[function(require,module,exports){function setElement(element){if("string"==typeof element){var el=document.querySelectorAll(element);element="length"in el?el[0]:el}return _element=element||_element}function hide(appElement){validateElement(appElement),(appElement||_element).setAttribute("aria-hidden","true")}function show(appElement){validateElement(appElement),(appElement||_element).removeAttribute("aria-hidden")}function toggle(shouldHide,appElement){shouldHide?hide(appElement):show(appElement)}function validateElement(appElement){if(!appElement&&!_element)throw new Error("react-modal: You must set an element with `Modal.setAppElement(el)` to make this accessible")}function resetForTesting(){_element=document.body}var _element="undefined"!=typeof document?document.body:null;exports.toggle=toggle,exports.setElement=setElement,exports.show=show,exports.hide=hide,exports.resetForTesting=resetForTesting},{}],4:[function(require,module,exports){function handleBlur(event){needToFocus=!0}function handleFocus(event){if(needToFocus){if(needToFocus=!1,!modalElement)return;setTimeout(function(){if(!modalElement.contains(document.activeElement)){var el=findTabbable(modalElement)[0]||modalElement;el.focus()}},0)}}var findTabbable=require("../helpers/tabbable"),modalElement=null,focusLaterElement=null,needToFocus=!1;exports.markForFocusLater=function(){focusLaterElement=document.activeElement},exports.returnFocus=function(){try{focusLaterElement.focus()}catch(e){console.warn("You tried to return focus to "+focusLaterElement+" but it is not in the DOM anymore")}focusLaterElement=null},exports.setupScopedFocus=function(element){modalElement=element,window.addEventListener?(window.addEventListener("blur",handleBlur,!1),document.addEventListener("focus",handleFocus,!0)):(window.attachEvent("onBlur",handleBlur),document.attachEvent("onFocus",handleFocus))},exports.teardownScopedFocus=function(){modalElement=null,window.addEventListener?(window.removeEventListener("blur",handleBlur),document.removeEventListener("focus",handleFocus)):(window.detachEvent("onBlur",handleBlur),document.detachEvent("onFocus",handleFocus))}},{"../helpers/tabbable":6}],5:[function(require,module,exports){var findTabbable=require("../helpers/tabbable");module.exports=function(node,event){var tabbable=findTabbable(node);if(!tabbable.length)return void event.preventDefault();var finalTabbable=tabbable[event.shiftKey?0:tabbable.length-1],leavingFinalTabbable=finalTabbable===document.activeElement||node===document.activeElement;if(leavingFinalTabbable){event.preventDefault();var target=tabbable[event.shiftKey?tabbable.length-1:0];target.focus()}}},{"../helpers/tabbable":6}],6:[function(require,module,exports){function focusable(element,isTabIndexNotNaN){var nodeName=element.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"===nodeName?element.href||isTabIndexNotNaN:isTabIndexNotNaN)&&visible(element)}function hidden(el){return el.offsetWidth<=0&&el.offsetHeight<=0||"none"===el.style.display}function visible(element){for(;element&&element!==document.body;){if(hidden(element))return!1;element=element.parentNode}return!0}function tabbable(element){var tabIndex=element.getAttribute("tabindex");null===tabIndex&&(tabIndex=void 0);var isTabIndexNaN=isNaN(tabIndex);return(isTabIndexNaN||tabIndex>=0)&&focusable(element,!isTabIndexNaN)}function findTabbableDescendants(element){return[].slice.call(element.querySelectorAll("*"),0).filter(function(el){return tabbable(el)})}module.exports=findTabbableDescendants},{}],7:[function(require,module,exports){module.exports=require("./components/Modal")},{"./components/Modal":1}],8:[function(require,module,exports){function indexOf(arr,prop){if(arr.indexOf)return arr.indexOf(prop);for(var i=0,len=arr.length;len>i;i++)if(arr[i]===prop)return i;return-1}function ElementClass(opts){if(!(this instanceof ElementClass))return new ElementClass(opts);opts||(opts={}),opts.nodeType&&(opts={el:opts}),this.opts=opts,this.el=opts.el||document.body,"object"!=typeof this.el&&(this.el=document.querySelector(this.el))}module.exports=function(opts){return new ElementClass(opts)},ElementClass.prototype.add=function(className){var el=this.el;if(el){if(""===el.className)return el.className=className;var classes=el.className.split(" ");return indexOf(classes,className)>-1?classes:(classes.push(className),el.className=classes.join(" "),classes)}},ElementClass.prototype.remove=function(className){var el=this.el;if(el&&""!==el.className){var classes=el.className.split(" "),idx=indexOf(classes,className);return idx>-1&&classes.splice(idx,1),el.className=classes.join(" "),classes}},ElementClass.prototype.has=function(className){var el=this.el;if(el){var classes=el.className.split(" ");return indexOf(classes,className)>-1}},ElementClass.prototype.toggle=function(className){var el=this.el;el&&(this.has(className)?this.remove(className):this.add(className))}},{}],9:[function(require,module,exports){!function(){"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};"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return ExecutionEnvironment}):"undefined"!=typeof module&&module.exports?module.exports=ExecutionEnvironment:window.ExecutionEnvironment=ExecutionEnvironment}()},{}],10:[function(require,module,exports){function baseAssign(object,source){return null==source?object:baseCopy(source,keys(source),object)}var baseCopy=require("lodash._basecopy"),keys=require("lodash.keys");module.exports=baseAssign},{"lodash._basecopy":11,"lodash.keys":19}],11:[function(require,module,exports){function baseCopy(source,props,object){object||(object={});for(var index=-1,length=props.length;++index<length;){var key=props[index];object[key]=source[key]}return object}module.exports=baseCopy},{}],12:[function(require,module,exports){function bindCallback(func,thisArg,argCount){if("function"!=typeof func)return identity;if(void 0===thisArg)return func;switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}function identity(value){return value}module.exports=bindCallback},{}],13:[function(require,module,exports){function createAssigner(assigner){return restParam(function(object,sources){var index=-1,length=null==object?0:sources.length,customizer=length>2?sources[length-2]:void 0,guard=length>2?sources[2]:void 0,thisArg=length>1?sources[length-1]:void 0;for("function"==typeof customizer?(customizer=bindCallback(customizer,thisArg,5),length-=2):(customizer="function"==typeof thisArg?thisArg:void 0,length-=customizer?1:0),guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=3>length?void 0:customizer,length=1);++index<length;){var source=sources[index];source&&assigner(object,source,customizer)}return object})}var bindCallback=require("lodash._bindcallback"),isIterateeCall=require("lodash._isiterateecall"),restParam=require("lodash.restparam");module.exports=createAssigner},{"lodash._bindcallback":12,"lodash._isiterateecall":15,"lodash.restparam":20}],14:[function(require,module,exports){function isObjectLike(value){return!!value&&"object"==typeof value}function getNative(object,key){var value=null==object?void 0:object[key];return isNative(value)?value:void 0}function isFunction(value){return isObject(value)&&objToString.call(value)==funcTag}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isNative(value){return null==value?!1:isFunction(value)?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value)}var funcTag="[object Function]",reIsHostCtor=/^\[object .+?Constructor\]$/,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp("^"+fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");module.exports=getNative},{}],15:[function(require,module,exports){function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function isArrayLike(value){return null!=value&&isLength(getLength(value))}function isIndex(value,length){return value="number"==typeof value||reIsUint.test(value)?+value:-1,length=null==length?MAX_SAFE_INTEGER:length,value>-1&&value%1==0&&length>value}function isIterateeCall(value,index,object){if(!isObject(object))return!1;var type=typeof index;if("number"==type?isArrayLike(object)&&isIndex(index,object.length):"string"==type&&index in object){var other=object[index];return value===value?value===other:other!==other}return!1}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}var reIsUint=/^\d+$/,MAX_SAFE_INTEGER=9007199254740991,getLength=baseProperty("length");module.exports=isIterateeCall},{}],16:[function(require,module,exports){function assignWith(object,source,customizer){for(var index=-1,props=keys(source),length=props.length;++index<length;){var key=props[index],value=object[key],result=customizer(value,source[key],key,object,source);(result===result?result===value:value!==value)&&(void 0!==value||key in object)||(object[key]=result)}return object}var baseAssign=require("lodash._baseassign"),createAssigner=require("lodash._createassigner"),keys=require("lodash.keys"),assign=createAssigner(function(object,source,customizer){return customizer?assignWith(object,source,customizer):baseAssign(object,source)});module.exports=assign},{"lodash._baseassign":10,"lodash._createassigner":13,"lodash.keys":19}],17:[function(require,module,exports){function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function isArguments(value){return isArrayLikeObject(value)&&hasOwnProperty.call(value,"callee")&&(!propertyIsEnumerable.call(value,"callee")||objectToString.call(value)==argsTag)}function isArrayLike(value){return null!=value&&isLength(getLength(value))&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}var MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",funcTag="[object Function]",genTag="[object GeneratorFunction]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,propertyIsEnumerable=objectProto.propertyIsEnumerable,getLength=baseProperty("length");module.exports=isArguments},{}],18:[function(require,module,exports){function isObjectLike(value){return!!value&&"object"==typeof value}function getNative(object,key){var value=null==object?void 0:object[key];return isNative(value)?value:void 0}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function isFunction(value){return isObject(value)&&objToString.call(value)==funcTag}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isNative(value){return null==value?!1:isFunction(value)?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value)}var arrayTag="[object Array]",funcTag="[object Function]",reIsHostCtor=/^\[object .+?Constructor\]$/,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp("^"+fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nativeIsArray=getNative(Array,"isArray"),MAX_SAFE_INTEGER=9007199254740991,isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag};module.exports=isArray},{}],19:[function(require,module,exports){function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function isArrayLike(value){return null!=value&&isLength(getLength(value))}function isIndex(value,length){return value="number"==typeof value||reIsUint.test(value)?+value:-1,length=null==length?MAX_SAFE_INTEGER:length,value>-1&&value%1==0&&length>value}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function shimKeys(object){for(var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length,allowIndexes=!!length&&isLength(length)&&(isArray(object)||isArguments(object)),index=-1,result=[];++index<propsLength;){var key=props[index];(allowIndexes&&isIndex(key,length)||hasOwnProperty.call(object,key))&&result.push(key)}return result}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function keysIn(object){if(null==object)return[];isObject(object)||(object=Object(object));var length=object.length;length=length&&isLength(length)&&(isArray(object)||isArguments(object))&&length||0;for(var Ctor=object.constructor,index=-1,isProto="function"==typeof Ctor&&Ctor.prototype===object,result=Array(length),skipIndexes=length>0;++index<length;)result[index]=index+"";for(var key in object)skipIndexes&&isIndex(key,length)||"constructor"==key&&(isProto||!hasOwnProperty.call(object,key))||result.push(key);return result}var getNative=require("lodash._getnative"),isArguments=require("lodash.isarguments"),isArray=require("lodash.isarray"),reIsUint=/^\d+$/,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeKeys=getNative(Object,"keys"),MAX_SAFE_INTEGER=9007199254740991,getLength=baseProperty("length"),keys=nativeKeys?function(object){var Ctor=null==object?void 0:object.constructor;return"function"==typeof Ctor&&Ctor.prototype===object||"function"!=typeof object&&isArrayLike(object)?shimKeys(object):isObject(object)?nativeKeys(object):[]}:shimKeys;module.exports=keys},{"lodash._getnative":14,"lodash.isarguments":17,"lodash.isarray":18}],20:[function(require,module,exports){function restParam(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=nativeMax(void 0===start?func.length-1:+start||0,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);++index<length;)rest[index]=args[start+index];switch(start){case 0:return func.call(this,rest);case 1:return func.call(this,args[0],rest);case 2:return func.call(this,args[0],args[1],rest)}var otherArgs=Array(start+1);for(index=-1;++index<start;)otherArgs[index]=args[index];return otherArgs[start]=rest,func.apply(this,otherArgs)}}var FUNC_ERROR_TEXT="Expected a function",nativeMax=Math.max;module.exports=restParam},{}]},{},[7])(7)}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactModal=t(require("react"),require("react-dom")):e.ReactModal=t(e.react,e["react-dom"])}(this,function(e,t){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="/",t(0)}([function(e,t,n){"use strict";e.exports=n(6)},function(e,t){"use strict";/*! | ||
* Adapted from jQuery UI core | ||
* | ||
* http://jqueryui.com | ||
* | ||
* Copyright 2014 jQuery Foundation and other contributors | ||
* Released under the MIT license. | ||
* http://jquery.org/license | ||
* | ||
* http://api.jqueryui.com/category/ui-core/ | ||
*/ | ||
function n(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&r(e)}function o(e){return e.offsetWidth<=0&&e.offsetHeight<=0||"none"===e.style.display}function r(e){for(;e&&e!==document.body;){if(o(e))return!1;e=e.parentNode}return!0}function i(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var o=isNaN(t);return(o||t>=0)&&n(e,!o)}function s(e){return[].slice.call(e.querySelectorAll("*"),0).filter(function(e){return i(e)})}e.exports=s},function(e,t,n){function o(e,t,n){for(var o=-1,r=s(t),i=r.length;++o<i;){var u=r[o],c=e[u],a=n(c,t[u],u,e,t);(a===a?a===c:c!==c)&&(void 0!==c||u in e)||(e[u]=a)}return e}var r=n(13),i=n(16),s=n(3),u=i(function(e,t,n){return n?o(e,t,n):r(e,t)});e.exports=u},function(e,t,n){function o(e){return function(t){return null==t?void 0:t[e]}}function r(e){return null!=e&&s(b(e))}function i(e,t){return e="number"==typeof e||d.test(e)?+e:-1,t=null==t?m:t,e>-1&&e%1==0&&t>e}function s(e){return"number"==typeof e&&e>-1&&e%1==0&&m>=e}function u(e){for(var t=a(e),n=t.length,o=n&&e.length,r=!!o&&s(o)&&(p(e)||f(e)),u=-1,c=[];++u<n;){var l=t[u];(r&&i(l,o)||v.call(e,l))&&c.push(l)}return c}function c(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){if(null==e)return[];c(e)||(e=Object(e));var t=e.length;t=t&&s(t)&&(p(e)||f(e))&&t||0;for(var n=e.constructor,o=-1,r="function"==typeof n&&n.prototype===e,u=Array(t),a=t>0;++o<t;)u[o]=o+"";for(var l in e)a&&i(l,t)||"constructor"==l&&(r||!v.call(e,l))||u.push(l);return u}var l=n(17),f=n(19),p=n(20),d=/^\d+$/,h=Object.prototype,v=h.hasOwnProperty,y=l(Object,"keys"),m=9007199254740991,b=o("length"),w=y?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&r(e)?u(e):c(e)?y(e):[]}:u;e.exports=w},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";function o(e){delete e.ref}var r=n(4),i=n(5),s=n(12),u=r.createFactory(n(7)),c=n(8),a=n(11),l=n(5).unstable_renderSubtreeIntoContainer,f=n(2),p=s.canUseDOM?window.HTMLElement:{},d=s.canUseDOM?document.body:{appendChild:function(){}},h=r.createClass({displayName:"Modal",statics:{setAppElement:function(e){d=c.setElement(e)},injectCSS:function(){console.warn("React-Modal: injectCSS has been deprecated and no longer has any effect. It will be removed in a later version")}},propTypes:{isOpen:r.PropTypes.bool.isRequired,style:r.PropTypes.shape({content:r.PropTypes.object,overlay:r.PropTypes.object}),appElement:r.PropTypes.instanceOf(p),onAfterOpen:r.PropTypes.func,onRequestClose:r.PropTypes.func,closeTimeoutMS:r.PropTypes.number,ariaHideApp:r.PropTypes.bool,shouldCloseOnOverlayClick:r.PropTypes.bool},getDefaultProps:function(){return{isOpen:!1,ariaHideApp:!0,closeTimeoutMS:0,shouldCloseOnOverlayClick:!0}},componentDidMount:function(){this.node=document.createElement("div"),this.node.className="ReactModalPortal",d.appendChild(this.node),this.renderPortal(this.props)},componentWillReceiveProps:function(e){this.renderPortal(e)},componentWillUnmount:function(){i.unmountComponentAtNode(this.node),d.removeChild(this.node),a(document.body).remove("ReactModal__Body--open")},renderPortal:function(e){e.isOpen?a(document.body).add("ReactModal__Body--open"):a(document.body).remove("ReactModal__Body--open"),e.ariaHideApp&&c.toggle(e.isOpen,e.appElement),o(e),this.portal=l(this,u(f({},e,{defaultStyles:h.defaultStyles})),this.node)},render:function(){return r.DOM.noscript()}});h.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},e.exports=h},function(e,t,n){"use strict";var o=n(4),r=o.DOM.div,i=n(9),s=n(10),u=n(2),c={overlay:{base:"ReactModal__Overlay",afterOpen:"ReactModal__Overlay--after-open",beforeClose:"ReactModal__Overlay--before-close"},content:{base:"ReactModal__Content",afterOpen:"ReactModal__Content--after-open",beforeClose:"ReactModal__Content--before-close"}};e.exports=o.createClass({displayName:"ModalPortal",getDefaultProps:function(){return{style:{overlay:{},content:{}}}},getInitialState:function(){return{afterOpen:!1,beforeClose:!1}},componentDidMount:function(){this.props.isOpen&&(this.setFocusAfterRender(!0),this.open())},componentWillUnmount:function(){clearTimeout(this.closeTimer)},componentWillReceiveProps:function(e){!this.props.isOpen&&e.isOpen?(this.setFocusAfterRender(!0),this.open()):this.props.isOpen&&!e.isOpen&&this.close()},componentDidUpdate:function(){this.focusAfterRender&&(this.focusContent(),this.setFocusAfterRender(!1))},setFocusAfterRender:function(e){this.focusAfterRender=e},open:function(){i.setupScopedFocus(this.node),i.markForFocusLater(),this.setState({isOpen:!0},function(){this.setState({afterOpen:!0}),this.props.isOpen&&this.props.onAfterOpen&&this.props.onAfterOpen()}.bind(this))},close:function(){this.ownerHandlesClose()&&(this.props.closeTimeoutMS>0?this.closeWithTimeout():this.closeWithoutTimeout())},focusContent:function(){this.refs.content.focus()},closeWithTimeout:function(){this.setState({beforeClose:!0},function(){this.closeTimer=setTimeout(this.closeWithoutTimeout,this.props.closeTimeoutMS)}.bind(this))},closeWithoutTimeout:function(){this.setState({afterOpen:!1,beforeClose:!1},this.afterClose)},afterClose:function(){i.returnFocus(),i.teardownScopedFocus()},handleKeyDown:function(e){9==e.keyCode&&s(this.refs.content,e),27==e.keyCode&&(e.preventDefault(),this.requestClose())},handleOverlayClick:function(e){for(var t=e.target;t;){if(t===this.refs.content)return;t=t.parentNode}this.props.shouldCloseOnOverlayClick&&(this.ownerHandlesClose()?this.requestClose():this.focusContent())},requestClose:function(){this.ownerHandlesClose()&&this.props.onRequestClose()},ownerHandlesClose:function(){return this.props.onRequestClose},shouldBeClosed:function(){return!this.props.isOpen&&!this.state.beforeClose},buildClassName:function(e,t){var n=c[e].base;return this.state.afterOpen&&(n+=" "+c[e].afterOpen),this.state.beforeClose&&(n+=" "+c[e].beforeClose),t?n+" "+t:n},render:function(){var e=this.props.className?{}:this.props.defaultStyles.content,t=this.props.overlayClassName?{}:this.props.defaultStyles.overlay;return this.shouldBeClosed()?r():r({ref:"overlay",className:this.buildClassName("overlay",this.props.overlayClassName),style:u({},t,this.props.style.overlay||{}),onClick:this.handleOverlayClick},r({ref:"content",style:u({},e,this.props.style.content||{}),className:this.buildClassName("content",this.props.className),tabIndex:"-1",onKeyDown:this.handleKeyDown},this.props.children))}})},function(e,t){"use strict";function n(e){if("string"==typeof e){var t=document.querySelectorAll(e);e="length"in t?t[0]:t}return c=e||c}function o(e){s(e),(e||c).setAttribute("aria-hidden","true")}function r(e){s(e),(e||c).removeAttribute("aria-hidden")}function i(e,t){e?o(t):r(t)}function s(e){if(!e&&!c)throw new Error("react-modal: You must set an element with `Modal.setAppElement(el)` to make this accessible")}function u(){c=document.body}var c="undefined"!=typeof document?document.body:null;t.toggle=i,t.setElement=n,t.show=r,t.hide=o,t.resetForTesting=u},function(e,t,n){"use strict";function o(e){c=!0}function r(e){if(c){if(c=!1,!s)return;setTimeout(function(){if(!s.contains(document.activeElement)){var e=i(s)[0]||s;e.focus()}},0)}}var i=n(1),s=null,u=null,c=!1;t.markForFocusLater=function(){u=document.activeElement},t.returnFocus=function(){try{u.focus()}catch(e){console.warn("You tried to return focus to "+u+" but it is not in the DOM anymore")}u=null},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",o,!1),document.addEventListener("focus",r,!0)):(window.attachEvent("onBlur",o),document.attachEvent("onFocus",r))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",o),document.removeEventListener("focus",r)):(window.detachEvent("onBlur",o),document.detachEvent("onFocus",r))}},function(e,t,n){"use strict";var o=n(1);e.exports=function(e,t){var n=o(e);if(!n.length)return void t.preventDefault();var r=n[t.shiftKey?0:n.length-1],i=r===document.activeElement||e===document.activeElement;if(i){t.preventDefault();var s=n[t.shiftKey?n.length-1:0];s.focus()}}},function(e,t){function n(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;o>n;n++)if(e[n]===t)return n;return-1}function o(e){return this instanceof o?(e||(e={}),e.nodeType&&(e={el:e}),this.opts=e,this.el=e.el||document.body,"object"!=typeof this.el&&(this.el=document.querySelector(this.el)),void 0):new o(e)}e.exports=function(e){return new o(e)},o.prototype.add=function(e){var t=this.el;if(t){if(""===t.className)return t.className=e;var o=t.className.split(" ");return n(o,e)>-1?o:(o.push(e),t.className=o.join(" "),o)}},o.prototype.remove=function(e){var t=this.el;if(t&&""!==t.className){var o=t.className.split(" "),r=n(o,e);return r>-1&&o.splice(r,1),t.className=o.join(" "),o}},o.prototype.has=function(e){var t=this.el;if(t){var o=t.className.split(" ");return n(o,e)>-1}},o.prototype.toggle=function(e){var t=this.el;t&&(this.has(e)?this.remove(e):this.add(e))}},function(e,t,n){var o;/*! | ||
Copyright (c) 2015 Jed Watson. | ||
Based on code that is Copyright 2013-2015, Facebook, Inc. | ||
All rights reserved. | ||
*/ | ||
!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};o=function(){return i}.call(t,n,t,e),!(void 0!==o&&(e.exports=o))}()},function(e,t,n){function o(e,t){return null==t?e:r(t,i(t),e)}var r=n(14),i=n(3);e.exports=o},function(e,t){function n(e,t,n){n||(n={});for(var o=-1,r=t.length;++o<r;){var i=t[o];n[i]=e[i]}return n}e.exports=n},function(e,t){function n(e,t,n){if("function"!=typeof e)return o;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,o,r){return e.call(t,n,o,r)};case 4:return function(n,o,r,i){return e.call(t,n,o,r,i)};case 5:return function(n,o,r,i,s){return e.call(t,n,o,r,i,s)}}return function(){return e.apply(t,arguments)}}function o(e){return e}e.exports=n},function(e,t,n){function o(e){return s(function(t,n){var o=-1,s=null==t?0:n.length,u=s>2?n[s-2]:void 0,c=s>2?n[2]:void 0,a=s>1?n[s-1]:void 0;for("function"==typeof u?(u=r(u,a,5),s-=2):(u="function"==typeof a?a:void 0,s-=u?1:0),c&&i(n[0],n[1],c)&&(u=3>s?void 0:u,s=1);++o<s;){var l=n[o];l&&e(t,l,u)}return t})}var r=n(15),i=n(18),s=n(21);e.exports=o},function(e,t){function n(e){return!!e&&"object"==typeof e}function o(e,t){var n=null==e?void 0:e[t];return s(n)?n:void 0}function r(e){return i(e)&&p.call(e)==u}function i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){return null==e?!1:r(e)?d.test(l.call(e)):n(e)&&c.test(e)}var u="[object Function]",c=/^\[object .+?Constructor\]$/,a=Object.prototype,l=Function.prototype.toString,f=a.hasOwnProperty,p=a.toString,d=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=o},function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}function o(e){return null!=e&&s(l(e))}function r(e,t){return e="number"==typeof e||c.test(e)?+e:-1,t=null==t?a:t,e>-1&&e%1==0&&t>e}function i(e,t,n){if(!u(n))return!1;var i=typeof t;if("number"==i?o(n)&&r(t,n.length):"string"==i&&t in n){var s=n[t];return e===e?e===s:s!==s}return!1}function s(e){return"number"==typeof e&&e>-1&&e%1==0&&a>=e}function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var c=/^\d+$/,a=9007199254740991,l=n("length");e.exports=i},function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}function o(e){return i(e)&&v.call(e,"callee")&&(!m.call(e,"callee")||y.call(e)==f)}function r(e){return null!=e&&u(b(e))&&!s(e)}function i(e){return a(e)&&r(e)}function s(e){var t=c(e)?y.call(e):"";return t==p||t==d}function u(e){return"number"==typeof e&&e>-1&&e%1==0&&l>=e}function c(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){return!!e&&"object"==typeof e}var l=9007199254740991,f="[object Arguments]",p="[object Function]",d="[object GeneratorFunction]",h=Object.prototype,v=h.hasOwnProperty,y=h.toString,m=h.propertyIsEnumerable,b=n("length");e.exports=o},function(e,t){function n(e){return!!e&&"object"==typeof e}function o(e,t){var n=null==e?void 0:e[t];return u(n)?n:void 0}function r(e){return"number"==typeof e&&e>-1&&e%1==0&&m>=e}function i(e){return s(e)&&h.call(e)==a}function s(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function u(e){return null==e?!1:i(e)?v.test(p.call(e)):n(e)&&l.test(e)}var c="[object Array]",a="[object Function]",l=/^\[object .+?Constructor\]$/,f=Object.prototype,p=Function.prototype.toString,d=f.hasOwnProperty,h=f.toString,v=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=o(Array,"isArray"),m=9007199254740991,b=y||function(e){return n(e)&&r(e.length)&&h.call(e)==c};e.exports=b},function(e,t){function n(e,t){if("function"!=typeof e)throw new TypeError(o);return t=r(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,o=-1,i=r(n.length-t,0),s=Array(i);++o<i;)s[o]=n[t+o];switch(t){case 0:return e.call(this,s);case 1:return e.call(this,n[0],s);case 2:return e.call(this,n[0],n[1],s)}var u=Array(t+1);for(o=-1;++o<t;)u[o]=n[o];return u[t]=s,e.apply(this,u)}}var o="Expected a function",r=Math.max;e.exports=n}])}); |
{ | ||
"name": "react-modal", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Accessible modal dialog component for React.JS", | ||
@@ -24,7 +24,7 @@ "main": "./lib/index", | ||
"devDependencies": { | ||
"browserify": "11.1.0", | ||
"browserify-shim": "3.8.10", | ||
"envify": "3.4.0", | ||
"babel-core": "^6.7.4", | ||
"babel-loader": "^6.2.4", | ||
"babel-preset-es2015": "^6.6.0", | ||
"babel-preset-react": "^6.5.0", | ||
"expect": "1.10.0", | ||
"jsx-loader": "0.13.2", | ||
"karma": "^0.13.22", | ||
@@ -41,3 +41,2 @@ "karma-browserify": "^4.2.1", | ||
"react-dom": "^15.0.0", | ||
"reactify": "^1.1.1", | ||
"rf-release": "0.4.0", | ||
@@ -67,7 +66,3 @@ "sinon": "^1.17.3", | ||
"dialog" | ||
], | ||
"browserify-shim": { | ||
"react": "global:React", | ||
"react-dom": "global:ReactDOM" | ||
} | ||
] | ||
} |
@@ -38,3 +38,3 @@ var fs = require('fs'); | ||
loaders: [ | ||
{ test: /\.js$/, loader: 'jsx-loader?harmony' } | ||
{ test: /\.js$/, loader: 'babel' } | ||
] | ||
@@ -41,0 +41,0 @@ }, |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
21
29
4
62461
611
2
1