{"size": 14253, "ext": "js", "max_stars_repo_path": "packages/outsideclick/es5/OutsideClick.min.js", "max_stars_repo_name": "ship-components/ship-components", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "packages/outsideclick/es5/OutsideClick.min.js", "max_issues_repo_name": "ship-components/ship-components", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/outsideclick/es5/OutsideClick.min.js", "max_forks_repo_name": "ship-components/ship-components", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 950.2, "max_line_length": 12782, "alphanum_fraction": 0.6590893145}
/*!
 *        .__    .__                                                                          __                                  __         .__    .___            .__  .__        __    
 *   _____|  |__ |__|_____             ____  ____   _____ ______   ____   ____   ____   _____/  |_  ______           ____  __ ___/  |_  _____|__| __| _/____   ____ |  | |__| ____ |  | __
 *  /  ___/  |  \|  \____ \   ______ _/ ___\/  _ \ /     \\____ \ /  _ \ /    \_/ __ \ /    \   __\/  ___/  ______  /  _ \|  |  \   __\/  ___/  |/ __ |/ __ \_/ ___\|  | |  |/ ___\|  |/ /
 *  \___ \|   Y  \  |  |_> > /_____/ \  \__(  <_> )  Y Y  \  |_> >  <_> )   |  \  ___/|   |  \  |  \___ \  /_____/ (  <_> )  |  /|  |  \___ \|  / /_/ \  ___/\  \___|  |_|  \  \___|    < 
 * /____  >___|  /__|   __/           \___  >____/|__|_|  /   __/ \____/|___|  /\___  >___|  /__| /____  >          \____/|____/ |__| /____  >__\____ |\___  >\___  >____/__|\___  >__|_ \
 *      \/     \/   |__|                  \/            \/|__|               \/     \/     \/          \/                                  \/        \/    \/     \/             \/     \/
 * ship-components-outsideclick 0.3.0
 * Description: React component to detect clicks outside of its children
 * Author: Isaac Suttell <isaac@isaacsuttell.com>
 * Homepage: https://github.com/ship-components/ship-components-outsideclick#readme
 * Bugs: https://github.com/ship-components/ship-components-outsideclick/issues
 * License: MIT
 */
module.exports=function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,n,t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function i(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function u(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),c=t(10),s=r(c),f=t(11),l=r(f),p=t(9),d=r(p),y=function(e){function n(e){o(this,n);var t=i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.handleBodyClick=t.handleBodyClick.bind(t),t}return u(n,e),a(n,[{key:"componentDidMount",value:function(){this.props.onClick&&document.body.addEventListener("click",this.handleBodyClick),this.props.onContextMenu&&document.body.addEventListener("contextmenu",this.handleBodyClick),this.props.onMouseDown&&document.body.addEventListener("mousedown",this.handleBodyClick),this.props.onMouseUp&&document.body.addEventListener("mouseup",this.handleBodyClick)}},{key:"componentWillUnmount",value:function(){document.body.removeEventListener("click",this.handleBodyClick),document.body.removeEventListener("contextmenu",this.handleBodyClick),document.body.removeEventListener("mousedown",this.handleBodyClick),document.body.removeEventListener("mouseup",this.handleBodyClick)}},{key:"handleBodyClick",value:function(e){for(var n=e.target,t=l.default.findDOMNode(this);n.parentNode;){if(n===t)return;n=n.parentNode}this.props.onMouseDown&&this.props.onMouseDown(e),this.props.onClick&&this.props.onClick(e),this.props.onMouseUp&&this.props.onMouseUp(e)}},{key:"render",value:function(){return s.default.createElement(this.props.tag,{className:this.props.className},this.props.children)}}]),n}(s.default.Component);n.default=y,y.defaultProps={tag:"div",className:""},y.propTypes={tag:d.default.string,className:d.default.string,onClick:d.default.func,onMouseDown:d.default.func,onMouseUp:d.default.func}},function(e,n){function t(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(f===setTimeout)return setTimeout(e,0);if((f===t||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(n){try{return f.call(null,e,0)}catch(n){return f.call(this,e,0)}}}function i(e){if(l===clearTimeout)return clearTimeout(e);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(n){try{return l.call(null,e)}catch(n){return l.call(this,e)}}}function u(){h&&d&&(h=!1,d.length?y=d.concat(y):v=-1,y.length&&a())}function a(){if(!h){var e=o(u);h=!0;for(var n=y.length;n;){for(d=y,y=[];++v<n;)d&&d[v].run();v=-1,n=y.length}d=null,h=!1,i(e)}}function c(e,n){this.fun=e,this.array=n}function s(){}var f,l,p=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:t}catch(e){f=t}try{l="function"==typeof clearTimeout?clearTimeout:r}catch(e){l=r}}();var d,y=[],h=!1,v=-1;p.nextTick=function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];y.push(new c(e,n)),1!==y.length||h||o(a)},c.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=s,p.addListener=s,p.once=s,p.off=s,p.removeListener=s,p.removeAllListeners=s,p.emit=s,p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,n){"use strict";function t(e){return function(){return e}}var r=function(){};r.thatReturns=t,r.thatReturnsFalse=t(!1),r.thatReturnsTrue=t(!0),r.thatReturnsNull=t(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,n,t){(function(n){"use strict";function t(e,n,t,o,i,u,a,c){if(r(n),!e){var s;if(void 0===n)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[t,o,i,u,a,c],l=0;s=new Error(n.replace(/%s/g,function(){return f[l++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var r=function(e){};"production"!==n.env.NODE_ENV&&(r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=t}).call(n,t(1))},function(e,n,t){(function(n){"use strict";var r=t(2),o=r;"production"!==n.env.NODE_ENV&&!function(){var e=function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return t[o++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};o=function(n,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!n){for(var r=arguments.length,o=Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];e.apply(void 0,[t].concat(o))}}}(),e.exports=o}).call(n,t(1))},function(e,n){"use strict";var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=t},function(e,n,t){(function(n){"use strict";function r(e,t,r,c,s){if("production"!==n.env.NODE_ENV)for(var f in e)if(e.hasOwnProperty(f)){var l;try{o("function"==typeof e[f],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",c||"React class",r,f),l=e[f](t,f,c,r,null,u)}catch(e){l=e}if(i(!l||l instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",c||"React class",r,f,typeof l),l instanceof Error&&!(l.message in a)){a[l.message]=!0;var p=s?s():"";i(!1,"Failed %s type: %s%s",r,l.message,null!=p?p:"")}}}if("production"!==n.env.NODE_ENV)var o=t(3),i=t(4),u=t(5),a={};e.exports=r}).call(n,t(1))},function(e,n,t){"use strict";var r=t(2),o=t(3);e.exports=function(){function e(){o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n};return t.checkPropTypes=r,t.PropTypes=t,t}},function(e,n,t){(function(n){"use strict";var r=t(2),o=t(3),i=t(4),u=t(5),a=t(6);e.exports=function(e,t){function c(e){var n=e&&(_&&e[_]||e[P]);if("function"==typeof n)return n}function s(e,n){return e===n?0!==e||1/e===1/n:e!==e&&n!==n}function f(e){this.message=e,this.stack=""}function l(e){function r(r,s,l,p,d,y,h){if(p=p||R,y=y||l,h!==u)if(t)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==n.env.NODE_ENV&&"undefined"!=typeof console){var v=p+":"+l;!a[v]&&c<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",y,p),a[v]=!0,c++)}return null==s[l]?r?new f(null===s[l]?"The "+d+" `"+y+"` is marked as required "+("in `"+p+"`, but its value is `null`."):"The "+d+" `"+y+"` is marked as required in "+("`"+p+"`, but its value is `undefined`.")):null:e(s,l,p,d,y)}if("production"!==n.env.NODE_ENV)var a={},c=0;var s=r.bind(null,!1);return s.isRequired=r.bind(null,!0),s}function p(e){function n(n,t,r,o,i,u){var a=n[t],c=x(a);if(c!==e){var s=k(a);return new f("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return l(n)}function d(){return l(r.thatReturnsNull)}function y(e){function n(n,t,r,o,i){if("function"!=typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=n[t];if(!Array.isArray(a)){var c=x(a);return new f("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var s=0;s<a.length;s++){var l=e(a,s,r,o,i+"["+s+"]",u);if(l instanceof Error)return l}return null}return l(n)}function h(){function n(n,t,r,o,i){var u=n[t];if(!e(u)){var a=x(u);return new f("Invalid "+o+" `"+i+"` of type "+("`"+a+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return l(n)}function v(e){function n(n,t,r,o,i){if(!(n[t]instanceof e)){var u=e.name||R,a=N(n[t]);return new f("Invalid "+o+" `"+i+"` of type "+("`"+a+"` supplied to `"+r+"`, expected ")+("instance of `"+u+"`."))}return null}return l(n)}function m(e){function t(n,t,r,o,i){for(var u=n[t],a=0;a<e.length;a++)if(s(u,e[a]))return null;var c=JSON.stringify(e);return new f("Invalid "+o+" `"+i+"` of value `"+u+"` "+("supplied to `"+r+"`, expected one of "+c+"."))}return Array.isArray(e)?l(t):("production"!==n.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOf, expected an instance of array."):void 0,r.thatReturnsNull)}function b(e){function n(n,t,r,o,i){if("function"!=typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=n[t],c=x(a);if("object"!==c)return new f("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an object."));for(var s in a)if(a.hasOwnProperty(s)){var l=e(a,s,r,o,i+"."+s,u);if(l instanceof Error)return l}return null}return l(n)}function g(e){function t(n,t,r,o,i){for(var a=0;a<e.length;a++){var c=e[a];if(null==c(n,t,r,o,i,u))return null}return new f("Invalid "+o+" `"+i+"` supplied to "+("`"+r+"`."))}return Array.isArray(e)?l(t):("production"!==n.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0,r.thatReturnsNull)}function w(){function e(e,n,t,r,o){return T(e[n])?null:new f("Invalid "+r+" `"+o+"` supplied to "+("`"+t+"`, expected a ReactNode."))}return l(e)}function E(e){function n(n,t,r,o,i){var a=n[t],c=x(a);if("object"!==c)return new f("Invalid "+o+" `"+i+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var s in e){var l=e[s];if(l){var p=l(a,s,r,o,i+"."+s,u);if(p)return p}}return null}return l(n)}function T(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(T);if(null===n||e(n))return!0;var t=c(n);if(!t)return!1;var r,o=t.call(n);if(t!==n.entries){for(;!(r=o.next()).done;)if(!T(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!T(i[1]))return!1}return!0;default:return!1}}function O(e,n){return"symbol"===e||("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}function x(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":O(n,e)?"symbol":n}function k(e){var n=x(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function N(e){return e.constructor&&e.constructor.name?e.constructor.name:R}var _="function"==typeof Symbol&&Symbol.iterator,P="@@iterator",R="<<anonymous>>",j={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:d(),arrayOf:y,element:h(),instanceOf:v,node:w(),objectOf:b,oneOf:m,oneOfType:g,shape:E};return f.prototype=Error.prototype,j.checkPropTypes=a,j.PropTypes=j,j}}).call(n,t(1))},function(e,n,t){(function(n){if("production"!==n.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},i=!0;e.exports=t(8)(o,i)}else e.exports=t(7)()}).call(n,t(1))},function(e,n){e.exports=require("react")},function(e,n){e.exports=require("react-dom")}]);