-
Notifications
You must be signed in to change notification settings - Fork 1
/
react-sortable-pane.js
1 lines (1 loc) · 62.6 KB
/
react-sortable-pane.js
1
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(()=>(()=>{var e={799:(e,t,n)=>{function r(e){return r="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},r(e)}var i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==(void 0===n.g?"undefined":r(n.g))&&n.g&&n.g.Object===Object&&n.g,c="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,p=l||c||Function("return this")(),f=Object.prototype.toString,h=Math.max,d=Math.min,y=function(){return p.Date.now()};function v(e){var t=r(e);return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==r(e)||function(e){return!!e&&"object"==r(e)}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=s.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,s,a,u,l=0,c=!1,p=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,o=i;return r=i=void 0,l=t,s=e.apply(o,n)}function g(e){return l=e,a=setTimeout(w,t),c?b(e):s}function _(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-l>=o}function w(){var e=y();if(_(e))return S(e);a=setTimeout(w,function(e){var n=t-(e-u);return p?d(n,o-(e-l)):n}(e))}function S(e){return a=void 0,f&&r?b(e):(r=i=void 0,s)}function z(){var e=y(),n=_(e);if(r=arguments,i=this,u=e,n){if(void 0===a)return g(u);if(p)return a=setTimeout(w,t),b(u)}return void 0===a&&(a=setTimeout(w,t)),s}return t=m(t)||0,v(n)&&(c=!!n.leading,o=(p="maxWait"in n)?h(m(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),z.cancel=function(){void 0!==a&&clearTimeout(a),l=0,r=u=i=a=void 0},z.flush=function(){return void 0===a?s:S(y())},z}},981:(e,t,n)=>{function r(e){return r="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},r(e)}e=n.nmd(e);var i="__lodash_hash_undefined__",o=9007199254740991,s="[object Arguments]",a="[object Array]",u="[object Boolean]",l="[object Date]",c="[object Error]",p="[object Function]",f="[object Map]",h="[object Number]",d="[object Object]",y="[object Promise]",v="[object RegExp]",m="[object Set]",b="[object String]",g="[object WeakMap]",_="[object ArrayBuffer]",w="[object DataView]",S=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,O={};O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O[s]=O[a]=O[_]=O[u]=O[w]=O[l]=O[c]=O[p]=O[f]=O[h]=O[d]=O[v]=O[m]=O[b]=O[g]=!1;var x="object"==(void 0===n.g?"undefined":r(n.g))&&n.g&&n.g.Object===Object&&n.g,M="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,E=x||M||Function("return this")(),T="object"==r(t)&&t&&!t.nodeType&&t,k=T&&"object"==r(e)&&e&&!e.nodeType&&e,j=k&&k.exports===T,P=j&&x.process,R=function(){try{return P&&P.binding&&P.binding("util")}catch(e){}}(),I=R&&R.isTypedArray;function W(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function A(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function D(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var L,N,C,U=Array.prototype,H=Function.prototype,V=Object.prototype,q=E["__core-js_shared__"],B=H.toString,F=V.hasOwnProperty,$=(L=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",Y=V.toString,X=RegExp("^"+B.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),G=j?E.Buffer:void 0,J=E.Symbol,K=E.Uint8Array,Q=V.propertyIsEnumerable,Z=U.splice,ee=J?J.toStringTag:void 0,te=Object.getOwnPropertySymbols,ne=G?G.isBuffer:void 0,re=(N=Object.keys,C=Object,function(e){return N(C(e))}),ie=ke(E,"DataView"),oe=ke(E,"Map"),se=ke(E,"Promise"),ae=ke(E,"Set"),ue=ke(E,"WeakMap"),le=ke(Object,"create"),ce=Ie(ie),pe=Ie(oe),fe=Ie(se),he=Ie(ae),de=Ie(ue),ye=J?J.prototype:void 0,ve=ye?ye.valueOf:void 0;function me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _e(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ge;++t<n;)this.add(e[t])}function we(e){var t=this.__data__=new be(e);this.size=t.size}function Se(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function ze(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ee&&ee in Object(e)?function(e){var t=F.call(e,ee),n=e[ee];try{e[ee]=void 0;var r=!0}catch(e){}var i=Y.call(e);return r&&(t?e[ee]=n:delete e[ee]),i}(e):function(e){return Y.call(e)}(e)}function Oe(e){return He(e)&&ze(e)==s}function xe(e,t,n,r,i){return e===t||(null==e||null==t||!He(e)&&!He(t)?e!=e&&t!=t:function(e,t,n,r,i,o){var p=De(e),y=De(t),g=p?a:Pe(e),S=y?a:Pe(t),z=(g=g==s?d:g)==d,O=(S=S==s?d:S)==d,x=g==S;if(x&&Le(e)){if(!Le(t))return!1;p=!0,z=!1}if(x&&!z)return o||(o=new we),p||Ve(e)?Me(e,t,n,r,i,o):function(e,t,n,r,i,o,s){switch(n){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!o(new K(e),new K(t)));case u:case l:case h:return We(+e,+t);case c:return e.name==t.name&&e.message==t.message;case v:case b:return e==t+"";case f:var a=A;case m:var p=1&r;if(a||(a=D),e.size!=t.size&&!p)return!1;var d=s.get(e);if(d)return d==t;r|=2,s.set(e,t);var y=Me(a(e),a(t),r,i,o,s);return s.delete(e),y;case"[object Symbol]":if(ve)return ve.call(e)==ve.call(t)}return!1}(e,t,g,n,r,i,o);if(!(1&n)){var M=z&&F.call(e,"__wrapped__"),E=O&&F.call(t,"__wrapped__");if(M||E){var T=M?e.value():e,k=E?t.value():t;return o||(o=new we),i(T,k,n,r,o)}}return!!x&&(o||(o=new we),function(e,t,n,r,i,o){var s=1&n,a=Ee(e),u=a.length;if(u!=Ee(t).length&&!s)return!1;for(var l=u;l--;){var c=a[l];if(!(s?c in t:F.call(t,c)))return!1}var p=o.get(e);if(p&&o.get(t))return p==t;var f=!0;o.set(e,t),o.set(t,e);for(var h=s;++l<u;){var d=e[c=a[l]],y=t[c];if(r)var v=s?r(y,d,c,t,e,o):r(d,y,c,e,t,o);if(!(void 0===v?d===y||i(d,y,n,r,o):v)){f=!1;break}h||(h="constructor"==c)}if(f&&!h){var m=e.constructor,b=t.constructor;m==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,i,o))}(e,t,n,r,xe,i))}function Me(e,t,n,r,i,o){var s=1&n,a=e.length,u=t.length;if(a!=u&&!(s&&u>a))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var c=-1,p=!0,f=2&n?new _e:void 0;for(o.set(e,t),o.set(t,e);++c<a;){var h=e[c],d=t[c];if(r)var y=s?r(d,h,c,t,e,o):r(h,d,c,e,t,o);if(void 0!==y){if(y)continue;p=!1;break}if(f){if(!W(t,(function(e,t){if(s=t,!f.has(s)&&(h===e||i(h,e,n,r,o)))return f.push(t);var s}))){p=!1;break}}else if(h!==d&&!i(h,d,n,r,o)){p=!1;break}}return o.delete(e),o.delete(t),p}function Ee(e){return function(e,t,n){var r=t(e);return De(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,qe,je)}function Te(e,t){var n,i,o=e.__data__;return("string"==(i=r(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ke(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ue(e)||function(e){return!!$&&$ in e}(e))&&(Ne(e)?X:S).test(Ie(e))}(n)?n:void 0}me.prototype.clear=function(){this.__data__=le?le(null):{},this.size=0},me.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},me.prototype.get=function(e){var t=this.__data__;if(le){var n=t[e];return n===i?void 0:n}return F.call(t,e)?t[e]:void 0},me.prototype.has=function(e){var t=this.__data__;return le?void 0!==t[e]:F.call(t,e)},me.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=le&&void 0===t?i:t,this},be.prototype.clear=function(){this.__data__=[],this.size=0},be.prototype.delete=function(e){var t=this.__data__,n=Se(t,e);return!(n<0||(n==t.length-1?t.pop():Z.call(t,n,1),--this.size,0))},be.prototype.get=function(e){var t=this.__data__,n=Se(t,e);return n<0?void 0:t[n][1]},be.prototype.has=function(e){return Se(this.__data__,e)>-1},be.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ge.prototype.clear=function(){this.size=0,this.__data__={hash:new me,map:new(oe||be),string:new me}},ge.prototype.delete=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},ge.prototype.get=function(e){return Te(this,e).get(e)},ge.prototype.has=function(e){return Te(this,e).has(e)},ge.prototype.set=function(e,t){var n=Te(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},_e.prototype.add=_e.prototype.push=function(e){return this.__data__.set(e,i),this},_e.prototype.has=function(e){return this.__data__.has(e)},we.prototype.clear=function(){this.__data__=new be,this.size=0},we.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},we.prototype.get=function(e){return this.__data__.get(e)},we.prototype.has=function(e){return this.__data__.has(e)},we.prototype.set=function(e,t){var n=this.__data__;if(n instanceof be){var r=n.__data__;if(!oe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ge(r)}return n.set(e,t),this.size=n.size,this};var je=te?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var r=-1,i=null==t?0:t.length,o=0,s=[];++r<i;){var a=t[r];u=a,Q.call(e,u)&&(s[o++]=a)}var u;return s}(te(e)))}:function(){return[]},Pe=ze;function Re(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||z.test(e))&&e>-1&&e%1==0&&e<t}function Ie(e){if(null!=e){try{return B.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(ie&&Pe(new ie(new ArrayBuffer(1)))!=w||oe&&Pe(new oe)!=f||se&&Pe(se.resolve())!=y||ae&&Pe(new ae)!=m||ue&&Pe(new ue)!=g)&&(Pe=function(e){var t=ze(e),n=t==d?e.constructor:void 0,r=n?Ie(n):"";if(r)switch(r){case ce:return w;case pe:return f;case fe:return y;case he:return m;case de:return g}return t});var Ae=Oe(function(){return arguments}())?Oe:function(e){return He(e)&&F.call(e,"callee")&&!Q.call(e,"callee")},De=Array.isArray,Le=ne||function(){return!1};function Ne(e){if(!Ue(e))return!1;var t=ze(e);return t==p||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ce(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Ue(e){var t=r(e);return null!=e&&("object"==t||"function"==t)}function He(e){return null!=e&&"object"==r(e)}var Ve=I?function(e){return function(t){return e(t)}}(I):function(e){return He(e)&&Ce(e.length)&&!!O[ze(e)]};function qe(e){return null!=(t=e)&&Ce(t.length)&&!Ne(t)?function(e,t){var n=De(e),r=!n&&Ae(e),i=!n&&!r&&Le(e),o=!n&&!r&&!i&&Ve(e),s=n||r||i||o,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=a.length;for(var l in e)!t&&!F.call(e,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Re(l,u))||a.push(l);return a}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||V))return re(e);var t,n,r=[];for(var i in Object(e))F.call(e,i)&&"constructor"!=i&&r.push(i);return r}(e);var t}e.exports=function(e,t){return xe(e,t)}},249:function(e){(function(){var t,n,r;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-r)/1e6},n=process.hrtime,r=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})()):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},742:(e,t,n)=>{"use strict";var r=n(665);function i(){}function o(){}o.resetWarningCache=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,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},946:(e,t,n)=>{e.exports=n(742)()},665:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},39:(e,t,n)=>{for(var r=n(387),i="undefined"==typeof window?n.g:window,o=["moz","webkit"],s="AnimationFrame",a=i["request"+s],u=i["cancel"+s]||i["cancelRequest"+s],l=0;!a&&l<o.length;l++)a=i[o[l]+"Request"+s],u=i[o[l]+"Cancel"+s]||i[o[l]+"CancelRequest"+s];if(!a||!u){var c=0,p=0,f=[];a=function(e){if(0===f.length){var t=r(),n=Math.max(0,16.666666666666668-(t-c));c=n+t,setTimeout((function(){var e=f.slice(0);f.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))}return f.push({handle:++p,callback:e,cancelled:!1}),p},u=function(e){for(var t=0;t<f.length;t++)f[t].handle===e&&(f[t].cancelled=!0)}}e.exports=function(e){return a.call(i,e)},e.exports.cancel=function(){u.apply(i,arguments)},e.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=a,e.cancelAnimationFrame=u}},387:function(e){(function(){var t,n,r,i,o,s;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-o)/1e6},n=process.hrtime,i=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),s=1e9*process.uptime(),o=i-s):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},805:(e,t,n)=>{"use strict";function r(e){return r="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},r(e)}t.__esModule=!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},o=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}}();function s(e){return e&&e.__esModule?e:{default:e}}var a=s(n(652)),u=s(n(870)),l=s(n(156)),c=s(n(249)),p=s(n(39)),f=s(n(618)),h=s(n(440)),d=s(n(946)),y=1e3/60,v=function(e){function t(n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.call(this,n),this.wasAnimating=!1,this.animationID=null,this.prevTime=0,this.accumulatedTime=0,this.unreadPropStyle=null,this.clearUnreadPropStyle=function(e){var t=!1,n=r.state,o=n.currentStyle,s=n.currentVelocity,a=n.lastIdealStyle,u=n.lastIdealVelocity;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var c=e[l];"number"==typeof c&&(t||(t=!0,o=i({},o),s=i({},s),a=i({},a),u=i({},u)),o[l]=c,s[l]=0,a[l]=c,u[l]=0)}t&&r.setState({currentStyle:o,currentVelocity:s,lastIdealStyle:a,lastIdealVelocity:u})},this.startAnimationIfNecessary=function(){r.animationID=p.default((function(e){var t=r.props.style;if(f.default(r.state.currentStyle,t,r.state.currentVelocity))return r.wasAnimating&&r.props.onRest&&r.props.onRest(),r.animationID=null,r.wasAnimating=!1,void(r.accumulatedTime=0);r.wasAnimating=!0;var n=e||c.default(),i=n-r.prevTime;if(r.prevTime=n,r.accumulatedTime=r.accumulatedTime+i,r.accumulatedTime>10*y&&(r.accumulatedTime=0),0===r.accumulatedTime)return r.animationID=null,void r.startAnimationIfNecessary();var o=(r.accumulatedTime-Math.floor(r.accumulatedTime/y)*y)/y,s=Math.floor(r.accumulatedTime/y),a={},u={},p={},h={};for(var d in t)if(Object.prototype.hasOwnProperty.call(t,d)){var v=t[d];if("number"==typeof v)p[d]=v,h[d]=0,a[d]=v,u[d]=0;else{for(var m=r.state.lastIdealStyle[d],b=r.state.lastIdealVelocity[d],g=0;g<s;g++){var _=l.default(y/1e3,m,b,v.val,v.stiffness,v.damping,v.precision);m=_[0],b=_[1]}var w=l.default(y/1e3,m,b,v.val,v.stiffness,v.damping,v.precision),S=w[0],z=w[1];p[d]=m+(S-m)*o,h[d]=b+(z-b)*o,a[d]=m,u[d]=b}}r.animationID=null,r.accumulatedTime-=s*y,r.setState({currentStyle:p,currentVelocity:h,lastIdealStyle:a,lastIdealVelocity:u}),r.unreadPropStyle=null,r.startAnimationIfNecessary()}))},this.state=this.defaultState()}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+r(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)}(t,e),o(t,null,[{key:"propTypes",value:{defaultStyle:d.default.objectOf(d.default.number),style:d.default.objectOf(d.default.oneOfType([d.default.number,d.default.object])).isRequired,children:d.default.func.isRequired,onRest:d.default.func},enumerable:!0}]),t.prototype.defaultState=function(){var e=this.props,t=e.defaultStyle,n=e.style,r=t||u.default(n),i=a.default(r);return{currentStyle:r,currentVelocity:i,lastIdealStyle:r,lastIdealVelocity:i}},t.prototype.componentDidMount=function(){this.prevTime=c.default(),this.startAnimationIfNecessary()},t.prototype.componentWillReceiveProps=function(e){null!=this.unreadPropStyle&&this.clearUnreadPropStyle(this.unreadPropStyle),this.unreadPropStyle=e.style,null==this.animationID&&(this.prevTime=c.default(),this.startAnimationIfNecessary())},t.prototype.componentWillUnmount=function(){null!=this.animationID&&(p.default.cancel(this.animationID),this.animationID=null)},t.prototype.render=function(){var e=this.props.children(this.state.currentStyle);return e&&h.default.Children.only(e)},t}(h.default.Component);t.default=v,e.exports=t.default},164:(e,t,n)=>{"use strict";function r(e){return r="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},r(e)}t.__esModule=!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},o=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}}();function s(e){return e&&e.__esModule?e:{default:e}}var a=s(n(652)),u=s(n(870)),l=s(n(156)),c=s(n(249)),p=s(n(39)),f=s(n(618)),h=s(n(440)),d=s(n(946)),y=1e3/60,v=function(e){function t(n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.call(this,n),this.animationID=null,this.prevTime=0,this.accumulatedTime=0,this.unreadPropStyles=null,this.clearUnreadPropStyle=function(e){for(var t=r.state,n=t.currentStyles,o=t.currentVelocities,s=t.lastIdealStyles,a=t.lastIdealVelocities,u=!1,l=0;l<e.length;l++){var c=e[l],p=!1;for(var f in c)if(Object.prototype.hasOwnProperty.call(c,f)){var h=c[f];"number"==typeof h&&(p||(p=!0,u=!0,n[l]=i({},n[l]),o[l]=i({},o[l]),s[l]=i({},s[l]),a[l]=i({},a[l])),n[l][f]=h,o[l][f]=0,s[l][f]=h,a[l][f]=0)}}u&&r.setState({currentStyles:n,currentVelocities:o,lastIdealStyles:s,lastIdealVelocities:a})},this.startAnimationIfNecessary=function(){r.animationID=p.default((function(e){var t=r.props.styles(r.state.lastIdealStyles);if(function(e,t,n){for(var r=0;r<e.length;r++)if(!f.default(e[r],t[r],n[r]))return!1;return!0}(r.state.currentStyles,t,r.state.currentVelocities))return r.animationID=null,void(r.accumulatedTime=0);var n=e||c.default(),i=n-r.prevTime;if(r.prevTime=n,r.accumulatedTime=r.accumulatedTime+i,r.accumulatedTime>10*y&&(r.accumulatedTime=0),0===r.accumulatedTime)return r.animationID=null,void r.startAnimationIfNecessary();for(var o=(r.accumulatedTime-Math.floor(r.accumulatedTime/y)*y)/y,s=Math.floor(r.accumulatedTime/y),a=[],u=[],p=[],h=[],d=0;d<t.length;d++){var v=t[d],m={},b={},g={},_={};for(var w in v)if(Object.prototype.hasOwnProperty.call(v,w)){var S=v[w];if("number"==typeof S)m[w]=S,b[w]=0,g[w]=S,_[w]=0;else{for(var z=r.state.lastIdealStyles[d][w],O=r.state.lastIdealVelocities[d][w],x=0;x<s;x++){var M=l.default(y/1e3,z,O,S.val,S.stiffness,S.damping,S.precision);z=M[0],O=M[1]}var E=l.default(y/1e3,z,O,S.val,S.stiffness,S.damping,S.precision),T=E[0],k=E[1];m[w]=z+(T-z)*o,b[w]=O+(k-O)*o,g[w]=z,_[w]=O}}p[d]=m,h[d]=b,a[d]=g,u[d]=_}r.animationID=null,r.accumulatedTime-=s*y,r.setState({currentStyles:p,currentVelocities:h,lastIdealStyles:a,lastIdealVelocities:u}),r.unreadPropStyles=null,r.startAnimationIfNecessary()}))},this.state=this.defaultState()}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+r(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)}(t,e),o(t,null,[{key:"propTypes",value:{defaultStyles:d.default.arrayOf(d.default.objectOf(d.default.number)),styles:d.default.func.isRequired,children:d.default.func.isRequired},enumerable:!0}]),t.prototype.defaultState=function(){var e=this.props,t=e.defaultStyles,n=e.styles,r=t||n().map(u.default),i=r.map((function(e){return a.default(e)}));return{currentStyles:r,currentVelocities:i,lastIdealStyles:r,lastIdealVelocities:i}},t.prototype.componentDidMount=function(){this.prevTime=c.default(),this.startAnimationIfNecessary()},t.prototype.componentWillReceiveProps=function(e){null!=this.unreadPropStyles&&this.clearUnreadPropStyle(this.unreadPropStyles),this.unreadPropStyles=e.styles(this.state.lastIdealStyles),null==this.animationID&&(this.prevTime=c.default(),this.startAnimationIfNecessary())},t.prototype.componentWillUnmount=function(){null!=this.animationID&&(p.default.cancel(this.animationID),this.animationID=null)},t.prototype.render=function(){var e=this.props.children(this.state.currentStyles);return e&&h.default.Children.only(e)},t}(h.default.Component);t.default=v,e.exports=t.default},349:(e,t,n)=>{"use strict";function r(e){return r="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},r(e)}t.__esModule=!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},o=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}}();function s(e){return e&&e.__esModule?e:{default:e}}var a=s(n(652)),u=s(n(870)),l=s(n(156)),c=s(n(889)),p=s(n(249)),f=s(n(39)),h=s(n(618)),d=s(n(440)),y=s(n(946)),v=1e3/60;function m(e,t,n){var r=t;return null==r?e.map((function(e,t){return{key:e.key,data:e.data,style:n[t]}})):e.map((function(e,t){for(var i=0;i<r.length;i++)if(r[i].key===e.key)return{key:r[i].key,data:r[i].data,style:n[t]};return{key:e.key,data:e.data,style:n[t]}}))}function b(e,t,n,r,i,o,s,u,l){for(var p=c.default(r,i,(function(e,r){var i=t(r);return null==i||h.default(o[e],i,s[e])?(n({key:r.key,data:r.data}),null):{key:r.key,data:r.data,style:i}})),f=[],d=[],y=[],v=[],m=0;m<p.length;m++){for(var b=p[m],g=null,_=0;_<r.length;_++)if(r[_].key===b.key){g=_;break}if(null==g){var w=e(b);f[m]=w,y[m]=w;var S=a.default(b.style);d[m]=S,v[m]=S}else f[m]=o[g],y[m]=u[g],d[m]=s[g],v[m]=l[g]}return[p,f,d,y,v]}var g=function(e){function t(n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.call(this,n),this.unmounting=!1,this.animationID=null,this.prevTime=0,this.accumulatedTime=0,this.unreadPropStyles=null,this.clearUnreadPropStyle=function(e){for(var t=b(r.props.willEnter,r.props.willLeave,r.props.didLeave,r.state.mergedPropsStyles,e,r.state.currentStyles,r.state.currentVelocities,r.state.lastIdealStyles,r.state.lastIdealVelocities),n=t[0],o=t[1],s=t[2],a=t[3],u=t[4],l=0;l<e.length;l++){var c=e[l].style,p=!1;for(var f in c)if(Object.prototype.hasOwnProperty.call(c,f)){var h=c[f];"number"==typeof h&&(p||(p=!0,o[l]=i({},o[l]),s[l]=i({},s[l]),a[l]=i({},a[l]),u[l]=i({},u[l]),n[l]={key:n[l].key,data:n[l].data,style:i({},n[l].style)}),o[l][f]=h,s[l][f]=0,a[l][f]=h,u[l][f]=0,n[l].style[f]=h)}}r.setState({currentStyles:o,currentVelocities:s,mergedPropsStyles:n,lastIdealStyles:a,lastIdealVelocities:u})},this.startAnimationIfNecessary=function(){r.unmounting||(r.animationID=f.default((function(e){if(!r.unmounting){var t=r.props.styles,n="function"==typeof t?t(m(r.state.mergedPropsStyles,r.unreadPropStyles,r.state.lastIdealStyles)):t;if(function(e,t,n,r){if(r.length!==t.length)return!1;for(var i=0;i<r.length;i++)if(r[i].key!==t[i].key)return!1;for(i=0;i<r.length;i++)if(!h.default(e[i],t[i].style,n[i]))return!1;return!0}(r.state.currentStyles,n,r.state.currentVelocities,r.state.mergedPropsStyles))return r.animationID=null,void(r.accumulatedTime=0);var i=e||p.default(),o=i-r.prevTime;if(r.prevTime=i,r.accumulatedTime=r.accumulatedTime+o,r.accumulatedTime>10*v&&(r.accumulatedTime=0),0===r.accumulatedTime)return r.animationID=null,void r.startAnimationIfNecessary();for(var s=(r.accumulatedTime-Math.floor(r.accumulatedTime/v)*v)/v,a=Math.floor(r.accumulatedTime/v),u=b(r.props.willEnter,r.props.willLeave,r.props.didLeave,r.state.mergedPropsStyles,n,r.state.currentStyles,r.state.currentVelocities,r.state.lastIdealStyles,r.state.lastIdealVelocities),c=u[0],f=u[1],d=u[2],y=u[3],g=u[4],_=0;_<c.length;_++){var w=c[_].style,S={},z={},O={},x={};for(var M in w)if(Object.prototype.hasOwnProperty.call(w,M)){var E=w[M];if("number"==typeof E)S[M]=E,z[M]=0,O[M]=E,x[M]=0;else{for(var T=y[_][M],k=g[_][M],j=0;j<a;j++){var P=l.default(v/1e3,T,k,E.val,E.stiffness,E.damping,E.precision);T=P[0],k=P[1]}var R=l.default(v/1e3,T,k,E.val,E.stiffness,E.damping,E.precision),I=R[0],W=R[1];S[M]=T+(I-T)*s,z[M]=k+(W-k)*s,O[M]=T,x[M]=k}}y[_]=O,g[_]=x,f[_]=S,d[_]=z}r.animationID=null,r.accumulatedTime-=a*v,r.setState({currentStyles:f,currentVelocities:d,lastIdealStyles:y,lastIdealVelocities:g,mergedPropsStyles:c}),r.unreadPropStyles=null,r.startAnimationIfNecessary()}})))},this.state=this.defaultState()}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+r(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)}(t,e),o(t,null,[{key:"propTypes",value:{defaultStyles:y.default.arrayOf(y.default.shape({key:y.default.string.isRequired,data:y.default.any,style:y.default.objectOf(y.default.number).isRequired})),styles:y.default.oneOfType([y.default.func,y.default.arrayOf(y.default.shape({key:y.default.string.isRequired,data:y.default.any,style:y.default.objectOf(y.default.oneOfType([y.default.number,y.default.object])).isRequired}))]).isRequired,children:y.default.func.isRequired,willEnter:y.default.func,willLeave:y.default.func,didLeave:y.default.func},enumerable:!0},{key:"defaultProps",value:{willEnter:function(e){return u.default(e.style)},willLeave:function(){return null},didLeave:function(){}},enumerable:!0}]),t.prototype.defaultState=function(){var e,t=this.props,n=t.defaultStyles,r=t.styles,i=t.willEnter,o=t.willLeave,s=t.didLeave,l="function"==typeof r?r(n):r;e=null==n?l:n.map((function(e){for(var t=0;t<l.length;t++)if(l[t].key===e.key)return l[t];return e}));var c=null==n?l.map((function(e){return u.default(e.style)})):n.map((function(e){return u.default(e.style)})),p=null==n?l.map((function(e){return a.default(e.style)})):n.map((function(e){return a.default(e.style)})),f=b(i,o,s,e,l,c,p,c,p),h=f[0];return{currentStyles:f[1],currentVelocities:f[2],lastIdealStyles:f[3],lastIdealVelocities:f[4],mergedPropsStyles:h}},t.prototype.componentDidMount=function(){this.prevTime=p.default(),this.startAnimationIfNecessary()},t.prototype.componentWillReceiveProps=function(e){this.unreadPropStyles&&this.clearUnreadPropStyle(this.unreadPropStyles);var t=e.styles;this.unreadPropStyles="function"==typeof t?t(m(this.state.mergedPropsStyles,this.unreadPropStyles,this.state.lastIdealStyles)):t,null==this.animationID&&(this.prevTime=p.default(),this.startAnimationIfNecessary())},t.prototype.componentWillUnmount=function(){this.unmounting=!0,null!=this.animationID&&(f.default.cancel(this.animationID),this.animationID=null)},t.prototype.render=function(){var e=m(this.state.mergedPropsStyles,this.unreadPropStyles,this.state.currentStyles),t=this.props.children(e);return t&&d.default.Children.only(t)},t}(d.default.Component);t.default=g,e.exports=t.default},652:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=0);return t},e.exports=t.default},889:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t,n){for(var r={},i=0;i<e.length;i++)r[e[i].key]=i;var o={};for(i=0;i<t.length;i++)o[t[i].key]=i;var s=[];for(i=0;i<t.length;i++)s[i]=t[i];for(i=0;i<e.length;i++)if(!Object.prototype.hasOwnProperty.call(o,e[i].key)){var a=n(i,e[i]);null!=a&&s.push(a)}return s.sort((function(e,n){var i=o[e.key],s=o[n.key],a=r[e.key],u=r[n.key];if(null!=i&&null!=s)return o[e.key]-o[n.key];if(null!=a&&null!=u)return r[e.key]-r[n.key];if(null!=i){for(var l=0;l<t.length;l++){var c=t[l].key;if(Object.prototype.hasOwnProperty.call(r,c)){if(i<o[c]&&u>r[c])return-1;if(i>o[c]&&u<r[c])return 1}}return 1}for(l=0;l<t.length;l++)if(c=t[l].key,Object.prototype.hasOwnProperty.call(r,c)){if(s<o[c]&&a>r[c])return 1;if(s>o[c]&&a<r[c])return-1}return-1}))},e.exports=t.default},669:(e,t)=>{"use strict";t.__esModule=!0,t.default={noWobble:{stiffness:170,damping:26},gentle:{stiffness:120,damping:14},wobbly:{stiffness:180,damping:12},stiff:{stiffness:210,damping:20}},e.exports=t.default},704:(e,t,n)=>{"use strict";function r(e){return e&&e.__esModule?e.default:e}var i=n(805);t.y_=r(i),r(n(164)),r(n(349));var o=n(323);t.ST=r(o),r(n(669)),r(n(870)),r(n(550))},550:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){},e.exports=t.default},618:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t,n){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(0!==n[r])return!1;var i="number"==typeof t[r]?t[r]:t[r].val;if(e[r]!==i)return!1}return!0},e.exports=t.default},323:(e,t,n)=>{"use strict";t.__esModule=!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};t.default=function(e,t){return r({},s,t,{val:e})};var i,o=(i=n(669))&&i.__esModule?i:{default:i},s=r({},o.default.noWobble,{precision:.01});e.exports=t.default},156:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t,r,i,o,s,a){var u=r+(-o*(t-i)+-s*r)*e,l=t+u*e;return Math.abs(u)<a&&Math.abs(l-i)<a?(n[0]=i,n[1]=0,n):(n[0]=l,n[1]=u,n)};var n=[0,0];e.exports=t.default},870:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]="number"==typeof e[n]?e[n]:e[n].val);return t},e.exports=t.default},440:e=>{e.exports=function(){return this.React}()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};return(()=>{"use strict";n.r(r),n.d(r,{Pane:()=>Y,SortablePane:()=>J});var e=n(440);function t(e){return t="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},t(e)}var 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=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},s={base:{position:"absolute",userSelect:"none",MsUserSelect:"none"},top:{width:"100%",height:"10px",top:"-5px",left:"0px",cursor:"row-resize"},right:{width:"10px",height:"100%",top:"0px",right:"-5px",cursor:"col-resize"},bottom:{width:"100%",height:"10px",bottom:"-5px",left:"0px",cursor:"row-resize"},left:{width:"10px",height:"100%",top:"0px",left:"-5px",cursor:"col-resize"},topRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",top:"-10px",cursor:"ne-resize"},bottomRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",bottom:"-10px",cursor:"se-resize"},bottomLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",bottom:"-10px",cursor:"sw-resize"},topLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",top:"-10px",cursor:"nw-resize"}},a=function(t){return(0,e.createElement)("div",{className:t.className,style:o({},s.base,s[t.direction],t.replaceStyles||{}),onMouseDown:function(e){t.onResizeStart(e,t.direction)},onTouchStart:function(e){t.onResizeStart(e,t.direction)}},t.children)},u={userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",MsUserSelect:"none"},l={userSelect:"auto",MozUserSelect:"auto",WebkitUserSelect:"auto",MsUserSelect:"auto"},c=function(e,t,n){return Math.max(Math.min(e,n),t)},p=function(e,t){return Math.round(e/t)*t},f=function(e,t){return e.substr(e.length-t.length,t.length)===t},h=function(e){return f(e.toString(),"px")||f(e.toString(),"%")?e.toString():e+"px"},d=["style","className","grid","bounds","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent"],y="__resizable_base__",v=function(n){function r(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var n=function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!==t(n)&&"function"!=typeof n?e:n}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return n.state={isResizing:!1,resizeCursor:"auto",width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0}},n.updateExtendsProps(e),n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),"undefined"!=typeof window&&(window.addEventListener("mouseup",n.onMouseUp),window.addEventListener("mousemove",n.onMouseMove),window.addEventListener("mouseleave",n.onMouseUp),window.addEventListener("touchmove",n.onMouseMove),window.addEventListener("touchend",n.onMouseUp)),n}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+t(n));e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(r,n),i(r,[{key:"updateExtendsProps",value:function(e){this.extendsProps=Object.keys(e).reduce((function(t,n){return-1!==d.indexOf(n)||(t[n]=e[n]),t}),{})}},{key:"getParentSize",value:function(){var e=this.base;if(!e)return{width:window.innerWidth,height:window.innerHeight};var t=!1,n=this.parentNode.style.flexWrap,r=e.style.minWidth;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return e.style.position="absolute",t&&(this.parentNode.style.flexWrap=n),e.style.minWidth=r,i}},{key:"componentDidMount",value:function(){var e=this.size;this.setState({width:this.state.width||e.width,height:this.state.height||e.height});var t=this.parentNode;if(t instanceof HTMLElement&&!this.base){var n=document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.position="absolute",n.style.transform="scale(0, 0)",n.style.left="-2147483647px",n.style.flex="0",n.classList?n.classList.add(y):n.className+=y,t.appendChild(n)}}},{key:"componentWillReceiveProps",value:function(e){this.updateExtendsProps(e)}},{key:"componentWillUnmount",value:function(){if("undefined"!=typeof window){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseleave",this.onMouseUp),window.removeEventListener("touchmove",this.onMouseMove),window.removeEventListener("touchend",this.onMouseUp);var e=this.parentNode,t=this.base;if(!t||!e)return;if(!(e instanceof HTMLElement&&t instanceof Node))return;e.removeChild(t)}}},{key:"calculateNewSize",value:function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"}},{key:"onResizeStart",value:function(e,t){var n=0,r=0;if(e.nativeEvent instanceof MouseEvent){if(n=e.nativeEvent.clientX,r=e.nativeEvent.clientY,3===e.nativeEvent.which)return}else e.nativeEvent instanceof TouchEvent&&(n=e.nativeEvent.touches[0].clientX,r=e.nativeEvent.touches[0].clientY);this.props.onResizeStart&&this.props.onResizeStart(e,t,this.resizable),this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.setState({original:{x:n,y:r,width:this.size.width,height:this.size.height},isResizing:!0,resizeCursor:window.getComputedStyle(e.target).cursor,direction:t})}},{key:"onMouseMove",value:function(e){if(this.state.isResizing){var t=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,n=e instanceof MouseEvent?e.clientY:e.touches[0].clientY,r=this.state,i=r.direction,o=r.original,s=r.width,a=r.height,u=this.props,l=u.lockAspectRatio,h=u.lockAspectRatioExtraHeight,d=u.lockAspectRatioExtraWidth,y=this.props,v=y.maxWidth,m=y.maxHeight,b=y.minWidth,g=y.minHeight,_=this.getParentSize();if(v&&"string"==typeof v&&f(v,"%")){var w=Number(v.replace("%",""))/100;v=_.width*w}if(m&&"string"==typeof m&&f(m,"%")){var S=Number(m.replace("%",""))/100;m=_.height*S}if(b&&"string"==typeof b&&f(b,"%")){var z=Number(b.replace("%",""))/100;b=_.width*z}if(g&&"string"==typeof g&&f(g,"%")){var O=Number(g.replace("%",""))/100;g=_.height*O}v=void 0===v?void 0:Number(v),m=void 0===m?void 0:Number(m),b=void 0===b?void 0:Number(b),g=void 0===g?void 0:Number(g);var x="number"==typeof l?l:o.width/o.height,M=o.width,E=o.height;if(/right/i.test(i)&&(M=o.width+(t-o.x),l&&(E=(M-d)/x+h)),/left/i.test(i)&&(M=o.width-(t-o.x),l&&(E=(M-d)/x+h)),/bottom/i.test(i)&&(E=o.height+(n-o.y),l&&(M=(E-h)*x+d)),/top/i.test(i)&&(E=o.height-(n-o.y),l&&(M=(E-h)*x+d)),"parent"===this.props.bounds){var T=this.parentNode;if(T instanceof HTMLElement){var k=T.getBoundingClientRect(),j=k.left,P=k.top,R=this.resizable.getBoundingClientRect(),I=R.left,W=R.top,A=T.offsetWidth+(j-I),D=T.offsetHeight+(P-W);v=v&&v<A?v:A,m=m&&m<D?m:D}}else if("window"===this.props.bounds){if("undefined"!=typeof window){var L=this.resizable.getBoundingClientRect(),N=L.left,C=L.top,U=window.innerWidth-N,H=window.innerHeight-C;v=v&&v<U?v:U,m=m&&m<H?m:H}}else if(this.props.bounds instanceof HTMLElement){var V=this.props.bounds.getBoundingClientRect(),q=V.left,B=V.top,F=this.resizable.getBoundingClientRect(),$=F.left,Y=F.top;if(!(this.props.bounds instanceof HTMLElement))return;var X=this.props.bounds.offsetWidth+(q-$),G=this.props.bounds.offsetHeight+(B-Y);v=v&&v<X?v:X,m=m&&m<G?m:G}var J=void 0===b?10:b,K=void 0===v||v<0?M:v,Q=void 0===g?10:g,Z=void 0===m||m<0?E:m;if(l){var ee=(Q-h)*x+d,te=(Z-h)*x+d,ne=(J-d)/x+h,re=(K-d)/x+h,ie=Math.max(J,ee),oe=Math.min(K,te),se=Math.max(Q,ne),ae=Math.min(Z,re);M=c(M,ie,oe),E=c(E,se,ae)}else M=c(M,J,K),E=c(E,Q,Z);this.props.grid&&(M=p(M,this.props.grid[0])),this.props.grid&&(E=p(E,this.props.grid[1]));var ue={width:M-o.width,height:E-o.height};s&&"string"==typeof s&&f(s,"%")&&(M=M/_.width*100+"%"),a&&"string"==typeof a&&f(a,"%")&&(E=E/_.height*100+"%"),this.setState({width:this.calculateNewSize(M,"width"),height:this.calculateNewSize(E,"height")}),this.props.onResize&&this.props.onResize(e,i,this.resizable,ue)}}},{key:"onMouseUp",value:function(e){var t=this.state,n=t.isResizing,r=t.direction,i=t.original;if(n){var o={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,o),this.props.size&&this.setState(this.props.size),this.setState({isResizing:!1,resizeCursor:"auto"})}}},{key:"updateSize",value:function(e){this.setState({width:e.width,height:e.height})}},{key:"renderResizer",value:function(){var t=this,n=this.props,r=n.enable,i=n.handleStyles,o=n.handleClasses,s=n.handleWrapperStyle,u=n.handleWrapperClass,l=n.handleComponent;if(!r)return null;var c=Object.keys(r).map((function(n){return!1!==r[n]?(0,e.createElement)(a,{key:n,direction:n,onResizeStart:t.onResizeStart,replaceStyles:i&&i[n],className:o&&o[n]},l&&l[n]?(0,e.createElement)(l[n]):null):null}));return(0,e.createElement)("span",{className:u,style:s},c)}},{key:"render",value:function(){var t=this,n=this.state.isResizing?u:l;return(0,e.createElement)("div",o({ref:function(e){e&&(t.resizable=e)},style:o({position:"relative"},n,this.props.style,this.sizeStyle,{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box"}),className:this.props.className},this.extendsProps),this.state.isResizing&&(0,e.createElement)("div",{style:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:""+(this.state.resizeCursor||"auto"),opacity:"0",position:"fixed",zIndex:"9999",top:"0",left:"0",bottom:"0",right:"0"}}),this.props.children,this.renderResizer())}},{key:"parentNode",get:function(){return this.resizable.parentNode}},{key:"propsSize",get:function(){return this.props.size||this.props.defaultSize}},{key:"base",get:function(){var e=this.parentNode;if(e)for(var t=[].slice.call(e.children),n=0;n<t.length;n+=1){var r=t[n];if(r instanceof HTMLElement&&r.classList.contains(y))return r}}},{key:"size",get:function(){var e=0,t=0;if("undefined"!=typeof window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;"relative"!==i&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=i}return{width:e,height:t}}},{key:"sizeStyle",get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&f(e.propsSize[t].toString(),"%")){if(f(e.state[t].toString(),"%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return h(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?h(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?h(t.height):n("height")}}}]),r}(e.Component);v.defaultProps={onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0};const m=v;var b=n(981),g=n.n(b),_=n(704),w=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__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),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++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),S="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,z=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),O="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(z):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},x=["top","right","bottom","left","width","height","size","weight"],M="undefined"!=typeof MutationObserver,E=function(){function e(){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 o(){n&&(n=!1,e()),r&&a()}function s(){O(o)}function a(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,20);i=e}return a}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.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},e.prototype.connect_=function(){S&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),M?(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)},e.prototype.disconnect_=function(){S&&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)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;x.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),T=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},k=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||z},j=A(0,0,0,0);function P(e){return parseFloat(e)||0}function R(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+P(e["border-"+n+"-width"])}),0)}var I="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof k(e).SVGGraphicsElement}:function(e){return e instanceof k(e).SVGElement&&"function"==typeof e.getBBox};function W(e){return S?I(e)?function(e){var t=e.getBBox();return A(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return j;var r=k(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){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-=R(r,"left","right")+o),Math.round(u+s)!==n&&(u-=R(r,"top","bottom")+s)),!function(e){return e===k(e).document.documentElement}(e)){var l=Math.round(a+o)-t,c=Math.round(u+s)-n;1!==Math.abs(l)&&(a-=l),1!==Math.abs(c)&&(u-=c)}return A(i.left,i.top,a,u)}(e):j}function A(e,t,n,r){return{x:e,y:t,width:n,height:r}}var D=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=A(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=W(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),L=function(e,t){var n,r,i,o,s,a,u,l=(r=(n=t).x,i=n.y,o=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(a.prototype),T(u,{x:r,y:i,width:o,height:s,top:i,right:r+o,bottom:s+i,left:r}),u);T(this,{target:e,contentRect:l})},N=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new w,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.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 k(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new D(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.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 k(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))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new L(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),C="undefined"!=typeof WeakMap?new WeakMap:new w,U=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=E.getInstance(),r=new N(t,n,this);C.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){U.prototype[e]=function(){var t;return(t=C.get(this))[e].apply(t,arguments)}}));const H=void 0!==z.ResizeObserver?z.ResizeObserver:U;var V=n(799),q=n.n(V),B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};function F(e,t){function n(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var $=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Y=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return F(n,t),n.prototype.componentDidUpdate=function(e){g()(e.size,this.props.size)||this.props.onSizeChange&&this.props.onSizeChange()},Object.defineProperty(n.prototype,"createAllowedProps",{get:function(){var e=this;return Object.keys(this.props).reduce((function(t,n){return-1!==["resizable","onSizeChange"].indexOf(n)||(t[n]=e.props[n]),t}),{})},enumerable:!0,configurable:!0}),n.prototype.render=function(){return(0,e.createElement)(m,$({enable:{top:!1,right:this.props.resizable&&this.props.resizable.x,bottom:this.props.resizable&&this.props.resizable.y,left:!1,topRight:!1,bottomRight:this.props.resizable&&this.props.resizable.xy,bottomLeft:!1,topLeft:!1}},this.createAllowedProps),this.props.children)},n.defaultProps={minWidth:0,minHeight:0,maxWidth:void 0,maxHeight:void 0,style:{},className:"",grid:[1,1],resizable:{x:!0,y:!0,xy:!0}},n}(e.Component),X={right:"x",bottom:"y",bottomRight:"xy"},G={damping:30,stiffness:500},J=function(t){function n(e){var n=t.call(this,e)||this;n.getSurroundingHalfSizes=function(e,t,n){var r=e+1,i=e-1;return t.reduce((function(e,t,o){var s={previous:0,next:0};return s.previous=o<i?e.previous+t+n:o===i?e.previous+t/2:e.previous,s.next=o<r?e.next+t+n:o===r?e.next+t/2:e.next,s}),{previous:0,next:0})};var r=e.order||e.defaultOrder,i=e.children||[];return n.state={delta:0,mouse:0,isPressed:!1,lastPressed:0,isResizing:!1,panes:r?r.map((function(e){var t=i.find((function(t){return t.key===e}));if(void 0===t)throw new Error("key ["+e+"] is not found in props.children. Please set correct key name to Pane component.");return{key:t.key,ref:null}})):i.map((function(e){return{key:e.key,ref:null}}))},n.sizePropsUpdated=!1,n.handleTouchMove=n.handleTouchMove.bind(n),n.handleMouseUp=n.handleMouseUp.bind(n),n.handleMove=n.handleMove.bind(n),n.debounceUpdate=q()((function(){return n.forceUpdate()}),100),n}return F(n,t),n.prototype.componentDidMount=function(){var e=this;if("undefined"!=typeof window&&this.panesWrapper){var t=this.panesWrapper;t.addEventListener("touchmove",this.handleTouchMove),t.addEventListener("touchend",this.handleMouseUp),t.addEventListener("mousemove",this.handleMove),t.addEventListener("mouseup",this.handleMouseUp),t.addEventListener("mouseleave",this.handleMouseUp),this.resizeObserver=new H(this.debounceUpdate)}if(this.panesWrapper&&this.panesWrapper.parentElement instanceof Element&&this.resizeObserver.observe(this.panesWrapper),this.panesWrapper&&this.panesWrapper.children){var n=[].slice.apply(this.panesWrapper.children)||[],r=this.panes.map((function(t,r){return{key:t.key,ref:n[e.order[r]]}}));this.setState({panes:r})}},n.prototype.componentDidUpdate=function(e){var t=this,n=this.state.panes,r=this.props.children||[];if(r.length>n.length)return this.addPane();if(r.length<n.length)return this.removePane();if(!g()(e.order,this.props.order)){if(!this.panesWrapper)return;var i=(this.props.order||[]).map((function(e){var n=[].slice.apply(t.props.children).findIndex((function(t){return t.key===e}));return{ref:t.panesWrapper.children[n],key:e}}));this.setState({panes:i})}},n.prototype.componentWillUnmount=function(){if("undefined"!=typeof window&&this.panesWrapper){var e=this.panesWrapper;e.removeEventListener("touchmove",this.handleTouchMove),e.removeEventListener("touchend",this.handleMouseUp),e.removeEventListener("mousemove",this.handleMove),e.removeEventListener("mouseup",this.handleMouseUp),this.panesWrapper&&this.panesWrapper.parentElement instanceof Element&&this.resizeObserver.unobserve(this.panesWrapper)}},Object.defineProperty(n.prototype,"order",{get:function(){var e=this.props.children||[];return this.props.order?this.props.order.map((function(t){return e.findIndex((function(e){return t===e.key}))})):this.panes.map((function(t){return e.findIndex((function(e){return t.key===e.key}))}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"panes",{get:function(){return this.state.panes.filter((function(e){return!!e}))},enumerable:!0,configurable:!0}),n.prototype.onResize=function(e,t,n,r,i){var o=this.state.panes;this.forceUpdate();var s,a=o[this.order.indexOf(e)];a&&this.props.onResize&&("right"!==n&&"bottom"!==n&&"bottomRight"!==n||(s=X[n],this.props.onResize(t,a.key,s,r,i)))},n.prototype.getPaneSizeList=function(){var e=this.panes.map((function(e){return Number(e.ref&&e.ref.offsetWidth||0)})),t=this.panes.map((function(e){return Number(e.ref&&e.ref.offsetHeight||0)}));return this.isHorizontal()?e:t},n.prototype.getItemCountByPosition=function(e,t){var n=this.getPaneSizeList(),r=this.props.margin,i=this.getSurroundingHalfSizes(t,n,r||0);return e+n[t]>i.next+10?t+1:e<i.previous-10?t-1:t},n.prototype.getItemPositionByIndex=function(e){var t=this.getPaneSizeList(),n=0;if(t.some((function(e){return"string"==typeof e})))return 0;for(var r=0;r<e;r+=1)n+=t[r]+(this.props.margin||0);return n},n.prototype.isHorizontal=function(){return"horizontal"===this.props.direction},n.prototype.addPane=function(){var e=this;if(this.panesWrapper&&this.panesWrapper.children){var t=this.panes;(this.props.children||[]).forEach((function(n,r){var i=e.panes.map((function(e){return e.key}));if(-1===i.indexOf(n.key)){var o={key:n.key,ref:e.panesWrapper.children[r]};t.splice(r,0,o)}})),this.setState({panes:t})}},n.prototype.removePane=function(){var e=this,t=this.panes;this.panes.forEach((function(n,r){-1===(e.props.children||[]).map((function(e){return e.key})).indexOf(n.key)&&t.splice(r,1)})),this.setState({panes:t})},n.prototype.handleResizeStart=function(e,t,n){var r=this.state.panes;this.setState({isResizing:!0});var i=r[this.order.indexOf(e)].key;if(void 0!==i&&this.props.onResizeStart){var o;if("right"!==n&&"bottom"!==n&&"bottomRight"!==n)return;o=X[n],this.props.onResizeStart(t,i,o)}},n.prototype.handleResizeStop=function(e,t,n,r,i){var o=this.state.panes;this.setState({isResizing:!1});var s=o[this.order.indexOf(e)].key;if(void 0!==s&&this.props.onResizeStop){var a;if("right"!==n&&"bottom"!==n&&"bottomRight"!==n)return;a=X[n],this.props.onResizeStop(t,s,a,r,i)}},n.prototype.handleMouseDown=function(e,t,n,r){if(!(this.props.dragHandleClassName&&r.target instanceof HTMLElement)||r.target.classList.contains(this.props.dragHandleClassName)){var i=0;if(window&&window.TouchEvent&&r.nativeEvent instanceof TouchEvent){var o=r.nativeEvent.touches[0];i=this.isHorizontal()?o.pageX-t:o.pageY-n}else if(MouseEvent&&r.nativeEvent instanceof MouseEvent){var s=r.nativeEvent;i=this.isHorizontal()?s.pageX-t:s.pageY-n}if(this.setState({delta:i,mouse:this.isHorizontal()?t:n,isPressed:!0,lastPressed:e}),this.props.children){var a=this.props.children[e];if(a&&(a.props.onMouseDown&&a.props.onMouseDown(r),this.props.onDragStart)){var u=this.panes.find((function(e){return e.key===a.key}));u&&u.ref&&this.props.onDragStart(r,a.key,u.ref)}}}},n.prototype.handleMove=function(e){var t,n,r,i,o,s,a,u,l=e.pageX,c=e.pageY,p=this.state,f=p.isPressed,h=p.delta,d=p.lastPressed,y=p.isResizing,v=p.panes;if(f&&!y){var m=this.isHorizontal()?l-h:c-h,b=(this.props.children||[]).length,_=this.getItemCountByPosition(m,this.order.indexOf(d)),w=(s=Math.round(_),void 0===(a=0)&&(a=s),void 0===(u=b-1)&&(u=s),Math.max(Math.min(s,u),a)),S=(t=v,n=this.order.indexOf(d),r=w,o=(i=t.slice(0))[n],i.splice(n,1),i.splice(r,0,o),i);if(this.setState({mouse:m,panes:S}),!this.props.onOrderChange)return;g()(v,S)||this.props.onOrderChange&&this.props.onOrderChange(S.map((function(e){return String(e.key)})))}},n.prototype.handleTouchStart=function(e,t,n,r,i){i.props.onTouchStart&&i.props.onTouchStart(r),this.handleMouseDown(e,t,n,r)},n.prototype.handleTouchMove=function(e){e.preventDefault(),this.handleMove(e.touches[0])},n.prototype.handleMouseUp=function(e){var t=this.props.children||[];if(0!==t.length){var n=this.state.isPressed;this.setState({isPressed:!1,delta:0});var r=t[this.state.lastPressed];if(r.key,this.props.isSortable){var i=this.state.panes;if(this.props.onDragStop&&n){var o=this.panes.find((function(e){return e.key===r.key}));o&&o.ref&&this.props.onDragStop(e,r.key,o.ref,i.map((function(e){return String(e.key)})))}}}},n.prototype.renderPanes=function(){var t=this,n=this.state,r=n.mouse,i=n.isPressed,o=n.lastPressed,s=n.isResizing,a=this.props,u=a.disableEffect,l=a.isSortable,c=a.springConfig;return(this.props.children||[]).map((function(n,a){var p=t.props.order?t.getItemPositionByIndex(t.props.order.indexOf(String(n.key))):t.getItemPositionByIndex(t.order.indexOf(a)),f=(0,_.ST)(p,c),h=o===a&&i&&!s?{scale:u?1:(0,_.ST)(1.05,c),shadow:u?0:(0,_.ST)(16,c),x:t.isHorizontal()?r:0,y:t.isHorizontal()?0:r}:{scale:u?1:(0,_.ST)(1,c),shadow:u?0:(0,_.ST)(0,c),x:t.isHorizontal()?f:0,y:t.isHorizontal()?0:f};return(0,e.createElement)(_.y_,{style:h,key:String(n.key)},(function(r){var u=r.scale,c=r.shadow,p=r.x,f=r.y,h=t.onResize.bind(t,a),d=l?t.handleMouseDown.bind(t,a,p,f):function(e){n.props.onMouseDown&&n.props.onMouseDown(e)},y=t.handleTouchStart.bind(t,a,p,f,n),v=t.handleResizeStart.bind(t,a),m=t.handleResizeStop.bind(t,a),b=$({},n.props.style,{boxShadow:"rgba(0, 0, 0, 0.2) 0px "+c+"px "+2*c+"px 0px",transform:"translate3d("+p+"px, "+f+"px, 0px) scale("+u+")",WebkitTransform:"translate3d("+p+"px, "+f+"px, 0px) scale("+u+")",MozTransform:"translate3d("+p+"px, "+f+"px, 0px) scale("+u+")",MsTransform:"translate3d("+p+"px, "+f+"px, 0px) scale("+u+")",zIndex:a===o&&t.state.isPressed?2147483647:n.props.style&&n.props.style.zIndex||"auto",position:"absolute",userSelect:i||s?"none":"auto"});return(0,e.cloneElement)(n,{onMouseDown:d,onTouchStart:y,onResizeStart:v,onResizeStop:m,onResize:h,onSizeChange:function(){return t.forceUpdate()},style:b})}))}))},n.prototype.render=function(){var t=this,n=this.props,r=n.style,i=n.className;return(0,e.createElement)("div",{ref:function(e){e&&(t.panesWrapper=e)},className:i,style:$({position:"relative",height:"100%"},r)},this.renderPanes())},n.defaultProps={direction:"horizontal",style:{},children:[],margin:0,onClick:function(){return null},onTouchStart:function(){return null},onResizeStart:function(){return null},onResize:function(){return null},onResizeStop:function(){return null},onDragStart:function(){return null},onDragStop:function(){return null},onOrderChange:function(){return null},className:"",disableEffect:!1,isSortable:!0,springConfig:G},n}(e.Component)})(),r})()));