Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-popper

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-popper - npm Package Compare versions

Comparing version 0.6.6 to 0.6.7

6

dist/react-popper.min.js
/*!
* React Popper 0.6.6
* React Popper 0.6.7
* https://github.com/souporserious/react-popper
* Copyright (c) 2017 React Popper Authors
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.ReactPopper=t(require("react"),require("prop-types")):e.ReactPopper=t(e.React,e.PropTypes)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Arrow=t.Popper=t.Target=t.Manager=void 0;var o=n(1),i=r(o),a=n(4),f=r(a),p=n(5),s=r(p),u=n(9),l=r(u);t.Manager=i.default,t.Target=f.default,t.Popper=s.default,t.Arrow=l.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(2),u=(r(s),n(3)),l=r(u),c=function(e){function t(){var e,n,r,o;i(this,t);for(var f=arguments.length,p=Array(f),s=0;s<f;s++)p[s]=arguments[s];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(p))),r._setTargetNode=function(e){r._targetNode=e},r._getTargetNode=function(){return r._targetNode},o=n,a(r,o)}return f(t,e),p(t,[{key:"getChildContext",value:function(){return{popperManager:{setTargetNode:this._setTargetNode,getTargetNode:this._getTargetNode}}}},{key:"render",value:function(){var e=this.props,t=e.tag,n=e.children,r=o(e,["tag","children"]);return t!==!1?(0,s.createElement)(t,r,n):n}}]),t}(s.Component);c.childContextTypes={popperManager:l.default.object.isRequired},c.propTypes={tag:l.default.oneOfType([l.default.string,l.default.bool])},c.defaultProps={tag:"div"},t.default=c},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(2),f=(r(a),n(3)),p=r(f),s=function(e,t){var n=e.tag,r=void 0===n?"div":n,f=e.innerRef,p=e.children,s=o(e,["tag","innerRef","children"]),u=t.popperManager,l=function(e){u.setTargetNode(e),"function"==typeof f&&f(e)};if("function"==typeof p){var c={ref:l};return p({targetProps:c,restProps:s})}return(0,a.createElement)(r,i({ref:l},s),p)};s.contextTypes={popperManager:p.default.object.isRequired},s.propTypes={tag:p.default.string,innerRef:p.default.func,children:p.default.oneOfType([p.default.node,p.default.func])},t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(2),c=(r(l),n(3)),d=r(c),h=n(6),m=r(h),v=n(7),g=r(v),Popper=function(e){function Popper(){var e,t,n,r;a(this,Popper);for(var o=arguments.length,i=Array(o),p=0;p<o;p++)i[p]=arguments[p];return t=n=f(this,(e=Popper.__proto__||Object.getPrototypeOf(Popper)).call.apply(e,[this].concat(i))),n.state={},n._setArrowNode=function(e){n._arrowNode=e},n._getTargetNode=function(){return n.context.popperManager.getTargetNode()},n._updateStateModifier={enabled:!0,order:900,fn:function(e){return(n.state.data&&!(0,g.default)(e.offsets,n.state.data.offsets)||!n.state.data)&&n.setState({data:e}),e}},n._getPopperStyle=function(){var e=n.state.data;if(!n._popper||!e)return{position:"absolute",pointerEvents:"none",opacity:0};var t=e.offsets.popper,r=t.top,o=t.left,i=t.position;return s({position:i,top:0,left:0,transform:"translate3d("+Math.round(o)+"px, "+Math.round(r)+"px, 0px)",willChange:"transform"},e.styles)},n._getPopperPlacement=function(){return n.state.data?n.state.data.placement:void 0},n._getArrowStyle=function(){if(n.state.data&&n.state.data.offsets.arrow){var e=n.state.data.offsets.arrow,t=e.top,r=e.left;return r?{left:+r}:{top:+t}}return{}},r=t,f(n,r)}return p(Popper,e),u(Popper,[{key:"getChildContext",value:function(){return{popper:{setArrowNode:this._setArrowNode,getArrowStyle:this._getArrowStyle}}}},{key:"componentDidMount",value:function(){this._updatePopper()}},{key:"componentDidUpdate",value:function(e){e.placement===this.props.placement&&e.eventsEnabled===this.props.eventsEnabled||this._updatePopper(),e.children!==this.props.children&&this._popper.scheduleUpdate()}},{key:"componentWillUnmount",value:function(){this._destroyPopper()}},{key:"_updatePopper",value:function(){this._destroyPopper(),this._node&&this._createPopper()}},{key:"_createPopper",value:function(){var e=this.props,t=e.placement,n=e.eventsEnabled,r=s({},this.props.modifiers,{applyStyle:{enabled:!1},updateState:this._updateStateModifier});this._arrowNode&&(r.arrow={element:this._arrowNode}),this._popper=new m.default(this._getTargetNode(),this._node,{placement:t,eventsEnabled:n,modifiers:r}),this._popper.scheduleUpdate()}},{key:"_destroyPopper",value:function(){this._popper&&this._popper.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.tag,r=t.innerRef,a=(t.placement,t.eventsEnabled,t.modifiers,t.children),f=i(t,["tag","innerRef","placement","eventsEnabled","modifiers","children"]),p=function(t){e._node=t,"function"==typeof r&&r(t)},u=this._getPopperStyle(),c=this._getPopperPlacement();if("function"==typeof a){var d=o({ref:p,style:u},"data-placement",c);return a({popperProps:d,restProps:f,scheduleUpdate:this._popper&&this._popper.scheduleUpdate})}return(0,l.createElement)(n,s({},f,{ref:p,style:s({},f.style,u),"data-placement":c}),a)}}]),Popper}(l.Component);Popper.contextTypes={popperManager:d.default.object.isRequired},Popper.childContextTypes={popper:d.default.object.isRequired},Popper.propTypes={tag:d.default.string,innerRef:d.default.func,placement:d.default.oneOf(m.default.placements),eventsEnabled:d.default.bool,modifiers:d.default.object,children:d.default.oneOfType([d.default.node,d.default.func])},Popper.defaultProps={tag:"div",placement:"bottom",eventsEnabled:!0,modifiers:{}},t.default=Popper},function(e,t,n){var r,o;(function(i){"use strict";var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(i,f){"object"===a(t)&&"undefined"!=typeof e?e.exports=f():(r=f,o="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==o&&(e.exports=o)))}(void 0,function(){function e(e){var t=!1,n=0,r=document.createElement("span"),o=new MutationObserver(function(){e(),t=!1});return o.observe(r,{attributes:!0}),function(){t||(t=!0,r.setAttribute("x-index",n),n+=1)}}function t(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},pe))}}function n(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function r(e,t){Object.keys(t).forEach(function(r){var o="";["width","height","top","right","bottom","left"].indexOf(r)!==-1&&n(t[r])&&(o="px"),e.style[r]=t[r]+o})}function o(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function f(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function p(e){if(!e||["HTML","BODY","#document"].indexOf(e.nodeName)!==-1)return window.document.body;var t=a(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll)/.test(n+o+r)?e:p(f(e))}function s(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||e.firstElementChild.offsetParent===e)}function u(e){return null!==e.parentNode?u(e.parentNode):e}function l(e){var t=e&&e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?t:window.document.documentElement}function c(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return window.document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||r.contains(o))return s(a)?a:l(a);var f=u(e);return f.host?c(f.host,t):c(e,u(t).host)}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=window.document.documentElement,i=window.document.scrollingElement||o;return i[n]}return e[n]}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=d(t,"top"),o=d(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function m(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return+e["border"+n+"Width"].split("px")[0]+ +e["border"+r+"Width"].split("px")[0]}function v(e,t,n,r){return Math.max(t["offset"+e],n["client"+e],n["offset"+e],de()?n["offset"+e]+r["margin"+("Height"===e?"Top":"Left")]+r["margin"+("Height"===e?"Bottom":"Right")]:0)}function g(){var e=window.document.body,t=window.document.documentElement,n=de()&&window.getComputedStyle(t);return{height:v("Height",e,t,n),width:v("Width",e,t,n)}}function b(e){return ge({},e,{right:e.left+e.width,bottom:e.top+e.height})}function y(e){var t={};if(de())try{t=e.getBoundingClientRect();var n=d(e,"top"),r=d(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}catch(e){}else t=e.getBoundingClientRect();var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?g():{},f=i.width||e.clientWidth||o.right-o.left,p=i.height||e.clientHeight||o.bottom-o.top,s=e.offsetWidth-f,u=e.offsetHeight-p;if(s||u){var l=a(e);s-=m(l,"x"),u-=m(l,"y"),o.width-=s,o.height-=u}return b(o)}function w(e,t){var n=de(),r="HTML"===t.nodeName,o=y(e),i=y(t),f=p(e),s=b({top:o.top-i.top,left:o.left-i.left,width:o.width,height:o.height});if(r||"BODY"===t.nodeName){var u=a(t),l=n&&r?0:+u.borderTopWidth.split("px")[0],c=n&&r?0:+u.borderLeftWidth.split("px")[0],d=n&&r?0:+u.marginTop.split("px")[0],m=n&&r?0:+u.marginLeft.split("px")[0];s.top-=l-d,s.bottom-=l-d,s.left-=c-m,s.right-=c-m,s.marginTop=d,s.marginLeft=m}return(n?t.contains(f):t===f&&"BODY"!==f.nodeName)&&(s=h(s,t)),s}function O(e){var t=window.document.documentElement,n=w(e,t),r=Math.max(t.clientWidth,window.innerWidth||0),o=Math.max(t.clientHeight,window.innerHeight||0),i=d(t),a=d(t,"left"),f={top:i-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:r,height:o};return b(f)}function x(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===a(e,"position")||x(f(e)))}function _(e,t,n,r){var o={top:0,left:0},i=c(e,t);if("viewport"===r)o=O(i);else{var a=void 0;"scrollParent"===r?(a=p(f(e)),"BODY"===a.nodeName&&(a=window.document.documentElement)):a="window"===r?window.document.documentElement:r;var s=w(a,i);if("HTML"!==a.nodeName||x(i))o=s;else{var u=g(),l=u.height,d=u.width;o.top+=s.top-s.marginTop,o.bottom=l+s.top,o.left+=s.left-s.marginLeft,o.right=d+s.left}}return o.left+=n,o.top+=n,o.right-=n,o.bottom-=n,o}function E(e){var t=e.width,n=e.height;return t*n}function P(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var a=_(n,r,i,o),f={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},p=Object.keys(f).map(function(e){return ge({key:e},f[e],{area:E(f[e])})}).sort(function(e,t){return t.area-e.area}),s=p.filter(function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight}),u=s.length>0?s[0].key:p[0].key,l=e.split("-")[1];return u+(l?"-"+l:"")}function T(e,t,n){var r=c(t,n);return w(n,r)}function j(e){var t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),r=parseFloat(t.marginLeft)+parseFloat(t.marginRight),o={width:e.offsetWidth+r,height:e.offsetHeight+n};return o}function M(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function N(e,t,n){n=n.split("-")[0];var r=j(e),o={width:r.width,height:r.height},i=["right","left"].indexOf(n)!==-1,a=i?"top":"left",f=i?"left":"top",p=i?"height":"width",s=i?"width":"height";return o[a]=t[a]+t[p]/2-r[p]/2,n===f?o[f]=t[f]-r[s]:o[f]=t[M(f)],o}function C(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function L(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=C(e,function(e){return e[t]===n});return e.indexOf(r)}function S(e,t,n){var r=void 0===n?e:e.slice(0,L(e,"name",n));return r.forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&o(n)&&(t=n(t,e))}),t}function k(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=T(this.state,this.popper,this.reference),e.placement=P(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=N(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=S(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function R(e,t){return e.some(function(e){var n=e.name,r=e.enabled;return r&&n===t})}function A(e){for(var t=[!1,"ms","webkit","moz","o"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length-1;r++){var o=t[r],i=o?""+o+n:e;if("undefined"!=typeof window.document.body.style[i])return i}return null}function D(){return this.state.isDestroyed=!0,R(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[A("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function W(e,t,n,r){var o="BODY"===e.nodeName,i=o?window:e;i.addEventListener(t,n,{passive:!0}),o||W(p(i.parentNode),t,n,r),r.push(i)}function B(e,t,n,r){n.updateBound=r,window.addEventListener("resize",n.updateBound,{passive:!0});var o=p(e);return W(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function H(){this.state.eventsEnabled||(this.state=B(this.reference,this.options,this.state,this.scheduleUpdate))}function U(e,t){return window.removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function q(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=U(this.reference,this.state))}function F(e,t){Object.keys(t).forEach(function(n){var r=t[n];r!==!1?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function I(e,t){var n={position:e.offsets.popper.position},o={"x-placement":e.placement},i=Math.round(e.offsets.popper.left),a=Math.round(e.offsets.popper.top),f=A("transform");return t.gpuAcceleration&&f?(n[f]="translate3d("+i+"px, "+a+"px, 0)",n.top=0,n.left=0,n.willChange="transform"):(n.left=i,n.top=a,n.willChange="top, left"),r(e.instance.popper,ge({},n,e.styles)),F(e.instance.popper,ge({},o,e.attributes)),e.offsets.arrow&&r(e.arrowElement,e.offsets.arrow),e}function Y(e,t,n,r,o){var i=T(o,t,e),a=P(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),n}function K(e,t,n){var r=C(e,function(e){var n=e.name;return n===t}),o=!!r&&e.some(function(e){return e.name===n&&e.enabled&&e.order<r.order});if(!o){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}function z(e,t){if(!K(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(n=e.instance.popper.querySelector(n),!n)return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],o=b(e.offsets.popper),i=e.offsets.reference,a=["left","right"].indexOf(r)!==-1,f=a?"height":"width",p=a?"top":"left",s=a?"left":"top",u=a?"bottom":"right",l=j(n)[f];i[u]-l<o[p]&&(e.offsets.popper[p]-=o[p]-(i[u]-l)),i[p]+l>o[u]&&(e.offsets.popper[p]+=i[p]+l-o[u]);var c=i[p]+i[f]/2-l/2,d=c-b(e.offsets.popper)[p];return d=Math.max(Math.min(o[f]-l,d),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[p]=Math.floor(d),e.offsets.arrow[s]="",e}function G(e){return"end"===e?"start":"start"===e?"end":e}function V(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=ye.indexOf(e),r=ye.slice(n+1).concat(ye.slice(0,n));return t?r.reverse():r}function X(e,t){if(R(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=_(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),r=e.placement.split("-")[0],o=M(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case we.FLIP:a=[r,o];break;case we.CLOCKWISE:a=V(r);break;case we.COUNTERCLOCKWISE:a=V(r,!0);break;default:a=t.behavior}return a.forEach(function(f,p){if(r!==f||a.length===p+1)return e;r=e.placement.split("-")[0],o=M(r);var s=b(e.offsets.popper),u=e.offsets.reference,l=Math.floor,c="left"===r&&l(s.right)>l(u.left)||"right"===r&&l(s.left)<l(u.right)||"top"===r&&l(s.bottom)>l(u.top)||"bottom"===r&&l(s.top)<l(u.bottom),d=l(s.left)<l(n.left),h=l(s.right)>l(n.right),m=l(s.top)<l(n.top),v=l(s.bottom)>l(n.bottom),g="left"===r&&d||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,y=["top","bottom"].indexOf(r)!==-1,w=!!t.flipVariations&&(y&&"start"===i&&d||y&&"end"===i&&h||!y&&"start"===i&&m||!y&&"end"===i&&v);(c||g||w)&&(e.flipped=!0,(c||g)&&(r=a[p+1]),w&&(i=G(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=ge({},e.offsets.popper,N(e.instance.popper,e.offsets.reference,e.placement)),e=S(e.instance.modifiers,e,"flip"))}),e}function J(e){var t=b(e.offsets.popper),n=e.offsets.reference,r=e.placement.split("-")[0],o=Math.floor,i=["top","bottom"].indexOf(r)!==-1,a=i?"right":"bottom",f=i?"left":"top",p=i?"width":"height";return t[a]<o(n[f])&&(e.offsets.popper[f]=o(n[f])-t[p]),t[f]>o(n[a])&&(e.offsets.popper[f]=o(n[a])),e}function Q(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var f=void 0;switch(a){case"%p":f=n;break;case"%":case"%r":default:f=r}var p=b(f);return p[t]/100*i}if("vh"===a||"vw"===a){var s=void 0;return s="vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0),s/100*i}return i}function Z(e,t,r,o){var i=[0,0],a=["right","left"].indexOf(o)!==-1,f=e.split(/(\+|\-)/).map(function(e){return e.trim()}),p=f.indexOf(C(f,function(e){return e.search(/,|\s/)!==-1}));f[p]&&f[p].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var s=/\s*,\s*|\s+/,u=p!==-1?[f.slice(0,p).concat([f[p].split(s)[0]]),[f[p].split(s)[1]].concat(f.slice(p+1))]:[f];return u=u.map(function(e,n){var o=(1===n?!a:a)?"height":"width",i=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&["+","-"].indexOf(t)!==-1?(e[e.length-1]=t,i=!0,e):i?(e[e.length-1]+=t,i=!1,e):e.concat(t)},[]).map(function(e){return Q(e,o,t,r)})}),u.forEach(function(e,t){e.forEach(function(r,o){n(r)&&(i[t]+=r*("-"===e[o-1]?-1:1))})}),i}function $(e,t){var r=t.offset,o=e.placement,i=e.offsets,a=i.popper,f=i.reference,p=o.split("-")[0],s=void 0;return s=n(+r)?[+r,0]:Z(r,a,f,p),"left"===p?(a.top+=s[0],a.left-=s[1]):"right"===p?(a.top+=s[0],a.left+=s[1]):"top"===p?(a.left+=s[0],a.top-=s[1]):"bottom"===p&&(a.left+=s[0],a.top+=s[1]),e.popper=a,e}function ee(e,t){var n=t.boundariesElement||l(e.instance.popper),r=_(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=r;var o=t.priority,i=b(e.offsets.popper),a={primary:function(e){var n=i[e];return i[e]<r[e]&&!t.escapeWithReference&&(n=Math.max(i[e],r[e])),ve({},e,n)},secondary:function(e){var n="right"===e?"left":"top",o=i[n];return i[e]>r[e]&&!t.escapeWithReference&&(o=Math.min(i[n],r[e]-("right"===e?i.width:i.height))),ve({},n,o)}};return o.forEach(function(e){var t=["left","top"].indexOf(e)!==-1?"primary":"secondary";i=ge({},i,a[t](e))}),e.offsets.popper=i,e}function te(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets.reference,i=b(e.offsets.popper),a=["bottom","top"].indexOf(n)!==-1,f=a?"left":"top",p=a?"width":"height",s={start:ve({},f,o[f]),end:ve({},f,o[f]+o[p]-i[p])};e.offsets.popper=ge({},i,s[r])}return e}function ne(e){if(!K(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=C(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(e.hide===!0)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===!1)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function re(e){var t=e.placement,n=t.split("-")[0],r=b(e.offsets.popper),o=b(e.offsets.reference),i=["left","right"].indexOf(n)!==-1,a=["top","left"].indexOf(n)===-1;return r[i?"left":"top"]=o[t]-(a?r[i?"width":"height"]:0),e.placement=M(t),e.offsets.popper=b(r),e}for(var oe=["native code","[object MutationObserverConstructor]"],ie=function(e){return oe.some(function(t){return(e||"").toString().indexOf(t)>-1})},ae="undefined"!=typeof window,fe=["Edge","Trident","Firefox"],pe=0,se=0;se<fe.length;se+=1)if(ae&&navigator.userAgent.indexOf(fe[se])>=0){pe=1;break}var ue=ae&&ie(window.MutationObserver),le=ue?e:t,ce=void 0,de=function(){return void 0===ce&&(ce=navigator.appVersion.indexOf("MSIE 10")!==-1),ce},he=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},me=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ve=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},be=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ye=be.slice(3),we={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},Oe={shift:{order:100,enabled:!0,fn:te},offset:{order:200,enabled:!0,fn:$,offset:0},preventOverflow:{order:300,enabled:!0,fn:ee,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:J},arrow:{order:500,enabled:!0,fn:z,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:X,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:re},hide:{order:800,enabled:!0,fn:ne},applyStyle:{order:900,enabled:!0,fn:I,onLoad:Y,gpuAcceleration:!0}},xe={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Oe},Popper=function(){function Popper(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he(this,Popper),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=le(this.update.bind(this)),this.options=ge({},Popper.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e.jquery?e[0]:e,this.popper=t.jquery?t[0]:t,r(this.popper,{position:"absolute"}),this.options.modifiers={},Object.keys(ge({},Popper.Defaults.modifiers,i.modifiers)).forEach(function(e){n.options.modifiers[e]=ge({},Popper.Defaults.modifiers[e]||{},i.modifiers?i.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return ge({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&o(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return me(Popper,[{key:"update",value:function(){return k.call(this)}},{key:"destroy",value:function(){return D.call(this)}},{key:"enableEventListeners",value:function(){return H.call(this)}},{key:"disableEventListeners",value:function(){return q.call(this)}}]),Popper}();return Popper.Utils=("undefined"!=typeof window?window:i).PopperUtils,Popper.placements=be,Popper.Defaults=xe,Popper})}).call(t,function(){return this}())},function(e,t,n){/*!
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.ReactPopper=t(require("react"),require("prop-types")):e.ReactPopper=t(e.React,e.PropTypes)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Arrow=t.Popper=t.Target=t.Manager=void 0;var o=n(1),i=r(o),a=n(4),f=r(a),s=n(5),p=r(s),u=n(9),l=r(u);t.Manager=i.default,t.Target=f.default,t.Popper=p.default,t.Arrow=l.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(2),u=(r(p),n(3)),l=r(u),c=function(e){function t(){var e,n,r,o;i(this,t);for(var f=arguments.length,s=Array(f),p=0;p<f;p++)s[p]=arguments[p];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r._setTargetNode=function(e){r._targetNode=e},r._getTargetNode=function(){return r._targetNode},o=n,a(r,o)}return f(t,e),s(t,[{key:"getChildContext",value:function(){return{popperManager:{setTargetNode:this._setTargetNode,getTargetNode:this._getTargetNode}}}},{key:"render",value:function(){var e=this.props,t=e.tag,n=e.children,r=o(e,["tag","children"]);return t!==!1?(0,p.createElement)(t,r,n):n}}]),t}(p.Component);c.childContextTypes={popperManager:l.default.object.isRequired},c.propTypes={tag:l.default.oneOfType([l.default.string,l.default.bool])},c.defaultProps={tag:"div"},t.default=c},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(2),f=(r(a),n(3)),s=r(f),p=function(e,t){var n=e.tag,r=void 0===n?"div":n,f=e.innerRef,s=e.children,p=o(e,["tag","innerRef","children"]),u=t.popperManager,l=function(e){u.setTargetNode(e),"function"==typeof f&&f(e)};if("function"==typeof s){var c={ref:l};return s({targetProps:c,restProps:p})}return(0,a.createElement)(r,i({ref:l},p),s)};p.contextTypes={popperManager:s.default.object.isRequired},p.propTypes={tag:s.default.string,innerRef:s.default.func,children:s.default.oneOfType([s.default.node,s.default.func])},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(2),c=(r(l),n(3)),d=r(c),h=n(6),m=r(h),v=n(7),g=r(v),Popper=function(e){function Popper(){var e,t,n,r;a(this,Popper);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return t=n=f(this,(e=Popper.__proto__||Object.getPrototypeOf(Popper)).call.apply(e,[this].concat(i))),n.state={},n._setArrowNode=function(e){n._arrowNode=e},n._getTargetNode=function(){return n.context.popperManager.getTargetNode()},n._updateStateModifier={enabled:!0,order:900,fn:function(e){return(n.state.data&&!(0,g.default)(e.offsets,n.state.data.offsets)||!n.state.data)&&n.setState({data:e}),e}},n._getPopperStyle=function(){var e=n.state.data;if(!n._popper||!e)return{position:"absolute",pointerEvents:"none",opacity:0};var t=e.offsets.popper,r=(t.top,t.left,t.position);return p({position:r},e.styles)},n._getPopperPlacement=function(){return n.state.data?n.state.data.placement:void 0},n._getArrowStyle=function(){if(n.state.data&&n.state.data.offsets.arrow){var e=n.state.data.offsets.arrow,t=e.top,r=e.left;return r?{left:+r}:{top:+t}}return{}},r=t,f(n,r)}return s(Popper,e),u(Popper,[{key:"getChildContext",value:function(){return{popper:{setArrowNode:this._setArrowNode,getArrowStyle:this._getArrowStyle}}}},{key:"componentDidMount",value:function(){this._updatePopper()}},{key:"componentDidUpdate",value:function(e){e.placement===this.props.placement&&e.eventsEnabled===this.props.eventsEnabled||this._updatePopper(),e.children!==this.props.children&&this._popper.scheduleUpdate()}},{key:"componentWillUnmount",value:function(){this._destroyPopper()}},{key:"_updatePopper",value:function(){this._destroyPopper(),this._node&&this._createPopper()}},{key:"_createPopper",value:function(){var e=this.props,t=e.placement,n=e.eventsEnabled,r=p({},this.props.modifiers,{applyStyle:{enabled:!1},updateState:this._updateStateModifier});this._arrowNode&&(r.arrow={element:this._arrowNode}),this._popper=new m.default(this._getTargetNode(),this._node,{placement:t,eventsEnabled:n,modifiers:r}),this._popper.scheduleUpdate()}},{key:"_destroyPopper",value:function(){this._popper&&this._popper.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.tag,r=t.innerRef,a=(t.placement,t.eventsEnabled,t.modifiers,t.children),f=i(t,["tag","innerRef","placement","eventsEnabled","modifiers","children"]),s=function(t){e._node=t,"function"==typeof r&&r(t)},u=this._getPopperStyle(),c=this._getPopperPlacement();if("function"==typeof a){var d=o({ref:s,style:u},"data-placement",c);return a({popperProps:d,restProps:f,scheduleUpdate:this._popper&&this._popper.scheduleUpdate})}return(0,l.createElement)(n,p({},f,{ref:s,style:p({},f.style,u),"data-placement":c}),a)}}]),Popper}(l.Component);Popper.contextTypes={popperManager:d.default.object.isRequired},Popper.childContextTypes={popper:d.default.object.isRequired},Popper.propTypes={tag:d.default.string,innerRef:d.default.func,placement:d.default.oneOf(m.default.placements),eventsEnabled:d.default.bool,modifiers:d.default.object,children:d.default.oneOfType([d.default.node,d.default.func])},Popper.defaultProps={tag:"div",placement:"bottom",eventsEnabled:!0,modifiers:{}},t.default=Popper},function(e,t,n){var r,o;(function(i){"use strict";var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(i,f){"object"===a(t)&&"undefined"!=typeof e?e.exports=f():(r=f,o="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==o&&(e.exports=o)))}(void 0,function(){function e(e){var t=!1,n=0,r=document.createElement("span"),o=new MutationObserver(function(){e(),t=!1});return o.observe(r,{attributes:!0}),function(){t||(t=!0,r.setAttribute("x-index",n),n+=1)}}function t(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},se))}}function n(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function r(e,t){Object.keys(t).forEach(function(r){var o="";["width","height","top","right","bottom","left"].indexOf(r)!==-1&&n(t[r])&&(o="px"),e.style[r]=t[r]+o})}function o(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function f(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function s(e){if(!e||["HTML","BODY","#document"].indexOf(e.nodeName)!==-1)return window.document.body;var t=a(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll)/.test(n+o+r)?e:s(f(e))}function p(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||e.firstElementChild.offsetParent===e)}function u(e){return null!==e.parentNode?u(e.parentNode):e}function l(e){var t=e&&e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?t:window.document.documentElement}function c(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return window.document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||r.contains(o))return p(a)?a:l(a);var f=u(e);return f.host?c(f.host,t):c(e,u(t).host)}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=window.document.documentElement,i=window.document.scrollingElement||o;return i[n]}return e[n]}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=d(t,"top"),o=d(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function m(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return+e["border"+n+"Width"].split("px")[0]+ +e["border"+r+"Width"].split("px")[0]}function v(e,t,n,r){return Math.max(t["offset"+e],n["client"+e],n["offset"+e],de()?n["offset"+e]+r["margin"+("Height"===e?"Top":"Left")]+r["margin"+("Height"===e?"Bottom":"Right")]:0)}function g(){var e=window.document.body,t=window.document.documentElement,n=de()&&window.getComputedStyle(t);return{height:v("Height",e,t,n),width:v("Width",e,t,n)}}function b(e){return ge({},e,{right:e.left+e.width,bottom:e.top+e.height})}function y(e){var t={};if(de())try{t=e.getBoundingClientRect();var n=d(e,"top"),r=d(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}catch(e){}else t=e.getBoundingClientRect();var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?g():{},f=i.width||e.clientWidth||o.right-o.left,s=i.height||e.clientHeight||o.bottom-o.top,p=e.offsetWidth-f,u=e.offsetHeight-s;if(p||u){var l=a(e);p-=m(l,"x"),u-=m(l,"y"),o.width-=p,o.height-=u}return b(o)}function w(e,t){var n=de(),r="HTML"===t.nodeName,o=y(e),i=y(t),f=s(e),p=b({top:o.top-i.top,left:o.left-i.left,width:o.width,height:o.height});if(r||"BODY"===t.nodeName){var u=a(t),l=n&&r?0:+u.borderTopWidth.split("px")[0],c=n&&r?0:+u.borderLeftWidth.split("px")[0],d=n&&r?0:+u.marginTop.split("px")[0],m=n&&r?0:+u.marginLeft.split("px")[0];p.top-=l-d,p.bottom-=l-d,p.left-=c-m,p.right-=c-m,p.marginTop=d,p.marginLeft=m}return(n?t.contains(f):t===f&&"BODY"!==f.nodeName)&&(p=h(p,t)),p}function O(e){var t=window.document.documentElement,n=w(e,t),r=Math.max(t.clientWidth,window.innerWidth||0),o=Math.max(t.clientHeight,window.innerHeight||0),i=d(t),a=d(t,"left"),f={top:i-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:r,height:o};return b(f)}function x(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===a(e,"position")||x(f(e)))}function _(e,t,n,r){var o={top:0,left:0},i=c(e,t);if("viewport"===r)o=O(i);else{var a=void 0;"scrollParent"===r?(a=s(f(e)),"BODY"===a.nodeName&&(a=window.document.documentElement)):a="window"===r?window.document.documentElement:r;var p=w(a,i);if("HTML"!==a.nodeName||x(i))o=p;else{var u=g(),l=u.height,d=u.width;o.top+=p.top-p.marginTop,o.bottom=l+p.top,o.left+=p.left-p.marginLeft,o.right=d+p.left}}return o.left+=n,o.top+=n,o.right-=n,o.bottom-=n,o}function E(e){var t=e.width,n=e.height;return t*n}function P(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var a=_(n,r,i,o),f={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},s=Object.keys(f).map(function(e){return ge({key:e},f[e],{area:E(f[e])})}).sort(function(e,t){return t.area-e.area}),p=s.filter(function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight}),u=p.length>0?p[0].key:s[0].key,l=e.split("-")[1];return u+(l?"-"+l:"")}function T(e,t,n){var r=c(t,n);return w(n,r)}function j(e){var t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),r=parseFloat(t.marginLeft)+parseFloat(t.marginRight),o={width:e.offsetWidth+r,height:e.offsetHeight+n};return o}function M(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function N(e,t,n){n=n.split("-")[0];var r=j(e),o={width:r.width,height:r.height},i=["right","left"].indexOf(n)!==-1,a=i?"top":"left",f=i?"left":"top",s=i?"height":"width",p=i?"width":"height";return o[a]=t[a]+t[s]/2-r[s]/2,n===f?o[f]=t[f]-r[p]:o[f]=t[M(f)],o}function C(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function L(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=C(e,function(e){return e[t]===n});return e.indexOf(r)}function S(e,t,n){var r=void 0===n?e:e.slice(0,L(e,"name",n));return r.forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&o(n)&&(t=n(t,e))}),t}function k(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=T(this.state,this.popper,this.reference),e.placement=P(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=N(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=S(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function R(e,t){return e.some(function(e){var n=e.name,r=e.enabled;return r&&n===t})}function A(e){for(var t=[!1,"ms","webkit","moz","o"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length-1;r++){var o=t[r],i=o?""+o+n:e;if("undefined"!=typeof window.document.body.style[i])return i}return null}function D(){return this.state.isDestroyed=!0,R(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[A("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function W(e,t,n,r){var o="BODY"===e.nodeName,i=o?window:e;i.addEventListener(t,n,{passive:!0}),o||W(s(i.parentNode),t,n,r),r.push(i)}function B(e,t,n,r){n.updateBound=r,window.addEventListener("resize",n.updateBound,{passive:!0});var o=s(e);return W(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function H(){this.state.eventsEnabled||(this.state=B(this.reference,this.options,this.state,this.scheduleUpdate))}function U(e,t){return window.removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function q(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=U(this.reference,this.state))}function F(e,t){Object.keys(t).forEach(function(n){var r=t[n];r!==!1?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function I(e,t){var n={position:e.offsets.popper.position},o={"x-placement":e.placement},i=Math.round(e.offsets.popper.left),a=Math.round(e.offsets.popper.top),f=A("transform");return t.gpuAcceleration&&f?(n[f]="translate3d("+i+"px, "+a+"px, 0)",n.top=0,n.left=0,n.willChange="transform"):(n.left=i,n.top=a,n.willChange="top, left"),r(e.instance.popper,ge({},n,e.styles)),F(e.instance.popper,ge({},o,e.attributes)),e.offsets.arrow&&r(e.arrowElement,e.offsets.arrow),e}function Y(e,t,n,r,o){var i=T(o,t,e),a=P(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),n}function K(e,t,n){var r=C(e,function(e){var n=e.name;return n===t}),o=!!r&&e.some(function(e){return e.name===n&&e.enabled&&e.order<r.order});if(!o){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}function z(e,t){if(!K(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(n=e.instance.popper.querySelector(n),!n)return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],o=b(e.offsets.popper),i=e.offsets.reference,a=["left","right"].indexOf(r)!==-1,f=a?"height":"width",s=a?"top":"left",p=a?"left":"top",u=a?"bottom":"right",l=j(n)[f];i[u]-l<o[s]&&(e.offsets.popper[s]-=o[s]-(i[u]-l)),i[s]+l>o[u]&&(e.offsets.popper[s]+=i[s]+l-o[u]);var c=i[s]+i[f]/2-l/2,d=c-b(e.offsets.popper)[s];return d=Math.max(Math.min(o[f]-l,d),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[s]=Math.floor(d),e.offsets.arrow[p]="",e}function G(e){return"end"===e?"start":"start"===e?"end":e}function V(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=ye.indexOf(e),r=ye.slice(n+1).concat(ye.slice(0,n));return t?r.reverse():r}function X(e,t){if(R(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=_(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),r=e.placement.split("-")[0],o=M(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case we.FLIP:a=[r,o];break;case we.CLOCKWISE:a=V(r);break;case we.COUNTERCLOCKWISE:a=V(r,!0);break;default:a=t.behavior}return a.forEach(function(f,s){if(r!==f||a.length===s+1)return e;r=e.placement.split("-")[0],o=M(r);var p=b(e.offsets.popper),u=e.offsets.reference,l=Math.floor,c="left"===r&&l(p.right)>l(u.left)||"right"===r&&l(p.left)<l(u.right)||"top"===r&&l(p.bottom)>l(u.top)||"bottom"===r&&l(p.top)<l(u.bottom),d=l(p.left)<l(n.left),h=l(p.right)>l(n.right),m=l(p.top)<l(n.top),v=l(p.bottom)>l(n.bottom),g="left"===r&&d||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,y=["top","bottom"].indexOf(r)!==-1,w=!!t.flipVariations&&(y&&"start"===i&&d||y&&"end"===i&&h||!y&&"start"===i&&m||!y&&"end"===i&&v);(c||g||w)&&(e.flipped=!0,(c||g)&&(r=a[s+1]),w&&(i=G(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=ge({},e.offsets.popper,N(e.instance.popper,e.offsets.reference,e.placement)),e=S(e.instance.modifiers,e,"flip"))}),e}function J(e){var t=b(e.offsets.popper),n=e.offsets.reference,r=e.placement.split("-")[0],o=Math.floor,i=["top","bottom"].indexOf(r)!==-1,a=i?"right":"bottom",f=i?"left":"top",s=i?"width":"height";return t[a]<o(n[f])&&(e.offsets.popper[f]=o(n[f])-t[s]),t[f]>o(n[a])&&(e.offsets.popper[f]=o(n[a])),e}function Q(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var f=void 0;switch(a){case"%p":f=n;break;case"%":case"%r":default:f=r}var s=b(f);return s[t]/100*i}if("vh"===a||"vw"===a){var p=void 0;return p="vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0),p/100*i}return i}function Z(e,t,r,o){var i=[0,0],a=["right","left"].indexOf(o)!==-1,f=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=f.indexOf(C(f,function(e){return e.search(/,|\s/)!==-1}));f[s]&&f[s].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var p=/\s*,\s*|\s+/,u=s!==-1?[f.slice(0,s).concat([f[s].split(p)[0]]),[f[s].split(p)[1]].concat(f.slice(s+1))]:[f];return u=u.map(function(e,n){var o=(1===n?!a:a)?"height":"width",i=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&["+","-"].indexOf(t)!==-1?(e[e.length-1]=t,i=!0,e):i?(e[e.length-1]+=t,i=!1,e):e.concat(t)},[]).map(function(e){return Q(e,o,t,r)})}),u.forEach(function(e,t){e.forEach(function(r,o){n(r)&&(i[t]+=r*("-"===e[o-1]?-1:1))})}),i}function $(e,t){var r=t.offset,o=e.placement,i=e.offsets,a=i.popper,f=i.reference,s=o.split("-")[0],p=void 0;return p=n(+r)?[+r,0]:Z(r,a,f,s),"left"===s?(a.top+=p[0],a.left-=p[1]):"right"===s?(a.top+=p[0],a.left+=p[1]):"top"===s?(a.left+=p[0],a.top-=p[1]):"bottom"===s&&(a.left+=p[0],a.top+=p[1]),e.popper=a,e}function ee(e,t){var n=t.boundariesElement||l(e.instance.popper),r=_(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=r;var o=t.priority,i=b(e.offsets.popper),a={primary:function(e){var n=i[e];return i[e]<r[e]&&!t.escapeWithReference&&(n=Math.max(i[e],r[e])),ve({},e,n)},secondary:function(e){var n="right"===e?"left":"top",o=i[n];return i[e]>r[e]&&!t.escapeWithReference&&(o=Math.min(i[n],r[e]-("right"===e?i.width:i.height))),ve({},n,o)}};return o.forEach(function(e){var t=["left","top"].indexOf(e)!==-1?"primary":"secondary";i=ge({},i,a[t](e))}),e.offsets.popper=i,e}function te(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets.reference,i=b(e.offsets.popper),a=["bottom","top"].indexOf(n)!==-1,f=a?"left":"top",s=a?"width":"height",p={start:ve({},f,o[f]),end:ve({},f,o[f]+o[s]-i[s])};e.offsets.popper=ge({},i,p[r])}return e}function ne(e){if(!K(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=C(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(e.hide===!0)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===!1)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function re(e){var t=e.placement,n=t.split("-")[0],r=b(e.offsets.popper),o=b(e.offsets.reference),i=["left","right"].indexOf(n)!==-1,a=["top","left"].indexOf(n)===-1;return r[i?"left":"top"]=o[t]-(a?r[i?"width":"height"]:0),e.placement=M(t),e.offsets.popper=b(r),e}for(var oe=["native code","[object MutationObserverConstructor]"],ie=function(e){return oe.some(function(t){return(e||"").toString().indexOf(t)>-1})},ae="undefined"!=typeof window,fe=["Edge","Trident","Firefox"],se=0,pe=0;pe<fe.length;pe+=1)if(ae&&navigator.userAgent.indexOf(fe[pe])>=0){se=1;break}var ue=ae&&ie(window.MutationObserver),le=ue?e:t,ce=void 0,de=function(){return void 0===ce&&(ce=navigator.appVersion.indexOf("MSIE 10")!==-1),ce},he=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},me=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ve=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},be=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ye=be.slice(3),we={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},Oe={shift:{order:100,enabled:!0,fn:te},offset:{order:200,enabled:!0,fn:$,offset:0},preventOverflow:{order:300,enabled:!0,fn:ee,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:J},arrow:{order:500,enabled:!0,fn:z,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:X,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:re},hide:{order:800,enabled:!0,fn:ne},applyStyle:{order:900,enabled:!0,fn:I,onLoad:Y,gpuAcceleration:!0}},xe={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Oe},Popper=function(){function Popper(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he(this,Popper),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=le(this.update.bind(this)),this.options=ge({},Popper.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e.jquery?e[0]:e,this.popper=t.jquery?t[0]:t,r(this.popper,{position:"absolute"}),this.options.modifiers={},Object.keys(ge({},Popper.Defaults.modifiers,i.modifiers)).forEach(function(e){n.options.modifiers[e]=ge({},Popper.Defaults.modifiers[e]||{},i.modifiers?i.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return ge({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&o(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return me(Popper,[{key:"update",value:function(){return k.call(this)}},{key:"destroy",value:function(){return D.call(this)}},{key:"enableEventListeners",value:function(){return H.call(this)}},{key:"disableEventListeners",value:function(){return q.call(this)}}]),Popper}();return Popper.Utils=("undefined"!=typeof window?window:i).PopperUtils,Popper.placements=be,Popper.Defaults=xe,Popper})}).call(t,function(){return this}())},function(e,t,n){/*!
* is-equal-shallow <https://github.com/jonschlinkert/is-equal-shallow>

@@ -18,2 +18,2 @@ *

*/
"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(e){return null==e||"function"!=typeof e&&"object"!==("undefined"==typeof e?"undefined":n(e))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(2),f=(r(a),n(3)),p=r(f),s=function(e,t){var n=e.tag,r=void 0===n?"span":n,f=e.innerRef,p=e.children,s=o(e,["tag","innerRef","children"]),u=t.popper,l=function(e){u.setArrowNode(e),"function"==typeof f&&f(e)},c=u.getArrowStyle();if("function"==typeof p){var d={ref:l,style:c};return p({arrowProps:d,restProps:s})}return(0,a.createElement)(r,i({},s,{ref:l,style:i({},c,s.style)}),p)};s.contextTypes={popper:p.default.object.isRequired},s.propTypes={tag:p.default.string,innerRef:p.default.func,children:p.default.oneOfType([p.default.node,p.default.func])},t.default=s}])});
"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(e){return null==e||"function"!=typeof e&&"object"!==("undefined"==typeof e?"undefined":n(e))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(2),f=(r(a),n(3)),s=r(f),p=function(e,t){var n=e.tag,r=void 0===n?"span":n,f=e.innerRef,s=e.children,p=o(e,["tag","innerRef","children"]),u=t.popper,l=function(e){u.setArrowNode(e),"function"==typeof f&&f(e)},c=u.getArrowStyle();if("function"==typeof s){var d={ref:l,style:c};return s({arrowProps:d,restProps:p})}return(0,a.createElement)(r,i({},p,{ref:l,style:i({},c,p.style)}),s)};p.contextTypes={popper:s.default.object.isRequired},p.propTypes={tag:s.default.string,innerRef:s.default.func,children:s.default.oneOfType([s.default.node,s.default.func])},t.default=p}])});

@@ -91,7 +91,3 @@ 'use strict';

return _extends({
position: position,
top: 0,
left: 0,
transform: 'translate3d(' + Math.round(left) + 'px, ' + Math.round(top) + 'px, 0px)',
willChange: 'transform'
position: position
}, data.styles);

@@ -98,0 +94,0 @@ }, _this._getPopperPlacement = function () {

{
"name": "react-popper",
"version": "0.6.6",
"version": "0.6.7",
"description": "React wrapper around PopperJS.",

@@ -43,3 +43,3 @@ "main": "lib/react-popper.js",

"is-equal-shallow": "^0.1.3",
"popper.js": "^1.9.9",
"popper.js": "^1.10.1",
"prop-types": "^15.5.10"

@@ -46,0 +46,0 @@ },

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc