From d70f3fdb0f63f75b32342c0c092ee4fc03f35d3a Mon Sep 17 00:00:00 2001 From: Kacper Banasik Date: Wed, 29 Aug 2018 14:15:24 +0200 Subject: [PATCH] Add getCroppedCanvas() method Signed-off-by: Kacper Banasik --- component/Cropper.js | 13 +++++++--- dist/app.js | 61 ++++++++++++++++++++++++-------------------- lib/Cropper.js | 16 +++++++++--- 3 files changed, 57 insertions(+), 33 deletions(-) diff --git a/component/Cropper.js b/component/Cropper.js index 6f0e30d..d937c71 100644 --- a/component/Cropper.js +++ b/component/Cropper.js @@ -496,10 +496,10 @@ class Cropper extends Component { } } - // crop image - crop () { + // get cropped canvas + getCroppedCanvas () { const img = findDOMNode(this.img) - let canvas = document.createElement('canvas') + const canvas = document.createElement('canvas') const { x, y, @@ -510,6 +510,13 @@ class Cropper extends Component { canvas.width = width canvas.height = height canvas.getContext('2d').drawImage(img, x, y, width, height, 0, 0, width, height) + return canvas + } + + // crop image + crop () { + const canvas = this.getCroppedCanvas() + return canvas.toDataURL() } diff --git a/dist/app.js b/dist/app.js index 83d529f..b0a6a89 100644 --- a/dist/app.js +++ b/dist/app.js @@ -1,29 +1,4 @@ -!function(e){function t(e){delete installedChunks[e]}function n(e){var t=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.src=d.p+""+e+"."+_+".hot-update.js",t.appendChild(n)}function r(){return new Promise(function(e,t){if("undefined"==typeof XMLHttpRequest)return t(new Error("No browser support"));try{var n=new XMLHttpRequest,r=d.p+""+_+".hot-update.json";n.open("GET",r,!0),n.timeout=1e4,n.send(null)}catch(e){return t(e)}n.onreadystatechange=function(){if(4===n.readyState)if(0===n.status)t(new Error("Manifest request to "+r+" timed out."));else if(404===n.status)e();else if(200!==n.status&&304!==n.status)t(new Error("Manifest request to "+r+" failed."));else{try{var o=JSON.parse(n.responseText)}catch(e){return void t(e)}e(o)}}})}function o(e){var t=N[e];if(!t)return d;var n=function(n){return t.hot.active?(N[n]?N[n].parents.indexOf(e)<0&&N[n].parents.push(e):(C=[e],m=n),t.children.indexOf(n)<0&&t.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+e),C=[]),d(n)};for(var r in d)Object.prototype.hasOwnProperty.call(d,r)&&"e"!==r&&Object.defineProperty(n,r,function(e){return{configurable:!0,enumerable:!0,get:function(){return d[e]},set:function(t){d[e]=t}}}(r));return n.e=function(e){function t(){P--,"prepare"===T&&(S[e]||c(e),0===P&&0===k&&p())}return"ready"===T&&a("prepare"),P++,d.e(e).then(t,function(e){throw t(),e})},n}function i(e){var t={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],_main:m!==e,active:!0,accept:function(e,n){if(void 0===e)t._selfAccepted=!0;else if("function"==typeof e)t._selfAccepted=e;else if("object"==typeof e)for(var r=0;r=0&&t._disposeHandlers.splice(n,1)},check:u,apply:f,status:function(e){if(!e)return T;x.push(e)},addStatusHandler:function(e){x.push(e)},removeStatusHandler:function(e){var t=x.indexOf(e);t>=0&&x.splice(t,1)},data:E[e]};return m=void 0,t}function a(e){T=e;for(var t=0;t0;){var i=o.pop(),a=i.id,s=i.chain;if((l=N[a])&&!l.hot._selfAccepted){if(l.hot._selfDeclined)return{type:"self-declined",chain:s,moduleId:a};if(l.hot._main)return{type:"unaccepted",chain:s,moduleId:a};for(var u=0;u=0||(p.hot._acceptedDependencies[a]?(n[c]||(n[c]=[]),r(n[c],[a])):(delete n[c],t.push(c),o.push({chain:s.concat([c]),id:c})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:n}}(c):{type:"disposed",moduleId:g};var w=!1,x=!1,k=!1,P="";switch(b.chain&&(P="\nUpdate propagation: "+b.chain.join(" -> ")),b.type){case"self-declined":n.onDeclined&&n.onDeclined(b),n.ignoreDeclined||(w=new Error("Aborted because of self decline: "+b.moduleId+P));break;case"declined":n.onDeclined&&n.onDeclined(b),n.ignoreDeclined||(w=new Error("Aborted because of declined dependency: "+b.moduleId+" in "+b.parentId+P));break;case"unaccepted":n.onUnaccepted&&n.onUnaccepted(b),n.ignoreUnaccepted||(w=new Error("Aborted because "+c+" is not accepted"+P));break;case"accepted":n.onAccepted&&n.onAccepted(b),x=!0;break;case"disposed":n.onDisposed&&n.onDisposed(b),k=!0;break;default:throw new Error("Unexception type "+b.type)}if(w)return a("abort"),Promise.reject(w);if(x){h[c]=v[c],r(f,b.outdatedModules);for(c in b.outdatedDependencies)Object.prototype.hasOwnProperty.call(b.outdatedDependencies,c)&&(p[c]||(p[c]=[]),r(p[c],b.outdatedDependencies[c]))}k&&(r(f,[b.moduleId]),h[c]=m)}var S=[];for(i=0;i0;)if(c=R.pop(),l=N[c]){var M={},O=l.hot._disposeHandlers;for(u=0;u=0&&D.parents.splice(I,1))}}var L,U;for(c in p)if(Object.prototype.hasOwnProperty.call(p,c)&&(l=N[c]))for(U=p[c],u=0;u=0&&l.children.splice(I,1);a("apply"),_=y;for(c in h)Object.prototype.hasOwnProperty.call(h,c)&&(e[c]=h[c]);var j=null;for(c in p)if(Object.prototype.hasOwnProperty.call(p,c)){l=N[c],U=p[c];var B=[];for(i=0;i=0||B.push(o);for(i=0;i1){for(var h=Array(d),m=0;m1){for(var v=Array(g),y=0;y]/;e.exports=o},function(e,t,n){"use strict";var r,o=n(5),i=n(32),a=/^[ \r\n\t\f]/,s=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,u=n(40),l=u(function(e,t){if(e.namespaceURI!==i.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML=""+t+"";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(o.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(l=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),c=null}e.exports=l},function(e,t,n){"use strict";e.exports=n(15)},function(e,t,n){t=e.exports=n(86)(void 0),t.push([e.i,"body{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.container{width:50pc;margin:0 auto}",""])},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=0;a-1||a("96",e),!l.plugins[n]){t.extractEvents||a("97",e),l.plugins[n]=t;var r=t.eventTypes;for(var i in r)o(r[i],t,i)||a("98",i,e)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)&&a("99",n),l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];i(s,t,n)}return!0}return!!e.registrationName&&(i(e.registrationName,t,n),!0)}function i(e,t,n){l.registrationNameModules[e]&&a("100",e),l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(2),s=(n(0),null),u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s&&a("101"),s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];u.hasOwnProperty(n)&&u[n]===o||(u[n]&&a("102",n),u[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var o=l.registrationNameModules[n[r]];if(o)return o}}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=l},function(e,t,n){"use strict";function r(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function o(e){return"topMouseMove"===e||"topTouchMove"===e}function i(e){return"topMouseDown"===e||"topTouchStart"===e}function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=v.getNodeFromInstance(r),t?m.invokeGuardedCallbackWithCatch(o,n,e):m.invokeGuardedCallback(o,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function i(e,t){var n=s.get(e);if(!n){return null}return n}var a=n(2),s=(n(10),n(19)),u=(n(7),n(8)),l=(n(0),n(1),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){l.validateCallback(t,n);var o=i(e);if(!o)return null;o._pendingCallbacks?o._pendingCallbacks.push(t):o._pendingCallbacks=[t],r(o)},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=i(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t,n){var o=i(e,"replaceState");o&&(o._pendingStateQueue=[t],o._pendingReplaceState=!0,void 0!==n&&null!==n&&(l.validateCallback(n,"replaceState"),o._pendingCallbacks?o._pendingCallbacks.push(n):o._pendingCallbacks=[n]),r(o))},enqueueSetState:function(e,t){var n=i(e,"setState");if(n){(n._pendingStateQueue||(n._pendingStateQueue=[])).push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e&&a("122",t,o(e))}});e.exports=l},function(e,t,n){"use strict";var r=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e};e.exports=r},function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,t>=32||13===t?t:0}e.exports=r},function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return!!r&&!!n[r]}function o(e){return r}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=o},function(e,t,n){"use strict";function r(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=r},function(e,t,n){"use strict";/** - * Checks if an event is supported in the current execution environment. - * - * NOTE: This will not work correctly for non-generic events such as `change`, - * `reset`, `load`, `error`, and `select`. - * - * Borrows from Modernizr. - * - * @param {string} eventNameSuffix Event name, e.g. "click". - * @param {?boolean} capture Check if the capture phase is supported. - * @return {boolean} True if the event is supported. - * @internal - * @license Modernizr 3.0.0pre (Custom Build) | MIT - */ -function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=n(5);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=null===e||!1===e,r=null===t||!1===t;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}e.exports=r},function(e,t,n){"use strict";var r=(n(3),n(6)),o=(n(1),r);e.exports=o},function(e,t,n){"use strict";e.exports=n(119)},function(e,t,n){"use strict";var r=n(6),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},function(e,t,n){"use strict";function r(e){try{e.focus()}catch(e){}}e.exports=r},function(e,t,n){"use strict";function r(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}e.exports=r},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?h=d.concat(h):g=-1,h.length&&s())}function s(){if(!m){var e=o(a);m=!0;for(var t=h.length;t;){for(d=h,h=[];++g1)for(var n=1;n.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,s=g.createElement(j,{child:t});if(e){var u=C.get(e);a=u._processChildContext(u._context)}else a=P;var c=f(n);if(c){var p=c._currentElement,h=p.props.child;if(A(h,t)){var m=c._renderedComponent.getPublicInstance(),v=r&&function(){r.call(m)};return B._updateRootComponent(c,s,a,n,v),m}B.unmountComponentAtNode(n)}var y=o(n),b=y&&!!i(y),_=l(n),E=b&&!c&&!_,w=B._renderNewRootComponent(s,n,E,a)._renderedComponent.getPublicInstance();return r&&r.call(w),w},render:function(e,t,n){return B._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){c(e)||d("40");var t=f(e);if(!t){l(e),1===e.nodeType&&e.hasAttribute(R);return!1}return delete L[t._instance.rootID],k.batchedUpdates(u,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,i,a){if(c(t)||d("41"),i){var s=o(t);if(w.canReuseMarkup(e,s))return void y.precacheNode(n,s);var u=s.getAttribute(w.CHECKSUM_ATTR_NAME);s.removeAttribute(w.CHECKSUM_ATTR_NAME);var l=s.outerHTML;s.setAttribute(w.CHECKSUM_ATTR_NAME,u);var p=e,f=r(p,l),m=" (client) "+p.substring(f-20,f+20)+"\n (server) "+l.substring(f-20,f+20);t.nodeType===O&&d("42",m)}if(t.nodeType===O&&d("43"),a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else I(t,e),y.precacheNode(n,t.firstChild)}};e.exports=B},function(e,t,n){"use strict";var r=n(2),o=n(15),i=(n(0),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||!1===e?i.EMPTY:o.isValidElement(e)?"function"==typeof e.type?i.COMPOSITE:i.HOST:void r("26",e)}});e.exports=i},function(e,t,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){r.currentScrollLeft=e.x,r.currentScrollTop=e.y}};e.exports=r},function(e,t,n){"use strict";function r(e,t){return null==t&&o("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}var o=n(2);n(0);e.exports=r},function(e,t,n){"use strict";function r(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}e.exports=r},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.HOST?e._renderedComponent:t===o.EMPTY?null:void 0}var o=n(64);e.exports=r},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(5),i=null;e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.type,n=e.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===t||"radio"===t)}function o(e){return e._wrapperState.valueTracker}function i(e,t){e._wrapperState.valueTracker=t}function a(e){delete e._wrapperState.valueTracker}function s(e){var t;return e&&(t=r(e)?""+e.checked:e.value),t}var u=n(4),l={_getTrackerFromNode:function(e){return o(u.getInstanceFromNode(e))},track:function(e){if(!o(e)){var t=u.getNodeFromInstance(e),n=r(t)?"checked":"value",s=Object.getOwnPropertyDescriptor(t.constructor.prototype,n),l=""+t[n];t.hasOwnProperty(n)||"function"!=typeof s.get||"function"!=typeof s.set||(Object.defineProperty(t,n,{enumerable:s.enumerable,configurable:!0,get:function(){return s.get.call(this)},set:function(e){l=""+e,s.set.call(this,e)}}),i(e,{getValue:function(){return l},setValue:function(e){l=""+e},stopTracking:function(){a(e),delete t[n]}}))}},updateValueIfChanged:function(e){if(!e)return!1;var t=o(e);if(!t)return l.track(e),!0;var n=t.getValue(),r=s(u.getNodeFromInstance(e));return r!==n&&(t.setValue(r),!0)},stopTracking:function(e){var t=o(e);t&&t.stopTracking()}};e.exports=l},function(e,t,n){"use strict";function r(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}function o(e){return"function"==typeof e&&void 0!==e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function i(e,t){var n;if(null===e||!1===e)n=l.create(i);else if("object"==typeof e){var s=e,u=s.type;if("function"!=typeof u&&"string"!=typeof u){var f="";f+=r(s._owner),a("130",null==u?u:typeof u,f)}"string"==typeof s.type?n=c.createInternalComponent(s):o(s.type)?(n=new s.type(s),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new p(s)}else"string"==typeof e||"number"==typeof e?n=c.createInstanceForText(e):a("131",typeof e);return n._mountIndex=0,n._mountImage=null,n}var a=n(2),s=n(3),u=n(118),l=n(59),c=n(61),p=(n(177),n(0),n(1),function(e){this.construct(e)});s(p.prototype,u,{_instantiateReactComponent:i}),e.exports=i},function(e,t,n){"use strict";function r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!o[e.type]:"textarea"===t}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=r},function(e,t,n){"use strict";var r=n(5),o=n(26),i=n(27),a=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){if(3===e.nodeType)return void(e.nodeValue=t);i(e,o(t))})),e.exports=a},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?l.escape(e.key):t.toString(36)}function o(e,t,n,i){var f=typeof e;if("undefined"!==f&&"boolean"!==f||(e=null),null===e||"string"===f||"number"===f||"object"===f&&e.$$typeof===s)return n(i,e,""===t?c+r(e,0):t),1;var d,h,m=0,g=""===t?c:t+p;if(Array.isArray(e))for(var v=0;v=i&&(n=i-u,e.setState({originX:n})),r+l>=a&&(r=a-l,e.setState({originY:r})),e.setState({maxLeft:c,maxTop:p}),e.calcPosition(u,l,n,r,function(){var t=e.state,n=t.frameWidth4Style,r=t.frameHeight4Style,o=t.toImgTop4Style,i=t.toImgLeft4Style;e.setState({frameWidth:n,frameHeight:r,originX:i,originY:o})})}})}},{key:"componentDidMount",value:function(){document.addEventListener("mousemove",this.handleDrag.bind(this)),document.addEventListener("touchmove",this.handleDrag.bind(this)),document.addEventListener("mouseup",this.handleDragStop.bind(this)),document.addEventListener("touchend",this.handleDragStop.bind(this)),this.imgGetSizeBeforeLoad()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousemove",this.handleDrag.bind(this)),document.removeEventListener("touchmove",this.handleDrag.bind(this)),document.removeEventListener("mouseup",this.handleDragStop.bind(this)),document.removeEventListener("touchend",this.handleDragStop.bind(this))}},{key:"componentWillReceiveProps",value:function(e){var t=this,n=this.props,r=n.width,o=n.height,i=n.originX,a=n.originY;r===e.width&&o===e.height&&i===e.originX&&a===e.originY||this.setState({frameWidth:e.width,frameHeight:e.height,originX:e.originX,originY:e.originY},function(){return t.initStyles()})}},{key:"imgOnLoad",value:function(){this.props.onImgLoad()}},{key:"imgGetSizeBeforeLoad",value:function(){var e=this;setTimeout(function(){var t=c.findDOMNode(e.refs.img);if(t&&t.naturalWidth){var n=e.props.beforeImgLoad,r=t.offsetWidth/t.naturalWidth,o=parseInt(t.naturalHeight*r);e.setState({imgHeight:o,imgLoaded:!0},function(){return e.initStyles()}),n()}else t&&e.imgGetSizeBeforeLoad()},0)}},{key:"calcPosition",value:function(e,t,n,r,o){var i=this,a=this.state,s=a.imgWidth,u=a.imgHeight,l=this.props,c=l.ratio,p=l.fixedRatio;if(e<0||t<0)return!1;p&&(e/s>t/u?e>s&&(e=s,n=0,t=e/c):t>u&&(t=u,r=0,e=t*c)),e+n>s&&(p?n=s-e:e-=e+n-s),t+r>u&&(p?r=u-t:t-=t+r-u),n<0&&(n=0),r<0&&(r=0),e>s&&(e=s),t>u&&(t=u),this.setState({toImgLeft4Style:n,toImgTop4Style:r,frameWidth4Style:e,frameHeight4Style:t},function(){o&&o(i)})}},{key:"createNewFrame",value:function(e){if(this.state.dragging){var t=e.pageX?e.pageX:e.targetTouches[0].pageX,n=e.pageY?e.pageY:e.targetTouches[0].pageY,r=this.props,o=r.ratio,i=r.fixedRatio,a=this.state,s=a.frameWidth,u=a.frameHeight,l=a.startPageX,c=a.startPageY,p=a.originX,f=a.originY,d=t-l,h=n-c,m=s+Math.abs(d),g=i?(s+Math.abs(d))/o:u+Math.abs(h),v=p,y=f;return h<0&&(y=i?f-Math.abs(d)/o:f-Math.abs(h)),d<0&&(v=p+d),this.calcPosition(m,g,v,y)}}},{key:"frameMove",value:function(e){var t=this.state,n=t.originX,r=t.originY,o=t.startPageX,i=t.startPageY,a=t.frameWidth,s=t.frameHeight,u=t.maxLeft,l=t.maxTop,c=e.pageX?e.pageX:e.targetTouches[0].pageX,p=e.pageY?e.pageY:e.targetTouches[0].pageY,f=c-o+n,d=p-i+r;if(c<0||p<0)return!1;f>u&&(f=u),d>l&&(d=l),this.calcPosition(a,s,f,d)}},{key:"frameDotMove",value:function(e,t){var n=t.pageX?t.pageX:t.targetTouches[0].pageX,r=t.pageY?t.pageY:t.targetTouches[0].pageY,o=this.props,i=o.ratio,a=o.fixedRatio,s=this.state,u=s.startPageX,l=s.startPageY,c=s.originX,p=s.originY,f=s.frameWidth4Style,d=s.frameHeight4Style,h=s.frameWidth,m=s.frameHeight,g=s.imgWidth,v=s.imgHeight;if(0!==r&&0!==n){var y=n-u,b=r-l,_=0,E=0,C=0,w=0;switch(e){case"ne":_=h+y,E=a?_/i:m-b,w=c,C=a?p-y/i:p+b;break;case"e":_=h+y,E=a?_/i:m,w=c,C=a?p-y/i*.5:p;break;case"se":_=h+y,E=a?_/i:m+b,w=c,C=p;break;case"n":E=m-b,_=a?E*i:h,w=a?c+b*i*.5:c,C=p+b;break;case"nw":_=h-y,E=a?_/i:m-b,w=c+y,C=a?p+y/i:p+b;break;case"w":_=h-y,E=a?_/i:m,w=c+y,C=a?p+y/i*.5:p;break;case"sw":_=h-y,E=a?_/i:m+b,w=c+y,C=p;break;case"s":E=m+b,_=a?E*i:h,w=a?c-b*i*.5:c,C=p}return(!(_>g||E>v)||!(f>=g||d>=v))&&this.calcPosition(_,E,w,C)}}},{key:"handleDrag",value:function(e){if(this.state.dragging){e.preventDefault();var t=this.state.action;if(!t)return this.createNewFrame(e);if("move"==t)return this.frameMove(e);this.frameDotMove(t,e)}}},{key:"handleDragStart",value:function(e){var t=this,n=this.props.allowNewSelection,r=e.target.getAttribute("data-action")?e.target.getAttribute("data-action"):e.target.parentNode.getAttribute("data-action"),o=e.pageX?e.pageX:e.targetTouches[0].pageX,i=e.pageY?e.pageY:e.targetTouches[0].pageY;if((r||n)&&(e.preventDefault(),this.setState({startPageX:o,startPageY:i,dragging:!0,action:r})),!r&&n){var a=c.findDOMNode(this.refs.container),s=a.offsetLeft,u=a.offsetTop;this.setState({originX:o-s,originY:i-u,frameWidth:2,frameHeight:2},function(){return t.calcPosition(2,2,o-s,i-u)})}}},{key:"crop",value:function(){var e=this.state,t=e.frameWidth,n=e.frameHeight,r=e.originX,o=e.originY,i=e.imgWidth,a=document.createElement("canvas"),s=c.findDOMNode(this.refs.img),u=s.naturalWidth/i,l=t*u,p=n*u,f=r*u,d=o*u;return a.width=t,a.height=n,a.getContext("2d").drawImage(s,f,d,l,p,0,0,t,n),a.toDataURL()}},{key:"values",value:function(){var e=this.state;return{width:e.frameWidth,height:e.frameHeight,x:e.originX,y:e.originY,imgWidth:e.imgWidth,imgHeight:e.imgHeight}}},{key:"handleDragStop",value:function(e){var t=this;if(this.state.dragging){e.preventDefault();var n=c.findDOMNode(this.refs.frameNode),r=n.offsetLeft,o=n.offsetTop,i=n.offsetWidth,a=n.offsetHeight,s=this.state,u=s.imgWidth,l=s.imgHeight;this.setState({originX:r,originY:o,dragging:!1,frameWidth:i,frameHeight:a,maxLeft:u-i,maxTop:l-a,action:null},function(){var e=t.props.onChange;e&&e(t.values())})}}},{key:"render",value:function(){var e=this.state,t=e.dragging,n=e.imgHeight,r=e.imgWidth,o=e.imgLoaded,i=e.styles,a=this.props,s=a.src,l=a.disabled,c=u.createElement("div",{style:i.source,ref:"sourceNode"},u.createElement("img",{crossOrigin:"anonymous",src:s,ref:"img",style:p({},i.img,i.source_img),onLoad:this.imgOnLoad.bind(this),width:r,height:n}));return l?u.createElement("div",{style:p({},i.container,{position:"relative",height:n}),ref:"container"},c,u.createElement("div",{style:p({},i.modal,i.modal_disabled)})):u.createElement("div",{onMouseDown:this.handleDragStart.bind(this),onTouchStart:this.handleDragStart.bind(this),style:p({},i.container,{position:"relative",height:n}),ref:"container"},c,o?u.createElement("div",null,u.createElement("div",{style:i.modal}),u.createElement("div",{style:p({},i.frame,t?i.dragging_frame:{},{display:"block",left:this.state.toImgLeft4Style,top:this.state.toImgTop4Style,width:this.state.frameWidth4Style,height:this.state.frameHeight4Style}),ref:"frameNode"},u.createElement("div",{style:i.clone},u.createElement("img",{src:s,crossOrigin:"anonymous",width:r,height:n,style:p({},i.img,{marginLeft:-this.state.toImgLeft4Style,marginTop:-this.state.toImgTop4Style}),ref:"cloneImg"})),u.createElement("span",{style:i.move,"data-action":"move"}),u.createElement("span",{style:p({},i.dot,i.dotCenter),"data-action":"move"},u.createElement("span",{style:p({},i.dotInner,i.dotInnerCenterVertical)}),u.createElement("span",{style:p({},i.dotInner,i.dotInnerCenterHorizontal)})),u.createElement("span",{style:p({},i.dot,i.dotNE),"data-action":"ne"},u.createElement("span",{style:p({},i.dotInner,i.dotInnerNE)})),u.createElement("span",{style:p({},i.dot,i.dotN),"data-action":"n"},u.createElement("span",{style:p({},i.dotInner,i.dotInnerN)})),u.createElement("span",{style:p({},i.dot,i.dotNW),"data-action":"nw"},u.createElement("span",{style:p({},i.dotInner,i.dotInnerNW)})),u.createElement("span",{style:p({},i.dot,i.dotE),"data-action":"e"},u.createElement("span",{style:p({},i.dotInner,i.dotInnerE)})),u.createElement("span",{style:p({},i.dot,i.dotW),"data-action":"w"},u.createElement("span",{style:p({},i.dotInner,i.dotInnerW)})),u.createElement("span",{style:p({},i.dot,i.dotSE),"data-action":"se"},u.createElement("span",{style:p({},i.dotInner,i.dotInnerSE)})),u.createElement("span",{style:p({},i.dot,i.dotS),"data-action":"s"},u.createElement("span",{style:p({},i.dotInner,i.dotInnerS)})),u.createElement("span",{style:p({},i.dot,i.dotSW),"data-action":"sw"},u.createElement("span",{style:p({},i.dotInner,i.dotInnerSW)})),u.createElement("span",{style:p({},i.line,i.lineN),"data-action":"n"}),u.createElement("span",{style:p({},i.line,i.lineS),"data-action":"s"}),u.createElement("span",{style:p({},i.line,i.lineW),"data-action":"w"}),u.createElement("span",{style:p({},i.line,i.lineE),"data-action":"e"}))):null)}}]),t}(l);d.PropTypes={src:f.string.isRequired,originX:f.number,originY:f.number,ratio:f.number,width:f.number,height:f.number,fixedRatio:f.bool,allowNewSelection:f.bool,disabled:f.bool,styles:f.object,onImgLoad:f.function,beforeImgLoad:f.function,onChange:f.function},d.defaultProps={width:200,height:200,fixedRatio:!0,allowNewSelection:!0,ratio:1,originX:0,originY:0,styles:{},onImgLoad:function(){},beforeImgLoad:function(){}};var h={container:{},img:{userDrag:"none",userSelect:"none",MozUserSelect:"none",WebkitUserDrag:"none",WebkitUserSelect:"none",WebkitTransform:"translateZ(0)",WebkitPerspective:1e3,WebkitBackfaceVisibility:"hidden"},clone:{width:"100%",height:"100%",overflow:"hidden",position:"absolute",left:0,top:0},frame:{position:"absolute",left:0,top:0,bottom:0,right:0,display:"none"},dragging_frame:{opacity:.8},source:{overflow:"hidden"},source_img:{float:"left"},modal:{position:"absolute",left:0,top:0,bottom:0,right:0,opacity:.4,backgroundColor:"#222"},modal_disabled:{backgroundColor:"#666",opacity:.7,cursor:"not-allowed"},move:{position:"absolute",left:0,top:0,bottom:0,right:0,cursor:"move",outline:"1px dashed #88f",backgroundColor:"transparent"},dot:{zIndex:10},dotN:{cursor:"n-resize"},dotS:{cursor:"s-resize"},dotE:{cursor:"e-resize"},dotW:{cursor:"w-resize"},dotNW:{cursor:"nw-resize"},dotNE:{cursor:"ne-resize"},dotSW:{cursor:"sw-resize"},dotSE:{cursor:"se-resize"},dotCenter:{backgroundColor:"transparent",cursor:"move"},dotInner:{border:"1px solid #88f",background:"#fff",display:"block",width:6,height:6,padding:0,margin:0,position:"absolute"},dotInnerN:{top:-4,left:"50%",marginLeft:-4},dotInnerS:{bottom:-4,left:"50%",marginLeft:-4},dotInnerE:{right:-4,top:"50%",marginTop:-4},dotInnerW:{left:-4,top:"50%",marginTop:-4},dotInnerNE:{top:-4,right:-4},dotInnerSE:{bottom:-4,right:-4},dotInnerNW:{top:-4,left:-4},dotInnerSW:{bottom:-4,left:-4},dotInnerCenterVertical:{position:"absolute",border:"none",width:2,height:8,backgroundColor:"#88f",top:"50%",left:"50%",marginLeft:-1,marginTop:-4},dotInnerCenterHorizontal:{position:"absolute",border:"none",width:8,height:2,backgroundColor:"#88f",top:"50%",left:"50%",marginLeft:-4,marginTop:-1},line:{position:"absolute",display:"block",zIndex:100},lineS:{cursor:"s-resize",bottom:0,left:0,width:"100%",height:4,background:"transparent"},lineN:{cursor:"n-resize",top:0,left:0,width:"100%",height:4,background:"transparent"},lineE:{cursor:"e-resize",right:0,top:0,width:4,height:"100%",background:"transparent"},lineW:{cursor:"w-resize",left:0,top:0,width:4,height:"100%",background:"transparent"}};e.exports=d},function(e,t,n){var r=n(29);"string"==typeof r&&(r=[[e.i,r,""]]);var o=n(181)(r,{});r.locals&&(e.exports=r.locals),r.locals||e.hot.accept(29,function(){var t=n(29);"string"==typeof t&&(t=[[e.i,t,""]]),o(t)}),e.hot.dispose(function(){o()})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":u(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":u(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)}var u="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},l=function(){function e(e,t){for(var n=0;n0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function o(e){return 3*e.length/4-r(e)}function i(e){var t,n,o,i,a,s=e.length;i=r(e),a=new p(3*s/4-i),n=i>0?s-4:s;var u=0;for(t=0;t>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,a[u++]=255&o):1===i&&(o=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}function a(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function s(e,t,n){for(var r,o=[],i=t;iu?u:a+16383));return 1===r?(t=e[n-1],o+=l[t>>2],o+=l[t<<4&63],o+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],o+=l[t>>10],o+=l[t>>4&63],o+=l[t<<2&63],o+="="),i.push(o),i.join("")}t.byteLength=o,t.toByteArray=i,t.fromByteArray=u;for(var l=[],c=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,h=f.length;d=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),i.alloc(+e)}function g(e,t){if(i.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(r)return Y(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return P(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:_(e,t,n,r,o);if("number"==typeof t)return t&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,r,o){function i(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}var l;if(o){var c=-1;for(l=n;ls&&(n=s-u),l=n;l>=0;l--){for(var p=!0,f=0;fo&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a239?4:i>223?3:i>191?2:1;if(o+s<=n){var u,l,c,p;switch(s){case 1:i<128&&(a=i);break;case 2:u=e[o+1],128==(192&u)&&(p=(31&i)<<6|63&u)>127&&(a=p);break;case 3:u=e[o+1],l=e[o+2],128==(192&u)&&128==(192&l)&&(p=(15&i)<<12|(63&u)<<6|63&l)>2047&&(p<55296||p>57343)&&(a=p);break;case 4:u=e[o+1],l=e[o+2],c=e[o+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(p=(15&i)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&p<1114112&&(a=p)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=s}return I(r)}function I(e){var t=e.length;if(t<=J)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function U(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function j(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,o){return o||j(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,o){return o||j(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(e,t,n,r,52,8),n+8}function W(e){if(e=V(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function V(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],a=0;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function q(e){for(var t=[],n=0;n>8,o=n%256,i.push(o),i.push(r);return i}function X(e){return Q.toByteArray(W(e))}function K(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function G(e){return e!==e}/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -var Q=n(83),$=n(100),Z=n(101);t.Buffer=i,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),i.poolSize=8192,i._augment=function(e){return e.__proto__=i.prototype,e},i.from=function(e,t,n){return a(null,e,t,n)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(e,t,n){return u(null,e,t,n)},i.allocUnsafe=function(e){return l(null,e)},i.allocUnsafeSlow=function(e){return l(null,e)},i.isBuffer=function(e){return!(null==e||!e._isBuffer)},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},i.prototype.compare=function(e,t,n,r,o){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var a=o-r,s=n-t,u=Math.min(a,s),l=this.slice(r,o),c=e.slice(t,n),p=0;po)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)r+=this[e+--t]*o;return r},i.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],o=1,i=0;++i=o&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},i.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),$.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),$.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),$.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),$.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){D(this,e,t,n,Math.pow(2,8*n)-1,0)}var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):U(this,e,t,!0),t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):U(this,e,t,!0),t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},i.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a=0&&t._disposeHandlers.splice(n,1)},check:u,apply:d,status:function(e){if(!e)return C;x.push(e)},addStatusHandler:function(e){x.push(e)},removeStatusHandler:function(e){var t=x.indexOf(e);t>=0&&x.splice(t,1)},data:E[e]};return m=void 0,t}function a(e){C=e;for(var t=0;t0;){var i=o.pop(),a=i.id,l=i.chain;if((s=O[a])&&!s.hot._selfAccepted){if(s.hot._selfDeclined)return{type:"self-declined",chain:l,moduleId:a};if(s.hot._main)return{type:"unaccepted",chain:l,moduleId:a};for(var u=0;u=0||(f.hot._acceptedDependencies[a]?(n[c]||(n[c]=[]),r(n[c],[a])):(delete n[c],t.push(c),o.push({chain:l.concat([c]),id:c})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:n}}(c):{type:"disposed",moduleId:g};var _=!1,x=!1,S=!1,T="";switch(b.chain&&(T="\nUpdate propagation: "+b.chain.join(" -> ")),b.type){case"self-declined":n.onDeclined&&n.onDeclined(b),n.ignoreDeclined||(_=new Error("Aborted because of self decline: "+b.moduleId+T));break;case"declined":n.onDeclined&&n.onDeclined(b),n.ignoreDeclined||(_=new Error("Aborted because of declined dependency: "+b.moduleId+" in "+b.parentId+T));break;case"unaccepted":n.onUnaccepted&&n.onUnaccepted(b),n.ignoreUnaccepted||(_=new Error("Aborted because "+c+" is not accepted"+T));break;case"accepted":n.onAccepted&&n.onAccepted(b),x=!0;break;case"disposed":n.onDisposed&&n.onDisposed(b),S=!0;break;default:throw new Error("Unexception type "+b.type)}if(_)return a("abort"),Promise.reject(_);if(x){h[c]=y[c],r(d,b.outdatedModules);for(c in b.outdatedDependencies)Object.prototype.hasOwnProperty.call(b.outdatedDependencies,c)&&(f[c]||(f[c]=[]),r(f[c],b.outdatedDependencies[c]))}S&&(r(d,[b.moduleId]),h[c]=m)}var P=[];for(i=0;i0;)if(c=I.pop(),s=O[c]){var U={},A=s.hot._disposeHandlers;for(u=0;u=0&&L.parents.splice(N,1))}}var D,M;for(c in f)if(Object.prototype.hasOwnProperty.call(f,c)&&(s=O[c]))for(M=f[c],u=0;u=0&&s.children.splice(N,1);a("apply"),w=v;for(c in h)Object.prototype.hasOwnProperty.call(h,c)&&(e[c]=h[c]);var j=null;for(c in f)if(Object.prototype.hasOwnProperty.call(f,c)){s=O[c],M=f[c];var F=[];for(i=0;i=0||F.push(o);for(i=0;i=i&&(n=i-u,e.setState({originX:n})),r+s>=a&&(r=a-s,e.setState({originY:r})),e.setState({maxLeft:c,maxTop:f}),e.calcPosition(u,s,n,r,function(){var t=e.state,n=t.frameWidth4Style,r=t.frameHeight4Style,o=t.toImgTop4Style,i=t.toImgLeft4Style;e.setState({frameWidth:n,frameHeight:r,originX:i,originY:o})})}})}},{key:"componentDidMount",value:function(){document.addEventListener("mousemove",this.handleDrag.bind(this)),document.addEventListener("touchmove",this.handleDrag.bind(this)),document.addEventListener("mouseup",this.handleDragStop.bind(this)),document.addEventListener("touchend",this.handleDragStop.bind(this)),this.imgGetSizeBeforeLoad()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousemove",this.handleDrag.bind(this)),document.removeEventListener("touchmove",this.handleDrag.bind(this)),document.removeEventListener("mouseup",this.handleDragStop.bind(this)),document.removeEventListener("touchend",this.handleDragStop.bind(this))}},{key:"componentWillReceiveProps",value:function(e){var t=this,n=this.props,r=n.width,o=n.height,i=n.originX,a=n.originY;if(this.props.src!==e.src)return this.setState({src:e.src},this.imgGetSizeBeforeLoad);r===e.width&&o===e.height&&i===e.originX&&a===e.originY||this.setState({frameWidth:e.width,frameHeight:e.height,originX:e.originX,originY:e.originY},function(){return t.initStyles()})}},{key:"imgOnLoad",value:function(){this.props.onImgLoad()}},{key:"imgGetSizeBeforeLoad",value:function(){var e=this;setTimeout(function(){var t=p(e.img);if(t&&t.naturalWidth){var n=parseInt(t.offsetWidth/t.naturalWidth*t.naturalHeight);e.setState({imgHeight:n,imgLoaded:!0},e.initStyles),e.props.beforeImgLoad()}else t&&e.imgGetSizeBeforeLoad()},0)}},{key:"calcPosition",value:function(e,t,n,r,o){var i=this.state,a=i.imgWidth,l=i.imgHeight,u=this.props,s=u.ratio,c=u.fixedRatio;if(e<0||t<0)return!1;c&&(e/a>t/l?e>a&&(e=a,n=0,t=e/s):t>l&&(t=l,r=0,e=t*s)),e+n>a&&(c?n=a-e:e-=e+n-a),t+r>l&&(c?r=l-t:t-=t+r-l),n<0&&(n=0),r<0&&(r=0),e>a&&(e=a),t>l&&(t=l),this.setState({toImgLeft4Style:n,toImgTop4Style:r,frameWidth4Style:e,frameHeight4Style:t},function(){o&&o()})}},{key:"createNewFrame",value:function(e){if(this.state.dragging){var t=e.pageX?e:e.targetTouches[0],n=t.pageX,r=t.pageY,o=this.props,i=o.ratio,a=o.fixedRatio,l=this.state,u=l.frameWidth,s=l.frameHeight,c=l.startPageX,f=l.startPageY,d=l.originX,p=l.originY,h=n-c,m=r-f,g=u+Math.abs(h),y=a?(u+Math.abs(h))/i:s+Math.abs(m),v=d,b=p;return m<0&&(b=a?p-Math.abs(h)/i:p-Math.abs(m)),h<0&&(v=d+h),this.calcPosition(g,y,v,b)}}},{key:"frameMove",value:function(e){var t=this.state,n=t.originX,r=t.originY,o=t.startPageX,i=t.startPageY,a=t.frameWidth,l=t.frameHeight,u=t.maxLeft,s=t.maxTop,c=e.pageX?e:e.targetTouches[0],f=c.pageX,d=c.pageY,p=f-o+n,h=d-i+r;if(f<0||d<0)return!1;p>u&&(p=u),h>s&&(h=s),this.calcPosition(a,l,p,h)}},{key:"frameDotMove",value:function(e,t){var n=t.pageX?t:t.targetTouches[0],r=n.pageX,o=n.pageY,i=this.props,a=i.ratio,l=i.fixedRatio,u=this.state,s=u.startPageX,c=u.startPageY,f=u.originX,d=u.originY,p=u.frameWidth4Style,h=u.frameHeight4Style,m=u.frameWidth,g=u.frameHeight,y=u.imgWidth,v=u.imgHeight;if(0!==o&&0!==r){var b=r-s,w=o-c,E=0,k=0,_=0,x=0;switch(e){case"ne":E=m+b,k=l?E/a:g-w,x=f,_=l?d-b/a:d+w;break;case"e":E=m+b,k=l?E/a:g,x=f,_=l?d-b/a*.5:d;break;case"se":E=m+b,k=l?E/a:g+w,x=f,_=d;break;case"n":k=g-w,E=l?k*a:m,x=l?f+w*a*.5:f,_=d+w;break;case"nw":E=m-b,k=l?E/a:g-w,x=f+b,_=l?d+b/a:d+w;break;case"w":E=m-b,k=l?E/a:g,x=f+b,_=l?d+b/a*.5:d;break;case"sw":E=m-b,k=l?E/a:g+w,x=f+b,_=d;break;case"s":k=g+w,E=l?k*a:m,x=l?f-w*a*.5:f,_=d}return(!(E>y||k>v)||!(p>=y||h>=v))&&this.calcPosition(E,k,x,_)}}},{key:"handleDrag",value:function(e){if(this.state.dragging){e.preventDefault();var t=this.state.action;if(!t)return this.createNewFrame(e);if("move"===t)return this.frameMove(e);this.frameDotMove(t,e)}}},{key:"handleDragStart",value:function(e){var t=this,n=this.props.allowNewSelection,r=e.target.getAttribute("data-action")?e.target.getAttribute("data-action"):e.target.parentNode.getAttribute("data-action"),o=e.pageX?e:e.targetTouches[0],i=o.pageX,a=o.pageY;if((r||n)&&(e.preventDefault(),this.setState({startPageX:i,startPageY:a,dragging:!0,action:r})),!r&&n){var l=p(this.container),u=l.offsetLeft,s=l.offsetTop;this.setState({originX:i-u,originY:a-s,frameWidth:2,frameHeight:2},function(){return t.calcPosition(2,2,i-u,a-s)})}}},{key:"getCroppedCanvas",value:function(){var e=p(this.img),t=document.createElement("canvas"),n=this.values().original,r=n.x,o=n.y,i=n.width,a=n.height;return t.width=i,t.height=a,t.getContext("2d").drawImage(e,r,o,i,a,0,0,i,a),t}},{key:"crop",value:function(){return this.getCroppedCanvas().toDataURL()}},{key:"values",value:function(){var e=p(this.img),t=this.state,n=t.frameWidth,r=t.frameHeight,o=t.originX,i=t.originY,a=t.imgWidth,l=t.imgHeight,u=e.naturalWidth/a;return{display:{width:n,height:r,x:o,y:i,imgWidth:a,imgHeight:l},original:{width:n*u,height:r*u,x:o*u,y:i*u,imgWidth:e.naturalWidth,imgHeight:e.naturalHeight}}}},{key:"handleDragStop",value:function(e){var t=this;if(this.state.dragging){e.preventDefault();var n=p(this.frameNode),r=n.offsetLeft,o=n.offsetTop,i=n.offsetWidth,a=n.offsetHeight,l=this.state,u=l.imgWidth,s=l.imgHeight;this.setState({originX:r,originY:o,dragging:!1,frameWidth:i,frameHeight:a,maxLeft:u-i,maxTop:s-a,action:null},function(){var e=t.props.onChange;e&&e(t.values())})}}},{key:"render",value:function(){var e=this,t=this.state,n=t.dragging,r=t.imgHeight,o=t.imgWidth,i=t.imgLoaded,a=t.styles,l=t.src,s=this.props.disabled,c=u.createElement("div",{style:a.source,ref:function(t){e.sourceNode=t}},u.createElement("img",{crossOrigin:"anonymous",src:l,width:o,height:r,ref:function(t){e.img=t},style:f({},a.img,a.source_img),onLoad:this.imgOnLoad.bind(this)}));return s?u.createElement("div",{style:f({},a.container,{position:"relative",height:r}),ref:function(t){e.container=t}},c,u.createElement("div",{style:f({},a.modal,a.modal_disabled)})):u.createElement("div",{onMouseDown:this.handleDragStart.bind(this),onTouchStart:this.handleDragStart.bind(this),style:f({},a.container,{position:"relative",height:r}),ref:function(t){e.container=t}},c,i?u.createElement("div",null,u.createElement("div",{style:a.modal}),u.createElement("div",{style:f({},a.frame,n?a.dragging_frame:{},{display:"block",left:this.state.toImgLeft4Style,top:this.state.toImgTop4Style,width:this.state.frameWidth4Style,height:this.state.frameHeight4Style}),ref:function(t){e.frameNode=t}},u.createElement("div",{style:a.clone},u.createElement("img",{src:l,crossOrigin:"anonymous",width:o,height:r,style:f({},a.img,{marginLeft:-1*this.state.toImgLeft4Style,marginTop:-1*this.state.toImgTop4Style}),ref:function(t){e.cloneImg=t}})),u.createElement("span",{"data-action":"move",style:a.move}),u.createElement("span",{"data-action":"move",style:f({},a.dot,a.dotCenter)},u.createElement("span",{style:f({},a.dotInner,a.dotInnerCenterVertical)}),u.createElement("span",{style:f({},a.dotInner,a.dotInnerCenterHorizontal)})),u.createElement("span",{"data-action":"ne",style:f({},a.dot,a.dotNE)},u.createElement("span",{style:f({},a.dotInner,a.dotInnerNE)})),u.createElement("span",{"data-action":"n",style:f({},a.dot,a.dotN)},u.createElement("span",{style:f({},a.dotInner,a.dotInnerN)})),u.createElement("span",{"data-action":"nw",style:f({},a.dot,a.dotNW)},u.createElement("span",{style:f({},a.dotInner,a.dotInnerNW)})),u.createElement("span",{"data-action":"e",style:f({},a.dot,a.dotE)},u.createElement("span",{style:f({},a.dotInner,a.dotInnerE)})),u.createElement("span",{"data-action":"w",style:f({},a.dot,a.dotW)},u.createElement("span",{style:f({},a.dotInner,a.dotInnerW)})),u.createElement("span",{"data-action":"se",style:f({},a.dot,a.dotSE)},u.createElement("span",{style:f({},a.dotInner,a.dotInnerSE)})),u.createElement("span",{"data-action":"s",style:f({},a.dot,a.dotS)},u.createElement("span",{style:f({},a.dotInner,a.dotInnerS)})),u.createElement("span",{"data-action":"sw",style:f({},a.dot,a.dotSW)},u.createElement("span",{style:f({},a.dotInner,a.dotInnerSW)})),u.createElement("span",{"data-action":"n",style:f({},a.line,a.lineN)}),u.createElement("span",{"data-action":"s",style:f({},a.line,a.lineS)}),u.createElement("span",{"data-action":"w",style:f({},a.line,a.lineW)}),u.createElement("span",{"data-action":"e",style:f({},a.line,a.lineE)}))):null)}}]),t}(s);h.propTypes={src:d.string.isRequired,originX:d.number,originY:d.number,ratio:d.number,width:d.number,height:d.number,fixedRatio:d.bool,allowNewSelection:d.bool,disabled:d.bool,styles:d.object,onImgLoad:d.func,beforeImgLoad:d.func,onChange:d.func},h.defaultProps={width:200,height:200,fixedRatio:!0,allowNewSelection:!0,ratio:1,originX:0,originY:0,styles:{},onImgLoad:function(){},beforeImgLoad:function(){}};var m={container:{},img:{userDrag:"none",userSelect:"none",MozUserSelect:"none",WebkitUserDrag:"none",WebkitUserSelect:"none",WebkitTransform:"translateZ(0)",WebkitPerspective:1e3,WebkitBackfaceVisibility:"hidden"},clone:{width:"100%",height:"100%",overflow:"hidden",position:"absolute",left:0,top:0},frame:{position:"absolute",left:0,top:0,bottom:0,right:0,display:"none"},dragging_frame:{opacity:.8},source:{overflow:"hidden"},source_img:{float:"left"},modal:{position:"absolute",left:0,top:0,bottom:0,right:0,opacity:.4,backgroundColor:"#000"},modal_disabled:{backgroundColor:"#666",opacity:.7,cursor:"not-allowed"},move:{position:"absolute",left:0,top:0,bottom:0,right:0,cursor:"move",outline:"1px dashed #88f",backgroundColor:"transparent"},dot:{zIndex:10},dotN:{cursor:"n-resize"},dotS:{cursor:"s-resize"},dotE:{cursor:"e-resize"},dotW:{cursor:"w-resize"},dotNW:{cursor:"nw-resize"},dotNE:{cursor:"ne-resize"},dotSW:{cursor:"sw-resize"},dotSE:{cursor:"se-resize"},dotCenter:{backgroundColor:"transparent",cursor:"move"},dotInner:{border:"1px solid #88f",background:"#fff",display:"block",width:6,height:6,padding:0,margin:0,position:"absolute"},dotInnerN:{top:-4,left:"50%",marginLeft:-4},dotInnerS:{bottom:-4,left:"50%",marginLeft:-4},dotInnerE:{right:-4,top:"50%",marginTop:-4},dotInnerW:{left:-4,top:"50%",marginTop:-4},dotInnerNE:{top:-4,right:-4},dotInnerSE:{bottom:-4,right:-4},dotInnerNW:{top:-4,left:-4},dotInnerSW:{bottom:-4,left:-4},dotInnerCenterVertical:{position:"absolute",border:"none",width:2,height:8,backgroundColor:"#88f",top:"50%",left:"50%",marginLeft:-1,marginTop:-4},dotInnerCenterHorizontal:{position:"absolute",border:"none",width:8,height:2,backgroundColor:"#88f",top:"50%",left:"50%",marginLeft:-4,marginTop:-1},line:{position:"absolute",display:"block",zIndex:100},lineS:{cursor:"s-resize",bottom:0,left:0,width:"100%",height:4,background:"transparent"},lineN:{cursor:"n-resize",top:0,left:0,width:"100%",height:4,background:"transparent"},lineE:{cursor:"e-resize",right:0,top:0,width:4,height:"100%",background:"transparent"},lineW:{cursor:"w-resize",left:0,top:0,width:4,height:"100%",background:"transparent"}};e.exports=h},function(e,t,n){var r=n(1);"string"==typeof r&&(r=[[e.i,r,""]]);var o=n(27)(r,{});r.locals&&(e.exports=r.locals),r.locals||e.hot.accept(1,function(){var t=n(1);"string"==typeof t&&(t=[[e.i,t,""]]),o(t)}),e.hot.dispose(function(){o()})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":u(t))&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":u(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)}var u="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},s=function(){function e(e,t){for(var n=0;n * @license MIT @@ -49,4 +24,36 @@ var Q=n(83),$=n(100),Z=n(101);t.Buffer=i,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,i * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e){var t=[];return e.forEach(function(e,a){"object"==typeof e&&null!==e?Array.isArray(e)?t[a]=o(e):n(e)?t[a]=r(e):t[a]=i({},e):t[a]=e}),t}var i=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,a=arguments[0],s=Array.prototype.slice.call(arguments,1);return s.forEach(function(s){"object"!=typeof s||null===s||Array.isArray(s)||Object.keys(s).forEach(function(u){return t=a[u],e=s[u],e===a?void 0:"object"!=typeof e||null===e?void(a[u]=e):Array.isArray(e)?void(a[u]=o(e)):n(e)?void(a[u]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(a[u]=i({},e)):void(a[u]=i(t,e))})}),a}}).call(t,n(84).Buffer)},function(e,t,n){"use strict";function r(e){return e.replace(o,function(e,t){return t.toUpperCase()})}var o=/-(.)/g;e.exports=r},function(e,t,n){"use strict";function r(e){return o(e.replace(i,"ms-"))}var o=n(88),i=/^-ms-/;e.exports=r},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var o=n(98);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.length;if((Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e)&&a(!1),"number"!=typeof t&&a(!1),0===t||t-1 in e||a(!1),"function"==typeof e.callee&&a(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),r=0;r":"<"+e+">",s[e]=!a.firstChild),s[e]?f[e]:null}var o=n(5),i=n(0),a=o.canUseDOM?document.createElement("div"):null,s={},u=[1,'"],l=[1,"","
"],c=[3,"","
"],p=[1,'',""],f={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c};["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"].forEach(function(e){f[e]=p,s[e]=!0}),e.exports=r},function(e,t,n){"use strict";function r(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=r},function(e,t,n){"use strict";function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;e.exports=r},function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=n(95),i=/^ms-/;e.exports=r},function(e,t,n){"use strict";function r(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||window;return!(!e||!("function"==typeof n.Node?e instanceof n.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=r},function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=n(97);e.exports=r},function(e,t,n){"use strict";function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=r},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,u=(1<>1,c=-7,p=n?o-1:0,f=n?-1:1,d=e[t+p];for(p+=f,i=d&(1<<-c)-1,d>>=-c,c+=s;c>0;i=256*i+e[t+p],p+=f,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=r;c>0;a=256*a+e[t+p],p+=f,c-=8);if(0===i)i=1-l;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=l}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,l=8*i-o-1,c=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+p>=1?f/u:f*Math.pow(2,1-p),t*u>=2&&(a++,u/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(t*u-1)*Math.pow(2,o),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&s,d+=h,s/=256,o-=8);for(a=a<0;e[n+d]=255&a,d+=h,a/=256,l-=8);e[n+d-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e,t,n,r,o){}e.exports=r},function(e,t,n){"use strict";var r=n(6),o=n(0),i=n(53);e.exports=function(){function e(e,t,n,r,a,s){s!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function 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};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";var r=n(6),o=n(0),i=n(1),a=n(53),s=n(102);e.exports=function(e,t){function n(e){var t=e&&(x&&e[x]||e[T]);if("function"==typeof t)return t}function u(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function l(e){this.message=e,this.stack=""}function c(e){function n(n,r,i,s,u,c,p){if(s=s||k,c=c||i,p!==a)if(t)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else;return null==r[i]?n?new l(null===r[i]?"The "+u+" `"+c+"` is marked as required in `"+s+"`, but its value is `null`.":"The "+u+" `"+c+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(r,i,s,u,c)}var r=n.bind(null,!1);return r.isRequired=n.bind(null,!0),r}function p(e){function t(t,n,r,o,i,a){var s=t[n];if(_(s)!==e)return new l("Invalid "+o+" `"+i+"` of type `"+E(s)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return c(t)}function f(e){function t(t,n,r,o,i){if("function"!=typeof e)return new l("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){return new l("Invalid "+o+" `"+i+"` of type `"+_(s)+"` supplied to `"+r+"`, expected an array.")}for(var u=0;u8&&_<=11),w=32,x=String.fromCharCode(w),T={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},k=!1,P=null,S={eventTypes:T,extractEvents:function(e,t,n,r){return[u(e,t,n,r),p(e,t,n,r)]}};e.exports=S},function(e,t,n){"use strict";var r=n(54),o=n(5),i=(n(7),n(89),n(160)),a=n(96),s=n(99),u=(n(1),s(function(e){return a(e)})),l=!1,c="cssFloat";if(o.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(e){l=!0}void 0===document.documentElement.style.cssFloat&&(c="styleFloat")}var f={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=0===r.indexOf("--"),a=e[r];null!=a&&(n+=u(r)+":",n+=i(r,a,t,o)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var a in t)if(t.hasOwnProperty(a)){var s=0===a.indexOf("--"),u=i(a,t[a],n,s);if("float"!==a&&"cssFloat"!==a||(a=c),s)o.setProperty(a,u);else if(u)o[a]=u;else{var p=l&&r.shorthandPropertyExpansions[a];if(p)for(var f in p)o[f]="";else o[a]=""}}}};e.exports=f},function(e,t,n){"use strict";function r(e,t,n){var r=k.getPooled(N.change,e,t,n);return r.type="change",C.accumulateTwoPhaseDispatches(r),r}function o(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function i(e){var t=r(M,e,S(e));T.batchedUpdates(a,t)}function a(e){E.enqueueEvents(e),E.processEventQueue(!1)}function s(e,t){R=e,M=t,R.attachEvent("onchange",i)}function u(){R&&(R.detachEvent("onchange",i),R=null,M=null)}function l(e,t){var n=P.updateValueIfChanged(e),r=!0===t.simulated&&L._allowSimulatedPassThrough;if(n||r)return e}function c(e,t){if("topChange"===e)return t}function p(e,t,n){"topFocus"===e?(u(),s(t,n)):"topBlur"===e&&u()}function f(e,t){R=e,M=t,R.attachEvent("onpropertychange",h)}function d(){R&&(R.detachEvent("onpropertychange",h),R=null,M=null)}function h(e){"value"===e.propertyName&&l(M,e)&&i(e)}function m(e,t,n){"topFocus"===e?(d(),f(t,n)):"topBlur"===e&&d()}function g(e,t,n){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return l(M,n)}function v(e){var t=e.nodeName;return t&&"input"===t.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function y(e,t,n){if("topClick"===e)return l(t,n)}function b(e,t,n){if("topInput"===e||"topChange"===e)return l(t,n)}function _(e,t){if(null!=e){var n=e._wrapperState||t._wrapperState;if(n&&n.controlled&&"number"===t.type){var r=""+t.value;t.getAttribute("value")!==r&&t.setAttribute("value",r)}}}var E=n(17),C=n(18),w=n(5),x=n(4),T=n(8),k=n(9),P=n(70),S=n(43),I=n(44),A=n(72),N={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}},R=null,M=null,O=!1;w.canUseDOM&&(O=I("change")&&(!document.documentMode||document.documentMode>8));var D=!1;w.canUseDOM&&(D=I("input")&&(!("documentMode"in document)||document.documentMode>9));var L={eventTypes:N,_allowSimulatedPassThrough:!0,_isInputEventSupported:D,extractEvents:function(e,t,n,i){var a,s,u=t?x.getNodeFromInstance(t):window;if(o(u)?O?a=c:s=p:A(u)?D?a=b:(a=g,s=m):v(u)&&(a=y),a){var l=a(e,t,n);if(l){return r(l,n,i)}}s&&s(e,u,t),"topBlur"===e&&_(t,u)}};e.exports=L},function(e,t,n){"use strict";var r=n(2),o=n(12),i=n(5),a=n(92),s=n(6),u=(n(0),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(i.canUseDOM||r("56"),t||r("57"),"HTML"===e.nodeName&&r("58"),"string"==typeof t){var n=a(t,s)[0];e.parentNode.replaceChild(n,e)}else o.replaceChildWithTree(e,t)}});e.exports=u},function(e,t,n){"use strict";var r=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"];e.exports=r},function(e,t,n){"use strict";var r=n(18),o=n(4),i=n(24),a={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},s={eventTypes:a,extractEvents:function(e,t,n,s){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement))return null;if("topMouseOut"!==e&&"topMouseOver"!==e)return null;var u;if(s.window===s)u=s;else{var l=s.ownerDocument;u=l?l.defaultView||l.parentWindow:window}var c,p;if("topMouseOut"===e){c=t;var f=n.relatedTarget||n.toElement;p=f?o.getClosestInstanceFromNode(f):null}else c=null,p=t;if(c===p)return null;var d=null==c?u:o.getNodeFromInstance(c),h=null==p?u:o.getNodeFromInstance(p),m=i.getPooled(a.mouseLeave,c,n,s);m.type="mouseleave",m.target=d,m.relatedTarget=h;var g=i.getPooled(a.mouseEnter,p,n,s);return g.type="mouseenter",g.target=h,g.relatedTarget=d,r.accumulateEnterLeaveDispatches(m,g,c,p),[m,g]}};e.exports=s},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(3),i=n(11),a=n(69);o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;e1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(13),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_NUMERIC_VALUE,s=r.injection.HAS_POSITIVE_NUMERIC_VALUE,u=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,l={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,as:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:s,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,default:i,defer:i,dir:0,disabled:i,download:u,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,playsInline:i,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,referrerPolicy:0,rel:0,required:i,reversed:i,role:0,rows:s,rowSpan:a,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:s,sizes:0,span:s,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute("value");"number"!==e.type||!1===e.hasAttribute("value")?e.setAttribute("value",""+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute("value",""+t)}}};e.exports=l},function(e,t,n){"use strict";(function(t){function r(e,t,n,r){var o=void 0===e[n];null!=t&&o&&(e[n]=i(t,!0))}var o=n(14),i=n(71),a=(n(35),n(45)),s=n(74);n(1);void 0!==t&&t.env;var u={instantiateChildren:function(e,t,n,o){if(null==e)return null;var i={};return s(e,r,i),i},updateChildren:function(e,t,n,r,s,u,l,c,p){if(t||e){var f,d;for(f in t)if(t.hasOwnProperty(f)){d=e&&e[f];var h=d&&d._currentElement,m=t[f];if(null!=d&&a(h,m))o.receiveComponent(d,m,s,c),t[f]=d;else{d&&(r[f]=o.getHostNode(d),o.unmountComponent(d,!1));var g=i(m,!0);t[f]=g;var v=o.mountComponent(g,s,u,l,c,p);n.push(v)}}for(f in e)!e.hasOwnProperty(f)||t&&t.hasOwnProperty(f)||(d=e[f],r[f]=o.getHostNode(d),o.unmountComponent(d,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];o.unmountComponent(r,t)}}};e.exports=u}).call(t,n(51))},function(e,t,n){"use strict";var r=n(31),o=n(124),i={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};e.exports=i},function(e,t,n){"use strict";function r(e){}function o(e){return!(!e.prototype||!e.prototype.isReactComponent)}function i(e){return!(!e.prototype||!e.prototype.isPureReactComponent)}var a=n(2),s=n(3),u=n(15),l=n(37),c=n(10),p=n(38),f=n(19),d=(n(7),n(64)),h=n(14),m=n(22),g=(n(0),n(30)),v=n(45),y=(n(1),{ImpureClass:0,PureClass:1,StatelessFunctional:2});r.prototype.render=function(){var e=f.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return t};var b=1,_={construct:function(e){this._currentElement=e,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,s){this._context=s,this._mountOrder=b++,this._hostParent=t,this._hostContainerInfo=n;var l,c=this._currentElement.props,p=this._processContext(s),d=this._currentElement.type,h=e.getUpdateQueue(),g=o(d),v=this._constructComponent(g,c,p,h);g||null!=v&&null!=v.render?i(d)?this._compositeType=y.PureClass:this._compositeType=y.ImpureClass:(l=v,null===v||!1===v||u.isValidElement(v)||a("105",d.displayName||d.name||"Component"),v=new r(d),this._compositeType=y.StatelessFunctional);v.props=c,v.context=p,v.refs=m,v.updater=h,this._instance=v,f.set(v,this);var _=v.state;void 0===_&&(v.state=_=null),("object"!=typeof _||Array.isArray(_))&&a("106",this.getName()||"ReactCompositeComponent"),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var E;return E=v.unstable_handleError?this.performInitialMountWithErrorHandling(l,t,n,e,s):this.performInitialMount(l,t,n,e,s),v.componentDidMount&&e.getReactMountReady().enqueue(v.componentDidMount,v),E},_constructComponent:function(e,t,n,r){return this._constructComponentWithoutOwner(e,t,n,r)},_constructComponentWithoutOwner:function(e,t,n,r){var o=this._currentElement.type;return e?new o(t,n,r):o(t,n,r)},performInitialMountWithErrorHandling:function(e,t,n,r,o){var i,a=r.checkpoint();try{i=this.performInitialMount(e,t,n,r,o)}catch(s){r.rollback(a),this._instance.unstable_handleError(s),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),i=this.performInitialMount(e,t,n,r,o)}return i},performInitialMount:function(e,t,n,r,o){var i=this._instance,a=0;i.componentWillMount&&(i.componentWillMount(),this._pendingStateQueue&&(i.state=this._processPendingState(i.props,i.context))),void 0===e&&(e=this._renderValidatedComponent());var s=d.getType(e);this._renderedNodeType=s;var u=this._instantiateReactComponent(e,s!==d.EMPTY);this._renderedComponent=u;var l=h.mountComponent(u,r,t,n,this._processChildContext(o),a);return l},getHostNode:function(){return h.getHostNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";p.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(h.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0,this._topLevelWrapper=null,f.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;if(!n)return m;var r={};for(var o in n)r[o]=e[o];return r},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t,n=this._currentElement.type,r=this._instance;if(r.getChildContext&&(t=r.getChildContext()),t){"object"!=typeof n.childContextTypes&&a("107",this.getName()||"ReactCompositeComponent");for(var o in t)o in n.childContextTypes||a("108",this.getName()||"ReactCompositeComponent",o);return s({},e,t)}return e},_checkContextTypes:function(e,t,n){},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement?h.receiveComponent(this,this._pendingElement,e,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(e,t,n,r,o){var i=this._instance;null==i&&a("136",this.getName()||"ReactCompositeComponent");var s,u=!1;this._context===o?s=i.context:(s=this._processContext(o),u=!0);var l=t.props,c=n.props;t!==n&&(u=!0),u&&i.componentWillReceiveProps&&i.componentWillReceiveProps(c,s);var p=this._processPendingState(c,s),f=!0;this._pendingForceUpdate||(i.shouldComponentUpdate?f=i.shouldComponentUpdate(c,p,s):this._compositeType===y.PureClass&&(f=!g(l,c)||!g(i.state,p))),this._updateBatchNumber=null,f?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,c,p,s,e,o)):(this._currentElement=n,this._context=o,i.props=c,i.state=p,i.context=s)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var i=s({},o?r[0]:n.state),a=o?1:0;a=0||null!=t.is}function m(e){var t=e.type;d(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var g=n(2),v=n(3),y=n(107),b=n(109),_=n(12),E=n(32),C=n(13),w=n(56),x=n(17),T=n(33),k=n(23),P=n(57),S=n(4),I=n(125),A=n(126),N=n(58),R=n(129),M=(n(7),n(138)),O=n(143),D=(n(6),n(26)),L=(n(0),n(44),n(30),n(70)),U=(n(46),n(1),P),j=x.deleteListener,B=S.getNodeFromInstance,F=k.listenTo,W=T.registrationNameModules,V={string:!0,number:!0},H="__html",Y={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},q=11,z={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},K={listing:!0,pre:!0,textarea:!0},G=v({menuitem:!0},X),Q=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,$={},Z={}.hasOwnProperty,J=1;m.displayName="ReactDOMComponent",m.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=J++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(p,this);break;case"input":I.mountWrapper(this,i,t),i=I.getHostProps(this,i),e.getReactMountReady().enqueue(c,this),e.getReactMountReady().enqueue(p,this);break;case"option":A.mountWrapper(this,i,t),i=A.getHostProps(this,i);break;case"select":N.mountWrapper(this,i,t),i=N.getHostProps(this,i),e.getReactMountReady().enqueue(p,this);break;case"textarea":R.mountWrapper(this,i,t),i=R.getHostProps(this,i),e.getReactMountReady().enqueue(c,this),e.getReactMountReady().enqueue(p,this)}o(this,i);var a,f;null!=t?(a=t._namespaceURI,f=t._tag):n._tag&&(a=n._namespaceURI,f=n._tag),(null==a||a===E.svg&&"foreignobject"===f)&&(a=E.html),a===E.html&&("svg"===this._tag?a=E.svg:"math"===this._tag&&(a=E.mathml)),this._namespaceURI=a;var d;if(e.useCreateElement){var h,m=n._ownerDocument;if(a===E.html)if("script"===this._tag){var g=m.createElement("div"),v=this._currentElement.type;g.innerHTML="<"+v+">",h=g.removeChild(g.firstChild)}else h=i.is?m.createElement(this._currentElement.type,i.is):m.createElement(this._currentElement.type);else h=m.createElementNS(a,this._currentElement.type);S.precacheNode(this,h),this._flags|=U.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(h),this._updateDOMProperties(null,i,e);var b=_(h);this._createInitialChildren(e,i,r,b),d=b}else{var C=this._createOpenTagMarkupAndPutListeners(e,i),x=this._createContentMarkup(e,i,r);d=!x&&X[this._tag]?C+"/>":C+">"+x+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(s,this),i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(u,this),i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"select":case"button":i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(l,this)}return d},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(W.hasOwnProperty(r))o&&i(this,r,o,e);else{"style"===r&&(o&&(o=this._previousStyleCopy=v({},t.style)),o=b.createMarkupForStyles(o,this));var a=null;null!=this._tag&&h(this._tag,t)?Y.hasOwnProperty(r)||(a=w.createMarkupForCustomAttribute(r,o)):a=w.createMarkupForProperty(r,o),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+w.createMarkupForRoot()),n+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=V[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=D(i);else if(null!=a){var s=this.mountChildren(a,e,n);r=s.join("")}}return K[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&_.queueHTML(r,o.__html);else{var i=V[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)""!==i&&_.queueText(r,i);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;ut.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),i=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=l(e,o),u=l(e,i);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=n(5),l=n(165),c=n(69),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:p?o:i,setOffsets:p?a:s};e.exports=f},function(e,t,n){"use strict";var r=n(2),o=n(3),i=n(31),a=n(12),s=n(4),u=n(26),l=(n(0),n(46),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(l.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,i=" react-text: "+o+" ";if(this._domID=o,this._hostParent=t,e.useCreateElement){var l=n._ownerDocument,c=l.createComment(i),p=l.createComment(" /react-text "),f=a(l.createDocumentFragment());return a.queueChild(f,a(c)),this._stringText&&a.queueChild(f,a(l.createTextNode(this._stringText))),a.queueChild(f,a(p)),s.precacheNode(this,c),this._closingComment=p,f}var d=u(this._stringText);return e.renderToStaticMarkup?d:"\x3c!--"+i+"--\x3e"+d+"\x3c!-- /react-text --\x3e"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();i.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n&&r("67",this._domID),8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),e.exports=l},function(e,t,n){"use strict";function r(){this._rootNodeID&&c.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return l.asap(r,this),n}var i=n(2),a=n(3),s=n(36),u=n(4),l=n(8),c=(n(0),n(1),{getHostProps:function(e,t){return null!=t.dangerouslySetInnerHTML&&i("91"),a({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue,onChange:e._wrapperState.onChange})},mountWrapper:function(e,t){var n=s.getValue(t),r=n;if(null==n){var a=t.defaultValue,u=t.children;null!=u&&(null!=a&&i("92"),Array.isArray(u)&&(u.length<=1||i("93"),u=u[0]),a=""+u),null==a&&(a=""),r=a}e._wrapperState={initialValue:""+r,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=u.getNodeFromInstance(e),r=s.getValue(t);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==t.defaultValue&&(n.defaultValue=o)}null!=t.defaultValue&&(n.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=u.getNodeFromInstance(e),n=t.textContent;n===e._wrapperState.initialValue&&(t.value=n)}});e.exports=c},function(e,t,n){"use strict";function r(e,t){"_hostNode"in e||u("33"),"_hostNode"in t||u("33");for(var n=0,r=e;r;r=r._hostParent)n++;for(var o=0,i=t;i;i=i._hostParent)o++;for(;n-o>0;)e=e._hostParent,n--;for(;o-n>0;)t=t._hostParent,o--;for(var a=n;a--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function o(e,t){"_hostNode"in e||u("35"),"_hostNode"in t||u("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function i(e){return"_hostNode"in e||u("36"),e._hostParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var o;for(o=r.length;o-- >0;)t(r[o],"captured",n);for(o=0;o0;)n(u[l],"captured",i)}var u=n(2);n(0);e.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:s}},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(3),i=n(8),a=n(25),s=n(6),u={initialize:s,close:function(){f.isBatchingUpdates=!1}},l={initialize:s,close:i.flushBatchedUpdates.bind(i)},c=[l,u];o(r.prototype,a,{getTransactionWrappers:function(){return c}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,i){var a=f.isBatchingUpdates;return f.isBatchingUpdates=!0,a?e(t,n,r,o,i):p.perform(e,null,t,n,r,o,i)}};e.exports=f},function(e,t,n){"use strict";function r(){w||(w=!0,y.EventEmitter.injectReactEventListener(v),y.EventPluginHub.injectEventPluginOrder(s),y.EventPluginUtils.injectComponentTree(f),y.EventPluginUtils.injectTreeTraversal(h),y.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:C,EnterLeaveEventPlugin:u,ChangeEventPlugin:a,SelectEventPlugin:E,BeforeInputEventPlugin:i}),y.HostComponent.injectGenericComponentClass(p),y.HostComponent.injectTextComponentClass(m),y.DOMProperty.injectDOMPropertyConfig(o),y.DOMProperty.injectDOMPropertyConfig(l),y.DOMProperty.injectDOMPropertyConfig(_),y.EmptyComponent.injectEmptyComponentFactory(function(e){return new d(e)}),y.Updates.injectReconcileTransaction(b),y.Updates.injectBatchingStrategy(g),y.Component.injectEnvironment(c))}var o=n(106),i=n(108),a=n(110),s=n(112),u=n(113),l=n(115),c=n(117),p=n(120),f=n(4),d=n(122),h=n(130),m=n(128),g=n(131),v=n(135),y=n(136),b=n(141),_=n(146),E=n(147),C=n(148),w=!1;e.exports={inject:r}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=n(17),i={handleTopLevel:function(e,t,n,i){r(o.extractEvents(e,t,n,i))}};e.exports=i},function(e,t,n){"use strict";function r(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){var t=d(e.nativeEvent),n=p.getClosestInstanceFromNode(t),o=n;do{e.ancestors.push(o),o=o&&r(o)}while(o);for(var i=0;i/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return i.test(e)?e:e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);return n=n&&parseInt(n,10),r(e)===n}};e.exports=a},function(e,t,n){"use strict";function r(e,t,n){return{type:"INSERT_MARKUP",content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:"MOVE_EXISTING",content:null,fromIndex:e._mountIndex,fromNode:f.getHostNode(e),toIndex:n,afterNode:t}}function i(e,t){return{type:"REMOVE_NODE",content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function a(e){return{type:"SET_MARKUP",content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e){return{type:"TEXT_CONTENT",content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e,t){return t&&(e=e||[],e.push(t)),e}function l(e,t){p.processChildrenUpdates(e,t)}var c=n(2),p=n(37),f=(n(19),n(7),n(10),n(14)),d=n(116),h=(n(6),n(162)),m=(n(0),{Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return d.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o,i){var a,s=0;return a=h(t,s),d.updateChildren(e,a,n,r,o,this,this._hostContainerInfo,i,s),a},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],u=0,l=f.mountComponent(s,t,this,this._hostContainerInfo,n,u);s._mountIndex=i++,o.push(l)}return o},updateTextContent:function(e){var t=this._renderedChildren;d.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");l(this,[s(e)])},updateMarkup:function(e){var t=this._renderedChildren;d.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");l(this,[a(e)])},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},i=[],a=this._reconcilerUpdateChildren(r,e,i,o,t,n);if(a||r){var s,c=null,p=0,d=0,h=0,m=null;for(s in a)if(a.hasOwnProperty(s)){var g=r&&r[s],v=a[s];g===v?(c=u(c,this.moveChild(g,m,p,d)),d=Math.max(g._mountIndex,d),g._mountIndex=p):(g&&(d=Math.max(g._mountIndex,d)),c=u(c,this._mountChildAtIndex(v,i[h],m,p,t,n)),h++),p++,m=f.getHostNode(v)}for(s in o)o.hasOwnProperty(s)&&(c=u(c,this._unmountChild(r[s],o[s])));c&&l(this,c),this._renderedChildren=a}},unmountChildren:function(e){var t=this._renderedChildren;d.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex=t)return{node:n,offset:t-i};i=a}n=r(o(n))}}e.exports=i},function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(s[e])return s[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in u)return s[e]=t[n];return""}var i=n(5),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},s={},u={};i.canUseDOM&&(u=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),e.exports=o},function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=n(26);e.exports=r},function(e,t,n){"use strict";var r=n(63);e.exports=r.renderSubtreeIntoContainer},function(e,t,n){"use strict";function r(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function o(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(t,function(e){return n[e]})}var i={escape:r,unescape:o};e.exports=i},function(e,t,n){"use strict";var r=n(21),o=(n(0),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},u=function(e){var t=this;e instanceof t||r("25"),e.destructor(),t.instancePool.lengththis.eventPool.length&&this.eventPool.push(e)}function F(e){e.eventPool=[],e.getPooled=M,e.release=j}function z(e,t){switch(e){case"keyup":return-1!==_o.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function B(e){return e=e.detail,"object"==typeof e&&"data"in e?e.data:null}function W(e,t){switch(e){case"compositionend":return B(t);case"keypress":return 32!==t.which?null:(Ro=!0,Po);case"textInput":return e=t.data,e===Po&&Ro?null:e;default:return null}}function H(e,t){if(Oo)return"compositionend"===e||!xo&&z(e,t)?(e=A(),vo._root=null,vo._startText=null,vo._fallbackText=null,Oo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}function fe(e,t,n,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t}function de(e){return e[1].toUpperCase()}function pe(e,t,n,r){var o=ri.hasOwnProperty(t)?ri[t]:null;(null!==o?0===o.type:!r&&(2Oi.length&&Oi.push(e)}}}function Xe(e){return Object.prototype.hasOwnProperty.call(e,Di)||(e[Di]=Li++,Ai[e[Di]]={}),Ai[e[Di]]}function $e(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qe(e,t){var n=$e(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=$e(n)}}function Qe(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Ke(e,t){if(Wi||null==Fi||Fi!==Fr())return null;var n=Fi;return"selectionStart"in n&&Qe(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,Bi&&zr(Bi,n)?null:(Bi=n,e=D.getPooled(ji.select,zi,e,t),e.type="select",e.target=Fi,N(e),e)}function Ge(e){var t="";return Lr.Children.forEach(e,function(e){null==e||"string"!=typeof e&&"number"!=typeof e||(t+=e)}),t}function Je(e,t){return e=Mr({children:void 0},t),(t=Ge(t.children))&&(e.children=t),e}function Ze(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function rt(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function ot(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function it(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function at(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?it(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function lt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function ut(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,i=t[n];o=null==i||"boolean"==typeof i||""===i?"":r||"number"!=typeof i||0===i||ma.hasOwnProperty(o)&&ma[o]?(""+i).trim():i+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}function st(e,t,n){t&&(ya[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!=typeof t.style&&r("62",n()))}function ct(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ft(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=Xe(e);t=Qr[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function pt(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function ht(e,t,n,r){var o=ct(t,n);switch(t){case"iframe":case"object":We("load",e);var i=n;break;case"video":case"audio":for(i=0;iSa||(e.current=Ca[Sa],Ca[Sa]=null,Sa--)}function Ct(e,t){Sa++,Ca[Sa]=e.current,e.current=t}function St(e){return Pt(e)?Na:Ta.current}function Tt(e,t){var n=e.type.contextTypes;if(!n)return Wr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Pt(e){return 2===e.tag&&null!=e.type.childContextTypes}function Nt(e){Pt(e)&&(xt(Pa,e),xt(Ta,e))}function Rt(e){xt(Pa,e),xt(Ta,e)}function Ot(e,t,n){Ta.current!==Wr&&r("168"),Ct(Ta,t,e),Ct(Pa,n,e)}function It(e,t){var n=e.stateNode,o=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;n=n.getChildContext();for(var i in n)i in o||r("108",ae(e)||"Unknown",i);return Mr({},t,n)}function Ut(e){if(!Pt(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Wr,Na=Ta.current,Ct(Ta,t,e),Ct(Pa,Pa.current,e),!0}function At(e,t){var n=e.stateNode;if(n||r("169"),t){var o=It(e,Na);n.__reactInternalMemoizedMergedChildContext=o,xt(Pa,e),xt(Ta,e),Ct(Ta,o,e)}else xt(Pa,e);Ct(Pa,t,e)}function Lt(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Dt(e,t,n){var r=e.alternate;return null===r?(r=new Lt(e.tag,t,e.key,e.mode),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Mt(e,t,n){var o=e.type,i=e.key;if(e=e.props,"function"==typeof o)var a=o.prototype&&o.prototype.isReactComponent?2:0;else if("string"==typeof o)a=5;else switch(o){case Yo:return jt(e.children,t,n,i);case Qo:a=11,t|=3;break;case Vo:a=11,t|=2;break;case Xo:return o=new Lt(15,e,i,4|t),o.type=Xo,o.expirationTime=n,o;case Go:a=16,t|=2;break;default:e:{switch("object"==typeof o&&null!==o?o.$$typeof:null){case $o:a=13;break e;case qo:a=12;break e;case Ko:a=14;break e;default:r("130",null==o?o:typeof o,"")}a=void 0}}return t=new Lt(a,e,i,t),t.type=o,t.expirationTime=n,t}function jt(e,t,n,r){return e=new Lt(10,e,r,t),e.expirationTime=n,e}function Ft(e,t,n){return e=new Lt(6,e,null,t),e.expirationTime=n,e}function zt(e,t,n){return t=new Lt(4,null!==e.children?e.children:[],e.key,t),t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bt(e,t,n){return t=new Lt(3,null,null,t?3:0),e={current:t,containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}function Wt(e){return function(t){try{return e(t)}catch(e){}}}function Ht(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Ra=Wt(function(e){return t.onCommitFiberRoot(n,e)}),Oa=Wt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function Yt(e){"function"==typeof Ra&&Ra(e)}function Vt(e){"function"==typeof Oa&&Oa(e)}function Xt(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function $t(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function qt(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Qt(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function Kt(e,t,n){var r=e.alternate;if(null===r){var o=e.updateQueue,i=null;null===o&&(o=e.updateQueue=Xt(e.memoizedState))}else o=e.updateQueue,i=r.updateQueue,null===o?null===i?(o=e.updateQueue=Xt(e.memoizedState),i=r.updateQueue=Xt(r.memoizedState)):o=e.updateQueue=$t(i):null===i&&(i=r.updateQueue=$t(o));null===i||o===i?Qt(o,t,n):null===o.lastUpdate||null===i.lastUpdate?(Qt(o,t,n),Qt(i,t,n)):(Qt(o,t,n),i.lastUpdate=t)}function Gt(e,t,n){var r=e.updateQueue;r=null===r?e.updateQueue=Xt(e.memoizedState):Jt(e,r),null===r.lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function Jt(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=$t(t)),t}function Zt(e,t,n,r,o,i){switch(n.tag){case 1:return e=n.payload,"function"==typeof e?e.call(i,r,o):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(e=n.payload,null===(o="function"==typeof e?e.call(i,r,o):e)||void 0===o)break;return Mr({},r,o);case 2:Ia=!0}return r}function en(e,t,n,r,o){if(Ia=!1,!(0===t.expirationTime||t.expirationTime>o)){t=Jt(e,t);for(var i=t.baseState,a=null,l=0,u=t.firstUpdate,s=i;null!==u;){var c=u.expirationTime;c>o?(null===a&&(a=u,i=s),(0===l||l>c)&&(l=c)):(s=Zt(e,t,u,s,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=u:(t.lastEffect.nextEffect=u,t.lastEffect=u))),u=u.next}for(c=null,u=t.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f>o?(null===c&&(c=u,null===a&&(i=s)),(0===l||l>f)&&(l=f)):(s=Zt(e,t,u,s,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=u:(t.lastCapturedEffect.nextEffect=u,t.lastCapturedEffect=u))),u=u.next}null===a&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===c&&(i=s),t.baseState=i,t.firstUpdate=a,t.firstCapturedUpdate=c,t.expirationTime=l,e.memoizedState=s}}function tn(e,t){"function"!=typeof e&&r("191",e),e.call(t)}function nn(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,tn(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)t=e.callback,null!==t&&(e.callback=null,tn(t,n)),e=e.nextEffect}function rn(e,t){return{value:e,source:t,stack:le(t)}}function on(e){var t=e.type._context;Ct(La,t._changedBits,e),Ct(Aa,t._currentValue,e),Ct(Ua,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function an(e){var t=La.current,n=Aa.current;xt(Ua,e),xt(Aa,e),xt(La,e),e=e.type._context,e._currentValue=n,e._changedBits=t}function ln(e){return e===Da&&r("174"),e}function un(e,t){Ct(Fa,t,e),Ct(ja,e,e),Ct(Ma,Da,e);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:at(null,"");break;default:n=8===n?t.parentNode:t,t=n.namespaceURI||null,n=n.tagName,t=at(t,n)}xt(Ma,e),Ct(Ma,t,e)}function sn(e){xt(Ma,e),xt(ja,e),xt(Fa,e)}function cn(e){ja.current===e&&(xt(Ma,e),xt(ja,e))}function fn(e,t,n){var r=e.memoizedState;t=t(n,r),r=null===t||void 0===t?r:Mr({},r,t),e.memoizedState=r,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=r)}function dn(e,t,n,r,o,i){var a=e.stateNode;return e=e.type,"function"==typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,o,i):!e.prototype||!e.prototype.isPureReactComponent||(!zr(t,n)||!zr(r,o))}function pn(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&za.enqueueReplaceState(t,t.state,null)}function hn(e,t){var n=e.type,r=e.stateNode,o=e.pendingProps,i=St(e);r.props=o,r.state=e.memoizedState,r.refs=Wr,r.context=Tt(e,i),i=e.updateQueue,null!==i&&(en(e,i,o,r,t),r.state=e.memoizedState),i=e.type.getDerivedStateFromProps,"function"==typeof i&&(fn(e,i,o),r.state=e.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(n=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&za.enqueueReplaceState(r,r.state,null),null!==(i=e.updateQueue)&&(en(e,i,o,r,t),r.state=e.memoizedState)),"function"==typeof r.componentDidMount&&(e.effectTag|=4)}function mn(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){n=n._owner;var o=void 0;n&&(2!==n.tag&&r("110"),o=n.stateNode),o||r("147",e);var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=o.refs===Wr?o.refs={}:o.refs;null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}"string"!=typeof e&&r("148"),n._owner||r("254",e)}return e}function gn(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function yn(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,n){return e=Dt(e,t,n),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index,rm?(g=f,f=null):g=f.sibling;var y=p(r,f,l[m],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(r,f),i=a(y,i,m),null===c?s=y:c.sibling=y,c=y,f=g}if(m===l.length)return n(r,f),s;if(null===f){for(;mg?(y=m,m=null):y=m.sibling;var b=p(i,m,v.value,s);if(null===b){m||(m=y);break}e&&m&&null===b.alternate&&t(i,m),l=a(b,l,g),null===f?c=b:f.sibling=b,f=b,m=y}if(v.done)return n(i,m),c;if(null===m){for(;!v.done;g++,v=u.next())null!==(v=d(i,v.value,s))&&(l=a(v,l,g),null===f?c=v:f.sibling=v,f=v);return c}for(m=o(i,m);!v.done;g++,v=u.next())null!==(v=h(m,i,g,v.value,s))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),l=a(v,l,g),null===f?c=v:f.sibling=v,f=v);return e&&m.forEach(function(e){return t(i,e)}),c}return function(e,o,a,u){var s="object"==typeof a&&null!==a&&a.type===Yo&&null===a.key;s&&(a=a.props.children);var c="object"==typeof a&&null!==a;if(c)switch(a.$$typeof){case Wo:e:{for(c=a.key,s=o;null!==s;){if(s.key===c){if(10===s.tag?a.type===Yo:s.type===a.type){n(e,s.sibling),o=i(s,a.type===Yo?a.props.children:a.props,u),o.ref=mn(e,s,a),o.return=e,e=o;break e}n(e,s);break}t(e,s),s=s.sibling}a.type===Yo?(o=jt(a.props.children,e.mode,u,a.key),o.return=e,e=o):(u=Mt(a,e.mode,u),u.ref=mn(e,o,a),u.return=e,e=u)}return l(e);case Ho:e:{for(s=a.key;null!==o;){if(o.key===s){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(e,o.sibling),o=i(o,a.children||[],u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=zt(a,e.mode,u),o.return=e,e=o}return l(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==o&&6===o.tag?(n(e,o.sibling),o=i(o,a,u),o.return=e,e=o):(n(e,o),o=Ft(a,e.mode,u),o.return=e,e=o),l(e);if(Ba(a))return m(e,o,a,u);if(ie(a))return g(e,o,a,u);if(c&&gn(e,a),void 0===a&&!s)switch(e.tag){case 2:case 1:u=e.type,r("152",u.displayName||u.name||"Component")}return n(e,o)}}function vn(e,t){var n=new Lt(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function bn(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function wn(e){if(Xa){var t=Va;if(t){var n=t;if(!bn(e,t)){if(!(t=Et(n))||!bn(e,t))return e.effectTag|=2,Xa=!1,void(Ya=e);vn(Ya,n)}Ya=e,Va=kt(t)}else e.effectTag|=2,Xa=!1,Ya=e}}function En(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;Ya=e}function kn(e){if(e!==Ya)return!1;if(!Xa)return En(e),Xa=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!wt(t,e.memoizedProps))for(t=Va;t;)vn(e,t),t=Et(t);return En(e),Va=Ya?Et(e.stateNode):null,!0}function _n(){Va=Ya=null,Xa=!1}function xn(e,t,n){Cn(e,t,n,t.expirationTime)}function Cn(e,t,n,r){t.child=null===e?Ha(t,null,n,r):Wa(t,e.child,n,r)}function Sn(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Tn(e,t,n,r,o){Sn(e,t);var i=0!=(64&t.effectTag);if(!n&&!i)return r&&At(t,!1),On(e,t);n=t.stateNode,zo.current=t;var a=i?null:n.render();return t.effectTag|=1,i&&(Cn(e,t,null,o),t.child=null),Cn(e,t,a,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&At(t,!0),t.child}function Pn(e){var t=e.stateNode;t.pendingContext?Ot(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ot(e,t.context,!1),un(e,t.containerInfo)}function Nn(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){switch(o.tag){case 12:var i=0|o.stateNode;if(o.type===t&&0!=(i&n)){for(i=o;null!==i;){var a=i.alternate;if(0===i.expirationTime||i.expirationTime>r)i.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}i=i.return}i=null}else i=o.child;break;case 13:i=o.type===e.type?null:o.child;break;default:i=o.child}if(null!==i)i.return=o;else for(i=o;null!==i;){if(i===e){i=null;break}if(null!==(o=i.sibling)){o.return=i.return,i=o;break}i=i.return}o=i}}function Rn(e,t,n){var r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=!0;if(Pa.current)a=!1;else if(i===o)return t.stateNode=0,on(t),On(e,t);var l=o.value;if(t.memoizedProps=o,null===i)l=1073741823;else if(i.value===o.value){if(i.children===o.children&&a)return t.stateNode=0,on(t),On(e,t);l=0}else{var u=i.value;if(u===l&&(0!==u||1/u==1/l)||u!==u&&l!==l){if(i.children===o.children&&a)return t.stateNode=0,on(t),On(e,t);l=0}else if(l="function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,l):1073741823,0===(l|=0)){if(i.children===o.children&&a)return t.stateNode=0,on(t),On(e,t)}else Nn(t,r,l,n)}return t.stateNode=l,on(t),xn(e,t,o.children),t.child}function On(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=Dt(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=Dt(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function In(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:Pn(t);break;case 2:Ut(t);break;case 4:un(t,t.stateNode.containerInfo);break;case 13:on(t)}return null}switch(t.tag){case 0:null!==e&&r("155");var o=t.type,i=t.pendingProps,a=St(t);return a=Tt(t,a),o=o(i,a),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,a=a.getDerivedStateFromProps,"function"==typeof a&&fn(t,a,i),i=Ut(t),o.updater=za,t.stateNode=o,o._reactInternalFiber=t,hn(t,n),e=Tn(e,t,!0,i,n)):(t.tag=1,xn(e,t,o),t.memoizedProps=i,e=t.child),e;case 1:return i=t.type,n=t.pendingProps,Pa.current||t.memoizedProps!==n?(o=St(t),o=Tt(t,o),i=i(n,o),t.effectTag|=1,xn(e,t,i),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 2:if(i=Ut(t),null===e)if(null===t.stateNode){var l=t.pendingProps,u=t.type;o=St(t);var s=2===t.tag&&null!=t.type.contextTypes;a=s?Tt(t,o):Wr,l=new u(l,a),t.memoizedState=null!==l.state&&void 0!==l.state?l.state:null,l.updater=za,t.stateNode=l,l._reactInternalFiber=t,s&&(s=t.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=o,s.__reactInternalMemoizedMaskedChildContext=a),hn(t,n),o=!0}else{u=t.type,o=t.stateNode,s=t.memoizedProps,a=t.pendingProps,o.props=s;var c=o.context;l=St(t),l=Tt(t,l);var f=u.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==a||c!==l)&&pn(t,o,a,l),Ia=!1;var d=t.memoizedState;c=o.state=d;var p=t.updateQueue;null!==p&&(en(t,p,a,o,n),c=t.memoizedState),s!==a||d!==c||Pa.current||Ia?("function"==typeof f&&(fn(t,f,a),c=t.memoizedState),(s=Ia||dn(t,s,a,d,c,l))?(u||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.effectTag|=4)):("function"==typeof o.componentDidMount&&(t.effectTag|=4),t.memoizedProps=a,t.memoizedState=c),o.props=a,o.state=c,o.context=l,o=s):("function"==typeof o.componentDidMount&&(t.effectTag|=4),o=!1)}else u=t.type,o=t.stateNode,a=t.memoizedProps,s=t.pendingProps,o.props=a,c=o.context,l=St(t),l=Tt(t,l),f=u.getDerivedStateFromProps,(u="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(a!==s||c!==l)&&pn(t,o,s,l),Ia=!1,c=t.memoizedState,d=o.state=c,p=t.updateQueue,null!==p&&(en(t,p,s,o,n),d=t.memoizedState),a!==s||c!==d||Pa.current||Ia?("function"==typeof f&&(fn(t,f,s),d=t.memoizedState),(f=Ia||dn(t,a,s,c,d,l))?(u||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(s,d,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(s,d,l)),"function"==typeof o.componentDidUpdate&&(t.effectTag|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=s,t.memoizedState=d),o.props=s,o.state=d,o.context=l,o=f):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),o=!1);return Tn(e,t,o,i,n);case 3:return Pn(t),i=t.updateQueue,null!==i?(o=t.memoizedState,o=null!==o?o.element:null,en(t,i,t.pendingProps,null,n),(i=t.memoizedState.element)===o?(_n(),e=On(e,t)):(o=t.stateNode,(o=(null===e||null===e.child)&&o.hydrate)&&(Va=kt(t.stateNode.containerInfo),Ya=t,o=Xa=!0),o?(t.effectTag|=2,t.child=Ha(t,null,i,n)):(_n(),xn(e,t,i)),e=t.child)):(_n(),e=On(e,t)),e;case 5:return ln(Fa.current),i=ln(Ma.current),o=at(i,t.type),i!==o&&(Ct(ja,t,t),Ct(Ma,o,t)),null===e&&wn(t),i=t.type,s=t.memoizedProps,o=t.pendingProps,a=null!==e?e.memoizedProps:null,Pa.current||s!==o||((s=1&t.mode&&!!o.hidden)&&(t.expirationTime=1073741823),s&&1073741823===n)?(s=o.children,wt(i,o)?s=null:a&&wt(i,a)&&(t.effectTag|=16),Sn(e,t),1073741823!==n&&1&t.mode&&o.hidden?(t.expirationTime=1073741823,t.memoizedProps=o,e=null):(xn(e,t,s),t.memoizedProps=o,e=t.child)):e=On(e,t),e;case 6:return null===e&&wn(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return un(t,t.stateNode.containerInfo),i=t.pendingProps,Pa.current||t.memoizedProps!==i?(null===e?t.child=Wa(t,null,i,n):xn(e,t,i),t.memoizedProps=i,e=t.child):e=On(e,t),e;case 14:return i=t.type.render,n=t.pendingProps,o=t.ref,Pa.current||t.memoizedProps!==n||o!==(null!==e?e.ref:null)?(i=i(n,o),xn(e,t,i),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 10:return n=t.pendingProps,Pa.current||t.memoizedProps!==n?(xn(e,t,n),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 11:return n=t.pendingProps.children,Pa.current||null!==n&&t.memoizedProps!==n?(xn(e,t,n),t.memoizedProps=n,e=t.child):e=On(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=On(e,t):(xn(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return Rn(e,t,n);case 12:e:if(o=t.type,a=t.pendingProps,s=t.memoizedProps,i=o._currentValue,l=o._changedBits,Pa.current||0!==l||s!==a){if(t.memoizedProps=a,u=a.unstable_observedBits,void 0!==u&&null!==u||(u=1073741823),t.stateNode=u,0!=(l&u))Nn(t,o,l,n);else if(s===a){e=On(e,t);break e}n=a.children,n=n(i),t.effectTag|=1,xn(e,t,n),e=t.child}else e=On(e,t);return e;default:r("156")}}function Un(e){e.effectTag|=4}function An(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return Nt(t),null;case 3:sn(t),Rt(t);var o=t.stateNode;return o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==e&&null!==e.child||(kn(t),t.effectTag&=-3),$a(t),null;case 5:cn(t),o=ln(Fa.current);var i=t.type;if(null!==e&&null!=t.stateNode){var a=e.memoizedProps,l=t.stateNode,u=ln(Ma.current);l=mt(l,i,a,n,o),qa(e,t,l,i,a,n,o,u),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&r("166"),null;if(e=ln(Ma.current),kn(t))n=t.stateNode,i=t.type,a=t.memoizedProps,n[oo]=t,n[io]=a,o=yt(n,i,a,e,o),t.updateQueue=o,null!==o&&Un(t);else{e=dt(i,n,o,e),e[oo]=t,e[io]=n;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}ht(e,i,n,o),bt(i,n)&&Un(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Qa(e,t,e.memoizedProps,n);else{if("string"!=typeof n)return null===t.stateNode&&r("166"),null;o=ln(Fa.current),ln(Ma.current),kn(t)?(o=t.stateNode,n=t.memoizedProps,o[oo]=t,vt(o,n)&&Un(t)):(o=pt(n,o),o[oo]=t,t.stateNode=o)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return sn(t),$a(t),null;case 13:return an(t),null;case 12:return null;case 0:r("167");default:r("156")}}function Ln(e,t){var n=t.source;null===t.stack&&null!==n&&le(n),null!==n&&ae(n),t=t.value,null!==e&&2===e.tag&&ae(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function Dn(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Kn(e,t)}else t.current=null}function Mn(e){switch("function"==typeof Vt&&Vt(e),e.tag){case 2:Dn(e);var t=e.stateNode;if("function"==typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Kn(e,t)}break;case 5:Dn(e);break;case 4:zn(e)}}function jn(e){return 5===e.tag||3===e.tag||4===e.tag}function Fn(e){e:{for(var t=e.return;null!==t;){if(jn(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var o=t=void 0;switch(n.tag){case 5:t=n.stateNode,o=!1;break;case 3:case 4:t=n.stateNode.containerInfo,o=!0;break;default:r("161")}16&n.effectTag&&(lt(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||jn(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)if(n)if(o){var a=t,l=i.stateNode,u=n;8===a.nodeType?a.parentNode.insertBefore(l,u):a.insertBefore(l,u)}else t.insertBefore(i.stateNode,n);else o?(a=t,l=i.stateNode,8===a.nodeType?a.parentNode.insertBefore(l,a):a.appendChild(l)):t.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function zn(e){for(var t=e,n=!1,o=void 0,i=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:o=n.stateNode,i=!1;break e;case 3:case 4:o=n.stateNode.containerInfo,i=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,l=a;;)if(Mn(l),null!==l.child&&4!==l.tag)l.child.return=l,l=l.child;else{if(l===a)break;for(;null===l.sibling;){if(null===l.return||l.return===a)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}i?(a=o,l=t.stateNode,8===a.nodeType?a.parentNode.removeChild(l):a.removeChild(l)):o.removeChild(t.stateNode)}else if(4===t.tag?o=t.stateNode.containerInfo:Mn(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function Bn(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var o=t.memoizedProps;e=null!==e?e.memoizedProps:o;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&(n[io]=o,gt(n,a,i,e,o))}break;case 6:null===t.stateNode&&r("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:r("163")}}function Wn(e,t,n){n=qt(n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){hr(r),Ln(e,t)},n}function Hn(e,t,n){n=qt(n),n.tag=3;var r=e.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){null===cl?cl=new Set([this]):cl.add(this);var n=t.value,r=t.stack;Ln(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function Yn(e,t,n,r,o,i){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=rn(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,r=Wn(e,r,i),void Gt(e,r,i);case 2:if(t=r,n=e.stateNode,0==(64&e.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&(null===cl||!cl.has(n)))return e.effectTag|=1024,r=Hn(e,t,i),void Gt(e,r,i)}e=e.return}while(null!==e)}function Vn(e){switch(e.tag){case 2:Nt(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return sn(e),Rt(e),t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 5:return cn(e),null;case 16:return t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 4:return sn(e),null;case 13:return an(e),null;default:return null}}function Xn(){if(null!==nl)for(var e=nl.return;null!==e;){var t=e;switch(t.tag){case 2:Nt(t);break;case 3:sn(t),Rt(t);break;case 5:cn(t);break;case 4:sn(t);break;case 13:an(t)}e=e.return}rl=null,ol=0,il=-1,al=!1,nl=null,sl=!1}function $n(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){t=An(t,e,ol);var o=e;if(1073741823===ol||1073741823!==o.expirationTime){var i=0;switch(o.tag){case 3:case 2:var a=o.updateQueue;null!==a&&(i=a.expirationTime)}for(a=o.child;null!==a;)0!==a.expirationTime&&(0===i||i>a.expirationTime)&&(i=a.expirationTime),a=a.sibling;o.expirationTime=i}if(null!==t)return t;if(null!==n&&0==(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1vl)&&(vl=e),e}function Zn(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!tl&&0!==ol&&tTl&&r("185")}e=e.return}}function er(){return Ja=ka()-Ka,Ga=2+(Ja/10|0)}function tr(e){var t=el;el=2+25*(1+((er()-2+500)/25|0));try{return e()}finally{el=t}}function nr(e,t,n,r,o){var i=el;el=1;try{return e(t,n,r,o)}finally{el=i}}function rr(e){if(0!==pl){if(e>pl)return;null!==hl&&xa(hl)}var t=ka()-Ka;pl=e,hl=_a(ar,{timeout:10*(e-2)-t})}function or(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===dl?(fl=dl=e,e.nextScheduledRoot=e):(dl=dl.nextScheduledRoot=e,dl.nextScheduledRoot=fl);else{var n=e.remainingExpirationTime;(0===n||t=yl)&&(!bl||er()>=yl);)er(),fr(gl,yl,!bl),ir();else for(;null!==gl&&0!==yl&&(0===e||e>=yl);)fr(gl,yl,!1),ir();null!==kl&&(pl=0,hl=null),0!==yl&&rr(yl),kl=null,bl=!1,cr()}function sr(e,t){ml&&r("253"),gl=e,yl=t,fr(e,t,!1),lr(),cr()}function cr(){if(Pl=0,null!==Sl){var e=Sl;Sl=null;for(var t=0;tb&&(w=b,b=S,S=w),w=qe(x,S),E=qe(x,b),w&&E&&(1!==C.rangeCount||C.anchorNode!==w.node||C.anchorOffset!==w.offset||C.focusNode!==E.node||C.focusOffset!==E.offset)&&(k=document.createRange(),k.setStart(w.node,w.offset),C.removeAllRanges(),S>b?(C.addRange(k),C.extend(E.node,E.offset)):(k.setEnd(E.node,E.offset),C.addRange(k))))),C=[];for(S=x;S=S.parentNode;)1===S.nodeType&&C.push({element:S,left:S.scrollLeft,top:S.scrollTop});for("function"==typeof x.focus&&x.focus(),x=0;xNl)&&(bl=!0)}function hr(e){null===gl&&r("246"),gl.remainingExpirationTime=0,wl||(wl=!0,El=e)}function mr(e){null===gl&&r("246"),gl.remainingExpirationTime=e}function gr(e,t){var n=_l;_l=!0;try{return e(t)}finally{(_l=n)||ml||lr()}}function yr(e,t){if(_l&&!xl){xl=!0;try{return e(t)}finally{xl=!1}}return e(t)}function vr(e,t){ml&&r("187");var n=_l;_l=!0;try{return nr(e,t)}finally{_l=n,lr()}}function br(e,t,n){if(Cl)return e(t,n);_l||ml||0===vl||(ur(vl,!1,null),vl=0);var r=Cl,o=_l;_l=Cl=!0;try{return e(t,n)}finally{Cl=r,(_l=o)||ml||lr()}}function wr(e){var t=_l;_l=!0;try{nr(e)}finally{(_l=t)||ml||ur(1,!1,null)}}function Er(e,t,n,o,i){var a=t.current;if(n){n=n._reactInternalFiber;var l;e:{for(2===Ue(n)&&2===n.tag||r("170"),l=n;3!==l.tag;){if(Pt(l)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}(l=l.return)||r("171")}l=l.stateNode.context}n=Pt(n)?It(n,l):l}else n=Wr;return null===t.context?t.context=n:t.pendingContext=n,t=i,i=qt(o),i.payload={element:e},t=void 0===t?null:t,null!==t&&(i.callback=t),Kt(a,i,o),Zn(a,o),o}function kr(e){var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?r("188"):r("268",Object.keys(e))),e=De(t),null===e?null:e.stateNode}function _r(e,t,n,r){var o=t.current;return o=Jn(er(),o),Er(e,t,n,o,r)}function xr(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Cr(e){var t=e.findFiberByHostInstance;return Ht(Mr({},e,{findHostInstanceByFiber:function(e){return e=De(e),null===e?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}function Sr(e,t,n){var r=3=Co),Po=String.fromCharCode(32),No={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Ro=!1,Oo=!1,Io={eventTypes:No,extractEvents:function(e,t,n,r){var o=void 0,i=void 0;if(xo)e:{switch(e){case"compositionstart":o=No.compositionStart;break e;case"compositionend":o=No.compositionEnd;break e;case"compositionupdate":o=No.compositionUpdate;break e}o=void 0}else Oo?z(e,n)&&(o=No.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=No.compositionStart);return o?(To&&(Oo||o!==No.compositionStart?o===No.compositionEnd&&Oo&&(i=A()):(vo._root=r,vo._startText=L(),Oo=!0)),o=Eo.getPooled(o,t,n,r),i?o.data=i:null!==(i=B(n))&&(o.data=i),N(o),i=o):i=null,(e=So?W(e,n):H(e,n))?(t=ko.getPooled(No.beforeInput,t,n,r),t.data=e,N(t)):t=null,null===i?t:null===t?i:[i,t]}},Uo=null,Ao={injectFiberControlledHostComponent:function(e){Uo=e}},Lo=null,Do=null,Mo={injection:Ao,enqueueStateRestore:V,needsStateRestore:X,restoreStateIfNeeded:$},jo=!1,Fo={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},zo=Lr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Bo="function"==typeof Symbol&&Symbol.for,Wo=Bo?Symbol.for("react.element"):60103,Ho=Bo?Symbol.for("react.portal"):60106,Yo=Bo?Symbol.for("react.fragment"):60107,Vo=Bo?Symbol.for("react.strict_mode"):60108,Xo=Bo?Symbol.for("react.profiler"):60114,$o=Bo?Symbol.for("react.provider"):60109,qo=Bo?Symbol.for("react.context"):60110,Qo=Bo?Symbol.for("react.async_mode"):60111,Ko=Bo?Symbol.for("react.forward_ref"):60112,Go=Bo?Symbol.for("react.timeout"):60113,Jo="function"==typeof Symbol&&Symbol.iterator,Zo=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ei=Object.prototype.hasOwnProperty,ti={},ni={},ri={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ri[e]=new fe(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ri[t]=new fe(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ri[e]=new fe(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){ri[e]=new fe(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ri[e]=new fe(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){ri[e]=new fe(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){ri[e]=new fe(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){ri[e]=new fe(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){ri[e]=new fe(e,5,!1,e.toLowerCase(),null)});var oi=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(oi,de);ri[t]=new fe(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(oi,de);ri[t]=new fe(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(oi,de);ri[t]=new fe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),ri.tabIndex=new fe("tabIndex",1,!1,"tabindex",null);var ii={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},ai=null,li=null,ui=!1;Dr.canUseDOM&&(ui=ee("input")&&(!document.documentMode||9=document.documentMode,ji={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Fi=null,zi=null,Bi=null,Wi=!1,Hi={eventTypes:ji,extractEvents:function(e,t,n,r){var o,i=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!i)){e:{i=Xe(i),o=Qr.onSelect;for(var a=0;at)){e=-1;for(var n=[],r=Zi;null!==r;){var o=r.timeoutTime;-1!==o&&o<=t?n.push(r):-1!==o&&(-1===e||ot&&(t=8),aa=t"+t+"",t=pa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),ma={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ga=["Webkit","ms","Moz","O"];Object.keys(ma).forEach(function(e){ga.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ma[t]=ma[e]})});var ya=Mr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),va=jr.thatReturns(""),ba={createElement:dt,createTextNode:pt,setInitialProperties:ht,diffProperties:mt,updateProperties:gt,diffHydratedProperties:yt,diffHydratedText:vt,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(ye(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;tj.length&&j.push(e)}function d(e,t,n,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case k:case _:a=!0}}if(a)return n(o,e,""===t?"."+p(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),i.alloc(+e)}function g(e,t){if(i.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(r)return Y(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return P(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,o);if("number"==typeof t)return t&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,o){function i(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,l=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,l/=2,u/=2,n/=2}var s;if(o){var c=-1;for(s=n;sl&&(n=l-u),s=n;s>=0;s--){for(var f=!0,d=0;do&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a239?4:i>223?3:i>191?2:1;if(o+l<=n){var u,s,c,f;switch(l){case 1:i<128&&(a=i);break;case 2:u=e[o+1],128==(192&u)&&(f=(31&i)<<6|63&u)>127&&(a=f);break;case 3:u=e[o+1],s=e[o+2],128==(192&u)&&128==(192&s)&&(f=(15&i)<<12|(63&u)<<6|63&s)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=e[o+1],s=e[o+2],c=e[o+3],128==(192&u)&&128==(192&s)&&128==(192&c)&&(f=(15&i)<<18|(63&u)<<12|(63&s)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,l=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=l}return N(r)}function N(e){var t=e.length;if(t<=Z)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,o,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function D(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function j(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(e,t,n,r,o){return o||j(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(e,t,n,r,23,4),n+4}function z(e,t,n,r,o){return o||j(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(e,t,n,r,52,8),n+8}function B(e){if(e=W(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function W(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],a=0;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function V(e){for(var t=[],n=0;n>8,o=n%256,i.push(o),i.push(r);return i}function $(e){return K.toByteArray(B(e))}function q(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Q(e){return e!==e}/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +var K=n(30),G=n(31),J=n(32);t.Buffer=i,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),i.poolSize=8192,i._augment=function(e){return e.__proto__=i.prototype,e},i.from=function(e,t,n){return a(null,e,t,n)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(e,t,n){return u(null,e,t,n)},i.allocUnsafe=function(e){return s(null,e)},i.allocUnsafeSlow=function(e){return s(null,e)},i.isBuffer=function(e){return!(null==e||!e._isBuffer)},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},i.prototype.compare=function(e,t,n,r,o){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var a=o-r,l=n-t,u=Math.min(a,l),s=this.slice(r,o),c=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)r+=this[e+--t]*o;return r},i.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],o=1,i=0;++i=o&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},i.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),G.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),G.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),G.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),G.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){L(this,e,t,n,Math.pow(2,8*n)-1,0)}var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);L(this,e,t,n,o-1,-o)}var i=0,a=1,l=0;for(this[t]=255&e;++i>0)-l&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);L(this,e,t,n,o-1,-o)}var i=n-1,a=1,l=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===l&&0!==this[t+i+1]&&(l=1),this[t+i]=(e/a>>0)-l&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},i.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function o(e){var t=r(e),n=t[0],o=t[1];return 3*(n+o)/4-o}function i(e,t,n){return 3*(t+n)/4-n}function a(e){for(var t,n=r(e),o=n[0],a=n[1],l=new d(i(e,o,a)),u=0,s=a>0?o-4:o,c=0;c>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===a&&(t=f[e.charCodeAt(c)]<<2|f[e.charCodeAt(c+1)]>>4,l[u++]=255&t),1===a&&(t=f[e.charCodeAt(c)]<<10|f[e.charCodeAt(c+1)]<<4|f[e.charCodeAt(c+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l}function l(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function u(e,t,n){for(var r,o=[],i=t;ia?a:i+16383));return 1===r?(t=e[n-1],o.push(c[t>>2]+c[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"=")),o.join("")}t.byteLength=o,t.toByteArray=a,t.fromByteArray=s;for(var c=[],f=[],d="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,m=p.length;h>1,c=-7,f=n?o-1:0,d=n?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-c)-1,p>>=-c,c+=l;c>0;i=256*i+e[t+f],f+=d,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=d,c-=8);if(0===i)i=1-s;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=s}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,l,u,s=8*i-o-1,c=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+f>=1?d/u:d*Math.pow(2,1-f),t*u>=2&&(a++,u/=2),a+f>=c?(l=0,a=c):a+f>=1?(l=(t*u-1)*Math.pow(2,o),a+=f):(l=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&l,p+=h,l/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=h,a/=256,s-=8);e[n+p-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}}]); \ No newline at end of file diff --git a/lib/Cropper.js b/lib/Cropper.js index 3d04b87..6394d7d 100644 --- a/lib/Cropper.js +++ b/lib/Cropper.js @@ -540,11 +540,11 @@ var Cropper = function (_Component) { } } - // crop image + // get cropped canvas }, { - key: 'crop', - value: function crop() { + key: 'getCroppedCanvas', + value: function getCroppedCanvas() { var img = findDOMNode(this.img); var canvas = document.createElement('canvas'); var _values$original = this.values().original, @@ -557,6 +557,16 @@ var Cropper = function (_Component) { canvas.width = width; canvas.height = height; canvas.getContext('2d').drawImage(img, x, y, width, height, 0, 0, width, height); + return canvas; + } + + // crop image + + }, { + key: 'crop', + value: function crop() { + var canvas = this.getCroppedCanvas(); + return canvas.toDataURL(); }