Socket
Socket
Sign inDemoInstall

react-poppop

Package Overview
Dependencies
16
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 1.3.0

lib/poppop.js

2

dist/react-poppop.min.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("react"),require("prop-types"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","prop-types","react-dom"],e):t.PopPop=e(t.React,t.PropTypes,t.ReactDOM)}(this,function(t,e,n){"use strict";function o(t){return t?{pageX:t.pageX,pageY:t.pageY,clientX:t.clientX,clientY:t.clientY}:{}}function i(t){return function(){return t}}function r(t,e,n){function o(t,e){var n=l.hasOwnProperty(e)?l[e]:null;E.hasOwnProperty(e)&&v("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",e),t&&v("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",e)}function i(t,n){if(n){v("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),v(!e(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var i=t.prototype,r=i.__reactAutoBindPairs;n.hasOwnProperty(_)&&p.mixins(t,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==_){var c=n[a],u=i.hasOwnProperty(a);if(o(u,a),p.hasOwnProperty(a))p[a](t,c);else{var h=l.hasOwnProperty(a);if("function"==typeof c&&!h&&!u&&!1!==n.autobind)r.push(a,c),i[a]=c;else if(u){var f=l[a];v(h&&("DEFINE_MANY_MERGED"===f||"DEFINE_MANY"===f),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",f,a),"DEFINE_MANY_MERGED"===f?i[a]=s(i[a],c):"DEFINE_MANY"===f&&(i[a]=function(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}(i[a],c))}else i[a]=c}}}}function r(t,e){v(t&&e&&"object"===(void 0===t?"undefined":y(t))&&"object"===(void 0===e?"undefined":y(e)),"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in e)e.hasOwnProperty(n)&&(v(void 0===t[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),t[n]=e[n]);return t}function s(t,e){return function(){var n=t.apply(this,arguments),o=e.apply(this,arguments);if(null==n)return o;if(null==o)return n;var i={};return r(i,n),r(i,o),i}}function a(t,e){return e.bind(t)}function c(t){var e=function(t){return t}(function(t,o,i){this.__reactAutoBindPairs.length&&function(t){for(var e=t.__reactAutoBindPairs,n=0;n<e.length;n+=2){var o=e[n],i=e[n+1];t[o]=a(t,i)}}(this),this.props=t,this.context=o,this.refs=d,this.updater=i||n,this.state=null;var r=this.getInitialState?this.getInitialState():null;v("object"===(void 0===r?"undefined":y(r))&&!Array.isArray(r),"%s.getInitialState(): must return an object or null",e.displayName||"ReactCompositeComponent"),this.state=r});e.prototype=new g,e.prototype.constructor=e,e.prototype.__reactAutoBindPairs=[],u.forEach(i.bind(null,e)),i(e,h),i(e,t),i(e,m),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),v(e.prototype.render,"createClass(...): Class specification must implement a `render` method.");for(var o in l)e.prototype[o]||(e.prototype[o]=null);return e}var u=[],l={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},p={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)i(t,e[n])},childContextTypes:function(t,e){t.childContextTypes=f({},t.childContextTypes,e)},contextTypes:function(t,e){t.contextTypes=f({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps?t.getDefaultProps=s(t.getDefaultProps,e):t.getDefaultProps=e},propTypes:function(t,e){t.propTypes=f({},t.propTypes,e)},statics:function(t,e){!function(t,e){if(e)for(var n in e){var o=e[n];e.hasOwnProperty(n)&&(v(!(n in p),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),v(!(n in t),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),t[n]=o)}}(t,e)},autobind:function(){}},h={componentDidMount:function(){this.__isMounted=!0}},m={componentWillUnmount:function(){this.__isMounted=!1}},E={replaceState:function(t,e){this.updater.enqueueReplaceState(this,t,e)},isMounted:function(){return!!this.__isMounted}},g=function(){};return f(g.prototype,t.prototype,E),c}function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function a(t,e){return e={exports:{}},t(e,e.exports),e.exports}var c="default"in t?t.default:t;e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var u={propTypes:{moveThreshold:e.number,activeDelay:e.number,pressDelay:e.number,pressMoveThreshold:e.number,preventDefault:e.bool,stopPropagation:e.bool,onTap:e.func,onPress:e.func,onTouchStart:e.func,onTouchMove:e.func,onTouchEnd:e.func,onMouseDown:e.func,onMouseUp:e.func,onMouseMove:e.func,onMouseOut:e.func,onKeyDown:e.func,onKeyUp:e.func},getDefaultProps:function(){return{activeDelay:0,moveThreshold:100,pressDelay:1e3,pressMoveThreshold:5}},getInitialState:function(){return{isActive:!1,touchActive:!1,pinchActive:!1}},componentDidMount:function(){this.isMounted=!0},componentWillUnmount:function(){this.isMounted=!1,this.cleanupScrollDetection(),this.cancelPressDetection(),this.clearActiveTimeout()},processEvent:function(t){this.props.preventDefault&&t.preventDefault(),this.props.stopPropagation&&t.stopPropagation()},onTouchStart:function(t){this.props.onTouchStart&&!1===this.props.onTouchStart(t)||(this.processEvent(t),window._blockMouseEvents=!0,1===t.touches.length?(this._initialTouch=this._lastTouch=o(t.touches[0]),this.initScrollDetection(),this.initPressDetection(t,this.endTouch),this.initTouchmoveDetection(),this.props.activeDelay>0?this._activeTimeout=setTimeout(this.makeActive,this.props.activeDelay):this.makeActive()):this.onPinchStart&&(this.props.onPinchStart||this.props.onPinchMove||this.props.onPinchEnd)&&2===t.touches.length&&this.onPinchStart(t))},makeActive:function(){this.isMounted&&(this.clearActiveTimeout(),this.setState({isActive:!0}))},clearActiveTimeout:function(){clearTimeout(this._activeTimeout),this._activeTimeout=!1},initScrollDetection:function(){this._scrollPos={top:0,left:0},this._scrollParents=[],this._scrollParentPos=[];for(var t=n.findDOMNode(this);t;)(t.scrollHeight>t.offsetHeight||t.scrollWidth>t.offsetWidth)&&(this._scrollParents.push(t),this._scrollParentPos.push(t.scrollTop+t.scrollLeft),this._scrollPos.top+=t.scrollTop,this._scrollPos.left+=t.scrollLeft),t=t.parentNode},initTouchmoveDetection:function(){this._touchmoveTriggeredTimes=0},cancelTouchmoveDetection:function(){this._touchmoveDetectionTimeout&&(clearTimeout(this._touchmoveDetectionTimeout),this._touchmoveDetectionTimeout=null,this._touchmoveTriggeredTimes=0)},calculateMovement:function(t){return{x:Math.abs(t.clientX-this._initialTouch.clientX),y:Math.abs(t.clientY-this._initialTouch.clientY)}},detectScroll:function(){for(var t={top:0,left:0},e=0;e<this._scrollParents.length;e++)t.top+=this._scrollParents[e].scrollTop,t.left+=this._scrollParents[e].scrollLeft;return!(t.top===this._scrollPos.top&&t.left===this._scrollPos.left)},cleanupScrollDetection:function(){this._scrollParents=void 0,this._scrollPos=void 0},initPressDetection:function(t,e){this.props.onPress&&(t.persist(),this._pressTimeout=setTimeout(function(){this.props.onPress(t),e()}.bind(this),this.props.pressDelay))},cancelPressDetection:function(){clearTimeout(this._pressTimeout)},onTouchMove:function(t){if(this._initialTouch){if(this.processEvent(t),this.detectScroll())return this.endTouch(t);0==this._touchmoveTriggeredTimes++&&(this._touchmoveDetectionTimeout=setTimeout(function(){1===this._touchmoveTriggeredTimes&&this.endTouch(t)}.bind(this),64)),this.props.onTouchMove&&this.props.onTouchMove(t),this._lastTouch=o(t.touches[0]);var e=this.calculateMovement(this._lastTouch);(e.x>this.props.pressMoveThreshold||e.y>this.props.pressMoveThreshold)&&this.cancelPressDetection(),e.x>this.props.moveThreshold||e.y>this.props.moveThreshold?this.state.isActive?this.setState({isActive:!1}):this._activeTimeout&&this.clearActiveTimeout():this.state.isActive||this._activeTimeout||this.setState({isActive:!0})}else this._initialPinch&&2===t.touches.length&&this.onPinchMove&&(this.onPinchMove(t),t.preventDefault())},onTouchEnd:function(t){var e=this;if(this._initialTouch){this.processEvent(t);var n,o=this.calculateMovement(this._lastTouch);o.x<=this.props.moveThreshold&&o.y<=this.props.moveThreshold&&this.props.onTap&&(t.preventDefault(),n=function(){var n=e._scrollParents.map(function(t){return t.scrollTop+t.scrollLeft});e._scrollParentPos.some(function(t,e){return t!==n[e]})||e.props.onTap(t)}),this.endTouch(t,n)}else this.onPinchEnd&&this._initialPinch&&t.touches.length+t.changedTouches.length===2&&(this.onPinchEnd(t),t.preventDefault())},endTouch:function(t,e){this.cancelTouchmoveDetection(),this.cancelPressDetection(),this.clearActiveTimeout(),t&&this.props.onTouchEnd&&this.props.onTouchEnd(t),this._initialTouch=null,this._lastTouch=null,e&&e(),this.state.isActive&&this.setState({isActive:!1})},onMouseDown:function(t){window._blockMouseEvents?window._blockMouseEvents=!1:this.props.onMouseDown&&!1===this.props.onMouseDown(t)||(this.processEvent(t),this.initPressDetection(t,this.endMouseEvent),this._mouseDown=!0,this.setState({isActive:!0}))},onMouseMove:function(t){!window._blockMouseEvents&&this._mouseDown&&(this.processEvent(t),this.props.onMouseMove&&this.props.onMouseMove(t))},onMouseUp:function(t){!window._blockMouseEvents&&this._mouseDown&&(this.processEvent(t),this.props.onMouseUp&&this.props.onMouseUp(t),this.props.onTap&&this.props.onTap(t),this.endMouseEvent())},onMouseOut:function(t){!window._blockMouseEvents&&this._mouseDown&&(this.processEvent(t),this.props.onMouseOut&&this.props.onMouseOut(t),this.endMouseEvent())},endMouseEvent:function(){this.cancelPressDetection(),this._mouseDown=!1,this.setState({isActive:!1})},onKeyUp:function(t){this._keyDown&&(this.processEvent(t),this.props.onKeyUp&&this.props.onKeyUp(t),this.props.onTap&&this.props.onTap(t),this._keyDown=!1,this.cancelPressDetection(),this.setState({isActive:!1}))},onKeyDown:function(t){this.props.onKeyDown&&!1===this.props.onKeyDown(t)||32!==t.which&&13!==t.which||this._keyDown||(this.initPressDetection(t,this.endKeyEvent),this.processEvent(t),this._keyDown=!0,this.setState({isActive:!0}))},endKeyEvent:function(){this.cancelPressDetection(),this._keyDown=!1,this.setState({isActive:!1})},cancelTap:function(){this.endTouch(),this._mouseDown=!1},handlers:function(){return{onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onMouseMove:this.onMouseMove,onMouseOut:this.onMouseOut,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp}}},l=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,f=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,o,i=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),r=1;r<arguments.length;r++){n=Object(arguments[r]);for(var s in n)p.call(n,s)&&(i[s]=n[s]);if(l){o=l(n);for(var a=0;a<o.length;a++)h.call(n,o[a])&&(i[o[a]]=n[o[a]])}}return i},d={},v=function(t,e,n,o,i,r,s,a){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,i,r,s,a],l=0;(c=new Error(e.replace(/%s/g,function(){return u[l++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}},m=function(){};m.thatReturns=i,m.thatReturnsFalse=i(!1),m.thatReturnsTrue=i(!0),m.thatReturnsNull=i(null),m.thatReturnsThis=function(){return this},m.thatReturnsArgument=function(t){return t};var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E=(function(){function t(t){this.value=t}function e(e){function n(i,r){try{var s=e[i](r),a=s.value;a instanceof t?Promise.resolve(a.value).then(function(t){n("next",t)},function(t){n("throw",t)}):o(s.done?"return":"normal",s.value)}catch(t){o("throw",t)}}function o(t,e){switch(t){case"return":i.resolve({value:e,done:!0});break;case"throw":i.reject(e);break;default:i.resolve({value:e,done:!1})}(i=i.next)?n(i.key,i.arg):r=null}var i,r;this._invoke=function(t,e){return new Promise(function(o,s){var a={key:t,arg:e,resolve:o,reject:s,next:null};r?r=r.next=a:(i=r=a,n(t,e))})},"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(t){return this._invoke("next",t)},e.prototype.throw=function(t){return this._invoke("throw",t)},e.prototype.return=function(t){return this._invoke("return",t)}}(),function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}),g=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),b=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},x=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},T=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},_="mixins",w=r;if(void 0===c)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var M=(new c.Component).updater,D=w(c.Component,c.isValidElement,M),P={WebkitTapHighlightColor:"rgba(0,0,0,0)",WebkitTouchCallout:"none",WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none",cursor:"pointer"},O=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},C=function(t){return D({displayName:"Tappable",mixins:t,getDefaultProps:function(){return{component:"span",classBase:"Tappable"}},render:function(){var t=this.props,e=t.classBase+(this.state.isActive?"-active":"-inactive");t.className&&(e+=" "+t.className),t.classes&&(e+=" "+(this.state.isActive?t.classes.active:t.classes.inactive));var n={};O(n,P,t.style);var o=O({},t,{style:n,className:e,disabled:t.disabled,handlers:this.handlers},this.handlers());return delete o.activeDelay,delete o.classBase,delete o.classes,delete o.handlers,delete o.onTap,delete o.onPress,delete o.onPinchStart,delete o.onPinchMove,delete o.onPinchEnd,delete o.moveThreshold,delete o.pressDelay,delete o.pressMoveThreshold,delete o.preventDefault,delete o.stopPropagation,delete o.component,c.createElement(t.component,o,t.children)}})}([u]),N=P,S=u;C.touchStyles=N,C.Mixin=S;var j=a(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+t.className+" ").indexOf(" "+e+" ")},t.exports=e.default});s(j);var k=a(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){t.classList?t.classList.add(e):(0,n.default)(t)||(t.className=t.className+" "+e)};var n=function(t){return t&&t.__esModule?t:{default:t}}(j);t.exports=e.default});s(k);var A=function(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")},I=a(function(t,n){n.__esModule=!0,n.classNamesShape=n.timeoutsShape=void 0,n.transitionTimeout=function(t){var e="transition"+t+"Timeout",n="transition"+t;return function(t){if(t[n]){if(null==t[e])return new Error(e+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof t[e])return new Error(e+" must be a number (in milliseconds)")}return null}};var o=function(t){return t&&t.__esModule?t:{default:t}}(e);n.timeoutsShape=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]),n.classNamesShape=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterActive:o.default.string,exit:o.default.string,exitActive:o.default.string})])});s(I);var R=a(function(t,o){function i(t){return t&&t.__esModule?t:{default:t}}function r(){}o.__esModule=!0,o.EXITING=o.ENTERED=o.ENTERING=o.EXITED=o.UNMOUNTED=void 0;var s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(e),a=i(c),u=i(n),l=o.UNMOUNTED="unmounted",p=o.EXITED="exited",h=o.ENTERING="entering",f=o.ENTERED="entered",d=o.EXITING="exiting",v=function(t){function e(n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":y(e))&&"function"!=typeof e?t:e}(this,t.call(this,n,o)),r=o.transitionGroup,s=r&&!r.isMounting?n.enter:n.appear,a=void 0;return i.nextStatus=null,n.in?s?(a=p,i.nextStatus=h):a=f:a=n.unmountOnExit||n.mountOnEnter?l:p,i.state={status:a},i.nextCallback=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":y(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{transitionGroup:null}},e.prototype.componentDidMount=function(){this.updateStatus(!0)},e.prototype.componentWillReceiveProps=function(t){var e=(this.pendingState||this.state).status;t.in?(e===l&&this.setState({status:p}),e!==h&&e!==f&&(this.nextStatus=h)):e!==h&&e!==f||(this.nextStatus=d)},e.prototype.componentDidUpdate=function(){this.updateStatus()},e.prototype.componentWillUnmount=function(){this.cancelNextCallback()},e.prototype.getTimeouts=function(){var t=this.props.timeout,e=void 0,n=void 0,o=void 0;return e=n=o=t,null!=t&&"number"!=typeof t&&(e=t.exit,n=t.enter,o=t.appear),{exit:e,enter:n,appear:o}},e.prototype.updateStatus=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.nextStatus;if(null!==e){this.nextStatus=null,this.cancelNextCallback();var n=u.default.findDOMNode(this);e===h?this.performEnter(n,t):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===p&&this.setState({status:l})},e.prototype.performEnter=function(t,e){var n=this,o=this.props.enter,i=this.context.transitionGroup?this.context.transitionGroup.isMounting:e,r=this.getTimeouts();e||o?(this.props.onEnter(t,i),this.safeSetState({status:h},function(){n.props.onEntering(t,i),n.onTransitionEnd(t,r.enter,function(){n.safeSetState({status:f},function(){n.props.onEntered(t,i)})})})):this.safeSetState({status:f},function(){n.props.onEntered(t)})},e.prototype.performExit=function(t){var e=this,n=this.props.exit,o=this.getTimeouts();n?(this.props.onExit(t),this.safeSetState({status:d},function(){e.props.onExiting(t),e.onTransitionEnd(t,o.exit,function(){e.safeSetState({status:p},function(){e.props.onExited(t)})})})):this.safeSetState({status:p},function(){e.props.onExited(t)})},e.prototype.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},e.prototype.safeSetState=function(t,e){var n=this;this.pendingState=t,e=this.setNextCallback(e),this.setState(t,function(){n.pendingState=null,e()})},e.prototype.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,e.nextCallback=null,t(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},e.prototype.onTransitionEnd=function(t,e,n){this.setNextCallback(n),t?(this.props.addEndListener&&this.props.addEndListener(t,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},e.prototype.render=function(){var t=this.state.status;if(t===l)return null;var e=this.props,n=e.children,o=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}(e,["children"]);if(delete o.in,delete o.mountOnEnter,delete o.unmountOnExit,delete o.appear,delete o.enter,delete o.exit,delete o.timeout,delete o.addEndListener,delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,"function"==typeof n)return n(t,o);var i=a.default.Children.only(n);return a.default.cloneElement(i,o)},e}(a.default.Component);v.contextTypes={transitionGroup:s.object},v.childContextTypes={transitionGroup:function(){}},v.propTypes={},v.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:r,onEntering:r,onEntered:r,onExit:r,onExiting:r,onExited:r},v.UNMOUNTED=0,v.EXITED=1,v.ENTERING=2,v.ENTERED=3,v.EXITING=4,o.default=v});s(R);var U=a(function(t,n){function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":y(e))&&"function"!=typeof e?t:e}n.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(e),a=o(k),u=o(A),l=o(c),p=o(R),h=function(t,e){return e&&e.split(" ").forEach(function(e){return(0,a.default)(t,e)})},f=function(t,e){return e&&e.split(" ").forEach(function(e){return(0,u.default)(t,e)})},d=(r({},p.default.propTypes,{classNames:I.classNamesShape,onEnter:s.func,onEntering:s.func,onEntered:s.func,onExit:s.func,onExiting:s.func,onExited:s.func}),function(t){function e(){var n,o,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var s=arguments.length,a=Array(s),c=0;c<s;c++)a[c]=arguments[c];return n=o=i(this,t.call.apply(t,[this].concat(a))),o.onEnter=function(t,e){var n=o.getClassNames(e?"appear":"enter").className;o.removeClasses(t,"exit"),h(t,n),o.props.onEnter&&o.props.onEnter(t)},o.onEntering=function(t,e){var n=o.getClassNames(e?"appear":"enter").activeClassName;o.reflowAndAddClass(t,n),o.props.onEntering&&o.props.onEntering(t)},o.onEntered=function(t,e){o.removeClasses(t,e?"appear":"enter"),o.props.onEntered&&o.props.onEntered(t)},o.onExit=function(t){var e=o.getClassNames("exit").className;o.removeClasses(t,"appear"),o.removeClasses(t,"enter"),h(t,e),o.props.onExit&&o.props.onExit(t)},o.onExiting=function(t){var e=o.getClassNames("exit").activeClassName;o.reflowAndAddClass(t,e),o.props.onExiting&&o.props.onExiting(t)},o.onExited=function(t){o.removeClasses(t,"exit"),o.props.onExited&&o.props.onExited(t)},o.getClassNames=function(t){var e=o.props.classNames,n="string"!=typeof e?e[t]:e+"-"+t;return{className:n,activeClassName:"string"!=typeof e?e[t+"Active"]:n+"-active"}},r=n,i(o,r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":y(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.removeClasses=function(t,e){var n=this.getClassNames(e),o=n.className,i=n.activeClassName;o&&f(t,o),i&&f(t,i)},e.prototype.reflowAndAddClass=function(t,e){t.scrollTop,h(t,e)},e.prototype.render=function(){var t=r({},this.props);return delete t.classNames,l.default.createElement(p.default,r({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(l.default.Component));d.propTypes={},n.default=d,t.exports=n.default});s(U);var Y=a(function(t,e){function n(t,e){var n=Object.create(null);return t&&c.Children.map(t,function(t){return t}).forEach(function(t){n[t.key]=function(t){return e&&(0,c.isValidElement)(t)?e(t):t}(t)}),n}e.__esModule=!0,e.getChildMapping=n,e.mergeChildMappings=function(t,e){function n(n){return n in e?e[n]:t[n]}t=t||{},e=e||{};var o=Object.create(null),i=[];for(var r in t)r in e?i.length&&(o[r]=i,i=[]):i.push(r);var s=void 0,a={};for(var c in e){if(o[c])for(s=0;s<o[c].length;s++){var u=o[c][s];a[o[c][s]]=n(u)}a[c]=n(c)}for(s=0;s<i.length;s++)a[i[s]]=n(i[s]);return a}});s(Y);var B=a(function(t,n){function o(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},r=o(e),s=o(c),a=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},u=function(t){function e(n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":y(e))&&"function"!=typeof e?t:e}(this,t.call(this,n,o));return r.handleExited=function(t,e,n){var o=(0,Y.getChildMapping)(r.props.children);t in o||(n&&n(e),r.setState(function(e){var n=i({},e.children);return delete n[t],{children:n}}))},r.state={children:(0,Y.getChildMapping)(n.children,function(t){return(0,c.cloneElement)(t,{onExited:function(e){r.handleExited(t.key,e,t.props.onExited)},in:!0,appear:r.getProp(t,"appear"),enter:r.getProp(t,"enter"),exit:r.getProp(t,"exit")})})},r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":y(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},e.prototype.getProp=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props;return null!=n[e]?n[e]:t.props[e]},e.prototype.componentDidMount=function(){this.appeared=!0},e.prototype.componentWillReceiveProps=function(t){var e=this,n=this.state.children,o=(0,Y.getChildMapping)(t.children),i=(0,Y.mergeChildMappings)(n,o);Object.keys(i).forEach(function(r){var s=i[r];if((0,c.isValidElement)(s)){var a=function(t){e.handleExited(s.key,t,s.props.onExited)},u=r in n,l=r in o,p=n[r],h=(0,c.isValidElement)(p)&&!p.props.in;!l||u&&!h?l||!u||h?l&&u&&(0,c.isValidElement)(p)&&(i[r]=(0,c.cloneElement)(s,{onExited:a,in:p.props.in,exit:e.getProp(s,"exit",t),enter:e.getProp(s,"enter",t)})):i[r]=(0,c.cloneElement)(s,{in:!1}):i[r]=(0,c.cloneElement)(s,{onExited:a,in:!0,exit:e.getProp(s,"exit",t),enter:e.getProp(s,"enter",t)})}}),this.setState({children:i})},e.prototype.render=function(){var t=this.props,e=t.component,n=t.childFactory,o=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}(t,["component","childFactory"]),i=this.state.children;return delete o.appear,delete o.enter,delete o.exit,s.default.createElement(e,o,a(i).map(n))},e}(s.default.Component);u.childContextTypes={transitionGroup:r.default.object.isRequired},u.propTypes={},u.defaultProps={component:"div",childFactory:function(t){return t}},n.default=u,t.exports=n.default});s(B);var F=a(function(t){function e(t){return t&&t.__esModule?t:{default:t}}var n=e(U),o=e(B),i=e(R);t.exports={Transition:i.default,TransitionGroup:o.default,CSSTransition:n.default}});s(F);var G=F.Transition,K=void 0!==n.createPortal,W=function(t){function e(t){E(this,e);var n=T(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.el=document.createElement("div"),document.body.appendChild(n.el),n.originBodyOverflow=document.body.style.overflow,n.isHidden="hidden"===n.originBodyOverflow,n.isHidden||(document.body.style.overflow="hidden"),n}return x(e,t),g(e,[{key:"componentDidMount",value:function(){this.renderUnstableSubtree()}},{key:"componentWillReceiveProps",value:function(t){t.open||this.resetBodyOverflow()}},{key:"componentWillUnmount",value:function(){this.removePortal(),this.resetBodyOverflow()}},{key:"resetBodyOverflow",value:function(){this.isHidden||(document.body.style.overflow=this.originBodyOverflow)}},{key:"removePortal",value:function(){K?document.body.removeChild(this.el):n.unmountComponentAtNode(this.el)}},{key:"renderUnstableSubtree",value:function(){K||n.unstable_renderSubtreeIntoContainer(this,this.props.children,this.el)}},{key:"render",value:function(){return K?n.createPortal(this.props.children,this.el):null}}]),e}(t.Component),L={wrapper:{transition:"opacity .2s linear",opacity:0,visibility:"visible",position:"fixed",overflowX:"hidden",overflowY:"auto",zIndex:"1000",top:"0",left:"0",right:"0",bottom:"0",display:"flex",padding:"20px"},overlay:{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:99,backgroundColor:"rgba(0,0,0,0.6)"},alignItems:{Top:{alignItems:"flex-start"},Center:{alignItems:"center"},Bottom:{alignItems:"flex-end"}},justifyContent:{Right:{justifyContent:"flex-end"},Left:{justifyContent:"flex-start"},Center:{justifyContent:"center"}},content:{transition:"all 0.3s",backgroundColor:"white",borderRadius:"3px",zIndex:2e3,position:"relative",boxShadow:"0 0 4px rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28)",overflow:"scroll",maxWidth:"850px",padding:"10px 20px"},closeBtn:{float:"right",color:"#000",textShadow:"0 1px 0 #fff",opacity:"0.3",cursor:"pointer",marginTop:"10px",marginBottom:"10px",fontSize:"20px",width:"30px",height:"30px"},fullCloseBtn:{right:"0",top:"0",borderRadius:"0"},transitionStyles:{entering:{opacity:0},entered:{opacity:1},exited:{opacity:0}}},X=function(t){function e(t){E(this,e);var n=T(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleOverlayClick=function(){n.props.closeOnOverlay&&n.props.onClose()},n.handleCloseBtn=function(){n.props.onClose&&n.props.onClose()},n.handleEscKeyDown=function(t){n.props.closeOnEsc&&27===t.keyCode&&n.props.onClose()},n}return x(e,t),g(e,[{key:"componentDidMount",value:function(){this.props.closeOnEsc&&document.addEventListener("keydown",this.handleEscKeyDown)}},{key:"componentWillUnmount",value:function(){this.props.closeOnEsc&&document.removeEventListener("keydown",this.handleEscKeyDown)}},{key:"render",value:function(){var t=this,e=this.props,n=e.open,o=e.position,i=e.overlayStyle,r=e.contentStyle,s=function(t){return t.split(/(?=[A-Z])/).map(function(t){return t.charAt(0).toUpperCase()+t.slice(1)})}(o),a=b({},L.wrapper,L.alignItems[s[0]],L.justifyContent[s[1]]),u=b({},L.overlay,i),l=b({},L.content,r);return n?c.createElement(W,null,c.createElement(G,{in:n,appear:!0,timeout:0},function(e){return c.createElement("div",{style:b({},a,L.transitionStyles[e])},c.createElement(C,{onTap:t.handleOverlayClick,style:u}),c.createElement("div",{style:l},t._renderCloseBtn(),t.props.children))})):null}},{key:"_renderCloseBtn",value:function(){return this.props.closeBtn?c.createElement("div",{style:L.closeBtn,onClick:this.handleCloseBtn},c.createElement("svg",{viewBox:"0 0 40 40"},c.createElement("g",null,c.createElement("path",{d:"m31.6 10.7l-9.3 9.3 9.3 9.3-2.3 2.3-9.3-9.3-9.3 9.3-2.3-2.3 9.3-9.3-9.3-9.3 2.3-2.3 9.3 9.3 9.3-9.3z"})))):null}}]),e}(t.Component);return X.defaultProps={position:"topCenter",closeOnOverlay:!0,overlayStyle:{}},X});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("react"),require("prop-types"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","prop-types","react-dom"],e):t.PopPop=e(t.React,t.PropTypes,t.ReactDOM)}(this,function(t,e,n){"use strict";function o(t){return t?{pageX:t.pageX,pageY:t.pageY,clientX:t.clientX,clientY:t.clientY}:{}}function i(t){return function(){return t}}function r(t,e,n){function o(t,e){var n=l.hasOwnProperty(e)?l[e]:null;E.hasOwnProperty(e)&&v("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",e),t&&v("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",e)}function i(t,n){if(n){v("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),v(!e(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var i=t.prototype,r=i.__reactAutoBindPairs;n.hasOwnProperty(_)&&p.mixins(t,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==_){var u=n[a],c=i.hasOwnProperty(a);if(o(c,a),p.hasOwnProperty(a))p[a](t,u);else{var h=l.hasOwnProperty(a);if("function"==typeof u&&!h&&!c&&!1!==n.autobind)r.push(a,u),i[a]=u;else if(c){var f=l[a];v(h&&("DEFINE_MANY_MERGED"===f||"DEFINE_MANY"===f),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",f,a),"DEFINE_MANY_MERGED"===f?i[a]=s(i[a],u):"DEFINE_MANY"===f&&(i[a]=function(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}(i[a],u))}else i[a]=u}}}}function r(t,e){v(t&&e&&"object"===(void 0===t?"undefined":y(t))&&"object"===(void 0===e?"undefined":y(e)),"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in e)e.hasOwnProperty(n)&&(v(void 0===t[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),t[n]=e[n]);return t}function s(t,e){return function(){var n=t.apply(this,arguments),o=e.apply(this,arguments);if(null==n)return o;if(null==o)return n;var i={};return r(i,n),r(i,o),i}}function a(t,e){return e.bind(t)}function u(t){var e=function(t){return t}(function(t,o,i){this.__reactAutoBindPairs.length&&function(t){for(var e=t.__reactAutoBindPairs,n=0;n<e.length;n+=2){var o=e[n],i=e[n+1];t[o]=a(t,i)}}(this),this.props=t,this.context=o,this.refs=d,this.updater=i||n,this.state=null;var r=this.getInitialState?this.getInitialState():null;v("object"===(void 0===r?"undefined":y(r))&&!Array.isArray(r),"%s.getInitialState(): must return an object or null",e.displayName||"ReactCompositeComponent"),this.state=r});e.prototype=new g,e.prototype.constructor=e,e.prototype.__reactAutoBindPairs=[],c.forEach(i.bind(null,e)),i(e,h),i(e,t),i(e,m),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),v(e.prototype.render,"createClass(...): Class specification must implement a `render` method.");for(var o in l)e.prototype[o]||(e.prototype[o]=null);return e}var c=[],l={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},p={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)i(t,e[n])},childContextTypes:function(t,e){t.childContextTypes=f({},t.childContextTypes,e)},contextTypes:function(t,e){t.contextTypes=f({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps?t.getDefaultProps=s(t.getDefaultProps,e):t.getDefaultProps=e},propTypes:function(t,e){t.propTypes=f({},t.propTypes,e)},statics:function(t,e){!function(t,e){if(e)for(var n in e){var o=e[n];e.hasOwnProperty(n)&&(v(!(n in p),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),v(!(n in t),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),t[n]=o)}}(t,e)},autobind:function(){}},h={componentDidMount:function(){this.__isMounted=!0}},m={componentWillUnmount:function(){this.__isMounted=!1}},E={replaceState:function(t,e){this.updater.enqueueReplaceState(this,t,e)},isMounted:function(){return!!this.__isMounted}},g=function(){};return f(g.prototype,t.prototype,E),u}function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function a(t,e){return e={exports:{}},t(e,e.exports),e.exports}var u="default"in t?t.default:t;e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var c={propTypes:{moveThreshold:e.number,activeDelay:e.number,pressDelay:e.number,pressMoveThreshold:e.number,preventDefault:e.bool,stopPropagation:e.bool,onTap:e.func,onPress:e.func,onTouchStart:e.func,onTouchMove:e.func,onTouchEnd:e.func,onMouseDown:e.func,onMouseUp:e.func,onMouseMove:e.func,onMouseOut:e.func,onKeyDown:e.func,onKeyUp:e.func},getDefaultProps:function(){return{activeDelay:0,moveThreshold:100,pressDelay:1e3,pressMoveThreshold:5}},getInitialState:function(){return{isActive:!1,touchActive:!1,pinchActive:!1}},componentDidMount:function(){this.isMounted=!0},componentWillUnmount:function(){this.isMounted=!1,this.cleanupScrollDetection(),this.cancelPressDetection(),this.clearActiveTimeout()},processEvent:function(t){this.props.preventDefault&&t.preventDefault(),this.props.stopPropagation&&t.stopPropagation()},onTouchStart:function(t){this.props.onTouchStart&&!1===this.props.onTouchStart(t)||(this.processEvent(t),window._blockMouseEvents=!0,1===t.touches.length?(this._initialTouch=this._lastTouch=o(t.touches[0]),this.initScrollDetection(),this.initPressDetection(t,this.endTouch),this.initTouchmoveDetection(),this.props.activeDelay>0?this._activeTimeout=setTimeout(this.makeActive,this.props.activeDelay):this.makeActive()):this.onPinchStart&&(this.props.onPinchStart||this.props.onPinchMove||this.props.onPinchEnd)&&2===t.touches.length&&this.onPinchStart(t))},makeActive:function(){this.isMounted&&(this.clearActiveTimeout(),this.setState({isActive:!0}))},clearActiveTimeout:function(){clearTimeout(this._activeTimeout),this._activeTimeout=!1},initScrollDetection:function(){this._scrollPos={top:0,left:0},this._scrollParents=[],this._scrollParentPos=[];for(var t=n.findDOMNode(this);t;)(t.scrollHeight>t.offsetHeight||t.scrollWidth>t.offsetWidth)&&(this._scrollParents.push(t),this._scrollParentPos.push(t.scrollTop+t.scrollLeft),this._scrollPos.top+=t.scrollTop,this._scrollPos.left+=t.scrollLeft),t=t.parentNode},initTouchmoveDetection:function(){this._touchmoveTriggeredTimes=0},cancelTouchmoveDetection:function(){this._touchmoveDetectionTimeout&&(clearTimeout(this._touchmoveDetectionTimeout),this._touchmoveDetectionTimeout=null,this._touchmoveTriggeredTimes=0)},calculateMovement:function(t){return{x:Math.abs(t.clientX-this._initialTouch.clientX),y:Math.abs(t.clientY-this._initialTouch.clientY)}},detectScroll:function(){for(var t={top:0,left:0},e=0;e<this._scrollParents.length;e++)t.top+=this._scrollParents[e].scrollTop,t.left+=this._scrollParents[e].scrollLeft;return!(t.top===this._scrollPos.top&&t.left===this._scrollPos.left)},cleanupScrollDetection:function(){this._scrollParents=void 0,this._scrollPos=void 0},initPressDetection:function(t,e){this.props.onPress&&(t.persist(),this._pressTimeout=setTimeout(function(){this.props.onPress(t),e()}.bind(this),this.props.pressDelay))},cancelPressDetection:function(){clearTimeout(this._pressTimeout)},onTouchMove:function(t){if(this._initialTouch){if(this.processEvent(t),this.detectScroll())return this.endTouch(t);0==this._touchmoveTriggeredTimes++&&(this._touchmoveDetectionTimeout=setTimeout(function(){1===this._touchmoveTriggeredTimes&&this.endTouch(t)}.bind(this),64)),this.props.onTouchMove&&this.props.onTouchMove(t),this._lastTouch=o(t.touches[0]);var e=this.calculateMovement(this._lastTouch);(e.x>this.props.pressMoveThreshold||e.y>this.props.pressMoveThreshold)&&this.cancelPressDetection(),e.x>this.props.moveThreshold||e.y>this.props.moveThreshold?this.state.isActive?this.setState({isActive:!1}):this._activeTimeout&&this.clearActiveTimeout():this.state.isActive||this._activeTimeout||this.setState({isActive:!0})}else this._initialPinch&&2===t.touches.length&&this.onPinchMove&&(this.onPinchMove(t),t.preventDefault())},onTouchEnd:function(t){var e=this;if(this._initialTouch){this.processEvent(t);var n,o=this.calculateMovement(this._lastTouch);o.x<=this.props.moveThreshold&&o.y<=this.props.moveThreshold&&this.props.onTap&&(t.preventDefault(),n=function(){var n=e._scrollParents.map(function(t){return t.scrollTop+t.scrollLeft});e._scrollParentPos.some(function(t,e){return t!==n[e]})||e.props.onTap(t)}),this.endTouch(t,n)}else this.onPinchEnd&&this._initialPinch&&t.touches.length+t.changedTouches.length===2&&(this.onPinchEnd(t),t.preventDefault())},endTouch:function(t,e){this.cancelTouchmoveDetection(),this.cancelPressDetection(),this.clearActiveTimeout(),t&&this.props.onTouchEnd&&this.props.onTouchEnd(t),this._initialTouch=null,this._lastTouch=null,e&&e(),this.state.isActive&&this.setState({isActive:!1})},onMouseDown:function(t){window._blockMouseEvents?window._blockMouseEvents=!1:this.props.onMouseDown&&!1===this.props.onMouseDown(t)||(this.processEvent(t),this.initPressDetection(t,this.endMouseEvent),this._mouseDown=!0,this.setState({isActive:!0}))},onMouseMove:function(t){!window._blockMouseEvents&&this._mouseDown&&(this.processEvent(t),this.props.onMouseMove&&this.props.onMouseMove(t))},onMouseUp:function(t){!window._blockMouseEvents&&this._mouseDown&&(this.processEvent(t),this.props.onMouseUp&&this.props.onMouseUp(t),this.props.onTap&&this.props.onTap(t),this.endMouseEvent())},onMouseOut:function(t){!window._blockMouseEvents&&this._mouseDown&&(this.processEvent(t),this.props.onMouseOut&&this.props.onMouseOut(t),this.endMouseEvent())},endMouseEvent:function(){this.cancelPressDetection(),this._mouseDown=!1,this.setState({isActive:!1})},onKeyUp:function(t){this._keyDown&&(this.processEvent(t),this.props.onKeyUp&&this.props.onKeyUp(t),this.props.onTap&&this.props.onTap(t),this._keyDown=!1,this.cancelPressDetection(),this.setState({isActive:!1}))},onKeyDown:function(t){this.props.onKeyDown&&!1===this.props.onKeyDown(t)||32!==t.which&&13!==t.which||this._keyDown||(this.initPressDetection(t,this.endKeyEvent),this.processEvent(t),this._keyDown=!0,this.setState({isActive:!0}))},endKeyEvent:function(){this.cancelPressDetection(),this._keyDown=!1,this.setState({isActive:!1})},cancelTap:function(){this.endTouch(),this._mouseDown=!1},handlers:function(){return{onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onMouseMove:this.onMouseMove,onMouseOut:this.onMouseOut,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp}}},l=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,f=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,o,i=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),r=1;r<arguments.length;r++){n=Object(arguments[r]);for(var s in n)p.call(n,s)&&(i[s]=n[s]);if(l){o=l(n);for(var a=0;a<o.length;a++)h.call(n,o[a])&&(i[o[a]]=n[o[a]])}}return i},d={},v=function(t,e,n,o,i,r,s,a){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,i,r,s,a],l=0;(u=new Error(e.replace(/%s/g,function(){return c[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}},m=function(){};m.thatReturns=i,m.thatReturnsFalse=i(!1),m.thatReturnsTrue=i(!0),m.thatReturnsNull=i(null),m.thatReturnsThis=function(){return this},m.thatReturnsArgument=function(t){return t};var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E=(function(){function t(t){this.value=t}function e(e){function n(i,r){try{var s=e[i](r),a=s.value;a instanceof t?Promise.resolve(a.value).then(function(t){n("next",t)},function(t){n("throw",t)}):o(s.done?"return":"normal",s.value)}catch(t){o("throw",t)}}function o(t,e){switch(t){case"return":i.resolve({value:e,done:!0});break;case"throw":i.reject(e);break;default:i.resolve({value:e,done:!1})}(i=i.next)?n(i.key,i.arg):r=null}var i,r;this._invoke=function(t,e){return new Promise(function(o,s){var a={key:t,arg:e,resolve:o,reject:s,next:null};r?r=r.next=a:(i=r=a,n(t,e))})},"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(e.prototype[Symbol.asyncIterator]=function(){return this}),e.prototype.next=function(t){return this._invoke("next",t)},e.prototype.throw=function(t){return this._invoke("throw",t)},e.prototype.return=function(t){return this._invoke("return",t)}}(),function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}),g=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),b=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},x=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},T=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},_="mixins",w=r;if(void 0===u)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var M=(new u.Component).updater,D=w(u.Component,u.isValidElement,M),P={WebkitTapHighlightColor:"rgba(0,0,0,0)",WebkitTouchCallout:"none",WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none",cursor:"pointer"},O=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},C=function(t){return D({displayName:"Tappable",mixins:t,getDefaultProps:function(){return{component:"span",classBase:"Tappable"}},render:function(){var t=this.props,e=t.classBase+(this.state.isActive?"-active":"-inactive");t.className&&(e+=" "+t.className),t.classes&&(e+=" "+(this.state.isActive?t.classes.active:t.classes.inactive));var n={};O(n,P,t.style);var o=O({},t,{style:n,className:e,disabled:t.disabled,handlers:this.handlers},this.handlers());return delete o.activeDelay,delete o.classBase,delete o.classes,delete o.handlers,delete o.onTap,delete o.onPress,delete o.onPinchStart,delete o.onPinchMove,delete o.onPinchEnd,delete o.moveThreshold,delete o.pressDelay,delete o.pressMoveThreshold,delete o.preventDefault,delete o.stopPropagation,delete o.component,u.createElement(t.component,o,t.children)}})}([c]),N=P,S=c;C.touchStyles=N,C.Mixin=S;var j=a(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+t.className+" ").indexOf(" "+e+" ")},t.exports=e.default});s(j);var k=a(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){t.classList?t.classList.add(e):(0,n.default)(t)||(t.className=t.className+" "+e)};var n=function(t){return t&&t.__esModule?t:{default:t}}(j);t.exports=e.default});s(k);var A=function(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")},I=a(function(t,n){n.__esModule=!0,n.classNamesShape=n.timeoutsShape=void 0,n.transitionTimeout=function(t){var e="transition"+t+"Timeout",n="transition"+t;return function(t){if(t[n]){if(null==t[e])return new Error(e+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof t[e])return new Error(e+" must be a number (in milliseconds)")}return null}};var o=function(t){return t&&t.__esModule?t:{default:t}}(e);n.timeoutsShape=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]),n.classNamesShape=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterActive:o.default.string,exit:o.default.string,exitActive:o.default.string})])});s(I);var R=a(function(t,o){function i(t){return t&&t.__esModule?t:{default:t}}function r(){}o.__esModule=!0,o.EXITING=o.ENTERED=o.ENTERING=o.EXITED=o.UNMOUNTED=void 0;var s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(e),a=i(u),c=i(n),l=o.UNMOUNTED="unmounted",p=o.EXITED="exited",h=o.ENTERING="entering",f=o.ENTERED="entered",d=o.EXITING="exiting",v=function(t){function e(n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":y(e))&&"function"!=typeof e?t:e}(this,t.call(this,n,o)),r=o.transitionGroup,s=r&&!r.isMounting?n.enter:n.appear,a=void 0;return i.nextStatus=null,n.in?s?(a=p,i.nextStatus=h):a=f:a=n.unmountOnExit||n.mountOnEnter?l:p,i.state={status:a},i.nextCallback=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":y(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{transitionGroup:null}},e.prototype.componentDidMount=function(){this.updateStatus(!0)},e.prototype.componentWillReceiveProps=function(t){var e=(this.pendingState||this.state).status;t.in?(e===l&&this.setState({status:p}),e!==h&&e!==f&&(this.nextStatus=h)):e!==h&&e!==f||(this.nextStatus=d)},e.prototype.componentDidUpdate=function(){this.updateStatus()},e.prototype.componentWillUnmount=function(){this.cancelNextCallback()},e.prototype.getTimeouts=function(){var t=this.props.timeout,e=void 0,n=void 0,o=void 0;return e=n=o=t,null!=t&&"number"!=typeof t&&(e=t.exit,n=t.enter,o=t.appear),{exit:e,enter:n,appear:o}},e.prototype.updateStatus=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.nextStatus;if(null!==e){this.nextStatus=null,this.cancelNextCallback();var n=c.default.findDOMNode(this);e===h?this.performEnter(n,t):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===p&&this.setState({status:l})},e.prototype.performEnter=function(t,e){var n=this,o=this.props.enter,i=this.context.transitionGroup?this.context.transitionGroup.isMounting:e,r=this.getTimeouts();e||o?(this.props.onEnter(t,i),this.safeSetState({status:h},function(){n.props.onEntering(t,i),n.onTransitionEnd(t,r.enter,function(){n.safeSetState({status:f},function(){n.props.onEntered(t,i)})})})):this.safeSetState({status:f},function(){n.props.onEntered(t)})},e.prototype.performExit=function(t){var e=this,n=this.props.exit,o=this.getTimeouts();n?(this.props.onExit(t),this.safeSetState({status:d},function(){e.props.onExiting(t),e.onTransitionEnd(t,o.exit,function(){e.safeSetState({status:p},function(){e.props.onExited(t)})})})):this.safeSetState({status:p},function(){e.props.onExited(t)})},e.prototype.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},e.prototype.safeSetState=function(t,e){var n=this;this.pendingState=t,e=this.setNextCallback(e),this.setState(t,function(){n.pendingState=null,e()})},e.prototype.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,e.nextCallback=null,t(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},e.prototype.onTransitionEnd=function(t,e,n){this.setNextCallback(n),t?(this.props.addEndListener&&this.props.addEndListener(t,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},e.prototype.render=function(){var t=this.state.status;if(t===l)return null;var e=this.props,n=e.children,o=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}(e,["children"]);if(delete o.in,delete o.mountOnEnter,delete o.unmountOnExit,delete o.appear,delete o.enter,delete o.exit,delete o.timeout,delete o.addEndListener,delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,"function"==typeof n)return n(t,o);var i=a.default.Children.only(n);return a.default.cloneElement(i,o)},e}(a.default.Component);v.contextTypes={transitionGroup:s.object},v.childContextTypes={transitionGroup:function(){}},v.propTypes={},v.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:r,onEntering:r,onEntered:r,onExit:r,onExiting:r,onExited:r},v.UNMOUNTED=0,v.EXITED=1,v.ENTERING=2,v.ENTERED=3,v.EXITING=4,o.default=v});s(R);var U=a(function(t,n){function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":y(e))&&"function"!=typeof e?t:e}n.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(e),a=o(k),c=o(A),l=o(u),p=o(R),h=function(t,e){return e&&e.split(" ").forEach(function(e){return(0,a.default)(t,e)})},f=function(t,e){return e&&e.split(" ").forEach(function(e){return(0,c.default)(t,e)})},d=(r({},p.default.propTypes,{classNames:I.classNamesShape,onEnter:s.func,onEntering:s.func,onEntered:s.func,onExit:s.func,onExiting:s.func,onExited:s.func}),function(t){function e(){var n,o,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var s=arguments.length,a=Array(s),u=0;u<s;u++)a[u]=arguments[u];return n=o=i(this,t.call.apply(t,[this].concat(a))),o.onEnter=function(t,e){var n=o.getClassNames(e?"appear":"enter").className;o.removeClasses(t,"exit"),h(t,n),o.props.onEnter&&o.props.onEnter(t)},o.onEntering=function(t,e){var n=o.getClassNames(e?"appear":"enter").activeClassName;o.reflowAndAddClass(t,n),o.props.onEntering&&o.props.onEntering(t)},o.onEntered=function(t,e){o.removeClasses(t,e?"appear":"enter"),o.props.onEntered&&o.props.onEntered(t)},o.onExit=function(t){var e=o.getClassNames("exit").className;o.removeClasses(t,"appear"),o.removeClasses(t,"enter"),h(t,e),o.props.onExit&&o.props.onExit(t)},o.onExiting=function(t){var e=o.getClassNames("exit").activeClassName;o.reflowAndAddClass(t,e),o.props.onExiting&&o.props.onExiting(t)},o.onExited=function(t){o.removeClasses(t,"exit"),o.props.onExited&&o.props.onExited(t)},o.getClassNames=function(t){var e=o.props.classNames,n="string"!=typeof e?e[t]:e+"-"+t;return{className:n,activeClassName:"string"!=typeof e?e[t+"Active"]:n+"-active"}},r=n,i(o,r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":y(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.removeClasses=function(t,e){var n=this.getClassNames(e),o=n.className,i=n.activeClassName;o&&f(t,o),i&&f(t,i)},e.prototype.reflowAndAddClass=function(t,e){t.scrollTop,h(t,e)},e.prototype.render=function(){var t=r({},this.props);return delete t.classNames,l.default.createElement(p.default,r({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(l.default.Component));d.propTypes={},n.default=d,t.exports=n.default});s(U);var Y=a(function(t,e){function n(t,e){var n=Object.create(null);return t&&u.Children.map(t,function(t){return t}).forEach(function(t){n[t.key]=function(t){return e&&(0,u.isValidElement)(t)?e(t):t}(t)}),n}e.__esModule=!0,e.getChildMapping=n,e.mergeChildMappings=function(t,e){function n(n){return n in e?e[n]:t[n]}t=t||{},e=e||{};var o=Object.create(null),i=[];for(var r in t)r in e?i.length&&(o[r]=i,i=[]):i.push(r);var s=void 0,a={};for(var u in e){if(o[u])for(s=0;s<o[u].length;s++){var c=o[u][s];a[o[u][s]]=n(c)}a[u]=n(u)}for(s=0;s<i.length;s++)a[i[s]]=n(i[s]);return a}});s(Y);var B=a(function(t,n){function o(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},r=o(e),s=o(u),a=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},c=function(t){function e(n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":y(e))&&"function"!=typeof e?t:e}(this,t.call(this,n,o));return r.handleExited=function(t,e,n){var o=(0,Y.getChildMapping)(r.props.children);t in o||(n&&n(e),r.setState(function(e){var n=i({},e.children);return delete n[t],{children:n}}))},r.state={children:(0,Y.getChildMapping)(n.children,function(t){return(0,u.cloneElement)(t,{onExited:function(e){r.handleExited(t.key,e,t.props.onExited)},in:!0,appear:r.getProp(t,"appear"),enter:r.getProp(t,"enter"),exit:r.getProp(t,"exit")})})},r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":y(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},e.prototype.getProp=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props;return null!=n[e]?n[e]:t.props[e]},e.prototype.componentDidMount=function(){this.appeared=!0},e.prototype.componentWillReceiveProps=function(t){var e=this,n=this.state.children,o=(0,Y.getChildMapping)(t.children),i=(0,Y.mergeChildMappings)(n,o);Object.keys(i).forEach(function(r){var s=i[r];if((0,u.isValidElement)(s)){var a=function(t){e.handleExited(s.key,t,s.props.onExited)},c=r in n,l=r in o,p=n[r],h=(0,u.isValidElement)(p)&&!p.props.in;!l||c&&!h?l||!c||h?l&&c&&(0,u.isValidElement)(p)&&(i[r]=(0,u.cloneElement)(s,{onExited:a,in:p.props.in,exit:e.getProp(s,"exit",t),enter:e.getProp(s,"enter",t)})):i[r]=(0,u.cloneElement)(s,{in:!1}):i[r]=(0,u.cloneElement)(s,{onExited:a,in:!0,exit:e.getProp(s,"exit",t),enter:e.getProp(s,"enter",t)})}}),this.setState({children:i})},e.prototype.render=function(){var t=this.props,e=t.component,n=t.childFactory,o=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}(t,["component","childFactory"]),i=this.state.children;return delete o.appear,delete o.enter,delete o.exit,s.default.createElement(e,o,a(i).map(n))},e}(s.default.Component);c.childContextTypes={transitionGroup:r.default.object.isRequired},c.propTypes={},c.defaultProps={component:"div",childFactory:function(t){return t}},n.default=c,t.exports=n.default});s(B);var F=a(function(t){function e(t){return t&&t.__esModule?t:{default:t}}var n=e(U),o=e(B),i=e(R);t.exports={Transition:i.default,TransitionGroup:o.default,CSSTransition:n.default}});s(F);var G=F.Transition,K=void 0!==n.createPortal,W=function(t){function e(t){E(this,e);var n=T(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.el=document.createElement("div"),document.body.appendChild(n.el),n.originBodyOverflow=document.body.style.overflow,n.isHidden="hidden"===n.originBodyOverflow,n.isHidden||(document.body.style.overflow="hidden"),n}return x(e,t),g(e,[{key:"componentDidMount",value:function(){this.renderUnstableSubtree()}},{key:"componentDidUpdate",value:function(){this.renderUnstableSubtree()}},{key:"componentWillReceiveProps",value:function(t){t.open||this.resetBodyOverflow()}},{key:"componentWillUnmount",value:function(){this.removePortal(),this.resetBodyOverflow()}},{key:"resetBodyOverflow",value:function(){this.isHidden||(document.body.style.overflow=this.originBodyOverflow)}},{key:"removePortal",value:function(){K?document.body.removeChild(this.el):n.unmountComponentAtNode(this.el)}},{key:"renderUnstableSubtree",value:function(){K||n.unstable_renderSubtreeIntoContainer(this,this.props.children,this.el)}},{key:"render",value:function(){return K?n.createPortal(this.props.children,this.el):null}}]),e}(t.Component),L={wrapper:{transition:"opacity .2s linear",opacity:0,visibility:"visible",position:"fixed",overflowX:"hidden",overflowY:"auto",zIndex:"1000",top:"0",left:"0",right:"0",bottom:"0",display:"flex",padding:"20px"},overlay:{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:99,backgroundColor:"rgba(0,0,0,0.6)"},alignItems:{Top:{alignItems:"flex-start"},Center:{alignItems:"center"},Bottom:{alignItems:"flex-end"}},justifyContent:{Right:{justifyContent:"flex-end"},Left:{justifyContent:"flex-start"},Center:{justifyContent:"center"}},content:{transition:"all 0.3s",backgroundColor:"white",borderRadius:"3px",zIndex:2e3,position:"relative",boxShadow:"0 0 4px rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28)",overflow:"scroll",maxWidth:"850px",padding:"10px 20px"},closeBtn:{float:"right",color:"#000",textShadow:"0 1px 0 #fff",opacity:"0.3",cursor:"pointer",marginTop:"10px",marginBottom:"10px",fontSize:"20px",width:"30px",height:"30px"},fullCloseBtn:{right:"0",top:"0",borderRadius:"0"},transitionStyles:{entering:{opacity:0},entered:{opacity:1},exited:{opacity:0}}},X=function(t){function e(t){E(this,e);var n=T(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.handleOverlayClick=function(){n.props.onClose&&n.props.closeOnOverlay&&n.props.onClose()},n.handleCloseBtn=function(){n.props.onClose&&n.props.onClose()},n.handleEscKeyDown=function(t){n.props.onClose&&n.props.closeOnEsc&&27===t.keyCode&&n.props.onClose()},n}return x(e,t),g(e,[{key:"componentDidMount",value:function(){this.props.closeOnEsc&&document.addEventListener("keydown",this.handleEscKeyDown)}},{key:"componentWillUnmount",value:function(){this.props.closeOnEsc&&document.removeEventListener("keydown",this.handleEscKeyDown)}},{key:"render",value:function(){var t=this,e=this.props,n=e.open,o=e.position,i=e.overlayStyle,r=e.contentStyle,s=function(t){return t.split(/(?=[A-Z])/).map(function(t){return t.charAt(0).toUpperCase()+t.slice(1)})}(o),a=b({},L.wrapper,L.alignItems[s[0]],L.justifyContent[s[1]]),c=b({},L.overlay,i),l=b({},L.content,r);return n?u.createElement(W,null,u.createElement(G,{in:n,appear:!0,timeout:0},function(e){return u.createElement("div",{style:b({},a,L.transitionStyles[e])},u.createElement(C,{onTap:t.handleOverlayClick,style:c}),u.createElement("div",{style:l},t._renderCloseBtn(),t.props.children))})):null}},{key:"_renderCloseBtn",value:function(){return this.props.closeBtn?u.createElement("div",{style:L.closeBtn,onClick:this.handleCloseBtn},u.createElement("svg",{viewBox:"0 0 40 40"},u.createElement("g",null,u.createElement("path",{d:"m31.6 10.7l-9.3 9.3 9.3 9.3-2.3 2.3-9.3-9.3-9.3 9.3-2.3-2.3 9.3-9.3-9.3-9.3 2.3-2.3 9.3 9.3 9.3-9.3z"})))):null}}]),e}(t.Component);return X.defaultProps={position:"topCenter",closeOnOverlay:!0,overlayStyle:{}},X});
{
"name": "react-poppop",
"version": "1.2.0",
"version": "1.3.0",
"description": "A responsive, mobile support, multi directions and easy to use modal for ReactJS.",

@@ -17,3 +17,3 @@ "main": "lib/index.js",

"gh-pages:publish": "git-directory-deploy --directory _gh-pages --branch gh-pages",
"prepublishOnly": "npm run build",
"prepublish": "npm run build",
"validate": "npm ls"

@@ -20,0 +20,0 @@ },

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc