react-reflex
Advanced tools
Comparing version 4.0.9 to 4.0.11
@@ -285,11 +285,13 @@ "use strict"; | ||
value: function getSize(element) { | ||
var domElement = element.ref.current; | ||
var _ref, _ref2; | ||
var domElement = element === null || element === void 0 ? void 0 : element.ref.current; | ||
switch (this.props.orientation) { | ||
case 'horizontal': | ||
return domElement.offsetHeight; | ||
return (_ref = domElement === null || domElement === void 0 ? void 0 : domElement.offsetHeight) !== null && _ref !== void 0 ? _ref : 0; | ||
case 'vertical': | ||
default: | ||
return domElement.offsetWidth; | ||
return (_ref2 = domElement === null || domElement === void 0 ? void 0 : domElement.offsetWidth) !== null && _ref2 !== void 0 ? _ref2 : 0; | ||
} | ||
@@ -424,6 +426,8 @@ } ///////////////////////////////////////////////////////// | ||
value: function computeAvailableStretch(idx, offset) { | ||
var _ref3; | ||
var childIdx = offset < 0 ? idx + 1 : idx - 1; | ||
var child = this.children[childIdx]; | ||
var size = this.getSize(child); | ||
var maxSize = child.props.maxSize; | ||
var maxSize = (_ref3 = child === null || child === void 0 ? void 0 : child.props.maxSize) !== null && _ref3 !== void 0 ? _ref3 : 0; | ||
var availableStretch = maxSize - size; | ||
@@ -448,6 +452,8 @@ | ||
value: function computeAvailableShrink(idx, offset) { | ||
var _ref4; | ||
var childIdx = offset > 0 ? idx + 1 : idx - 1; | ||
var child = this.children[childIdx]; | ||
var size = this.getSize(child); | ||
var minSize = Math.max(child.props.minSize, 0); | ||
var minSize = Math.max((_ref4 = child === null || child === void 0 ? void 0 : child.props.minSize) !== null && _ref4 !== void 0 ? _ref4 : 0, 0); | ||
var availableShrink = size - minSize; | ||
@@ -454,0 +460,0 @@ |
@@ -232,11 +232,13 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
getSize(element) { | ||
const domElement = element.ref.current; | ||
var _ref, _ref2; | ||
const domElement = element === null || element === void 0 ? void 0 : element.ref.current; | ||
switch (this.props.orientation) { | ||
case 'horizontal': | ||
return domElement.offsetHeight; | ||
return (_ref = domElement === null || domElement === void 0 ? void 0 : domElement.offsetHeight) !== null && _ref !== void 0 ? _ref : 0; | ||
case 'vertical': | ||
default: | ||
return domElement.offsetWidth; | ||
return (_ref2 = domElement === null || domElement === void 0 ? void 0 : domElement.offsetWidth) !== null && _ref2 !== void 0 ? _ref2 : 0; | ||
} | ||
@@ -361,6 +363,8 @@ } ///////////////////////////////////////////////////////// | ||
computeAvailableStretch(idx, offset) { | ||
var _ref3; | ||
const childIdx = offset < 0 ? idx + 1 : idx - 1; | ||
const child = this.children[childIdx]; | ||
const size = this.getSize(child); | ||
const maxSize = child.props.maxSize; | ||
const maxSize = (_ref3 = child === null || child === void 0 ? void 0 : child.props.maxSize) !== null && _ref3 !== void 0 ? _ref3 : 0; | ||
const availableStretch = maxSize - size; | ||
@@ -384,6 +388,8 @@ | ||
computeAvailableShrink(idx, offset) { | ||
var _ref4; | ||
const childIdx = offset > 0 ? idx + 1 : idx - 1; | ||
const child = this.children[childIdx]; | ||
const size = this.getSize(child); | ||
const minSize = Math.max(child.props.minSize, 0); | ||
const minSize = Math.max((_ref4 = child === null || child === void 0 ? void 0 : child.props.minSize) !== null && _ref4 !== void 0 ? _ref4 : 0, 0); | ||
const availableShrink = size - minSize; | ||
@@ -390,0 +396,0 @@ |
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports["react-reflex"]=t(require("react")):e["react-reflex"]=t(e.React)}(window,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){e.exports=n(24)()},function(t,n){t.exports=e},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){function n(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)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(19),i=n(20),o=n(21);e.exports=function(e){return r(e)||i(e)||o()}},function(e,t,n){var r=n(3);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(22),i=n(0);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(23);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){e.exports=n(27)},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=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},i=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}}(),o=n(2),s=(f(o),f(n(1))),a=f(n(30)),u=f(n(31)),c=f(n(32));function f(e){return e&&e.__esModule?e:{default:e}}function l(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}t.default=function(e){return function(t){var n,f;return f=n=function(n){function s(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=l(this,(t=s.__proto__||Object.getPrototypeOf(s)).call.apply(t,[this].concat(o))),r.state={contentRect:{entry:{},client:{},offset:{},scroll:{},bounds:{},margin:{}}},r.measure=function(t){var n=(0,c.default)(r._node,e||(0,u.default)(r.props));t&&(n.entry=t[0].contentRect),r.setState({contentRect:n}),"function"==typeof r.props.onResize&&r.props.onResize(n)},r._handleRef=function(e){r._resizeObserver&&(e?r._resizeObserver.observe(e):r._resizeObserver.disconnect(r._node)),r._node=e,"function"==typeof r.props.innerRef&&r.props.innerRef(e)},l(r,n)}return function(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)}(s,o.Component),i(s,[{key:"componentWillMount",value:function(){this._resizeObserver=new a.default(this.measure)}},{key:"componentWillUnmount",value:function(){this._resizeObserver&&this._node&&this._resizeObserver.disconnect(this._node),this._resizeObserver=null}},{key:"render",value:function(){var e=this.props,n=(e.innerRef,e.onResize,function(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}(e,["innerRef","onResize"]));return(0,o.createElement)(t,r({},n,{measureRef:this._handleRef,measure:this.measure,contentRect:this.state.contentRect}))}}]),s}(),n.propTypes={client:s.default.bool,offset:s.default.bool,scroll:s.default.bool,bounds:s.default.bool,margin:s.default.bool,innerRef:s.default.func,onResize:s.default.func},f}}},function(e,t){function n(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise(function(i,o){var s=e.apply(t,r);function a(e){n(s,i,o,a,u,"next",e)}function u(e){n(s,i,o,a,u,"throw",e)}a(void 0)})}}},function(e,t,n){(function(t){var n="Expected a function",r=NaN,i="[object Symbol]",o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt,f="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,h=f||l||Function("return this")(),p=Object.prototype.toString,d=Math.max,v=Math.min,m=function(){return h.Date.now()};function y(e,t,r){var i,o,s,a,u,c,f=0,l=!1,h=!1,p=!0;if("function"!=typeof e)throw new TypeError(n);function y(t){var n=i,r=o;return i=o=void 0,f=t,a=e.apply(r,n)}function w(e){var n=e-c;return void 0===c||n>=t||n<0||h&&e-f>=s}function x(){var e=m();if(w(e))return _(e);u=setTimeout(x,function(e){var n=t-(e-c);return h?v(n,s-(e-f)):n}(e))}function _(e){return u=void 0,p&&i?y(e):(i=o=void 0,a)}function O(){var e=m(),n=w(e);if(i=arguments,o=this,c=e,n){if(void 0===u)return function(e){return f=e,u=setTimeout(x,t),l?y(e):a}(c);if(h)return u=setTimeout(x,t),y(c)}return void 0===u&&(u=setTimeout(x,t)),a}return t=g(t)||0,b(r)&&(l=!!r.leading,s=(h="maxWait"in r)?d(g(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p),O.cancel=function(){void 0!==u&&clearTimeout(u),f=0,i=c=o=u=void 0},O.flush=function(){return void 0===u?a:_(m())},O}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&p.call(e)==i}(e))return r;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):s.test(e)?r:+e}e.exports=function(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(n);return b(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),y(e,t,{leading:i,maxWait:t,trailing:o})}}).call(this,n(13))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withContentRect=t.default=void 0;var r=o(n(29)),i=o(n(14));function o(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,t.withContentRect=i.default},function(e,t,n){e.exports=n(33)},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t){function n(e){return(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)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(25);function i(){}e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var a=new Error("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");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=i,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return!1;var i=0|t,o=Math.max(i>=0?i:r-Math.abs(i),0);function s(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}for(;o<r;){if(s(n[o],e))return!0;o++}return!1}}),Math.sign||(Math.sign=function(e){return(e>0)-(e<0)||+e})},function(e,t,n){var r=function(){return this||"object"==typeof self&&self}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(28),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",c="object"==typeof e,f=t.regeneratorRuntime;if(f)c&&(e.exports=f);else{(f=t.regeneratorRuntime=c?e.exports:{}).wrap=w;var l="suspendedStart",h="suspendedYield",p="executing",d="completed",v={},m={};m[s]=function(){return this};var y=Object.getPrototypeOf,b=y&&y(y(A([])));b&&b!==r&&i.call(b,s)&&(m=b);var g=E.prototype=_.prototype=Object.create(m);O.prototype=g.constructor=E,E.constructor=O,E[u]=O.displayName="GeneratorFunction",f.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===O||"GeneratorFunction"===(t.displayName||t.name))},f.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(g),e},f.awrap=function(e){return{__await:e}},z(R.prototype),R.prototype[a]=function(){return this},f.AsyncIterator=R,f.async=function(e,t,n,r){var i=new R(w(e,t,n,r));return f.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},z(g),g[u]="Generator",g[s]=function(){return this},g.toString=function(){return"[object Generator]"},f.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},f.values=A,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,i){return a.type="throw",a.arg=e,t.next=r,i&&(t.method="next",t.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var u=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function w(e,t,n,r){var i=t&&t.prototype instanceof _?t:_,o=Object.create(i.prototype),s=new j(r||[]);return o._invoke=function(e,t,n){var r=l;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=M(s,n);if(a){if(a===v)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=x(e,t,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(e,n,s),o}function x(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function _(){}function O(){}function E(){}function z(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function R(e){var t;this._invoke=function(n,r){function o(){return new Promise(function(t,o){!function t(n,r,o,s){var a=x(e[n],e,r);if("throw"!==a.type){var u=a.arg,c=u.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,o,s)},function(e){t("throw",e,o,s)}):Promise.resolve(c).then(function(e){u.value=e,o(u)},function(e){return t("throw",e,o,s)})}s(a.arg)}(n,r,t,o)})}return t=t?t.then(o,o):o()}}function M(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,M(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=x(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,v;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,v):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function A(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=n,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:n,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});i(n(2));var r=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}var o=(0,i(n(14)).default)()(function(e){var t=e.measure,n=e.measureRef,r=e.contentRect;return(0,e.children)({measure:t,measureRef:n,contentRect:r})});o.displayName="Measure",o.propTypes.children=r.default.func,t.default=o},function(e,t,n){"use strict";n.r(t),function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];e.call(t,i[1],i[0])}},Object.defineProperties(t.prototype,n),t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},s=2,a=["top","right","bottom","left","width","height","size","weight"],u="undefined"!=typeof MutationObserver,c=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&c()}function u(){o(a)}function c(){var e=Date.now();if(n){if(e-i<s)return;r=!0}else n=!0,r=!1,setTimeout(u,t);i=e}return c}(this.refresh.bind(this),20)};c.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},c.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},c.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},c.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},c.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},c.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},c.prototype.onTransitionEnd_=function(e){var t=e.propertyName;void 0===t&&(t=""),a.some(function(e){return!!~t.indexOf(e)})&&this.refresh()},c.getInstance=function(){return this.instance_||(this.instance_=new c),this.instance_},c.instance_=null;var f=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n+=1){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},l=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},h=b(0,0,0,0);function p(e){return parseFloat(e)||0}function d(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return t.reduce(function(t,n){return t+p(e["border-"+n+"-width"])},0)}function v(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return h;var r=l(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=e["padding-"+i];t[i]=p(o)}return t}(r),o=i.left+i.right,s=i.top+i.bottom,a=p(r.width),u=p(r.height);if("border-box"===r.boxSizing&&(Math.round(a+o)!==t&&(a-=d(r,"left","right")+o),Math.round(u+s)!==n&&(u-=d(r,"top","bottom")+s)),!function(e){return e===l(e).document.documentElement}(e)){var c=Math.round(a+o)-t,f=Math.round(u+s)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(f)&&(u-=f)}return b(i.left,i.top,a,u)}var m="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof l(e).SVGGraphicsElement}:function(e){return e instanceof l(e).SVGElement&&"function"==typeof e.getBBox};function y(e){return r?m(e)?function(e){var t=e.getBBox();return b(0,0,t.width,t.height)}(e):v(e):h}function b(e,t,n,r){return{x:e,y:t,width:n,height:r}}var g=function(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=b(0,0,0,0),this.target=e};g.prototype.isActive=function(){var e=y(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},g.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var w=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(o.prototype);return f(s,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),s}(t);f(this,{target:e,contentRect:n})},x=function(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r};x.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof l(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new g(e)),this.controller_.addObserver(this),this.controller_.refresh())}},x.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof l(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},x.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},x.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},x.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new w(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},x.prototype.clearActive=function(){this.activeObservations_.splice(0)},x.prototype.hasActive=function(){return this.activeObservations_.length>0};var _="undefined"!=typeof WeakMap?new WeakMap:new n,O=function(e){if(!(this instanceof O))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=c.getInstance(),n=new x(e,t,this);_.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){O.prototype[e]=function(){return(t=_.get(this))[e].apply(t,arguments);var t}});var E=void 0!==i.ResizeObserver?i.ResizeObserver:O;t.default=E}.call(this,n(13))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[];return r.forEach(function(n){e[n]&&t.push(n)}),t};var r=["client","offset","scroll","bounds","margin"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={};if(t.indexOf("client")>-1&&(n.client={top:e.clientTop,left:e.clientLeft,width:e.clientWidth,height:e.clientHeight}),t.indexOf("offset")>-1&&(n.offset={top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth,height:e.offsetHeight}),t.indexOf("scroll")>-1&&(n.scroll={top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}),t.indexOf("bounds")>-1){var r=e.getBoundingClientRect();n.bounds={top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:r.width,height:r.height}}if(t.indexOf("margin")>-1){var i=getComputedStyle(e);n.margin={top:parseInt(i.marginTop),right:parseInt(i.marginRight),bottom:parseInt(i.marginBottom),left:parseInt(i.marginLeft)}}return n}},function(e,t,n){"use strict";n.r(t);var r=n(8),i=n.n(r),o=n(7),s=n.n(o),a=n(6),u=n.n(a),c=n(5),f=n.n(c),l=n(4),h=n.n(l),p=n(9),d=n.n(p),v=n(10),m=n.n(v),y=n(11),b=n.n(y),g=n(0),w=n.n(g),x=n(3),_=n.n(x),O=function(){function e(){f()(this,e)}return h()(e,null,[{key:"isBrowser",value:function(){return"undefined"!=typeof window}},{key:"isOpera",value:function(){return e.isBrowser()&&(!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0)}},{key:"isFirefox",value:function(){return e.isBrowser()&&"undefined"!=typeof InstallTrigger}},{key:"isSafari",value:function(){return!!e.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isIE",value:function(){ | ||
/*@cc_on!@*/ | ||
return e.isBrowser()&&!!document.documentMode}},{key:"isEdge",value:function(){return e.isBrowser()&&!e.isIE()&&!!window.StyleMedia}},{key:"isChrome",value:function(){return e.isBrowser()&&!!window.chrome&&!!window.chrome.webstore}},{key:"isBlink",value:function(){return e.isBrowser()&&(e.isChrome()||e.isOpera())&&!!window.CSS}},{key:"getUserAgent",value:function(){return"undefined"==typeof navigator?"":navigator.userAgent}},{key:"isAndroid",value:function(){return e.isBrowser()&&e.getUserAgent().match(/Android/i)}},{key:"isBlackBerry",value:function(){return e.isBrowser()&&e.getUserAgent().match(/BlackBerry/i)}},{key:"isIOS",value:function(){return e.isBrowser()&&e.getUserAgent().match(/iPhone|iPad|iPod/i)}},{key:"isOpera",value:function(){return e.isBrowser()&&e.getUserAgent().match(/Opera Mini/i)}},{key:"isWindows",value:function(){return e.isBrowser()&&e.isWindowsDesktop()||e.isWindowsMobile()}},{key:"isWindowsMobile",value:function(){return e.isBrowser()&&e.getUserAgent().match(/IEMobile/i)}},{key:"isWindowsDesktop",value:function(){return e.isBrowser()&&e.getUserAgent().match(/WPDesktop/i)}},{key:"isMobile",value:function(){return e.isBrowser()&&(e.isWindowsMobile()||e.isBlackBerry()||e.isAndroid()||e.isIOS())}}]),e}(),E=function(e){return Object.keys(e).reduce(function(t,n){return"data-"===n.substr(0,5)?s()({},t,_()({},n,e[n])):t},{})},z=n(1),R=n.n(z),M=n(2),S=n.n(M),k=function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"ref",S.a.createRef()),_()(w()(w()(n)),"onMouseMove",function(e){if(n.state.active){var t=n.ref.current;n.props.events.emit("resize",{index:n.props.index,domElement:t,event:e}),n.props.onResize&&n.props.onResize({component:w()(w()(n)),domElement:t}),e.stopPropagation(),e.preventDefault()}}),_()(w()(w()(n)),"onMouseDown",function(e){n.setState({active:!0}),n.props.onStartResize&&n.props.onStartResize({domElement:n.ref.current,component:w()(w()(n))})||n.props.events.emit("startResize",{index:n.props.index,event:e})}),_()(w()(w()(n)),"onMouseUp",function(e){n.state.active&&(n.setState({active:!1}),n.props.onStopResize&&n.props.onStopResize({domElement:n.ref.current,component:w()(w()(n))}),n.props.events.emit("stopResize",{index:n.props.index,event:e}))}),n.state={active:!1},n.document=e.document,n}return b()(t,e),h()(t,null,[{key:"isA",value:function(e){return!!e&&e.type===t}}]),h()(t,[{key:"componentDidMount",value:function(){this.document&&(this.document.addEventListener("touchend",this.onMouseUp),this.document.addEventListener("mouseup",this.onMouseUp),this.document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),this.document.addEventListener("touchmove",this.onMouseMove,{passive:!1}))}},{key:"componentWillUnmount",value:function(){this.document&&(this.document.removeEventListener("mouseup",this.onMouseUp),this.document.removeEventListener("touchend",this.onMouseUp),this.document.removeEventListener("mousemove",this.onMouseMove),this.document.removeEventListener("touchmove",this.onMouseMove),this.state.active&&this.props.events.emit("stopResize",{index:this.props.index,event:null}))}},{key:"render",value:function(){var e=[O.isMobile()?"reflex-thin":""].concat(u()(this.props.className.split(" ")),[this.state.active?"active":"","reflex-splitter"]).join(" ").trim();return S.a.createElement("div",i()({},E(this.props),{onTouchStart:this.onMouseDown,onMouseDown:this.onMouseDown,style:this.props.style,className:e,id:this.props.id,ref:this.ref}),this.props.children)}}]),t}(S.a.Component);_()(k,"propTypes",{children:R.a.oneOfType([R.a.arrayOf(R.a.node),R.a.node]),onStartResize:R.a.func,onStopResize:R.a.func,className:R.a.string,propagate:R.a.bool,onResize:R.a.func,style:R.a.object}),_()(k,"defaultProps",{document:"undefined"!=typeof document?document:null,onStartResize:null,onStopResize:null,propagate:!1,onResize:null,className:"",style:{}});var j=function(){function e(){f()(this,e),this._events={}}return h()(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach(function(e){n._events[e]=n._events[e]||[],n._events[e].push(t)}),this}},{key:"off",value:function(e,t){var n=this;if(void 0!=e)return e.split(" ").forEach(function(e){e in n._events!=!1&&(t?n._events[e].splice(n._events[e].indexOf(t),1):n._events[e]=[])}),this;this._events={}}},{key:"emit",value:function(e){if(void 0!==this._events[e])for(var t=this._events[e].slice(),n=0;n<t.length;++n){var r=t[n].apply(this,Array.prototype.slice.call(arguments,1));if(void 0!==r)return r}}}]),e}(),A=(n(26),function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"onWindowResize",function(){n.setState({flexData:n.computeFlexData()})}),_()(w()(w()(n)),"onStartResize",function(e){var t=e.event.changedTouches?e.event.changedTouches[0]:e.event;switch(n.props.orientation){case"horizontal":document.body.classList.add("reflex-row-resize"),n.previousPos=t.clientY;break;case"vertical":default:document.body.classList.add("reflex-col-resize"),n.previousPos=t.clientX}n.elements=[n.children[e.index-1],n.children[e.index+1]],n.emitElementsEvent(n.elements,"onStartResize")}),_()(w()(w()(n)),"onResize",function(e){var t=e.event.changedTouches?e.event.changedTouches[0]:e.event,r=n.getOffset(t,e.domElement);switch(n.props.orientation){case"horizontal":n.previousPos=t.clientY;break;case"vertical":default:n.previousPos=t.clientX}if(r){var i=n.computeAvailableOffset(e.index,r);i&&(n.elements=n.dispatchOffset(e.index,i),n.adjustFlex(n.elements),n.setState({resizing:!0},function(){n.emitElementsEvent(n.elements,"onResize")}))}}),_()(w()(w()(n)),"onStopResize",function(e){document.body.classList.remove("reflex-row-resize"),document.body.classList.remove("reflex-col-resize");var t=n.elements?n.elements.map(function(e){return e.ref}):[],r=n.children.filter(function(e){return!k.isA(e)&&t.includes(e.ref)});n.emitElementsEvent(r,"onStopResize"),n.setState({resizing:!1})}),_()(w()(w()(n)),"onElementSize",function(e){return new Promise(function(t){try{var r=e.index,i=n.getSize(n.children[r]),o=e.size-i,s=e.direction,a=r+s,u=n.computeAvailableOffset(a,s*o);n.elements=null,u&&(n.elements=n.dispatchOffset(a,u),n.adjustFlex(n.elements)),n.setState(n.state,function(){n.emitElementsEvent(n.elements,"onResize"),t()})}catch(e){console.log(e)}})}),n.events=new j,n.children=[],n.state={flexData:[]},n.ref=S.a.createRef(),n}return b()(t,e),h()(t,[{key:"componentDidMount",value:function(){var e=this.computeFlexData(),t=this.props.windowResizeAware;t&&window.addEventListener("resize",this.onWindowResize),this.setState({windowResizeAware:t,flexData:e}),this.events.on("element.size",this.onElementSize),this.events.on("startResize",this.onStartResize),this.events.on("stopResize",this.onStopResize),this.events.on("resize",this.onResize)}},{key:"componentWillUnmount",value:function(){this.events.off(),window.removeEventListener("resize",this.onWindowResize)}},{key:"getValidChildren",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return this.toArray(e.children).filter(function(e){return!!e})}},{key:"componentDidUpdate",value:function(e,t){var n=this.getValidChildren(this.props);if(n.length!==this.state.flexData.length||e.orientation!==this.props.orientation||this.flexHasChanged(e)){var r=this.computeFlexData(n,this.props);this.setState({flexData:r})}this.props.windowResizeAware!==this.state.windowResizeAware&&(this.props.windowResizeAware?window.addEventListener("resize",this.onWindowResize):window.removeEventListener("resize",this.onWindowResize),this.setState({windowResizeAware:this.props.windowResizeAware}))}},{key:"flexHasChanged",value:function(e){var t=this.getValidChildren(e).map(function(e){return e.props.flex||0});return!this.getValidChildren().map(function(e){return e.props.flex||0}).every(function(e,n){return e===t[n]})}},{key:"getSize",value:function(e){var t=e.ref.current;switch(this.props.orientation){case"horizontal":return t.offsetHeight;case"vertical":default:return t.offsetWidth}}},{key:"getOffset",value:function(e,t){var n=t.getBoundingClientRect(),r=n.top,i=n.bottom,o=n.left,s=n.right;switch(this.props.orientation){case"horizontal":var a=e.clientY-this.previousPos;if(a>0){if(e.clientY>=r)return a}else if(e.clientY<=i)return a;break;case"vertical":default:var u=e.clientX-this.previousPos;if(u>0){if(e.clientX>o)return u}else if(e.clientX<s)return u}return 0}},{key:"adjustFlex",value:function(e){var t=this,n=e.reduce(function(n,r){var i=r.props.index;return n+(r.props.flex-t.state.flexData[i].flex)/e.length},0);e.forEach(function(e){t.state.flexData[e.props.index].flex+=n})}},{key:"computeAvailableOffset",value:function(e,t){var n=this.computeAvailableStretch(e,t),r=this.computeAvailableShrink(e,t);return Math.min(n,r)*Math.sign(t)}},{key:"checkPropagate",value:function(e,t){if(t>0){if(e<this.children.length-2){var n=this.children[e+2];return k.isA(n)&&n.props.propagate}}else if(e>2){var r=this.children[e-2];return k.isA(r)&&r.props.propagate}return!1}},{key:"computeAvailableStretch",value:function(e,t){var n=t<0?e+1:e-1,r=this.children[n],i=this.getSize(r),o=r.props.maxSize-i;if(o<Math.abs(t)&&this.checkPropagate(e,-1*t)){var s=Math.sign(t)*(Math.abs(t)-o);return o+this.computeAvailableStretch(t<0?e+2:e-2,s)}return Math.min(o,Math.abs(t))}},{key:"computeAvailableShrink",value:function(e,t){var n=t>0?e+1:e-1,r=this.children[n],i=this.getSize(r)-Math.max(r.props.minSize,0);if(i<Math.abs(t)&&this.checkPropagate(e,t)){var o=Math.sign(t)*(Math.abs(t)-i);return i+this.computeAvailableShrink(t>0?e+2:e-2,o)}return Math.min(i,Math.abs(t))}},{key:"computePixelFlex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.orientation;if(!this.ref.current)return console.warn("Unable to locate ReflexContainer dom node"),0;switch(e){case"horizontal":return 0===this.ref.current.offsetHeight?(console.warn("Found ReflexContainer with height=0, this will cause invalid behavior..."),console.warn(this.ref.current),0):1/this.ref.current.offsetHeight;case"vertical":default:return 0===this.ref.current.offsetWidth?(console.warn("Found ReflexContainer with width=0, this will cause invalid behavior..."),console.warn(this.ref.current),0):1/this.ref.current.offsetWidth}}},{key:"addOffset",value:function(e,t){var n=this.getSize(e),r=e.props.index,i=Math.max(n+t,0),o=this.state.flexData[r].flex,s=o>0?o*i/n:this.computePixelFlex()*i;this.state.flexData[r].flex=!isFinite(s)||isNaN(s)?0:s}},{key:"dispatchStretch",value:function(e,t){var n=t<0?e+1:e-1;if(n<0||n>this.children.length-1)return[];var r=this.children[n],i=this.getSize(r),o=Math.min(r.props.maxSize,i+Math.abs(t))-i;if(this.addOffset(r,o),o<Math.abs(t)){var s=e-2*Math.sign(t),a=Math.sign(t)*(Math.abs(t)-o);return[r].concat(u()(this.dispatchStretch(s,a)))}return[r]}},{key:"dispatchShrink",value:function(e,t){var n=t>0?e+1:e-1;if(n<0||n>this.children.length-1)return[];var r=this.children[n],i=this.getSize(r),o=Math.max(r.props.minSize,i-Math.abs(t))-i;if(this.addOffset(r,o),Math.abs(o)<Math.abs(t)){var s=e+2*Math.sign(t),a=Math.sign(t)*(Math.abs(t)+o);return[r].concat(u()(this.dispatchShrink(s,a)))}return[r]}},{key:"dispatchOffset",value:function(e,t){return u()(this.dispatchStretch(e,t)).concat(u()(this.dispatchShrink(e,t)))}},{key:"emitElementsEvent",value:function(e,t){this.toArray(e).forEach(function(e){e.props[t]&&e.props[t]({domElement:e.ref.current,component:e})})}},{key:"computeFlexData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getValidChildren(),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props,r=this.computePixelFlex(n.orientation);return function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=!1,o=function(e){return e.reduce(function(e,t){return k.isA(t)||t.constrained?e:e+1},0)}(n),a=function(e){return e.reduce(function(e,t){return!k.isA(t)&&t.constrained?e-t.flex:e},1)}(n),u=n.map(function(e){if(k.isA(e))return e;var t=e.constrained?e.flex:a/o,n=Math.min(e.sizeFlex,Math.min(e.maxFlex,Math.max(e.minFlex,t))),r=e.constrained||n!==t;return i=i||r,s()({},e,{flex:n,constrained:r})});return i&&r<e.props.maxRecDepth?t(u,r+1):u}(t.map(function(e){var t=e.props;return{maxFlex:(t.maxSize||Number.MAX_VALUE)*r,sizeFlex:(t.size||Number.MAX_VALUE)*r,minFlex:(t.minSize||1)*r,constrained:void 0!==t.flex,flex:t.flex||0,type:e.type}})).map(function(e){return{flex:k.isA(e)?0:e.flex,ref:S.a.createRef()}})}},{key:"toArray",value:function(e){return e?Array.isArray(e)?e:[e]:[]}},{key:"render",value:function(){var e=this,t=[this.state.resizing?"reflex-resizing":""].concat(u()(this.props.className.split(" ")),[this.props.orientation,"reflex-container"]).join(" ").trim();return this.children=S.a.Children.map(this.getValidChildren(),function(t,n){if(n>e.state.flexData.length-1)return S.a.createElement("div",null);var r=e.state.flexData[n],i=s()({},t.props,{maxSize:t.props.maxSize||Number.MAX_VALUE,orientation:e.props.orientation,minSize:t.props.minSize||1,events:e.events,flex:r.flex,ref:r.ref,index:n});return S.a.cloneElement(t,i)}),S.a.createElement("div",i()({},E(this.props),{style:this.props.style,className:t,ref:this.ref}),this.children)}}]),t}(S.a.Component));_()(A,"propTypes",{windowResizeAware:R.a.bool,orientation:R.a.oneOf(["horizontal","vertical"]),maxRecDepth:R.a.number,className:R.a.string,style:R.a.object}),_()(A,"defaultProps",{orientation:"horizontal",windowResizeAware:!1,maxRecDepth:100,className:"",style:{}});var P=n(12),L=n.n(P),T=n(15),D=n.n(T),C=function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"ref",S.a.createRef()),_()(w()(w()(n)),"onMouseMove",function(e){if(n.state.active){var t=n.ref.current;n.props.events.emit("resize",{index:n.props.index,domElement:t,event:e}),n.props.onResize&&n.props.onResize({component:w()(w()(n)),domElement:t}),e.stopPropagation(),e.preventDefault()}}),_()(w()(w()(n)),"onMouseDown",function(e){n.setState({active:!0}),n.props.onStartResize&&n.props.onStartResize({domElement:n.ref.current,component:w()(w()(n))})||n.props.events.emit("startResize",{index:n.props.index,event:e})}),_()(w()(w()(n)),"onMouseUp",function(e){n.state.active&&(n.setState({active:!1}),n.props.onStopResize&&n.props.onStopResize({domElement:n.ref.current,component:w()(w()(n))}),n.props.events.emit("stopResize",{index:n.props.index,event:e}))}),n.state={active:!1},n.document=e.document,n}return b()(t,e),h()(t,null,[{key:"isA",value:function(e){return!!e&&e.type===t}}]),h()(t,[{key:"componentDidMount",value:function(){this.document&&(this.document.addEventListener("touchend",this.onMouseUp),this.document.addEventListener("mouseup",this.onMouseUp),this.document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),this.document.addEventListener("touchmove",this.onMouseMove,{passive:!1}))}},{key:"componentWillUnmount",value:function(){this.document&&(this.document.removeEventListener("mouseup",this.onMouseUp),this.document.removeEventListener("touchend",this.onMouseUp),this.document.removeEventListener("mousemove",this.onMouseMove),this.document.removeEventListener("touchmove",this.onMouseMove),this.state.active&&this.props.events.emit("stopResize",{index:this.props.index,event:null}))}},{key:"render",value:function(){var e=u()(this.props.className.split(" ")).concat([this.state.active?"active":"","reflex-handle"]).join(" ").trim();return S.a.createElement("div",i()({},E(this.props),{onTouchStart:this.onMouseDown,onMouseDown:this.onMouseDown,style:this.props.style,className:e,id:this.props.id,ref:this.ref}),this.props.children)}}]),t}(S.a.Component);_()(C,"propTypes",{children:R.a.oneOfType([R.a.arrayOf(R.a.node),R.a.node]),onStartResize:R.a.func,onStopResize:R.a.func,className:R.a.string,propagate:R.a.bool,onResize:R.a.func,style:R.a.object}),_()(C,"defaultProps",{document:"undefined"==typeof document?null:document,onStartResize:null,onStopResize:null,propagate:!1,onResize:null,className:"",style:{}});var N=n(16),W=n.n(N),F=n(17),B=n.n(F),U=function(e){return e?Array.isArray(e)?e:[e]:[]},I=function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"onResize",function(e){var t=n.props,r=t.resizeHeight,i=t.resizeWidth,o=e.bounds,a=o.height,u=o.width;n.setDimensions(s()({},r&&{height:a},i&&{width:u}))}),n.setDimensions=W()(function(e){n.setState(e)},n.props.propagateDimensionsRate/1e3),n.state={height:"100%",width:"100%"},n}return b()(t,e),h()(t,[{key:"renderChildren",value:function(){var e=this,t=this.props.propagateDimensions,n=U(this.props.children).filter(function(e){return!!e});return S.a.Children.map(n,function(n){return e.props.withHandle||C.isA(n)?S.a.cloneElement(n,s()({dimensions:t&&e.state},n.props,{index:e.props.index-1,events:e.props.events})):t?S.a.cloneElement(n,s()({},n.props,{dimensions:e.state})):n})}},{key:"render",value:function(){var e=this;return S.a.createElement(B.a,{bounds:!0,onResize:this.onResize},function(t){var n=t.measureRef;return S.a.createElement("div",{ref:n,className:"reflex-size-aware"},S.a.createElement("div",{style:e.state},e.renderChildren()))})}}]),t}(S.a.Component),H=function(e){function t(e){var n;return f()(this,t),(n=d()(this,m()(t).call(this,e))).state={size:e.size},n}return b()(t,e),h()(t,[{key:"componentDidUpdate",value:function(){var e=D()(L.a.mark(function e(t,n,r){var i,o,s,a,u,c,f;return L.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.size===this.state.size){e.next=28;break}i=U(this.props.direction),o=!0,s=!1,a=void 0,e.prev=5,u=i[Symbol.iterator]();case 7:if(o=(c=u.next()).done){e.next=14;break}return f=c.value,e.next=11,this.props.events.emit("element.size",{index:this.props.index,size:this.props.size,direction:f});case 11:o=!0,e.next=7;break;case 14:e.next=20;break;case 16:e.prev=16,e.t0=e.catch(5),s=!0,a=e.t0;case 20:e.prev=20,e.prev=21,o||null==u.return||u.return();case 23:if(e.prev=23,!s){e.next=26;break}throw a;case 26:return e.finish(23);case 27:return e.finish(20);case 28:case"end":return e.stop()}},e,this,[[5,16,20,28],[21,,23,27]])}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"renderChildren",value:function(){var e=this,t=U(this.props.children).filter(function(e){return!!e});return S.a.Children.map(t,function(t){return e.props.withHandle||C.isA(t)?S.a.cloneElement(t,s()({},t.props,{index:e.props.index-1,events:e.props.events})):t})}},{key:"render",value:function(){var e=u()(this.props.className.split(" ")).concat([this.props.orientation,"reflex-element"]).join(" ").trim(),t=s()({},this.props.style,{flexGrow:this.props.flex,flexShrink:1,flexBasis:"0%"});return S.a.createElement("div",i()({},E(this.props),{ref:this.props.innerRef,className:e,style:t}),this.props.propagateDimensions?S.a.createElement(I,this.props):this.renderChildren())}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.size!==t.size?s()({},t,{size:e.size}):null}}]),t}(S.a.Component);_()(H,"propTypes",{propagateDimensions:R.a.bool,resizeHeight:R.a.bool,resizeWidth:R.a.bool,className:R.a.string,size:R.a.number}),_()(H,"defaultProps",{propagateDimensionsRate:100,propagateDimensions:!1,resizeHeight:!0,resizeWidth:!0,direction:[1],className:""});var G=S.a.forwardRef(function(e,t){return S.a.createElement(H,i()({innerRef:t},e))});n.d(t,"ReflexContainer",function(){return A}),n.d(t,"ReflexSplitter",function(){return k}),n.d(t,"ReflexElement",function(){return G}),n.d(t,"ReflexHandle",function(){return C})}])}); | ||
return e.isBrowser()&&!!document.documentMode}},{key:"isEdge",value:function(){return e.isBrowser()&&!e.isIE()&&!!window.StyleMedia}},{key:"isChrome",value:function(){return e.isBrowser()&&!!window.chrome&&!!window.chrome.webstore}},{key:"isBlink",value:function(){return e.isBrowser()&&(e.isChrome()||e.isOpera())&&!!window.CSS}},{key:"getUserAgent",value:function(){return"undefined"==typeof navigator?"":navigator.userAgent}},{key:"isAndroid",value:function(){return e.isBrowser()&&e.getUserAgent().match(/Android/i)}},{key:"isBlackBerry",value:function(){return e.isBrowser()&&e.getUserAgent().match(/BlackBerry/i)}},{key:"isIOS",value:function(){return e.isBrowser()&&e.getUserAgent().match(/iPhone|iPad|iPod/i)}},{key:"isOpera",value:function(){return e.isBrowser()&&e.getUserAgent().match(/Opera Mini/i)}},{key:"isWindows",value:function(){return e.isBrowser()&&e.isWindowsDesktop()||e.isWindowsMobile()}},{key:"isWindowsMobile",value:function(){return e.isBrowser()&&e.getUserAgent().match(/IEMobile/i)}},{key:"isWindowsDesktop",value:function(){return e.isBrowser()&&e.getUserAgent().match(/WPDesktop/i)}},{key:"isMobile",value:function(){return e.isBrowser()&&(e.isWindowsMobile()||e.isBlackBerry()||e.isAndroid()||e.isIOS())}}]),e}(),E=function(e){return Object.keys(e).reduce(function(t,n){return"data-"===n.substr(0,5)?s()({},t,_()({},n,e[n])):t},{})},z=n(1),R=n.n(z),M=n(2),S=n.n(M),k=function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"ref",S.a.createRef()),_()(w()(w()(n)),"onMouseMove",function(e){if(n.state.active){var t=n.ref.current;n.props.events.emit("resize",{index:n.props.index,domElement:t,event:e}),n.props.onResize&&n.props.onResize({component:w()(w()(n)),domElement:t}),e.stopPropagation(),e.preventDefault()}}),_()(w()(w()(n)),"onMouseDown",function(e){n.setState({active:!0}),n.props.onStartResize&&n.props.onStartResize({domElement:n.ref.current,component:w()(w()(n))})||n.props.events.emit("startResize",{index:n.props.index,event:e})}),_()(w()(w()(n)),"onMouseUp",function(e){n.state.active&&(n.setState({active:!1}),n.props.onStopResize&&n.props.onStopResize({domElement:n.ref.current,component:w()(w()(n))}),n.props.events.emit("stopResize",{index:n.props.index,event:e}))}),n.state={active:!1},n.document=e.document,n}return b()(t,e),h()(t,null,[{key:"isA",value:function(e){return!!e&&e.type===t}}]),h()(t,[{key:"componentDidMount",value:function(){this.document&&(this.document.addEventListener("touchend",this.onMouseUp),this.document.addEventListener("mouseup",this.onMouseUp),this.document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),this.document.addEventListener("touchmove",this.onMouseMove,{passive:!1}))}},{key:"componentWillUnmount",value:function(){this.document&&(this.document.removeEventListener("mouseup",this.onMouseUp),this.document.removeEventListener("touchend",this.onMouseUp),this.document.removeEventListener("mousemove",this.onMouseMove),this.document.removeEventListener("touchmove",this.onMouseMove),this.state.active&&this.props.events.emit("stopResize",{index:this.props.index,event:null}))}},{key:"render",value:function(){var e=[O.isMobile()?"reflex-thin":""].concat(u()(this.props.className.split(" ")),[this.state.active?"active":"","reflex-splitter"]).join(" ").trim();return S.a.createElement("div",i()({},E(this.props),{onTouchStart:this.onMouseDown,onMouseDown:this.onMouseDown,style:this.props.style,className:e,id:this.props.id,ref:this.ref}),this.props.children)}}]),t}(S.a.Component);_()(k,"propTypes",{children:R.a.oneOfType([R.a.arrayOf(R.a.node),R.a.node]),onStartResize:R.a.func,onStopResize:R.a.func,className:R.a.string,propagate:R.a.bool,onResize:R.a.func,style:R.a.object}),_()(k,"defaultProps",{document:"undefined"!=typeof document?document:null,onStartResize:null,onStopResize:null,propagate:!1,onResize:null,className:"",style:{}});var j=function(){function e(){f()(this,e),this._events={}}return h()(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach(function(e){n._events[e]=n._events[e]||[],n._events[e].push(t)}),this}},{key:"off",value:function(e,t){var n=this;if(void 0!=e)return e.split(" ").forEach(function(e){e in n._events!=!1&&(t?n._events[e].splice(n._events[e].indexOf(t),1):n._events[e]=[])}),this;this._events={}}},{key:"emit",value:function(e){if(void 0!==this._events[e])for(var t=this._events[e].slice(),n=0;n<t.length;++n){var r=t[n].apply(this,Array.prototype.slice.call(arguments,1));if(void 0!==r)return r}}}]),e}(),A=(n(26),function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"onWindowResize",function(){n.setState({flexData:n.computeFlexData()})}),_()(w()(w()(n)),"onStartResize",function(e){var t=e.event.changedTouches?e.event.changedTouches[0]:e.event;switch(n.props.orientation){case"horizontal":document.body.classList.add("reflex-row-resize"),n.previousPos=t.clientY;break;case"vertical":default:document.body.classList.add("reflex-col-resize"),n.previousPos=t.clientX}n.elements=[n.children[e.index-1],n.children[e.index+1]],n.emitElementsEvent(n.elements,"onStartResize")}),_()(w()(w()(n)),"onResize",function(e){var t=e.event.changedTouches?e.event.changedTouches[0]:e.event,r=n.getOffset(t,e.domElement);switch(n.props.orientation){case"horizontal":n.previousPos=t.clientY;break;case"vertical":default:n.previousPos=t.clientX}if(r){var i=n.computeAvailableOffset(e.index,r);i&&(n.elements=n.dispatchOffset(e.index,i),n.adjustFlex(n.elements),n.setState({resizing:!0},function(){n.emitElementsEvent(n.elements,"onResize")}))}}),_()(w()(w()(n)),"onStopResize",function(e){document.body.classList.remove("reflex-row-resize"),document.body.classList.remove("reflex-col-resize");var t=n.elements?n.elements.map(function(e){return e.ref}):[],r=n.children.filter(function(e){return!k.isA(e)&&t.includes(e.ref)});n.emitElementsEvent(r,"onStopResize"),n.setState({resizing:!1})}),_()(w()(w()(n)),"onElementSize",function(e){return new Promise(function(t){try{var r=e.index,i=n.getSize(n.children[r]),o=e.size-i,s=e.direction,a=r+s,u=n.computeAvailableOffset(a,s*o);n.elements=null,u&&(n.elements=n.dispatchOffset(a,u),n.adjustFlex(n.elements)),n.setState(n.state,function(){n.emitElementsEvent(n.elements,"onResize"),t()})}catch(e){console.log(e)}})}),n.events=new j,n.children=[],n.state={flexData:[]},n.ref=S.a.createRef(),n}return b()(t,e),h()(t,[{key:"componentDidMount",value:function(){var e=this.computeFlexData(),t=this.props.windowResizeAware;t&&window.addEventListener("resize",this.onWindowResize),this.setState({windowResizeAware:t,flexData:e}),this.events.on("element.size",this.onElementSize),this.events.on("startResize",this.onStartResize),this.events.on("stopResize",this.onStopResize),this.events.on("resize",this.onResize)}},{key:"componentWillUnmount",value:function(){this.events.off(),window.removeEventListener("resize",this.onWindowResize)}},{key:"getValidChildren",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return this.toArray(e.children).filter(function(e){return!!e})}},{key:"componentDidUpdate",value:function(e,t){var n=this.getValidChildren(this.props);if(n.length!==this.state.flexData.length||e.orientation!==this.props.orientation||this.flexHasChanged(e)){var r=this.computeFlexData(n,this.props);this.setState({flexData:r})}this.props.windowResizeAware!==this.state.windowResizeAware&&(this.props.windowResizeAware?window.addEventListener("resize",this.onWindowResize):window.removeEventListener("resize",this.onWindowResize),this.setState({windowResizeAware:this.props.windowResizeAware}))}},{key:"flexHasChanged",value:function(e){var t=this.getValidChildren(e).map(function(e){return e.props.flex||0});return!this.getValidChildren().map(function(e){return e.props.flex||0}).every(function(e,n){return e===t[n]})}},{key:"getSize",value:function(e){var t,n,r=null===e||void 0===e?void 0:e.ref.current;switch(this.props.orientation){case"horizontal":return null!==(t=null===r||void 0===r?void 0:r.offsetHeight)&&void 0!==t?t:0;case"vertical":default:return null!==(n=null===r||void 0===r?void 0:r.offsetWidth)&&void 0!==n?n:0}}},{key:"getOffset",value:function(e,t){var n=t.getBoundingClientRect(),r=n.top,i=n.bottom,o=n.left,s=n.right;switch(this.props.orientation){case"horizontal":var a=e.clientY-this.previousPos;if(a>0){if(e.clientY>=r)return a}else if(e.clientY<=i)return a;break;case"vertical":default:var u=e.clientX-this.previousPos;if(u>0){if(e.clientX>o)return u}else if(e.clientX<s)return u}return 0}},{key:"adjustFlex",value:function(e){var t=this,n=e.reduce(function(n,r){var i=r.props.index;return n+(r.props.flex-t.state.flexData[i].flex)/e.length},0);e.forEach(function(e){t.state.flexData[e.props.index].flex+=n})}},{key:"computeAvailableOffset",value:function(e,t){var n=this.computeAvailableStretch(e,t),r=this.computeAvailableShrink(e,t);return Math.min(n,r)*Math.sign(t)}},{key:"checkPropagate",value:function(e,t){if(t>0){if(e<this.children.length-2){var n=this.children[e+2];return k.isA(n)&&n.props.propagate}}else if(e>2){var r=this.children[e-2];return k.isA(r)&&r.props.propagate}return!1}},{key:"computeAvailableStretch",value:function(e,t){var n,r=t<0?e+1:e-1,i=this.children[r],o=this.getSize(i),s=(null!==(n=null===i||void 0===i?void 0:i.props.maxSize)&&void 0!==n?n:0)-o;if(s<Math.abs(t)&&this.checkPropagate(e,-1*t)){var a=Math.sign(t)*(Math.abs(t)-s);return s+this.computeAvailableStretch(t<0?e+2:e-2,a)}return Math.min(s,Math.abs(t))}},{key:"computeAvailableShrink",value:function(e,t){var n,r=t>0?e+1:e-1,i=this.children[r],o=this.getSize(i)-Math.max(null!==(n=null===i||void 0===i?void 0:i.props.minSize)&&void 0!==n?n:0,0);if(o<Math.abs(t)&&this.checkPropagate(e,t)){var s=Math.sign(t)*(Math.abs(t)-o);return o+this.computeAvailableShrink(t>0?e+2:e-2,s)}return Math.min(o,Math.abs(t))}},{key:"computePixelFlex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.orientation;if(!this.ref.current)return console.warn("Unable to locate ReflexContainer dom node"),0;switch(e){case"horizontal":return 0===this.ref.current.offsetHeight?(console.warn("Found ReflexContainer with height=0, this will cause invalid behavior..."),console.warn(this.ref.current),0):1/this.ref.current.offsetHeight;case"vertical":default:return 0===this.ref.current.offsetWidth?(console.warn("Found ReflexContainer with width=0, this will cause invalid behavior..."),console.warn(this.ref.current),0):1/this.ref.current.offsetWidth}}},{key:"addOffset",value:function(e,t){var n=this.getSize(e),r=e.props.index,i=Math.max(n+t,0),o=this.state.flexData[r].flex,s=o>0?o*i/n:this.computePixelFlex()*i;this.state.flexData[r].flex=!isFinite(s)||isNaN(s)?0:s}},{key:"dispatchStretch",value:function(e,t){var n=t<0?e+1:e-1;if(n<0||n>this.children.length-1)return[];var r=this.children[n],i=this.getSize(r),o=Math.min(r.props.maxSize,i+Math.abs(t))-i;if(this.addOffset(r,o),o<Math.abs(t)){var s=e-2*Math.sign(t),a=Math.sign(t)*(Math.abs(t)-o);return[r].concat(u()(this.dispatchStretch(s,a)))}return[r]}},{key:"dispatchShrink",value:function(e,t){var n=t>0?e+1:e-1;if(n<0||n>this.children.length-1)return[];var r=this.children[n],i=this.getSize(r),o=Math.max(r.props.minSize,i-Math.abs(t))-i;if(this.addOffset(r,o),Math.abs(o)<Math.abs(t)){var s=e+2*Math.sign(t),a=Math.sign(t)*(Math.abs(t)+o);return[r].concat(u()(this.dispatchShrink(s,a)))}return[r]}},{key:"dispatchOffset",value:function(e,t){return u()(this.dispatchStretch(e,t)).concat(u()(this.dispatchShrink(e,t)))}},{key:"emitElementsEvent",value:function(e,t){this.toArray(e).forEach(function(e){e.props[t]&&e.props[t]({domElement:e.ref.current,component:e})})}},{key:"computeFlexData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getValidChildren(),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props,r=this.computePixelFlex(n.orientation);return function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=!1,o=function(e){return e.reduce(function(e,t){return k.isA(t)||t.constrained?e:e+1},0)}(n),a=function(e){return e.reduce(function(e,t){return!k.isA(t)&&t.constrained?e-t.flex:e},1)}(n),u=n.map(function(e){if(k.isA(e))return e;var t=e.constrained?e.flex:a/o,n=Math.min(e.sizeFlex,Math.min(e.maxFlex,Math.max(e.minFlex,t))),r=e.constrained||n!==t;return i=i||r,s()({},e,{flex:n,constrained:r})});return i&&r<e.props.maxRecDepth?t(u,r+1):u}(t.map(function(e){var t=e.props;return{maxFlex:(t.maxSize||Number.MAX_VALUE)*r,sizeFlex:(t.size||Number.MAX_VALUE)*r,minFlex:(t.minSize||1)*r,constrained:void 0!==t.flex,flex:t.flex||0,type:e.type}})).map(function(e){return{flex:k.isA(e)?0:e.flex,ref:S.a.createRef()}})}},{key:"toArray",value:function(e){return e?Array.isArray(e)?e:[e]:[]}},{key:"render",value:function(){var e=this,t=[this.state.resizing?"reflex-resizing":""].concat(u()(this.props.className.split(" ")),[this.props.orientation,"reflex-container"]).join(" ").trim();return this.children=S.a.Children.map(this.getValidChildren(),function(t,n){if(n>e.state.flexData.length-1)return S.a.createElement("div",null);var r=e.state.flexData[n],i=s()({},t.props,{maxSize:t.props.maxSize||Number.MAX_VALUE,orientation:e.props.orientation,minSize:t.props.minSize||1,events:e.events,flex:r.flex,ref:r.ref,index:n});return S.a.cloneElement(t,i)}),S.a.createElement("div",i()({},E(this.props),{style:this.props.style,className:t,ref:this.ref}),this.children)}}]),t}(S.a.Component));_()(A,"propTypes",{windowResizeAware:R.a.bool,orientation:R.a.oneOf(["horizontal","vertical"]),maxRecDepth:R.a.number,className:R.a.string,style:R.a.object}),_()(A,"defaultProps",{orientation:"horizontal",windowResizeAware:!1,maxRecDepth:100,className:"",style:{}});var P=n(12),L=n.n(P),T=n(15),D=n.n(T),C=function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"ref",S.a.createRef()),_()(w()(w()(n)),"onMouseMove",function(e){if(n.state.active){var t=n.ref.current;n.props.events.emit("resize",{index:n.props.index,domElement:t,event:e}),n.props.onResize&&n.props.onResize({component:w()(w()(n)),domElement:t}),e.stopPropagation(),e.preventDefault()}}),_()(w()(w()(n)),"onMouseDown",function(e){n.setState({active:!0}),n.props.onStartResize&&n.props.onStartResize({domElement:n.ref.current,component:w()(w()(n))})||n.props.events.emit("startResize",{index:n.props.index,event:e})}),_()(w()(w()(n)),"onMouseUp",function(e){n.state.active&&(n.setState({active:!1}),n.props.onStopResize&&n.props.onStopResize({domElement:n.ref.current,component:w()(w()(n))}),n.props.events.emit("stopResize",{index:n.props.index,event:e}))}),n.state={active:!1},n.document=e.document,n}return b()(t,e),h()(t,null,[{key:"isA",value:function(e){return!!e&&e.type===t}}]),h()(t,[{key:"componentDidMount",value:function(){this.document&&(this.document.addEventListener("touchend",this.onMouseUp),this.document.addEventListener("mouseup",this.onMouseUp),this.document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),this.document.addEventListener("touchmove",this.onMouseMove,{passive:!1}))}},{key:"componentWillUnmount",value:function(){this.document&&(this.document.removeEventListener("mouseup",this.onMouseUp),this.document.removeEventListener("touchend",this.onMouseUp),this.document.removeEventListener("mousemove",this.onMouseMove),this.document.removeEventListener("touchmove",this.onMouseMove),this.state.active&&this.props.events.emit("stopResize",{index:this.props.index,event:null}))}},{key:"render",value:function(){var e=u()(this.props.className.split(" ")).concat([this.state.active?"active":"","reflex-handle"]).join(" ").trim();return S.a.createElement("div",i()({},E(this.props),{onTouchStart:this.onMouseDown,onMouseDown:this.onMouseDown,style:this.props.style,className:e,id:this.props.id,ref:this.ref}),this.props.children)}}]),t}(S.a.Component);_()(C,"propTypes",{children:R.a.oneOfType([R.a.arrayOf(R.a.node),R.a.node]),onStartResize:R.a.func,onStopResize:R.a.func,className:R.a.string,propagate:R.a.bool,onResize:R.a.func,style:R.a.object}),_()(C,"defaultProps",{document:"undefined"==typeof document?null:document,onStartResize:null,onStopResize:null,propagate:!1,onResize:null,className:"",style:{}});var N=n(16),W=n.n(N),F=n(17),B=n.n(F),U=function(e){return e?Array.isArray(e)?e:[e]:[]},I=function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"onResize",function(e){var t=n.props,r=t.resizeHeight,i=t.resizeWidth,o=e.bounds,a=o.height,u=o.width;n.setDimensions(s()({},r&&{height:a},i&&{width:u}))}),n.setDimensions=W()(function(e){n.setState(e)},n.props.propagateDimensionsRate/1e3),n.state={height:"100%",width:"100%"},n}return b()(t,e),h()(t,[{key:"renderChildren",value:function(){var e=this,t=this.props.propagateDimensions,n=U(this.props.children).filter(function(e){return!!e});return S.a.Children.map(n,function(n){return e.props.withHandle||C.isA(n)?S.a.cloneElement(n,s()({dimensions:t&&e.state},n.props,{index:e.props.index-1,events:e.props.events})):t?S.a.cloneElement(n,s()({},n.props,{dimensions:e.state})):n})}},{key:"render",value:function(){var e=this;return S.a.createElement(B.a,{bounds:!0,onResize:this.onResize},function(t){var n=t.measureRef;return S.a.createElement("div",{ref:n,className:"reflex-size-aware"},S.a.createElement("div",{style:e.state},e.renderChildren()))})}}]),t}(S.a.Component),H=function(e){function t(e){var n;return f()(this,t),(n=d()(this,m()(t).call(this,e))).state={size:e.size},n}return b()(t,e),h()(t,[{key:"componentDidUpdate",value:function(){var e=D()(L.a.mark(function e(t,n,r){var i,o,s,a,u,c,f;return L.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.size===this.state.size){e.next=28;break}i=U(this.props.direction),o=!0,s=!1,a=void 0,e.prev=5,u=i[Symbol.iterator]();case 7:if(o=(c=u.next()).done){e.next=14;break}return f=c.value,e.next=11,this.props.events.emit("element.size",{index:this.props.index,size:this.props.size,direction:f});case 11:o=!0,e.next=7;break;case 14:e.next=20;break;case 16:e.prev=16,e.t0=e.catch(5),s=!0,a=e.t0;case 20:e.prev=20,e.prev=21,o||null==u.return||u.return();case 23:if(e.prev=23,!s){e.next=26;break}throw a;case 26:return e.finish(23);case 27:return e.finish(20);case 28:case"end":return e.stop()}},e,this,[[5,16,20,28],[21,,23,27]])}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"renderChildren",value:function(){var e=this,t=U(this.props.children).filter(function(e){return!!e});return S.a.Children.map(t,function(t){return e.props.withHandle||C.isA(t)?S.a.cloneElement(t,s()({},t.props,{index:e.props.index-1,events:e.props.events})):t})}},{key:"render",value:function(){var e=u()(this.props.className.split(" ")).concat([this.props.orientation,"reflex-element"]).join(" ").trim(),t=s()({},this.props.style,{flexGrow:this.props.flex,flexShrink:1,flexBasis:"0%"});return S.a.createElement("div",i()({},E(this.props),{ref:this.props.innerRef,className:e,style:t}),this.props.propagateDimensions?S.a.createElement(I,this.props):this.renderChildren())}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.size!==t.size?s()({},t,{size:e.size}):null}}]),t}(S.a.Component);_()(H,"propTypes",{propagateDimensions:R.a.bool,resizeHeight:R.a.bool,resizeWidth:R.a.bool,className:R.a.string,size:R.a.number}),_()(H,"defaultProps",{propagateDimensionsRate:100,propagateDimensions:!1,resizeHeight:!0,resizeWidth:!0,direction:[1],className:""});var G=S.a.forwardRef(function(e,t){return S.a.createElement(H,i()({innerRef:t},e))});n.d(t,"ReflexContainer",function(){return A}),n.d(t,"ReflexSplitter",function(){return k}),n.d(t,"ReflexElement",function(){return G}),n.d(t,"ReflexHandle",function(){return C})}])}); |
{ | ||
"name": "react-reflex", | ||
"version": "4.0.9", | ||
"version": "4.0.11", | ||
"description": "Flex layout component for advanced React web applications", | ||
@@ -57,6 +57,6 @@ "main": "dist/commonjs/index.js", | ||
"@babel/plugin-proposal-logical-assignment-operators": "7.0.0", | ||
"@babel/plugin-proposal-nullish-coalescing-operator": "7.0.0", | ||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", | ||
"@babel/plugin-proposal-numeric-separator": "7.0.0", | ||
"@babel/plugin-proposal-object-rest-spread": "7.0.0", | ||
"@babel/plugin-proposal-optional-chaining": "7.0.0", | ||
"@babel/plugin-proposal-optional-chaining": "^7.0.0", | ||
"@babel/plugin-proposal-pipeline-operator": "7.0.0", | ||
@@ -81,3 +81,2 @@ "@babel/plugin-proposal-throw-expressions": "7.0.0", | ||
"eslint-plugin-react": "^2.3.0", | ||
"node-sass": "7.0.0", | ||
"postcss-cli": "^6.1.3", | ||
@@ -98,2 +97,3 @@ "postcss-loader": "3.0.0", | ||
"lodash.throttle": "^4.1.1", | ||
"node-sass": "^4.14.1", | ||
"prop-types": "^15.5.8", | ||
@@ -100,0 +100,0 @@ "react-measure": "^2.0.2" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2035805
44
8700
6
+ Addednode-sass@^4.14.1
+ Addedabbrev@1.1.1(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedamdefine@1.0.1(transitive)
+ Addedansi-regex@2.1.14.1.1(transitive)
+ Addedansi-styles@2.2.13.2.1(transitive)
+ Addedaproba@1.2.0(transitive)
+ Addedare-we-there-yet@1.1.7(transitive)
+ Addedarray-find-index@1.0.2(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasync-foreach@0.1.3(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedblock-stream@0.0.9(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedcamelcase@2.1.15.3.1(transitive)
+ Addedcamelcase-keys@2.1.0(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedcliui@5.0.0(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedconsole-control-strings@1.1.0(transitive)
+ Addedcore-util-is@1.0.21.0.3(transitive)
+ Addedcross-spawn@3.0.1(transitive)
+ Addedcurrently-unhandled@0.4.1(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddecamelize@1.2.0(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addeddelegates@1.0.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedemoji-regex@7.0.3(transitive)
+ Addederror-ex@1.3.2(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedfind-up@1.1.23.0.0(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedfstream@1.0.12(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedgauge@2.7.4(transitive)
+ Addedgaze@1.1.3(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedget-stdin@4.0.1(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedglob@7.1.77.2.3(transitive)
+ Addedglobule@1.3.4(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhas-unicode@2.0.1(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhosted-git-info@2.8.9(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedin-publish@2.0.1(transitive)
+ Addedindent-string@2.1.0(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-arrayish@0.2.1(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addedis-finite@1.1.0(transitive)
+ Addedis-fullwidth-code-point@1.0.02.0.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedis-utf8@0.2.1(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjs-base64@2.6.4(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedload-json-file@1.1.0(transitive)
+ Addedlocate-path@3.0.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedloud-rejection@1.6.0(transitive)
+ Addedlru-cache@4.1.5(transitive)
+ Addedmap-obj@1.0.1(transitive)
+ Addedmeow@3.7.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedminimatch@3.0.83.1.2(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addednan@2.22.0(transitive)
+ Addednode-gyp@3.8.0(transitive)
+ Addednode-sass@4.14.1(transitive)
+ Addednopt@3.0.6(transitive)
+ Addednormalize-package-data@2.5.0(transitive)
+ Addednpmlog@4.1.2(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedosenv@0.1.5(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@3.0.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedparse-json@2.2.0(transitive)
+ Addedpath-exists@2.1.03.0.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpath-type@1.1.0(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpify@2.3.0(transitive)
+ Addedpinkie@2.0.4(transitive)
+ Addedpinkie-promise@2.0.1(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedpseudomap@1.0.2(transitive)
+ Addedpsl@1.13.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedread-pkg@1.1.0(transitive)
+ Addedread-pkg-up@1.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedredent@1.0.0(transitive)
+ Addedrepeating@2.0.1(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedrequire-main-filename@2.0.0(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsass-graph@2.2.5(transitive)
+ Addedscss-tokenizer@0.2.3(transitive)
+ Addedsemver@5.3.0(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsource-map@0.4.4(transitive)
+ Addedspdx-correct@3.2.0(transitive)
+ Addedspdx-exceptions@2.5.0(transitive)
+ Addedspdx-expression-parse@3.0.1(transitive)
+ Addedspdx-license-ids@3.0.20(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedstdout-stream@1.4.1(transitive)
+ Addedstring-width@1.0.23.1.0(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-ansi@3.0.15.2.0(transitive)
+ Addedstrip-bom@2.0.0(transitive)
+ Addedstrip-indent@1.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedtar@2.2.2(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtrim-newlines@1.0.0(transitive)
+ Addedtrue-case-path@1.0.3(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedvalidate-npm-package-license@3.0.4(transitive)
+ Addedverror@1.10.0(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwhich-module@2.0.1(transitive)
+ Addedwide-align@1.1.5(transitive)
+ Addedwrap-ansi@5.1.0(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedy18n@4.0.3(transitive)
+ Addedyallist@2.1.2(transitive)
+ Addedyargs@13.3.2(transitive)
+ Addedyargs-parser@13.1.2(transitive)