text: !function(t){function e(t){delete installedChunks[t]}function n(t){var e=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.src=p.p+""+t+"."+_+".hot-update.js",e.appendChild(n)}function r(){return new Promise(function(t,e){if("undefined"==typeof XMLHttpRequest)return e(new Error("No browser support"));try{var n=new XMLHttpRequest,r=p.p+""+_+".hot-update.json";n.open("GET",r,!0),n.timeout=1e4,n.send(null)}catch(t){return e(t)}n.onreadystatechange=function(){if(4===n.readyState)if(0===n.status)e(new Error("Manifest request to "+r+" timed out."));else if(404===n.status)t();else if(200!==n.status&&304!==n.status)e(new Error("Manifest request to "+r+" failed."));else{try{var o=JSON.parse(n.responseText)}catch(t){return void e(t)}t(o)}}})}function o(t){var e=A[t];if(!e)return p;var n=function(n){return e.hot.active?(A[n]?A[n].parents.indexOf(t)<0&&A[n].parents.push(t):x=[t],e.children.indexOf(n)<0&&e.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+t),x=[]),C=!1,p(n)};for(var r in p)Object.prototype.hasOwnProperty.call(p,r)&&Object.defineProperty(n,r,function(t){return{configurable:!0,enumerable:!0,get:function(){return p[t]},set:function(e){p[t]=e}}}(r));return Object.defineProperty(n,"e",{enumerable:!0,value:function(t){function e(){E--,"prepare"===T&&(K[t]||l(t),0===E&&0===P&&h())}return"ready"===T&&a("prepare"),E++,p.e(t).then(e,function(t){throw e(),t})}}),n}function i(t){var e={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],_main:C,active:!0,accept:function(t,n){if(void 0===t)e._selfAccepted=!0;else if("function"==typeof t)e._selfAccepted=t;else if("object"==typeof t)for(var r=0;r<t.length;r++)e._acceptedDependencies[t[r]]=n||function(){};else e._acceptedDependencies[t]=n||function(){}},decline:function(t){if(void 0===t)e._selfDeclined=!0;else if("object"==typeof t)for(var n=0;n<t.length;n++)e._declinedDependencies[t[n]]=!0;else e._declinedDependencies[t]=!0},dispose:function(t){e._disposeHandlers.push(t)},addDisposeHandler:function(t){e._disposeHandlers.push(t)},removeDisposeHandler:function(t){var n=e._disposeHandlers.indexOf(t);n>=0&&e._disposeHandlers.splice(n,1)},check:c,apply:d,status:function(t){if(!t)return T;w.push(t)},addStatusHandler:function(t){w.push(t)},removeStatusHandler:function(t){var e=w.indexOf(t);e>=0&&w.splice(e,1)},data:b[t]};return C=!0,e}function a(t){T=t;for(var e=0;e<w.length;e++)w[e].call(null,t)}function s(t){return+t+""===t?+t:t}function c(t){if("idle"!==T)throw new Error("check() is only allowed in idle status");return y=t,a("check"),r().then(function(t){if(!t)return a("idle"),null;k={},K={},M=t.c,m=t.h,a("prepare");var e=new Promise(function(t,e){v={resolve:t,reject:e}});g={};return l(0),"prepare"===T&&0===E&&0===P&&h(),e})}function u(t,e){if(M[t]&&k[t]){k[t]=!1;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(g[n]=e[n]);0==--P&&0===E&&h()}}function l(t){M[t]?(k[t]=!0,P++,n(t)):K[t]=!0}function h(){a("ready");var t=v;if(v=null,t)if(y)d(y).then(function(e){t.resolve(e)},function(e){t.reject(e)});else{var e=[];for(var n in g)Object.prototype.hasOwnProperty.call(g,n)&&e.push(s(n));t.resolve(e)}}function d(n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];t.indexOf(r)<0&&t.push(r)}}if("ready"!==T)throw new Error("apply() is only allowed in ready status");n=n||{};var o,i,c,u,l,h={},d=[],f={},v=function(){console.warn("[HMR] unexpected require("+C.moduleId+") to disposed module")};for(var y in g)if(Object.prototype.hasOwnProperty.call(g,y)){l=s(y);var C;C=g[y]?function(t){for(var e=[t],n={},o=e.slice().map(function(t){return{chain:[t],id:t}});o.length>0;){var i=o.pop(),a=i.id,s=i.chain;if((u=A[a])&&!u.hot._selfAccepted){if(u.hot._selfDeclined)return{type:"self-declined",chain:s,moduleId:a};if(u.hot._main)return{type:"unaccepted",chain:s,moduleId:a};for(var c=0;c<u.parents.length;c++){var l=u.parents[c],h=A[l];if(h){if(h.hot._declinedDependencies[a])return{type:"declined",chain:s.concat([l]),moduleId:a,parentId:l};e.indexOf(l)>=0||(h.hot._acceptedDependencies[a]?(n[l]||(n[l]=[]),r(n[l],[a])):(delete n[l],e.push(l),o.push({chain:s.concat([l]),id:l})))}}}}return{type:"accepted",moduleId:t,outdatedModules:e,outdatedDependencies:n}}(l):{type:"disposed",moduleId:y};var S=!1,w=!1,P=!1,E="";switch(C.chain&&(E="\nUpdate propagation: "+C.chain.join(" -> ")),C.type){case"self-declined":n.onDeclined&&n.onDeclined(C),n.ignoreDeclined||(S=new Error("Aborted because of self decline: "+C.moduleId+E));break;case"declined":n.onDeclined&&n.onDeclined(C),n.ignoreDeclined||(S=new Error("Aborted because of declined dependency: "+C.moduleId+" in "+C.parentId+E));break;case"unaccepted":n.onUnaccepted&&n.onUnaccepted(C),n.ignoreUnaccepted||(S=new Error("Aborted because "+l+" is not accepted"+E));break;case"accepted":n.onAccepted&&n.onAccepted(C),w=!0;break;case"disposed":n.onDisposed&&n.onDisposed(C),P=!0;break;default:throw new Error("Unexception type "+C.type)}if(S)return a("abort"),Promise.reject(S);if(w){f[l]=g[l],r(d,C.outdatedModules);for(l in C.outdatedDependencies)Object.prototype.hasOwnProperty.call(C.outdatedDependencies,l)&&(h[l]||(h[l]=[]),r(h[l],C.outdatedDependencies[l]))}P&&(r(d,[C.moduleId]),f[l]=v)}var K=[];for(i=0;i<d.length;i++)l=d[i],A[l]&&A[l].hot._selfAccepted&&K.push({module:l,errorHandler:A[l].hot._selfAccepted});a("dispose"),Object.keys(M).forEach(function(t){M[t]===!1&&e(t)});for(var k,R=d.slice();R.length>0;)if(l=R.pop(),u=A[l]){var D={},O=u.hot._disposeHandlers;for(c=0;c<O.length;c++)(o=O[c])(D);for(b[l]=D,u.hot.active=!1,delete A[l],c=0;c<u.children.length;c++){var F=A[u.children[c]];F&&((k=F.parents.indexOf(l))>=0&&F.parents.splice(k,1))}}var I,N;for(l in h)if(Object.prototype.hasOwnProperty.call(h,l)&&(u=A[l]))for(N=h[l],c=0;c<N.length;c++)I=N[c],(k=u.children.indexOf(I))>=0&&u.children.splice(k,1);a("apply"),_=m;for(l in f)Object.prototype.hasOwnProperty.call(f,l)&&(t[l]=f[l]);var L=null;for(l in h)if(Object.prototype.hasOwnProperty.call(h,l)){u=A[l],N=h[l];var U=[];for(i=0;i<N.length;i++)I=N[i],o=u.hot._acceptedDependencies[I],U.indexOf(o)>=0||U.push(o);for(i=0;i<U.length;i++){o=U[i];try{o(N)}catch(t){n.onErrored&&n.onErrored({type:"accept-errored",moduleId:l,dependencyId:N[i],error:t}),n.ignoreErrored||L||(L=t)}}}for(i=0;i<K.length;i++){var G=K[i];l=G.module,x=[l];try{p(l)}catch(t){if("function"==typeof G.errorHandler)try{G.errorHandler(t)}catch(e){n.onErrored&&n.onErrored({type:"self-accept-error-handler-errored",moduleId:l,error:e,orginalError:t}),n.ignoreErrored||L||(L=e),L||(L=t)}else n.onErrored&&n.onErrored({type:"self-accept-errored",moduleId:l,error:t}),n.ignoreErrored||L||(L=t)}}return L?(a("fail"),Promise.reject(L)):(a("idle"),Promise.resolve(d))}function p(e){if(A[e])return A[e].exports;var n=A[e]={i:e,l:!1,exports:{},hot:i(e),parents:(S=x,x=[],S),children:[]};return t[e].call(n.exports,n,n.exports,o(e)),n.l=!0,n.exports}var f=this.webpackHotUpdate;this.webpackHotUpdate=function(t,e){u(t,e),f&&f(t,e)};var v,g,m,y=!0,_="ea444382c05c9d598f8c",b={},C=!0,x=[],S=[],w=[],T="idle",P=0,E=0,K={},k={},M={},A={};p.m=t,p.c=A,p.i=function(t){return t},p.d=function(t,e,n){p.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},p.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return p.d(e,"a",e),e},p.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},p.p="/",p.h=function(){return _},o(276)(p.s=276)}([function(t,e,n){"use strict";function r(t,e,n,r,i,a,s,c){if(o(e),!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,s,c],h=0;u=new Error(e.replace(/%s/g,function(){return l[h++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}var o=function(t){};t.exports=r},function(t,e,n){"use strict";var r=n(6),o=r;t.exports=o},function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}t.exports=r},function(t,e,n){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}/*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  */
  var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,s,c=r(t),u=1;u<arguments.length;u++){n=Object(arguments[u]);for(var l in n)i.call(n,l)&&(c[l]=n[l]);if(o){s=o(n);for(var h=0;h<s.length;h++)a.call(n,s[h])&&(c[s[h]]=n[s[h]])}}return c}},function(t,e,n){"use strict";function r(t,e){return 1===t.nodeType&&t.getAttribute(f)===String(e)||8===t.nodeType&&t.nodeValue===" react-text: "+e+" "||8===t.nodeType&&t.nodeValue===" react-empty: "+e+" "}function o(t){for(var e;e=t._renderedComponent;)t=e;return t}function i(t,e){var n=o(t);n._hostNode=e,e[g]=n}function a(t){var e=t._hostNode;e&&(delete e[g],t._hostNode=null)}function s(t,e){if(!(t._flags&v.hasCachedChildNodes)){var n=t._renderedChildren,a=e.firstChild;t:for(var s in n)if(n.hasOwnProperty(s)){var c=n[s],u=o(c)._domID;if(0!==u){for(;null!==a;a=a.nextSibling)if(r(a,u)){i(c,a);continue t}h("32",u)}}t._flags|=v.hasCachedChildNodes}}function c(t){if(t[g])return t[g];for(var e=[];!t[g];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var n,r;t&&(r=t[g]);t=e.pop())n=r,e.length&&s(r,t);return n}function u(t){var e=c(t);return null!=e&&e._hostNode===t?e:null}function l(t){if(void 0===t._hostNode&&h("33"),t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent||h("34"),t=t._hostParent;for(;e.length;t=e.pop())s(t,t._hostNode);return t._hostNode}var h=n(2),d=n(25),p=n(99),f=(n(0),d.ID_ATTRIBUTE_NAME),v=p,g="__reactInternalInstance$"+Math.random().toString(36).slice(2),m={getClosestInstanceFromNode:c,getInstanceFromNode:u,getNodeFromInstance:l,precacheChildNodes:s,precacheNode:i,uncacheNode:a};t.exports=m},function(t,e,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},function(t,e,n){"use strict";function r(t){return function(){return t}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(t){return t},t.exports=o},function(t,e,n){"use strict";var r=null;t.exports={debugTool:r}},function(t,e,n){"use strict";function r(){E.ReactReconcileTransaction&&C||l("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=E.ReactReconcileTransaction.getPooled(!0)}function i(t,e,n,o,i,a){return r(),C.batchedUpdates(t,e,n,o,i,a)}function a(t,e){return t._mountOrder-e._mountOrder}function s(t){var e=t.dirtyComponentsLength;e!==m.length&&l("124",e,m.length),m.sort(a),y++;for(var n=0;n<e;n++){var r=m[n],o=r._pendingCallbacks;r._pendingCallbacks=null;var i;if(f.logTopLevelRenders){var s=r;r._currentElement.type.isReactTopLevelWrapper&&(s=r._renderedComponent),i="React update: "+s.getName(),console.time(i)}if(v.performUpdateIfNecessary(r,t.reconcileTransaction,y),i&&console.timeEnd(i),o)for(var c=0;c<o.length;c++)t.callbackQueue.enqueue(o[c],r.getPublicInstance())}}function c(t){if(r(),!C.isBatchingUpdates)return void C.batchedUpdates(c,t);m.push(t),null==t._updateBatchNumber&&(t._updateBatchNumber=y+1)}function u(t,e){C.isBatchingUpdates||l("125"),_.enqueue(t,e),b=!0}var l=n(2),h=n(3),d=n(97),p=n(18),f=n(102),v=n(27),g=n(41),m=(n(0),[]),y=0,_=d.getPooled(),b=!1,C=null,x={initialize:function(){this.dirtyComponentsLength=m.length},close:function(){this.dirtyComponentsLength!==m.length?(m.splice(0,this.dirtyComponentsLength),T()):m.length=0}},S={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},w=[x,S];h(o.prototype,g,{getTransactionWrappers:function(){return w},destructor:function(){this.dirtyComponentsLength=null,d.release(this.callbackQueue),this.callbackQueue=null,E.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(t,e,n){return g.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,t,e,n)}}),p.addPoolingTo(o);var T=function(){for(;m.length||b;){if(m.length){var t=o.getPooled();t.perform(s,null,t),o.release(t)}if(b){b=!1;var e=_;_=d.getPooled(),e.notifyAll(),d.release(e)}}},P={injectReconcileTransaction:function(t){t||l("126"),E.ReactReconcileTransaction=t},injectBatchingStrategy:function(t){t||l("127"),"function"!=typeof t.batchedUpdates&&l("128"),"boolean"!=typeof t.isBatchingUpdates&&l("129"),C=t}},E={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:c,flushBatchedUpdates:T,injection:P,asap:u};t.exports=E},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";function r(t,e,n,r){this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var s=o[i];s?this[i]=s(n):"target"===i?this.target=r:this[i]=n[i]}var c=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return this.isDefaultPrevented=c?a.thatReturnsTrue:a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var o=n(3),i=n(18),a=n(6),s=(n(1),["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),c={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var t=this.constructor.Interface;for(var e in t)this[e]=null;for(var n=0;n<s.length;n++)this[s[n]]=null}}),r.Interface=c,r.augmentClass=function(t,e){var n=this,r=function(){};r.prototype=n.prototype;var a=new r;o(a,t.prototype),t.prototype=a,t.prototype.constructor=t,t.Interface=o({},n.Interface,e),t.augmentClass=n.augmentClass,i.addPoolingTo(t,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),t.exports=r},function(t,e,n){"use strict";var r={current:null};t.exports=r},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){t.exports=!n(20)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(12),o=n(9),i=n(82),a=n(21),s=function(t,e,n){var c,u,l,h=t&s.F,d=t&s.G,p=t&s.S,f=t&s.P,v=t&s.B,g=t&s.W,m=d?o:o[e]||(o[e]={}),y=m.prototype,_=d?r:p?r[e]:(r[e]||{}).prototype;d&&(n=e);for(c in n)(u=!h&&_&&void 0!==_[c])&&c in m||(l=u?_[c]:n[c],m[c]=d&&"function"!=typeof _[c]?n[c]:v&&u?i(l,r):g&&_[c]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):f&&"function"==typeof l?i(Function.call,l):l,f&&((m.virtual||(m.virtual={}))[c]=l,t&s.R&&y&&!y[c]&&a(y,c,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(30),o=n(84),i=n(56),a=Object.defineProperty;e.f=n(13)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(85),o=n(45);t.exports=function(t){return r(o(t))}},function(t,e,n){"use strict";var r=n(2),o=(n(0),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),i=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n),o}return new r(t,e,n)},s=function(t,e,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n,r),i}return new o(t,e,n,r)},c=function(t){var e=this;t instanceof e||r("25"),t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},u=o,l=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||u,n.poolSize||(n.poolSize=10),n.release=c,n},h={addPoolingTo:l,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:s};t.exports=h},function(t,e,n){"use strict";var r=n(3),o=n(262),i=n(77),a=n(267),s=n(263),c=n(264),u=n(28),l=n(265),h=n(268),d=n(269),p=(n(1),u.createElement),f=u.createFactory,v=u.cloneElement,g=r,m={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:d},Component:i,PureComponent:a,createElement:p,cloneElement:v,isValidElement:u.isValidElement,PropTypes:l,createClass:s.createClass,createFactory:f,createMixin:function(t){return t},DOM:c,version:h,__spread:g};t.exports=m},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(16),o=n(37);t.exports=n(13)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(53)("wks"),o=n(38),i=n(12).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},function(t,e,n){"use strict";var r={};t.exports=r},function(t,e,n){"use strict";function r(t){if(f){var e=t.node,n=t.children;if(n.length)for(var r=0;r<n.length;r++)v(e,n[r],null);else null!=t.html?h(e,t.html):null!=t.text&&p(e,t.text)}}function o(t,e){t.parentNode.replaceChild(e.node,t),r(e)}function i(t,e){f?t.children.push(e):t.node.appendChild(e.node)}function a(t,e){f?t.html=e:h(t.node,e)}function s(t,e){f?t.text=e:p(t.node,e)}function c(){return this.node.nodeName}function u(t){return{node:t,children:[],html:null,text:null,toString:c}}var l=n(62),h=n(43),d=n(70),p=n(115),f="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),v=d(function(t,e,n){11===e.node.nodeType||1===e.node.nodeType&&"object"===e.node.nodeName.toLowerCase()&&(null==e.node.namespaceURI||e.node.namespaceURI===l.html)?(r(e),t.insertBefore(e.node,n)):(t.insertBefore(e.node,n),r(e))});u.insertTreeBefore=v,u.replaceChildWithTree=o,u.queueChild=i,u.queueHTML=a,u.queueText=s,t.exports=u},function(t,e,n){"use strict";function r(t,e){return(t&e)===e}var o=n(2),i=(n(0),{MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(t){var e=i,n=t.Properties||{},a=t.DOMAttributeNamespaces||{},c=t.DOMAttributeNames||{},u=t.DOMPropertyNames||{},l=t.DOMMutationMethods||{};t.isCustomAttribute&&s._isCustomAttributeFunctions.push(t.isCustomAttribute);for(var h in n){s.properties.hasOwnProperty(h)&&o("48",h);var d=h.toLowerCase(),p=n[h],f={attributeName:d,attributeNamespace:null,propertyName:h,mutationMethod:null,mustUseProperty:r(p,e.MUST_USE_PROPERTY),hasBooleanValue:r(p,e.HAS_BOOLEAN_VALUE),hasNumericValue:r(p,e.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(p,e.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(p,e.HAS_OVERLOADED_BOOLEAN_VALUE)};if(f.hasBooleanValue+f.hasNumericValue+f.hasOverloadedBooleanValue<=1||o("50",h),c.hasOwnProperty(h)){var v=c[h];f.attributeName=v}a.hasOwnProperty(h)&&(f.attributeNamespace=a[h]),u.hasOwnProperty(h)&&(f.propertyName=u[h]),l.hasOwnProperty(h)&&(f.mutationMethod=l[h]),s.properties[h]=f}}}),a=":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",s={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:a,ATTRIBUTE_NAME_CHAR:a+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(t){for(var e=0;e<s._isCustomAttributeFunctions.length;e++){if((0,s._isCustomAttributeFunctions[e])(t))return!0}return!1},injection:i};t.exports=s},function(t,e,n){"use strict";var r={remove:function(t){t._reactInternalInstance=void 0},get:function(t){return t._reactInternalInstance},has:function(t){return void 0!==t._reactInternalInstance},set:function(t,e){t._reactInternalInstance=e}};t.exports=r},function(t,e,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=n(225),i=(n(7),n(1),{mountComponent:function(t,e,n,o,i,a){var s=t.mountComponent(e,n,o,i,a);return t._currentElement&&null!=t._currentElement.ref&&e.getReactMountReady().enqueue(r,t),s},getHostNode:function(t){return t.getHostNode()},unmountComponent:function(t,e){o.detachRefs(t,t._currentElement),t.unmountComponent(e)},receiveComponent:function(t,e,n,i){var a=t._currentElement;if(e!==a||i!==t._context){var s=o.shouldUpdateRefs(a,e);s&&o.detachRefs(t,a),t.receiveComponent(e,n,i),s&&t._currentElement&&null!=t._currentElement.ref&&n.getReactMountReady().enqueue(r,t)}},performUpdateIfNecessary:function(t,e,n){t._updateBatchNumber===n&&t.performUpdateIfNecessary(e)}});t.exports=i},function(t,e,n){"use strict";function r(t){return void 0!==t.ref}function o(t){return void 0!==t.key}var i=n(3),a=n(11),s=(n(1),n(120),Object.prototype.hasOwnProperty),c=n(118),u={key:!0,ref:!0,__self:!0,__source:!0},l=function(t,e,n,r,o,i,a){var s={$$typeof:c,type:t,key:e,ref:n,props:a,_owner:i};return s};l.createElement=function(t,e,n){var i,c={},h=null,d=null;if(null!=e){r(e)&&(d=e.ref),o(e)&&(h=""+e.key),void 0===e.__self?null:e.__self,void 0===e.__source?null:e.__source;for(i in e)s.call(e,i)&&!u.hasOwnProperty(i)&&(c[i]=e[i])}var p=arguments.length-2;if(1===p)c.children=n;else if(p>1){for(var f=Array(p),v=0;v<p;v++)f[v]=arguments[v+2];c.children=f}if(t&&t.defaultProps){var g=t.defaultProps;for(i in g)void 0===c[i]&&(c[i]=g[i])}return l(t,h,d,0,0,a.current,c)},l.createFactory=function(t){var e=l.createElement.bind(null,t);return e.type=t,e},l.cloneAndReplaceKey=function(t,e){return l(t.type,e,t.ref,t._self,t._source,t._owner,t.props)},l.cloneElement=function(t,e,n){var c,h=i({},t.props),d=t.key,p=t.ref,f=(t._self,t._source,t._owner);if(null!=e){r(e)&&(p=e.ref,f=a.current),o(e)&&(d=""+e.key);var v;t.type&&t.type.defaultProps&&(v=t.type.defaultProps);for(c in e)s.call(e,c)&&!u.hasOwnProperty(c)&&(void 0===e[c]&&void 0!==v?h[c]=v[c]:h[c]=e[c])}var g=arguments.length-2;if(1===g)h.children=n;else if(g>1){for(var m=Array(g),y=0;y<g;y++)m[y]=arguments[y+2];h.children=m}return l(t.type,d,p,0,0,f,h)},l.isValidElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===c},t.exports=l},function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r<e;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}t.exports=r},function(t,e,n){var r=n(31);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(90),o=n(46);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){"use strict";function r(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function o(t,e,n){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!r(e));default:return!1}}var i=n(2),a=n(63),s=n(64),c=n(68),u=n(109),l=n(110),h=(n(0),{}),d=null,p=function(t,e){t&&(s.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},f=function(t){return p(t,!0)},v=function(t){return p(t,!1)},g=function(t){return"."+t._rootNodeID},m={injection:{injectEventPluginOrder:a.injectEventPluginOrder,injectEventPluginsByName:a.injectEventPluginsByName},putListener:function(t,e,n){"function"!=typeof n&&i("94",e,typeof n);var r=g(t);(h[e]||(h[e]={}))[r]=n;var o=a.registrationNameModules[e];o&&o.didPutListener&&o.didPutListener(t,e,n)},getListener:function(t,e){var n=h[e];if(o(e,t._currentElement.type,t._currentElement.props))return null;var r=g(t);return n&&n[r]},deleteListener:function(t,e){var n=a.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e);var r=h[e];if(r){delete r[g(t)]}},deleteAllListeners:function(t){var e=g(t);for(var n in h)if(h.hasOwnProperty(n)&&h[n][e]){var r=a.registrationNameModules[n];r&&r.willDeleteListener&&r.willDeleteListener(t,n),delete h[n][e]}},extractEvents:function(t,e,n,r){for(var o,i=a.plugins,s=0;s<i.length;s++){var c=i[s];if(c){var l=c.extractEvents(t,e,n,r);l&&(o=u(o,l))}}return o},enqueueEvents:function(t){t&&(d=u(d,t))},processEventQueue:function(t){var e=d;d=null,t?l(e,f):l(e,v),d&&i("95"),c.rethrowCaughtError()},__purge:function(){h={}},__getListenerBank:function(){return h}};t.exports=m},function(t,e,n){"use strict";function r(t,e,n){var r=e.dispatchConfig.phasedRegistrationNames[n];return m(t,r)}function o(t,e,n){var o=r(t,n,e);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchInstances=v(n._dispatchInstances,t))}function i(t){t&&t.dispatchConfig.phasedRegistrationNames&&f.traverseTwoPhase(t._targetInst,o,t)}function a(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,n=e?f.getParentInstance(e):null;f.traverseTwoPhase(n,o,t)}}function s(t,e,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=m(t,r);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchInstances=v(n._dispatchInstances,t))}}function c(t){t&&t.dispatchConfig.registrationName&&s(t._targetInst,null,t)}function u(t){g(t,i)}function l(t){g(t,a)}function h(t,e,n,r){f.traverseEnterLeave(n,r,s,t,e)}function d(t){g(t,c)}var p=n(33),f=n(64),v=n(109),g=n(110),m=(n(1),p.getListener),y={accumulateTwoPhaseDispatches:u,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:d,accumulateEnterLeaveDispatches:h};t.exports=y},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(10),i=n(73),a={view:function(t){if(t.view)return t.view;var e=i(t);if(e.window===e)return e;var n=e.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(t){return t.detail||0}};o.augmentClass(r,a),t.exports=r},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){"use strict";function r(t){return Object.prototype.hasOwnProperty.call(t,v)||(t[v]=p++,h[t[v]]={}),h[t[v]]}var o,i=n(3),a=n(63),s=n(218),c=n(108),u=n(250),l=n(74),h={},d=!1,p=0,f={topAbort:"abort",topAnimationEnd:u("animationend")||"animationend",topAnimationIteration:u("animationiteration")||"animationiteration",topAnimationStart:u("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:u("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},v="_reactListenersID"+String(Math.random()).slice(2),g=i({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(t){t.setHandleTopLevel(g.handleTopLevel),g.ReactEventListener=t}},setEnabled:function(t){g.ReactEventListener&&g.ReactEventListener.setEnabled(t)},isEnabled:function(){return!(!g.ReactEventListener||!g.ReactEventListener.isEnabled())},listenTo:function(t,e){for(var n=e,o=r(n),i=a.registrationNameDependencies[t],s=0;s<i.length;s++){var c=i[s];o.hasOwnProperty(c)&&o[c]||("topWheel"===c?l("wheel")?g.ReactEventListener.trapBubbledEvent("topWheel","wheel",n):l("mousewheel")?g.ReactEventListener.trapBubbledEvent("topWheel","mousewheel",n):g.ReactEventListener.trapBubbledEvent("topWheel","DOMMouseScroll",n):"topScroll"===c?l("scroll",!0)?g.ReactEventListener.trapCapturedEvent("topScroll","scroll",n):g.ReactEventListener.trapBubbledEvent("topScroll","scroll",g.ReactEventListener.WINDOW_HANDLE):"topFocus"===c||"topBlur"===c?(l("focus",!0)?(g.ReactEventListener.trapCapturedEvent("topFocus","focus",n),g.ReactEventListener.trapCapturedEvent("topBlur","blur",n)):l("focusin")&&(g.ReactEventListener.trapBubbledEvent("topFocus","focusin",n),g.ReactEventListener.trapBubbledEvent("topBlur","focusout",n)),o.topBlur=!0,o.topFocus=!0):f.hasOwnProperty(c)&&g.ReactEventListener.trapBubbledEvent(c,f[c],n),o[c]=!0)}},trapBubbledEvent:function(t,e,n){return g.ReactEventListener.trapBubbledEvent(t,e,n)},trapCapturedEvent:function(t,e,n){return g.ReactEventListener.trapCapturedEvent(t,e,n)},supportsEventPageXY:function(){if(!document.createEvent)return!1;var t=document.createEvent("MouseEvent");return null!=t&&"pageX"in t},ensureScrollValueMonitoring:function(){if(void 0===o&&(o=g.supportsEventPageXY()),!o&&!d){var t=c.refreshScrollValues;g.ReactEventListener.monitorScrollValue(t),d=!0}}});t.exports=g},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(35),i=n(108),a=n(72),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(t){var e=t.button;return"which"in t?e:2===e?2:4===e?1:0},buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)},pageX:function(t){return"pageX"in t?t.pageX:t.clientX+i.currentScrollLeft},pageY:function(t){return"pageY"in t?t.pageY:t.clientY+i.currentScrollTop}};o.augmentClass(r,s),t.exports=r},function(t,e,n){"use strict";var r=n(2),o=(n(0),{}),i={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(t,e,n,o,i,a,s,c){this.isInTransaction()&&r("27");var u,l;try{this._isInTransaction=!0,u=!0,this.initializeAll(0),l=t.call(e,n,o,i,a,s,c),u=!1}finally{try{if(u)try{this.closeAll(0)}catch(t){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return l},initializeAll:function(t){for(var e=this.transactionWrappers,n=t;n<e.length;n++){var r=e[n];try{this.wrapperInitData[n]=o,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===o)try{this.initializeAll(n+1)}catch(t){}}}},closeAll:function(t){this.isInTransaction()||r("28");for(var e=this.transactionWrappers,n=t;n<e.length;n++){var i,a=e[n],s=this.wrapperInitData[n];try{i=!0,s!==o&&a.close&&a.close.call(this,s),i=!1}finally{if(i)try{this.closeAll(n+1)}catch(t){}}}this.wrapperInitData.length=0}};t.exports=i},function(t,e,n){"use strict";function r(t){var e=""+t,n=i.exec(e);if(!n)return e;var r,o="",a=0,s=0;for(a=n.index;a<e.length;a++){switch(e.charCodeAt(a)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#x27;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}s!==a&&(o+=e.substring(s,a)),s=a+1,o+=r}return s!==a?o+e.substring(s,a):o}function o(t){return"boolean"==typeof t||"number"==typeof t?""+t:r(t)}var i=/["'&<>]/;t.exports=o},function(t,e,n){"use strict";var r,o=n(5),i=n(62),a=/^[ \r\n\t\f]/,s=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,c=n(70),u=c(function(t,e){if(t.namespaceURI!==i.svg||"innerHTML"in t)t.innerHTML=e;else{r=r||document.createElement("div"),r.innerHTML="<svg>"+e+"</svg>";for(var n=r.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(u=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),a.test(e)||"<"===e[0]&&s.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),l=null}t.exports=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(135),i=r(o),a=n(129),s=r(a),c=n(133),u=r(c),l=n(134),h=r(l),d=n(137),p=r(d),f=n(136),v=r(f),g=n(79),m=r(g);n(272);var y=n(125),_=r(y),b=n(259),C=function(t){return S(2.54*.01/t).toFixed(1)},x=function(t){return(t/Math.sqrt(2)).toFixed(1)},S=function(t){return 1e6*t},w=function(t){function e(t){(0,u.default)(this,e);var n=(0,p.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t)),r=C(1e3);return n.state={map:_.default,canvasSize:{width:10*r*2,height:10*r*2},colorSize:{r:r,g:r,b:r},ppi:1e3,sppi:{r:x(1e3),g:1e3,b:x(1e3)},gridSize:r},n}return(0,v.default)(e,t),(0,h.default)(e,[{key:"_getColorSize",value:function(t){return t?2*this.state.colorSize[t]:2*this.state.gridSize}},{key:"_renderRect",value:function(t,e,n){var r=this._getColorSize(n),o=this.state.gridSize;return m.default.createElement(b.Group,{x:t,y:e,width:2*o,height:2*o},m.default.createElement(b.Rect,{x:0,y:0,width:2*o,height:2*o,fill:"transparent"}),m.default.createElement(b.Rect,{x:o-r/2,y:o-r/2,width:r,height:r,fill:this._mapColorKeyToHex(n),opacity:.7,stroke:n?"white":null}))}},{key:"_mapColorKeyToHex",value:function(t){switch(t){case"r":return"red";case"g":return"green";case"b":return"blue";default:return"transparent"}}},{key:"_handlePPIChange",value:function(t){var e=t.target.value,n=C(e),r=Math.min(Math.max(10*n*2,500),2e3);this.setState({canvasSize:{width:r,height:r},ppi:e,sppi:{r:x(e),g:e,b:x(e)},colorSize:{r:n,g:n,b:n},gridSize:n})}},{key:"_handleRGBChange",value:function(t){var e=t.target,n=(0,i.default)({},this.state.colorSize);n[e.name]=e.value,this.setState({colorSize:n}),console.info(t.target)}},{key:"_calculateCenterCoord",value:function(){var t=4*Math.sqrt(2*Math.pow(this.state.gridSize,2)),e=6*Math.sqrt(2*Math.pow(this.state.gridSize,2));return{x:this.state.canvasSize.width/2-e,y:2*t}}},{key:"render",value:function(){var t=this,e=this.state.gridSize;return m.default.createElement("div",{style:T.container},m.default.createElement("h1",null,"OLED Mask Pattern Program"),m.default.createElement(b.Stage,{width:this.state.canvasSize.width,height:this.state.canvasSize.height},m.default.createElement(b.Layer,{rotation:-45,x:this._calculateCenterCoord().x,y:this._calculateCenterCoord().y},this.state.map.map(function(n,r){return n.map(function(n,o){return t._renderRect(o*e*2,r*e*2,n)})}))),m.default.createElement("div",{style:T.controlPanelContainer},m.default.createElement("form",{style:T.controlPanel},m.default.createElement("div",{style:T.controlRow},m.default.createElement("label",null,"PPI "),m.default.createElement("input",{name:"r",type:"text",placeholder:this.state.ppi,value:this.state.ppi,onChange:this._handlePPIChange.bind(this)})),m.default.createElement("div",{style:T.controlRow},m.default.createElement("label",null,"R: "),m.default.createElement("input",{name:"r",type:"text",placeholder:this.state.sppi.r,value:this.state.sppi.r,disabled:!0})),m.default.createElement("div",{style:T.controlRow},m.default.createElement("label",null,"G: "),m.default.createElement("input",{name:"g",type:"text",placeholder:this.state.sppi.g,value:this.state.sppi.g,disabled:!0})),m.default.createElement("div",{style:T.controlRow},m.default.createElement("label",null,"B: "),m.default.createElement("input",{name:"b",type:"text",placeholder:this.state.sppi.b,value:this.state.sppi.b,disabled:!0}))),m.default.createElement("form",{style:T.controlPanel},m.default.createElement("div",null,"Pixel Dimension (µm)"),m.default.createElement("div",{style:T.controlRow},m.default.createElement("label",null,"R: "),m.default.createElement("input",{name:"r",type:"text",placeholder:this.state.colorSize.r,value:this.state.colorSize.r,onChange:this._handleRGBChange.bind(this)})),m.default.createElement("div",{style:T.controlRow},m.default.createElement("label",null,"G: "),m.default.createElement("input",{name:"g",type:"text",placeholder:this.state.colorSize.g,value:this.state.colorSize.g,onChange:this._handleRGBChange.bind(this)})),m.default.createElement("div",{style:T.controlRow},m.default.createElement("label",null,"B: "),m.default.createElement("input",{name:"b",type:"text",placeholder:this.state.colorSize.b,value:this.state.colorSize.b,onChange:this._handleRGBChange.bind(this)})))))}}]),e}(m.default.Component);e.default=w;var T={container:{display:"flex",flexDirection:"column",alignItems:"center"},canvasContainer:{backgroundColor:"lightGrey"},controlPanelContainer:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-around",alignSelf:"stretch"},controlPanel:{display:"flex",flexDirection:"column",alignItems:"flex-start",marginTop:50},controlRow:{display:"flex",flexDirection:"row"}};!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(C,"ppiToGridSize","/Users/roytang/GitHub/oled/src/app.jsx"),__REACT_HOT_LOADER__.register(x,"ppiToSppi","/Users/roytang/GitHub/oled/src/app.jsx"),__REACT_HOT_LOADER__.register(S,"normalise","/Users/roytang/GitHub/oled/src/app.jsx"),__REACT_HOT_LOADER__.register(w,"App","/Users/roytang/GitHub/oled/src/app.jsx"),__REACT_HOT_LOADER__.register(T,"styles","/Users/roytang/GitHub/oled/src/app.jsx"))}()},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){t.exports={}},function(t,e){t.exports=!0},function(t,e,n){var r=n(30),o=n(156),i=n(46),a=n(52)("IE_PROTO"),s=function(){},c=function(){var t,e=n(83)("iframe"),r=i.length;for(e.style.display="none",n(149).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object</script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(16).f,o=n(15),i=n(22)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(53)("keys"),o=n(38);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(12),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(45);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(31);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(12),o=n(9),i=n(48),a=n(58),s=n(16).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){e.f=n(22)},function(t,e,n){e=t.exports=n(175)(),e.push([t.i,"body{background:#ece7e7}.redBg{background-color:red;border-radius:51px;color:#fff;padding:5px}",""])},function(t,e,n){"use strict";function r(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!==t&&e!==e}function o(t,e){if(r(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(e,n[a])||!r(t[n[a]],e[n[a]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;t.exports=o},function(t,e,n){"use strict";function r(t,e){return Array.isArray(e)&&(e=e[1]),e?e.nextSibling:t.firstChild}function o(t,e,n){l.insertTreeBefore(t,e,n)}function i(t,e,n){Array.isArray(e)?s(t,e[0],e[1],n):v(t,e,n)}function a(t,e){if(Array.isArray(e)){var n=e[1];e=e[0],c(t,e,n),t.removeChild(n)}t.removeChild(e)}function s(t,e,n,r){for(var o=e;;){var i=o.nextSibling;if(v(t,o,r),o===n)break;o=i}}function c(t,e,n){for(;;){var r=e.nextSibling;if(r===n)break;t.removeChild(r)}}function u(t,e,n){var r=t.parentNode,o=t.nextSibling;o===e?n&&v(r,document.createTextNode(n),o):n?(f(o,n),c(r,o,e)):c(r,t,e)}var l=n(24),h=n(195),d=(n(4),n(7),n(70)),p=n(43),f=n(115),v=d(function(t,e,n){t.insertBefore(e,n)}),g=h.dangerouslyReplaceNodeWithMarkup,m={dangerouslyReplaceNodeWithMarkup:g,replaceDelimitedText:u,processUpdates:function(t,e){for(var n=0;n<e.length;n++){var s=e[n];switch(s.type){case"INSERT_MARKUP":o(t,s.content,r(t,s.afterNode));break;case"MOVE_EXISTING":i(t,s.fromNode,r(t,s.afterNode));break;case"SET_MARKUP":p(t,s.content);break;case"TEXT_CONTENT":f(t,s.content);break;case"REMOVE_NODE":a(t,s.fromNode)}}}};t.exports=m},function(t,e,n){"use strict";var r={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};t.exports=r},function(t,e,n){"use strict";function r(){if(s)for(var t in c){var e=c[t],n=s.indexOf(t);if(n>-1||a("96",t),!u.plugins[n]){e.extractEvents||a("97",t),u.plugins[n]=e;var r=e.eventTypes;for(var i in r)o(r[i],e,i)||a("98",i,t)}}}function o(t,e,n){u.eventNameDispatchConfigs.hasOwnProperty(n)&&a("99",n),u.eventNameDispatchConfigs[n]=t;var r=t.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];i(s,e,n)}return!0}return!!t.registrationName&&(i(t.registrationName,e,n),!0)}function i(t,e,n){u.registrationNameModules[t]&&a("100",t),u.registrationNameModules[t]=e,u.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var a=n(2),s=(n(0),null),c={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){s&&a("101"),s=Array.prototype.slice.call(t),r()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];c.hasOwnProperty(n)&&c[n]===o||(c[n]&&a("102",n),c[n]=o,e=!0)}e&&r()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return u.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var o=u.registrationNameModules[n[r]];if(o)return o}}return null},_resetEventPlugins:function(){s=null;for(var t in c)c.hasOwnProperty(t)&&delete c[t];u.plugins.length=0;var e=u.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var r=u.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=u},function(t,e,n){"use strict";function r(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function o(t){return"topMouseMove"===t||"topTouchMove"===t}function i(t){return"topMouseDown"===t||"topTouchStart"===t}function a(t,e,n,r){var o=t.type||"unknown-event";t.currentTarget=m.getNodeFromInstance(r),e?v.invokeGuardedCallbackWithCatch(o,n,t):v.invokeGuardedCallback(o,n,t),t.currentTarget=null}function s(t,e){var n=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!t.isPropagationStopped();o++)a(t,e,n[o],r[o]);else n&&a(t,e,n,r);t._dispatchListeners=null,t._dispatchInstances=null}function c(t){var e=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(e)){for(var r=0;r<e.length&&!t.isPropagationStopped();r++)if(e[r](t,n[r]))return n[r]}else if(e&&e(t,n))return n;return null}function u(t){var e=c(t);return t._dispatchInstances=null,t._dispatchListeners=null,e}function l(t){var e=t._dispatchListeners,n=t._dispatchInstances;Array.isArray(e)&&f("103"),t.currentTarget=e?m.getNodeFromInstance(n):null;var r=e?e(t):null;return t.currentTarget=null,t._dispatchListeners=null,t._dispatchInstances=null,r}function h(t){return!!t._dispatchListeners}var d,p,f=n(2),v=n(68),g=(n(0),n(1),{injectComponentTree:function(t){d=t},injectTreeTraversal:function(t){p=t}}),m={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:l,executeDispatchesInOrder:s,executeDispatchesInOrderStopAtTrue:u,hasDispatches:h,getInstanceFromNode:function(t){return d.getInstanceFromNode(t)},getNodeFromInstance:function(t){return d.getNodeFromInstance(t)},isAncestor:function(t,e){return p.isAncestor(t,e)},getLowestCommonAncestor:function(t,e){return p.getLowestCommonAncestor(t,e)},getParentInstance:function(t){return p.getParentInstance(t)},traverseTwoPhase:function(t,e,n){return p.traverseTwoPhase(t,e,n)},traverseEnterLeave:function(t,e,n,r,o){return p.traverseEnterLeave(t,e,n,r,o)},injection:g};t.exports=m},function(t,e,n){"use strict";function r(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}function o(t){var e={"=0":"=","=2":":"};return(""+("."===t[0]&&"$"===t[1]?t.substring(2):t.substring(1))).replace(/(=0|=2)/g,function(t){return e[t]})}var i={escape:r,unescape:o};t.exports=i},function(t,e,n){"use strict";function r(t){null!=t.checkedLink&&null!=t.valueLink&&s("87")}function o(t){r(t),(null!=t.value||null!=t.onChange)&&s("88")}function i(t){r(t),(null!=t.checked||null!=t.onChange)&&s("89")}function a(t){if(t){var e=t.getName();if(e)return" Check the render method of `"+e+"`."}return""}var s=n(2),c=n(19),u=n(223),l=(n(0),n(1),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),h={value:function(t,e,n){return!t[e]||l[t.type]||t.onChange||t.readOnly||t.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(t,e,n){return!t[e]||t.onChange||t.readOnly||t.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:c.PropTypes.func},d={},p={checkPropTypes:function(t,e,n){for(var r in h){if(h.hasOwnProperty(r))var o=h[r](e,r,t,"prop",null,u);if(o instanceof Error&&!(o.message in d)){d[o.message]=!0;a(n)}}},getValue:function(t){return t.valueLink?(o(t),t.valueLink.value):t.value},getChecked:function(t){return t.checkedLink?(i(t),t.checkedLink.value):t.checked},executeOnChange:function(t,e){return t.valueLink?(o(t),t.valueLink.requestChange(e.target.value)):t.checkedLink?(i(t),t.checkedLink.requestChange(e.target.checked)):t.onChange?t.onChange.call(void 0,e):void 0}};t.exports=p},function(t,e,n){"use strict";var r=n(2),o=(n(0),!1),i={replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(t){o&&r("104"),i.replaceNodeWithMarkup=t.replaceNodeWithMarkup,i.processChildrenUpdates=t.processChildrenUpdates,o=!0}}};t.exports=i},function(t,e,n){"use strict";function r(t,e,n){try{e(n)}catch(t){null===o&&(o=t)}}var o=null,i={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var t=o;throw o=null,t}}};t.exports=i},function(t,e,n){"use strict";function r(t){c.enqueueUpdate(t)}function o(t){var e=typeof t;if("object"!==e)return e;var n=t.constructor&&t.constructor.name||e,r=Object.keys(t);return r.length>0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function i(t,e){var n=s.get(t);if(!n){return null}return n}var a=n(2),s=(n(11),n(26)),c=(n(7),n(8)),u=(n(0),n(1),{isMounted:function(t){var e=s.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){u.validateCallback(e,n);var o=i(t);if(!o)return null;o._pendingCallbacks?o._pendingCallbacks.push(e):o._pendingCallbacks=[e],r(o)},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],r(t)},enqueueForceUpdate:function(t){var e=i(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,r(e))},enqueueReplaceState:function(t,e){var n=i(t,"replaceState");n&&(n._pendingStateQueue=[e],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(t,e){var n=i(t,"setState");if(n){(n._pendingStateQueue||(n._pendingStateQueue=[])).push(e),r(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,r(t)},validateCallback:function(t,e){t&&"function"!=typeof t&&a("122",e,o(t))}});t.exports=u},function(t,e,n){"use strict";var r=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,r,o){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,o)})}:t};t.exports=r},function(t,e,n){"use strict";function r(t){var e,n=t.keyCode;return"charCode"in t?0===(e=t.charCode)&&13===n&&(e=13):e=n,e>=32||13===e?e:0}t.exports=r},function(t,e,n){"use strict";function r(t){var e=this,n=e.nativeEvent;if(n.getModifierState)return n.getModifierState(t);var r=i[t];return!!r&&!!n[r]}function o(t){return r}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},function(t,e,n){"use strict";function r(t){var e=t.target||t.srcElement||window;return e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}t.exports=r},function(t,e,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(t,e){if(!i.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===t&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=n(5);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=null===t||t===!1,r=null===e||e===!1;if(n||r)return n===r;var o=typeof t,i=typeof e;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&t.type===e.type&&t.key===e.key}t.exports=r},function(t,e,n){"use strict";var r=(n(3),n(6)),o=(n(1),r);t.exports=o},function(t,e,n){"use strict";function r(t,e,n){this.props=t,this.context=e,this.refs=a,this.updater=n||i}var o=n(29),i=n(78),a=(n(120),n(23));n(0),n(1);r.prototype.isReactComponent={},r.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&o("85"),this.updater.enqueueSetState(this,t),e&&this.updater.enqueueCallback(this,e,"setState")},r.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this),t&&this.updater.enqueueCallback(this,t,"forceUpdate")};t.exports=r},function(t,e,n){"use strict";var r=(n(1),{isMounted:function(t){return!1},enqueueCallback:function(t,e){},enqueueForceUpdate:function(t){},enqueueReplaceState:function(t,e){},enqueueSetState:function(t,e){}});t.exports=r},function(t,e,n){"use strict";t.exports=n(19)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(132),i=r(o),a=n(131),s=r(a),c="function"==typeof s.default&&"symbol"==typeof i.default?function(t){return typeof t}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":typeof t};e.default="function"==typeof s.default&&"symbol"===c(i.default)?function(t){return void 0===t?"undefined":c(t)}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":void 0===t?"undefined":c(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(145);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(31),o=n(12).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){t.exports=!n(13)&&!n(20)(function(){return 7!=Object.defineProperty(n(83)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(81);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){"use strict";var r=n(48),o=n(14),i=n(91),a=n(21),s=n(15),c=n(47),u=n(151),l=n(51),h=n(89),d=n(22)("iterator"),p=!([].keys&&"next"in[].keys()),f=function(){return this};t.exports=function(t,e,n,v,g,m,y){u(n,e,v);var _,b,C,x=function(t){if(!p&&t in P)return P[t];switch(t){case"keys":return function(){return new n(this,t)};case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",w="values"==g,T=!1,P=t.prototype,E=P[d]||P["@@iterator"]||g&&P[g],K=E||x(g),k=g?w?x("entries"):K:void 0,M="Array"==e?P.entries||E:E;if(M&&(C=h(M.call(new t)))!==Object.prototype&&(l(C,S,!0),r||s(C,d)||a(C,d,f)),w&&E&&"values"!==E.name&&(T=!0,K=function(){return E.call(this)}),r&&!y||!p&&!T&&P[d]||a(P,d,K),c[e]=K,c[S]=f,g)if(_={values:w?K:x("values"),keys:m?K:x("keys"),entries:k},y)for(b in _)b in P||i(P,b,_[b]);else o(o.P+o.F*(p||T),e,_);return _}},function(t,e,n){var r=n(36),o=n(37),i=n(17),a=n(56),s=n(15),c=n(84),u=Object.getOwnPropertyDescriptor;e.f=n(13)?u:function(t,e){if(t=i(t),e=a(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(90),o=n(46).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(15),o=n(55),i=n(52)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(15),o=n(17),i=n(147)(!1),a=n(52)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},function(t,e,n){t.exports=n(21)},function(t,e,n){"use strict";var r=n(6),o={listen:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}}):t.attachEvent?(t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}):void 0},capture:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!0),{remove:function(){t.removeEventListener(e,n,!0)}}):{remove:r}},registerDefault:function(){}};t.exports=o},function(t,e,n){"use strict";function r(t){try{t.focus()}catch(t){}}t.exports=r},function(t,e,n){"use strict";(function(e){function n(t){if(void 0===(t=t||e.document))return null;try{return t.activeElement||t.body}catch(e){return t.body}}t.exports=n}).call(e,n(122))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function i(t){if(h===clearTimeout)return clearTimeout(t);if((h===r||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function a(){v&&p&&(v=!1,p.length?f=p.concat(f):g=-1,f.length&&s())}function s(){if(!v){var t=o(a);v=!0;for(var e=f.length;e;){for(p=f,f=[];++g<e;)p&&p[g].run();g=-1,e=f.length}p=null,v=!1,i(t)}}function c(t,e){this.fun=t,this.array=e}function u(){}var l,h,d=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{h="function"==typeof clearTimeout?clearTimeout:r}catch(t){h=r}}();var p,f=[],v=!1,g=-1;d.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];f.push(new c(t,e)),1!==f.length||v||o(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=u,d.addListener=u,d.once=u,d.off=u,d.removeListener=u,d.removeAllListeners=u,d.emit=u,d.binding=function(t){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(t){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(t,e,n){"use strict";function r(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}var o={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!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},i=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(t){i.forEach(function(e){o[r(e,t)]=o[t]})});var a={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},s={isUnitlessNumber:o,shorthandPropertyExpansions:a};t.exports=s},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n(2),i=n(18),a=(n(0),function(){function t(e){r(this,t),this._callbacks=null,this._contexts=null,this._arg=e}return t.prototype.enqueue=function(t,e){this._callbacks=this._callbacks||[],this._callbacks.push(t),this._contexts=this._contexts||[],this._contexts.push(e)},t.prototype.notifyAll=function(){var t=this._callbacks,e=this._contexts,n=this._arg;if(t&&e){t.length!==e.length&&o("24"),this._callbacks=null,this._contexts=null;for(var r=0;r<t.length;r++)t[r].call(e[r],n);t.length=0,e.length=0}},t.prototype.checkpoint=function(){return this._callbacks?this._callbacks.length:0},t.prototype.rollback=function(t){this._callbacks&&this._contexts&&(this._callbacks.length=t,this._contexts.length=t)},t.prototype.reset=function(){this._callbacks=null,this._contexts=null},t.prototype.destructor=function(){this.reset()},t}());t.exports=i.addPoolingTo(a)},function(t,e,n){"use strict";function r(t){return!!u.hasOwnProperty(t)||!c.hasOwnProperty(t)&&(s.test(t)?(u[t]=!0,!0):(c[t]=!0,!1))}function o(t,e){return null==e||t.hasBooleanValue&&!e||t.hasNumericValue&&isNaN(e)||t.hasPositiveNumericValue&&e<1||t.hasOverloadedBooleanValue&&e===!1}var i=n(25),a=(n(4),n(7),n(251)),s=(n(1),new RegExp("^["+i.ATTRIBUTE_NAME_START_CHAR+"]["+i.ATTRIBUTE_NAME_CHAR+"]*$")),c={},u={},l={createMarkupForID:function(t){return i.ID_ATTRIBUTE_NAME+"="+a(t)},setAttributeForID:function(t,e){t.setAttribute(i.ID_ATTRIBUTE_NAME,e)},createMarkupForRoot:function(){return i.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(t){t.setAttribute(i.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(t,e){var n=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(n){if(o(n,e))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&e===!0?r+'=""':r+"="+a(e)}return i.isCustomAttribute(t)?null==e?"":t+"="+a(e):null},createMarkupForCustomAttribute:function(t,e){return r(t)&&null!=e?t+"="+a(e):""},setValueForProperty:function(t,e,n){var r=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(r){var a=r.mutationMethod;if(a)a(t,n);else{if(o(r,n))return void this.deleteValueForProperty(t,e);if(r.mustUseProperty)t[r.propertyName]=n;else{var s=r.attributeName,c=r.attributeNamespace;c?t.setAttributeNS(c,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?t.setAttribute(s,""):t.setAttribute(s,""+n)}}}else if(i.isCustomAttribute(e))return void l.setValueForAttribute(t,e,n)},setValueForAttribute:function(t,e,n){if(r(e)){null==n?t.removeAttribute(e):t.setAttribute(e,""+n)}},deleteValueForAttribute:function(t,e){t.removeAttribute(e)},deleteValueForProperty:function(t,e){var n=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(n){var r=n.mutationMethod;if(r)r(t,void 0);else if(n.mustUseProperty){var o=n.propertyName;n.hasBooleanValue?t[o]=!1:t[o]=""}else t.removeAttribute(n.attributeName)}else i.isCustomAttribute(e)&&t.removeAttribute(e)}};t.exports=l},function(t,e,n){"use strict";var r={hasCachedChildNodes:1};t.exports=r},function(t,e,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var t=this._currentElement.props,e=s.getValue(t);null!=e&&o(this,Boolean(t.multiple),e)}}function o(t,e,n){var r,o,i=c.getNodeFromInstance(t).options;if(e){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<i.length;o++){var a=r.hasOwnProperty(i[o].value);i[o].selected!==a&&(i[o].selected=a)}}else{for(r=""+n,o=0;o<i.length;o++)if(i[o].value===r)return void(i[o].selected=!0);i.length&&(i[0].selected=!0)}}function i(t){var e=this._currentElement.props,n=s.executeOnChange(e,t);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),u.asap(r,this),n}var a=n(3),s=n(66),c=n(4),u=n(8),l=(n(1),!1),h={getHostProps:function(t,e){return a({},e,{onChange:t._wrapperState.onChange,value:void 0})},mountWrapper:function(t,e){var n=s.getValue(e);t._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:e.defaultValue,listeners:null,onChange:i.bind(t),wasMultiple:Boolean(e.multiple)},void 0===e.value||void 0===e.defaultValue||l||(l=!0)},getSelectValueContext:function(t){return t._wrapperState.initialValue},postUpdateWrapper:function(t){var e=t._currentElement.props;t._wrapperState.initialValue=void 0;var n=t._wrapperState.wasMultiple;t._wrapperState.wasMultiple=Boolean(e.multiple);var r=s.getValue(e);null!=r?(t._wrapperState.pendingUpdate=!1,o(t,Boolean(e.multiple),r)):n!==Boolean(e.multiple)&&(null!=e.defaultValue?o(t,Boolean(e.multiple),e.defaultValue):o(t,Boolean(e.multiple),e.multiple?[]:""))}};t.exports=h},function(t,e,n){"use strict";var r,o={injectEmptyComponentFactory:function(t){r=t}},i={create:function(t){return r(t)}};i.injection=o,t.exports=i},function(t,e,n){"use strict";var r={logTopLevelRenders:!1};t.exports=r},function(t,e,n){"use strict";function r(t){return s||a("111",t.type),new s(t)}function o(t){return new c(t)}function i(t){return t instanceof c}var a=n(2),s=(n(0),null),c=null,u={injectGenericComponentClass:function(t){s=t},injectTextComponentClass:function(t){c=t}},l={createInternalComponent:r,createInstanceForText:o,isTextComponent:i,injection:u};t.exports=l},function(t,e,n){"use strict";function r(t){return i(document.documentElement,t)}var o=n(211),i=n(178),a=n(93),s=n(94),c={hasSelectionCapabilities:function(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&"text"===t.type||"textarea"===e||"true"===t.contentEditable)},getSelectionInformation:function(){var t=s();return{focusedElem:t,selectionRange:c.hasSelectionCapabilities(t)?c.getSelection(t):null}},restoreSelection:function(t){var e=s(),n=t.focusedElem,o=t.selectionRange;e!==n&&r(n)&&(c.hasSelectionCapabilities(n)&&c.setSelection(n,o),a(n))},getSelection:function(t){var e;if("selectionStart"in t)e={start:t.selectionStart,end:t.selectionEnd};else if(document.selection&&t.nodeName&&"input"===t.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===t&&(e={start:-n.moveStart("character",-t.value.length),end:-n.moveEnd("character",-t.value.length)})}else e=o.getOffsets(t);return e||{start:0,end:0}},setSelection:function(t,e){var n=e.start,r=e.end;if(void 0===r&&(r=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(r,t.value.length);else if(document.selection&&t.nodeName&&"input"===t.nodeName.toLowerCase()){var i=t.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(t,e)}};t.exports=c},function(t,e,n){"use strict";function r(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r))return r;return t.length===e.length?-1:n}function o(t){return t?t.nodeType===O?t.documentElement:t.firstChild:null}function i(t){return t.getAttribute&&t.getAttribute(A)||""}function a(t,e,n,r,o){var i;if(C.logTopLevelRenders){var a=t._currentElement.props.child,s=a.type;i="React mount: "+("string"==typeof s?s:s.displayName||s.name),console.time(i)}var c=w.mountComponent(t,n,null,_(t,e),o,0);i&&console.timeEnd(i),t._renderedComponent._topLevelWrapper=t,U._mountImageIntoNode(c,e,t,r,n)}function s(t,e,n,r){var o=P.ReactReconcileTransaction.getPooled(!n&&b.useCreateElement);o.perform(a,null,t,e,o,n,r),P.ReactReconcileTransaction.release(o)}function c(t,e,n){for(w.unmountComponent(t,n),e.nodeType===O&&(e=e.documentElement);e.lastChild;)e.removeChild(e.lastChild)}function u(t){var e=o(t);if(e){var n=y.getInstanceFromNode(e);return!(!n||!n._hostParent)}}function l(t){return!(!t||t.nodeType!==D&&t.nodeType!==O&&t.nodeType!==F)}function h(t){var e=o(t),n=e&&y.getInstanceFromNode(e);return n&&!n._hostParent?n:null}function d(t){var e=h(t);return e?e._hostContainerInfo._topLevelWrapper:null}var p=n(2),f=n(24),v=n(25),g=n(19),m=n(39),y=(n(11),n(4)),_=n(205),b=n(207),C=n(102),x=n(26),S=(n(7),n(221)),w=n(27),T=n(69),P=n(8),E=n(23),K=n(113),k=(n(0),n(43)),M=n(75),A=(n(1),v.ID_ATTRIBUTE_NAME),R=v.ROOT_ATTRIBUTE_NAME,D=1,O=9,F=11,I={},N=1,L=function(){this.rootID=N++};L.prototype.isReactComponent={},L.prototype.render=function(){return this.props.child},L.isReactTopLevelWrapper=!0;var U={TopLevelWrapper:L,_instancesByReactRootID:I,scrollMonitor:function(t,e){e()},_updateRootComponent:function(t,e,n,r,o){return U.scrollMonitor(r,function(){T.enqueueElementInternal(t,e,n),o&&T.enqueueCallbackInternal(t,o)}),t},_renderNewRootComponent:function(t,e,n,r){l(e)||p("37"),m.ensureScrollValueMonitoring();var o=K(t,!1);P.batchedUpdates(s,o,e,n,r);var i=o._instance.rootID;return I[i]=o,o},renderSubtreeIntoContainer:function(t,e,n,r){return null!=t&&x.has(t)||p("38"),U._renderSubtreeIntoContainer(t,e,n,r)},_renderSubtreeIntoContainer:function(t,e,n,r){T.validateCallback(r,"ReactDOM.render"),g.isValidElement(e)||p("39","string"==typeof e?" Instead of passing a string like 'div', pass React.createElement('div') or <div />.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or <Foo />.":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,s=g.createElement(L,{child:e});if(t){var c=x.get(t);a=c._processChildContext(c._context)}else a=E;var l=d(n);if(l){var h=l._currentElement,f=h.props.child;if(M(f,e)){var v=l._renderedComponent.getPublicInstance(),m=r&&function(){r.call(v)};return U._updateRootComponent(l,s,a,n,m),v}U.unmountComponentAtNode(n)}var y=o(n),_=y&&!!i(y),b=u(n),C=_&&!l&&!b,S=U._renderNewRootComponent(s,n,C,a)._renderedComponent.getPublicInstance();return r&&r.call(S),S},render:function(t,e,n){return U._renderSubtreeIntoContainer(null,t,e,n)},unmountComponentAtNode:function(t){l(t)||p("40");var e=d(t);if(!e){u(t),1===t.nodeType&&t.hasAttribute(R);return!1}return delete I[e._instance.rootID],P.batchedUpdates(c,e,t,!1),!0},_mountImageIntoNode:function(t,e,n,i,a){if(l(e)||p("41"),i){var s=o(e);if(S.canReuseMarkup(t,s))return void y.precacheNode(n,s);var c=s.getAttribute(S.CHECKSUM_ATTR_NAME);s.removeAttribute(S.CHECKSUM_ATTR_NAME);var u=s.outerHTML;s.setAttribute(S.CHECKSUM_ATTR_NAME,c);var h=t,d=r(h,u),v=" (client) "+h.substring(d-20,d+20)+"\n (server) "+u.substring(d-20,d+20);e.nodeType===O&&p("42",v)}if(e.nodeType===O&&p("43"),a.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);f.insertTreeBefore(e,t,null)}else k(e,t),y.precacheNode(n,e.firstChild)}};t.exports=U},function(t,e,n){"use strict";function r(t,e,n){return{type:"INSERT_MARKUP",content:t,fromIndex:null,fromNode:null,toIndex:n,afterNode:e}}function o(t,e,n){return{type:"MOVE_EXISTING",content:null,fromIndex:t._mountIndex,fromNode:d.getHostNode(t),toIndex:n,afterNode:e}}function i(t,e){return{type:"REMOVE_NODE",content:null,fromIndex:t._mountIndex,fromNode:e,toIndex:null,afterNode:null}}function a(t){return{type:"SET_MARKUP",content:t,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(t){return{type:"TEXT_CONTENT",content:t,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function c(t,e){return e&&(t=t||[],t.push(e)),t}function u(t,e){h.processChildrenUpdates(t,e)}var l=n(2),h=n(67),d=(n(26),n(7),n(11),n(27)),p=n(200),f=(n(6),n(245)),v=(n(0),{Mixin:{_reconcilerInstantiateChildren:function(t,e,n){return p.instantiateChildren(t,e,n)},_reconcilerUpdateChildren:function(t,e,n,r,o,i){var a,s=0;return a=f(e,s),p.updateChildren(t,a,n,r,o,this,this._hostContainerInfo,i,s),a},mountChildren:function(t,e,n){var r=this._reconcilerInstantiateChildren(t,e,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],c=0,u=d.mountComponent(s,e,this,this._hostContainerInfo,n,c);s._mountIndex=i++,o.push(u)}return o},updateTextContent:function(t){var e=this._renderedChildren;p.unmountChildren(e,!1);for(var n in e)e.hasOwnProperty(n)&&l("118");u(this,[s(t)])},updateMarkup:function(t){var e=this._renderedChildren;p.unmountChildren(e,!1);for(var n in e)e.hasOwnProperty(n)&&l("118");u(this,[a(t)])},updateChildren:function(t,e,n){this._updateChildren(t,e,n)},_updateChildren:function(t,e,n){var r=this._renderedChildren,o={},i=[],a=this._reconcilerUpdateChildren(r,t,i,o,e,n);if(a||r){var s,l=null,h=0,p=0,f=0,v=null;for(s in a)if(a.hasOwnProperty(s)){var g=r&&r[s],m=a[s];g===m?(l=c(l,this.moveChild(g,v,h,p)),p=Math.max(g._mountIndex,p),g._mountIndex=h):(g&&(p=Math.max(g._mountIndex,p)),l=c(l,this._mountChildAtIndex(m,i[f],v,h,e,n)),f++),h++,v=d.getHostNode(m)}for(s in o)o.hasOwnProperty(s)&&(l=c(l,this._unmountChild(r[s],o[s])));l&&u(this,l),this._renderedChildren=a}},unmountChildren:function(t){var e=this._renderedChildren;p.unmountChildren(e,t),this._renderedChildren=null},moveChild:function(t,e,n,r){if(t._mountIndex<r)return o(t,e,n)},createChild:function(t,e,n){return r(n,e,t._mountIndex)},removeChild:function(t,e){return i(t,e)},_mountChildAtIndex:function(t,e,n,r,o,i){return t._mountIndex=r,this.createChild(t,n,e)},_unmountChild:function(t,e){var n=this.removeChild(t,e);return t._mountIndex=null,n}}});t.exports=v},function(t,e,n){"use strict";var r=n(2),o=n(19),i=(n(0),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(t){return null===t||t===!1?i.EMPTY:o.isValidElement(t)?"function"==typeof t.type?i.COMPOSITE:i.HOST:void r("26",t)}});t.exports=i},function(t,e,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(t){r.currentScrollLeft=t.x,r.currentScrollTop=t.y}};t.exports=r},function(t,e,n){"use strict";function r(t,e){return null==e&&o("30"),null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}var o=n(2);n(0);t.exports=r},function(t,e,n){"use strict";function r(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}t.exports=r},function(t,e,n){"use strict";function r(t){for(var e;(e=t._renderedNodeType)===o.COMPOSITE;)t=t._renderedComponent;return e===o.HOST?t._renderedComponent:e===o.EMPTY?null:void 0}var o=n(107);t.exports=r},function(t,e,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(5),i=null;t.exports=r},function(t,e,n){"use strict";function r(t){if(t){var e=t.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(t){return"function"==typeof t&&void 0!==t.prototype&&"function"==typeof t.prototype.mountComponent&&"function"==typeof t.prototype.receiveComponent}function i(t,e){var n;if(null===t||t===!1)n=u.create(i);else if("object"==typeof t){var s=t,c=s.type;if("function"!=typeof c&&"string"!=typeof c){var d="";d+=r(s._owner),a("130",null==c?c:typeof c,d)}"string"==typeof s.type?n=l.createInternalComponent(s):o(s.type)?(n=new s.type(s),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new h(s)}else"string"==typeof t||"number"==typeof t?n=l.createInstanceForText(t):a("131",typeof t);return n._mountIndex=0,n._mountImage=null,n}var a=n(2),s=n(3),c=n(202),u=n(101),l=n(103),h=(n(248),n(0),n(1),function(t){this.construct(t)});s(h.prototype,c,{_instantiateReactComponent:i}),t.exports=i},function(t,e,n){"use strict";function r(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!o[t.type]:"textarea"===e}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};t.exports=r},function(t,e,n){"use strict";var r=n(5),o=n(42),i=n(43),a=function(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e};r.canUseDOM&&("textContent"in document.documentElement||(a=function(t,e){if(3===t.nodeType)return void(t.nodeValue=e);i(t,o(e))})),t.exports=a},function(t,e,n){"use strict";function r(t,e){return t&&"object"==typeof t&&null!=t.key?u.escape(t.key):e.toString(36)}function o(t,e,n,i){var d=typeof t;if("undefined"!==d&&"boolean"!==d||(t=null),null===t||"string"===d||"number"===d||"object"===d&&t.$$typeof===s)return n(i,t,""===e?l+r(t,0):e),1;var p,f,v=0,g=""===e?l:e+h;if(Array.isArray(t))for(var m=0;m<t.length;m++)p=t[m],f=g+r(p,m),v+=o(p,f,n,i);else{var y=c(t);if(y){var _,b=y.call(t);if(y!==t.entries)for(var C=0;!(_=b.next()).done;)p=_.value,f=g+r(p,C++),v+=o(p,f,n,i);else for(;!(_=b.next()).done;){var x=_.value;x&&(p=x[1],f=g+u.escape(x[0])+h+r(p,0),v+=o(p,f,n,i))}}else if("object"===d){var S="",w=String(t);a("31","[object Object]"===w?"object with keys {"+Object.keys(t).join(", ")+"}":w,S)}}return v}function i(t,e,n){return null==t?0:o(t,"",e,n)}var a=n(2),s=(n(11),n(217)),c=n(247),u=(n(0),n(65)),l=(n(1),"."),h=":";t.exports=i},function(t,e,n){"use strict";function r(t){var e=Function.prototype.toString,n=Object.prototype.hasOwnProperty,r=RegExp("^"+e.call(n).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");try{var o=e.call(t);return r.test(o)}catch(t){return!1}}function o(t){var e=u(t);if(e){var n=e.childIDs;l(t),n.forEach(o)}}function i(t,e,n){return"\n    in "+(t||"Unknown")+(e?" (at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+")":n?" (created by "+n+")":"")}function a(t){return null==t?"#empty":"string"==typeof t||"number"==typeof t?"#text":"string"==typeof t.type?t.type:t.type.displayName||t.type.name||"Unknown"}function s(t){var e,n=T.getDisplayName(t),r=T.getElement(t),o=T.getOwnerID(t);return o&&(e=T.getDisplayName(o)),i(n,r&&r._source,e)}var c,u,l,h,d,p,f,v=n(29),g=n(11),m=(n(0),n(1),"function"==typeof Array.from&&"function"==typeof Map&&r(Map)&&null!=Map.prototype&&"function"==typeof Map.prototype.keys&&r(Map.prototype.keys)&&"function"==typeof Set&&r(Set)&&null!=Set.prototype&&"function"==typeof Set.prototype.keys&&r(Set.prototype.keys));if(m){var y=new Map,_=new Set;c=function(t,e){y.set(t,e)},u=function(t){return y.get(t)},l=function(t){y.delete(t)},h=function(){return Array.from(y.keys())},d=function(t){_.add(t)},p=function(t){_.delete(t)},f=function(){return Array.from(_.keys())}}else{var b={},C={},x=function(t){return"."+t},S=function(t){return parseInt(t.substr(1),10)};c=function(t,e){var n=x(t);b[n]=e},u=function(t){var e=x(t);return b[e]},l=function(t){var e=x(t);delete b[e]},h=function(){return Object.keys(b).map(S)},d=function(t){var e=x(t);C[e]=!0},p=function(t){var e=x(t);delete C[e]},f=function(){return Object.keys(C).map(S)}}var w=[],T={onSetChildren:function(t,e){var n=u(t);n||v("144"),n.childIDs=e;for(var r=0;r<e.length;r++){var o=e[r],i=u(o);i||v("140"),null==i.childIDs&&"object"==typeof i.element&&null!=i.element&&v("141"),i.isMounted||v("71"),null==i.parentID&&(i.parentID=t),i.parentID!==t&&v("142",o,i.parentID,t)}},onBeforeMountComponent:function(t,e,n){c(t,{element:e,parentID:n,text:null,childIDs:[],isMounted:!1,updateCount:0})},onBeforeUpdateComponent:function(t,e){var n=u(t);n&&n.isMounted&&(n.element=e)},onMountComponent:function(t){var e=u(t);e||v("144"),e.isMounted=!0,0===e.parentID&&d(t)},onUpdateComponent:function(t){var e=u(t);e&&e.isMounted&&e.updateCount++},onUnmountComponent:function(t){var e=u(t);if(e){e.isMounted=!1;0===e.parentID&&p(t)}w.push(t)},purgeUnmountedComponents:function(){if(!T._preventPurging){for(var t=0;t<w.length;t++){o(w[t])}w.length=0}},isMounted:function(t){var e=u(t);return!!e&&e.isMounted},getCurrentStackAddendum:function(t){var e="";if(t){var n=a(t),r=t._owner;e+=i(n,t._source,r&&r.getName())}var o=g.current,s=o&&o._debugID;return e+=T.getStackAddendumByID(s)},getStackAddendumByID:function(t){for(var e="";t;)e+=s(t),t=T.getParentID(t);return e},getChildIDs:function(t){var e=u(t);return e?e.childIDs:[]},getDisplayName:function(t){var e=T.getElement(t);return e?a(e):null},getElement:function(t){var e=u(t);return e?e.element:null},getOwnerID:function(t){var e=T.getElement(t);return e&&e._owner?e._owner._debugID:null},getParentID:function(t){var e=u(t);return e?e.parentID:null},getSource:function(t){var e=u(t),n=e?e.element:null;return null!=n?n._source:null},getText:function(t){var e=T.getElement(t);return"string"==typeof e?e:"number"==typeof e?""+e:null},getUpdateCount:function(t){var e=u(t);return e?e.updateCount:0},getRootIDs:f,getRegisteredIDs:h};t.exports=T},function(t,e,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=r},function(t,e,n){"use strict";var r={};t.exports=r},function(t,e,n){"use strict";var r=!1;t.exports=r},function(t,e,n){"use strict";function r(t){var e=t&&(o&&t[o]||t[i]);if("function"==typeof e)return e}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";t.exports=r},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";(function(t){function e(t){return t&&t.__esModule?t:{default:t}}var r=n(79),o=e(r),i=n(189),a=n(253),s=n(44),c=e(s);(0,i.render)(o.default.createElement(a.AppContainer,null,o.default.createElement(c.default,null)),document.querySelector("#app")),t&&t.hot&&t.hot.accept(44,function(){var t=n(44).default;(0,i.render)(o.default.createElement(a.AppContainer,null,o.default.createElement(t,null)),document.querySelector("#app"))})}).call(e,n(273)(t))},function(t,e,n){t.exports=n(257)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=[[null,null,"g","b",null,null],[null,"g","r","g","r",null],["g","b","g","b","g","b"],["r","g","r","g","r","g"],[null,"b","g","b","g",null],[null,null,"r","g",null,null]],o=r;e.default=o;!function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"map","/Users/roytang/GitHub/oled/src/test_data.js"),__REACT_HOT_LOADER__.register(o,"default","/Users/roytang/GitHub/oled/src/test_data.js"))}()},function(t,e,n){t.exports={default:n(138),__esModule:!0}},function(t,e,n){t.exports={default:n(139),__esModule:!0}},function(t,e,n){t.exports={default:n(140),__esModule:!0}},function(t,e,n){t.exports={default:n(141),__esModule:!0}},function(t,e,n){t.exports={default:n(142),__esModule:!0}},function(t,e,n){t.exports={default:n(143),__esModule:!0}},function(t,e,n){t.exports={default:n(144),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(128),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,o.default)(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},function(t,e,n){"use strict";e.__esModule=!0;var r=n(126),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=o.default||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(130),i=r(o),a=n(127),s=r(a),c=n(80),u=r(c);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,u.default)(e)));t.prototype=(0,s.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(i.default?(0,i.default)(t,e):t.__proto__=e)}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(80),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,o.default)(e))&&"function"!=typeof e?t:e}},function(t,e,n){n(164),t.exports=n(9).Object.assign},function(t,e,n){n(165);var r=n(9).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){n(166);var r=n(9).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){n(167),t.exports=n(9).Object.getPrototypeOf},function(t,e,n){n(168),t.exports=n(9).Object.setPrototypeOf},function(t,e,n){n(171),n(169),n(172),n(173),t.exports=n(9).Symbol},function(t,e,n){n(170),n(174),t.exports=n(58).f("iterator")},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(17),o=n(162),i=n(161);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),l=i(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(32),o=n(50),i=n(36);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,s=n(t),c=i.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},function(t,e,n){t.exports=n(12).document&&document.documentElement},function(t,e,n){var r=n(81);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){"use strict";var r=n(49),o=n(37),i=n(51),a={};n(21)(a,n(22)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(32),o=n(17);t.exports=function(t,e){for(var n,i=o(t),a=r(i),s=a.length,c=0;s>c;)if(i[n=a[c++]]===e)return n}},function(t,e,n){var r=n(38)("meta"),o=n(31),i=n(15),a=n(16).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(20)(function(){return c(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},h=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},d=function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},p=function(t){return u&&f.NEED&&c(t)&&!i(t,r)&&l(t),t},f=t.exports={KEY:r,NEED:!1,fastKey:h,getWeak:d,onFreeze:p}},function(t,e,n){"use strict";var r=n(32),o=n(50),i=n(36),a=n(55),s=n(85),c=Object.assign;t.exports=!c||n(20)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=a(t),c=arguments.length,u=1,l=o.f,h=i.f;c>u;)for(var d,p=s(arguments[u++]),f=l?r(p).concat(l(p)):r(p),v=f.length,g=0;v>g;)h.call(p,d=f[g++])&&(n[d]=p[d]);return n}:c},function(t,e,n){var r=n(16),o=n(30),i=n(32);t.exports=n(13)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var r=n(17),o=n(88).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return o(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?s(t):o(r(t))}},function(t,e,n){var r=n(14),o=n(9),i=n(20);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(31),o=n(30),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(82)(Function.call,n(87).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){var r=n(54),o=n(45);t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(i=s.charCodeAt(c),i<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):a-56320+(i-55296<<10)+65536)}}},function(t,e,n){var r=n(54),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(54),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){"use strict";var r=n(146),o=n(152),i=n(47),a=n(17);t.exports=n(86)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(14);r(r.S+r.F,"Object",{assign:n(155)})},function(t,e,n){var r=n(14);r(r.S,"Object",{create:n(49)})},function(t,e,n){var r=n(14);r(r.S+r.F*!n(13),"Object",{defineProperty:n(16).f})},function(t,e,n){var r=n(55),o=n(89);n(158)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,e,n){var r=n(14);r(r.S,"Object",{setPrototypeOf:n(159).set})},function(t,e){},function(t,e,n){"use strict";var r=n(160)(!0);n(86)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(12),o=n(15),i=n(13),a=n(14),s=n(91),c=n(154).KEY,u=n(20),l=n(53),h=n(51),d=n(38),p=n(22),f=n(58),v=n(57),g=n(153),m=n(148),y=n(150),_=n(30),b=n(17),C=n(56),x=n(37),S=n(49),w=n(157),T=n(87),P=n(16),E=n(32),K=T.f,k=P.f,M=w.f,A=r.Symbol,R=r.JSON,D=R&&R.stringify,O=p("_hidden"),F=p("toPrimitive"),I={}.propertyIsEnumerable,N=l("symbol-registry"),L=l("symbols"),U=l("op-symbols"),G=Object.prototype,j="function"==typeof A,B=r.QObject,H=!B||!B.prototype||!B.prototype.findChild,W=i&&u(function(){return 7!=S(k({},"a",{get:function(){return k(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=K(G,e);r&&delete G[e],k(t,e,n),r&&t!==G&&k(G,e,r)}:k,V=function(t){var e=L[t]=S(A.prototype);return e._k=t,e},z=j&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},q=function(t,e,n){return t===G&&q(U,e,n),_(t),e=C(e,!0),_(n),o(L,e)?(n.enumerable?(o(t,O)&&t[O][e]&&(t[O][e]=!1),n=S(n,{enumerable:x(0,!1)})):(o(t,O)||k(t,O,x(1,{})),t[O][e]=!0),W(t,e,n)):k(t,e,n)},Y=function(t,e){_(t);for(var n,r=m(e=b(e)),o=0,i=r.length;i>o;)q(t,n=r[o++],e[n]);return t},X=function(t,e){return void 0===e?S(t):Y(S(t),e)},Q=function(t){var e=I.call(this,t=C(t,!0));return!(this===G&&o(L,t)&&!o(U,t))&&(!(e||!o(this,t)||!o(L,t)||o(this,O)&&this[O][t])||e)},$=function(t,e){if(t=b(t),e=C(e,!0),t!==G||!o(L,e)||o(U,e)){var n=K(t,e);return!n||!o(L,e)||o(t,O)&&t[O][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=M(b(t)),r=[],i=0;n.length>i;)o(L,e=n[i++])||e==O||e==c||r.push(e);return r},Z=function(t){for(var e,n=t===G,r=M(n?U:b(t)),i=[],a=0;r.length>a;)!o(L,e=r[a++])||n&&!o(G,e)||i.push(L[e]);return i};j||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=d(arguments.length>0?arguments[0]:void 0),e=function(n){this===G&&e.call(U,n),o(this,O)&&o(this[O],t)&&(this[O][t]=!1),W(this,t,x(1,n))};return i&&H&&W(G,t,{configurable:!0,set:e}),V(t)},s(A.prototype,"toString",function(){return this._k}),T.f=$,P.f=q,n(88).f=w.f=J,n(36).f=Q,n(50).f=Z,i&&!n(48)&&s(G,"propertyIsEnumerable",Q,!0),f.f=function(t){return V(p(t))}),a(a.G+a.W+a.F*!j,{Symbol:A});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)p(tt[et++]);for(var tt=E(p.store),et=0;tt.length>et;)v(tt[et++]);a(a.S+a.F*!j,"Symbol",{for:function(t){return o(N,t+="")?N[t]:N[t]=A(t)},keyFor:function(t){if(z(t))return g(N,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!j,"Object",{create:X,defineProperty:q,defineProperties:Y,getOwnPropertyDescriptor:$,getOwnPropertyNames:J,getOwnPropertySymbols:Z}),R&&a(a.S+a.F*(!j||u(function(){var t=A();return"[null]"!=D([t])||"{}"!=D({a:t})||"{}"!=D(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!z(t)){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);return e=r[1],"function"==typeof e&&(n=e),!n&&y(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!z(e))return e}),r[1]=e,D.apply(R,r)}}}),A.prototype[F]||n(21)(A.prototype,F,A.prototype.valueOf),h(A,"Symbol"),h(Math,"Math",!0),h(r.JSON,"JSON",!0)},function(t,e,n){n(57)("asyncIterator")},function(t,e,n){n(57)("observable")},function(t,e,n){n(163);for(var r=n(12),o=n(21),i=n(47),a=n(22)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],c=0;c<5;c++){var u=s[c],l=r[u],h=l&&l.prototype;h&&!h[a]&&o(h,a,u),i[u]=i.Array}},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(t,e,n){"use strict";function r(t){return t.replace(o,function(t,e){return e.toUpperCase()})}var o=/-(.)/g;t.exports=r},function(t,e,n){"use strict";function r(t){return o(t.replace(i,"ms-"))}var o=n(176),i=/^-ms-/;t.exports=r},function(t,e,n){"use strict";function r(t,e){return!(!t||!e)&&(t===e||!o(t)&&(o(e)?r(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var o=n(186);t.exports=r},function(t,e,n){"use strict";function r(t){var e=t.length;if((Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t)&&a(!1),"number"!=typeof e&&a(!1),0===e||e-1 in t||a(!1),"function"==typeof t.callee&&a(!1),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}function o(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"length"in t&&!("setInterval"in t)&&"number"!=typeof t.nodeType&&(Array.isArray(t)||"callee"in t||"item"in t)}function i(t){return o(t)?Array.isArray(t)?t.slice():r(t):[t]}var a=n(0);t.exports=i},function(t,e,n){"use strict";function r(t){var e=t.match(l);return e&&e[1].toLowerCase()}function o(t,e){var n=u;u||c(!1);var o=r(t),i=o&&s(o);if(i){n.innerHTML=i[1]+t+i[2];for(var l=i[0];l--;)n=n.lastChild}else n.innerHTML=t;var h=n.getElementsByTagName("script");h.length&&(e||c(!1),a(h).forEach(e));for(var d=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var i=n(5),a=n(179),s=n(181),c=n(0),u=i.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;t.exports=o},function(t,e,n){"use strict";function r(t){return a||i(!1),d.hasOwnProperty(t)||(t="*"),s.hasOwnProperty(t)||(a.innerHTML="*"===t?"<link />":"<"+t+"></"+t+">",s[t]=!a.firstChild),s[t]?d[t]:null}var o=n(5),i=n(0),a=o.canUseDOM?document.createElement("div"):null,s={},c=[1,'<select multiple="true">',"</select>"],u=[1,"<table>","</table>"],l=[3,"<table><tbody><tr>","</tr></tbody></table>"],h=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],d={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:c,option:c,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:l,th:l};["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"].forEach(function(t){d[t]=h,s[t]=!0}),t.exports=r},function(t,e,n){"use strict";function r(t){return t.Window&&t instanceof t.Window?{x:t.pageXOffset||t.document.documentElement.scrollLeft,y:t.pageYOffset||t.document.documentElement.scrollTop}:{x:t.scrollLeft,y:t.scrollTop}}t.exports=r},function(t,e,n){"use strict";function r(t){return t.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},function(t,e,n){"use strict";function r(t){return o(t).replace(i,"-ms-")}var o=n(183),i=/^ms-/;t.exports=r},function(t,e,n){"use strict";function r(t){var e=t?t.ownerDocument||t:document,n=e.defaultView||window;return!(!t||!("function"==typeof n.Node?t instanceof n.Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=r},function(t,e,n){"use strict";function r(t){return o(t)&&3==t.nodeType}var o=n(185);t.exports=r},function(t,e,n){"use strict";function r(t){var e={};return function(n){return e.hasOwnProperty(n)||(e[n]=t.call(this,n)),e[n]}}t.exports=r},function(t,e,n){(function(r){/*
   * Konva JavaScript Framework v1.5.0
   * http://konvajs.github.io/
   * Licensed under the MIT or GPL Version 2 licenses.
   * Date: Mon Mar 20 2017
   *
   * Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
   * Modified work Copyright (C) 2014 - 2017 by Anton Lavrenov (Konva)
   *
   * @license
   * Permission is hereby granted, free of charge, to any person obtaining a copy
   * of this software and associated documentation files (the "Software"), to deal
   * in the Software without restriction, including without limitation the rights
   * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   * copies of the Software, and to permit persons to whom the Software is
   * furnished to do so, subject to the following conditions:
   *
   * The above copyright notice and this permission notice shall be included in
   * all copies or substantial portions of the Software.
   *
   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   * LIABILITY, WHETHER 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(e){"use strict";var r=Math.PI/180,o={version:"1.5.0",stages:[],idCounter:0,ids:{},names:{},shapes:{},listenClickTap:!1,inDblClickWindow:!1,enableTrace:!1,traceArrMax:100,dblClickWindow:400,pixelRatio:void 0,dragDistance:0,angleDeg:!0,showWarnings:!0,Filters:{},isDragging:function(){var t=o.DD;return!!t&&t.isDragging},isDragReady:function(){var t=o.DD;return!!t&&!!t.node},_addId:function(t,e){void 0!==e&&(this.ids[e]=t)},_removeId:function(t){void 0!==t&&delete this.ids[t]},_addName:function(t,e){e&&(this.names[e]||(this.names[e]=[]),this.names[e].push(t))},_removeName:function(t,e){if(t){var n=this.names[t];if(n){for(var r=0;r<n.length;r++){n[r]._id===e&&n.splice(r,1)}0===n.length&&delete this.names[t]}}},getAngle:function(t){return this.angleDeg?t*r:t},_detectIE:function(t){var e=t.indexOf("msie ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("trident/")>0){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}var r=t.indexOf("edge/");return r>0&&parseInt(t.substring(r+5,t.indexOf(".",r)),10)},_parseUA:function(t){var e=t.toLowerCase(),n=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],r=!!t.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i),i=!!t.match(/IEMobile/i);return{browser:n[1]||"",version:n[2]||"0",isIE:o._detectIE(e),mobile:r,ieMobile:i}},UA:void 0},i=void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:{};if(o.UA=o._parseUA(i.navigator&&i.navigator.userAgent||""),i.Konva&&console.error("Konva instance is already exist in current eviroment. Please use only one instance."),i.Konva=o,o.global=i,i.window&&i.window.document)o.document=i.window.document,o.window=i.window;else{var a=n(274),s=n(275).jsdom;o.window=s("<!DOCTYPE html><html><head></head><body></body></html>").defaultView,o.document=o.window.document,o.window.Image=a.Image,o._nodeCanvas=a}void(t.exports=o)}(void 0!==r?r:window),function(){"use strict";Konva.Collection=function(){var t=[].slice.call(arguments),e=t.length,n=0;for(this.length=e;n<e;n++)this[n]=t[n];return this},Konva.Collection.prototype=[],Konva.Collection.prototype.each=function(t){for(var e=0;e<this.length;e++)t(this[e],e)},Konva.Collection.prototype.toArray=function(){var t,e=[],n=this.length;for(t=0;t<n;t++)e.push(this[t]);return e},Konva.Collection.toCollection=function(t){var e,n=new Konva.Collection,r=t.length;for(e=0;e<r;e++)n.push(t[e]);return n},Konva.Collection._mapMethod=function(t){Konva.Collection.prototype[t]=function(){var e,n=this.length,r=[].slice.call(arguments);for(e=0;e<n;e++)this[e][t].apply(this[e],r);return this}},Konva.Collection.mapMethods=function(t){var e=t.prototype;for(var n in e)Konva.Collection._mapMethod(n)},Konva.Transform=function(t){this.m=t&&t.slice()||[1,0,0,1,0,0]},Konva.Transform.prototype={copy:function(){return new Konva.Transform(this.m)},point:function(t){var e=this.m;return{x:e[0]*t.x+e[2]*t.y+e[4],y:e[1]*t.x+e[3]*t.y+e[5]}},translate:function(t,e){return this.m[4]+=this.m[0]*t+this.m[2]*e,this.m[5]+=this.m[1]*t+this.m[3]*e,this},scale:function(t,e){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=e,this.m[3]*=e,this},rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=this.m[0]*e+this.m[2]*n,o=this.m[1]*e+this.m[3]*n,i=this.m[0]*-n+this.m[2]*e,a=this.m[1]*-n+this.m[3]*e;return this.m[0]=r,this.m[1]=o,this.m[2]=i,this.m[3]=a,this},getTranslation:function(){return{x:this.m[4],y:this.m[5]}},skew:function(t,e){var n=this.m[0]+this.m[2]*e,r=this.m[1]+this.m[3]*e,o=this.m[2]+this.m[0]*t,i=this.m[3]+this.m[1]*t;return this.m[0]=n,this.m[1]=r,this.m[2]=o,this.m[3]=i,this},multiply:function(t){var e=this.m[0]*t.m[0]+this.m[2]*t.m[1],n=this.m[1]*t.m[0]+this.m[3]*t.m[1],r=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],i=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],a=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=e,this.m[1]=n,this.m[2]=r,this.m[3]=o,this.m[4]=i,this.m[5]=a,this},invert:function(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),e=this.m[3]*t,n=-this.m[1]*t,r=-this.m[2]*t,o=this.m[0]*t,i=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),a=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=e,this.m[1]=n,this.m[2]=r,this.m[3]=o,this.m[4]=i,this.m[5]=a,this},getMatrix:function(){return this.m},setAbsolutePosition:function(t,e){var n=this.m[0],r=this.m[1],o=this.m[2],i=this.m[3],a=this.m[4],s=this.m[5],c=(n*(e-s)-r*(t-a))/(n*i-r*o),u=(t-a-o*c)/n;return this.translate(u,c)}};var t=Math.PI/180,n=180/Math.PI,r={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},o=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;Konva.Util={_isElement:function(t){return!(!t||1!=t.nodeType)},_isFunction:function(t){return!!(t&&t.constructor&&t.call&&t.apply)},_isObject:function(t){return!!t&&t.constructor===Object},_isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},_isNumber:function(t){return"[object Number]"===Object.prototype.toString.call(t)},_isString:function(t){return"[object String]"===Object.prototype.toString.call(t)},_throttle:function(t,e,n){var r,o,i,a=null,s=0,c=n||{},u=function(){s=c.leading===!1?0:(new Date).getTime(),a=null,i=t.apply(r,o),r=o=null};return function(){var n=(new Date).getTime();s||c.leading!==!1||(s=n);var l=e-(n-s);return r=this,o=arguments,l<=0?(clearTimeout(a),a=null,s=n,i=t.apply(r,o),r=o=null):a||c.trailing===!1||(a=setTimeout(u,l)),i}},_hasMethods:function(t){var e,n=[];for(e in t)t.hasOwnProperty(e)&&this._isFunction(t[e])&&n.push(e);return n.length>0},isValidSelector:function(t){if("string"!=typeof t)return!1;var e=t[0];return"#"===e||"."===e||e===e.toUpperCase()},createCanvasElement:function(){var t=Konva.document.createElement("canvas");try{t.style=t.style||{}}catch(t){}return t},isBrowser:function(){return"object"!=typeof e},_isInDocument:function(t){for(;t=t.parentNode;)if(t==Konva.document)return!0;return!1},_simplifyArray:function(t){var e,n,r=[],o=t.length,i=Konva.Util;for(e=0;e<o;e++)n=t[e],i._isNumber(n)?n=Math.round(1e3*n)/1e3:i._isString(n)||(n=n.toString()),r.push(n);return r},_getImage:function(t,e){var n,r;if(t)if(this._isElement(t))e(t);else if(this._isString(t))n=new Konva.window.Image,n.onload=function(){e(n)},n.src=t;else if(t.data){r=Konva.Util.createCanvasElement(),r.width=t.width,r.height=t.height;var o=r.getContext("2d");o.putImageData(t,0,0),this._getImage(r.toDataURL(),e)}else e(null);else e(null)},_getRGBAString:function(t){return["rgba(",t.red||0,",",t.green||0,",",t.blue||0,",",t.alpha||1,")"].join("")},_rgbToHex:function(t,e,n){return((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1)},_hexToRgb:function(t){t=t.replace("#","");var e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:255&e}},getRandomColor:function(){for(var t=(16777215*Math.random()<<0).toString(16);t.length<6;)t="0"+t;return"#"+t},get:function(t,e){return void 0===t?e:t},getRGB:function(t){var e;return t in r?(e=r[t],{r:e[0],g:e[1],b:e[2]}):"#"===t[0]?this._hexToRgb(t.substring(1)):"rgb("===t.substr(0,4)?(e=o.exec(t.replace(/ /g,"")),{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}):{r:0,g:0,b:0}},colorToRGBA:function(t){return t=t||"black",Konva.Util._namedColorToRBA(t)||Konva.Util._hex3ColorToRGBA(t)||Konva.Util._hex6ColorToRGBA(t)||Konva.Util._rgbColorToRGBA(t)||Konva.Util._rgbaColorToRGBA(t)},_namedColorToRBA:function(t){var e=r[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA:function(t){if(0===t.indexOf("rgb(")){t=t.match(/rgb\(([^)]+)\)/)[1];var e=t.split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA:function(t){if(0===t.indexOf("rgba(")){t=t.match(/rgba\(([^)]+)\)/)[1];var e=t.split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:e[3]}}},_hex6ColorToRGBA:function(t){if("#"===t[0]&&7===t.length)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex3ColorToRGBA:function(t){if("#"===t[0]&&4===t.length)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_merge:function(t,e){var n=this._clone(e);for(var r in t)this._isObject(t[r])?n[r]=this._merge(t[r],n[r]):n[r]=t[r];return n},cloneObject:function(t){var e={};for(var n in t)this._isObject(t[n])?e[n]=this.cloneObject(t[n]):this._isArray(t[n])?e[n]=this.cloneArray(t[n]):e[n]=t[n];return e},cloneArray:function(t){return t.slice(0)},_degToRad:function(e){return e*t},_radToDeg:function(t){return t*n},_capitalize:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},throw:function(t){throw new Error("Konva error: "+t)},error:function(t){console.error("Konva error: "+t)},warn:function(t){Konva.global.console&&console.warn&&Konva.showWarnings&&console.warn("Konva warning: "+t)},extend:function(t,e){function n(){this.constructor=t}n.prototype=e.prototype;var r=t.prototype;t.prototype=new n;for(var o in r)r.hasOwnProperty(o)&&(t.prototype[o]=r[o]);t.__super__=e.prototype,t.super=e},addMethods:function(t,e){var n;for(n in e)t.prototype[n]=e[n]},_getControlPoints:function(t,e,n,r,o,i,a){var s=Math.sqrt(Math.pow(n-t,2)+Math.pow(r-e,2)),c=Math.sqrt(Math.pow(o-n,2)+Math.pow(i-r,2)),u=a*s/(s+c),l=a*c/(s+c);return[n-u*(o-t),r-u*(i-e),n+l*(o-t),r+l*(i-e)]},_expandPoints:function(t,e){var n,r,o=t.length,i=[];for(n=2;n<o-2;n+=2)r=Konva.Util._getControlPoints(t[n-2],t[n-1],t[n],t[n+1],t[n+2],t[n+3],e),i.push(r[0]),i.push(r[1]),i.push(t[n]),i.push(t[n+1]),i.push(r[2]),i.push(r[3]);return i},_removeLastLetter:function(t){return t.substring(0,t.length-1)},each:function(t,e){for(var n in t)e(n,t[n])},_getProjectionToSegment:function(t,e,n,r,o,i){var a,s,c,u=(t-n)*(t-n)+(e-r)*(e-r);if(0==u)a=t,s=e,c=(o-n)*(o-n)+(i-r)*(i-r);else{var l=((o-t)*(n-t)+(i-e)*(r-e))/u;l<0?(a=t,s=e,c=(t-o)*(t-o)+(e-i)*(e-i)):l>1?(a=n,s=r,c=(n-o)*(n-o)+(r-i)*(r-i)):(a=t+l*(n-t),s=e+l*(r-e),c=(a-o)*(a-o)+(s-i)*(s-i))}return[a,s,c]},_getProjectionToLine:function(t,e,n){var r=Konva.Util.cloneObject(t),o=Number.MAX_VALUE;return e.forEach(function(i,a){if(n||a!==e.length-1){var s=e[(a+1)%e.length],c=Konva.Util._getProjectionToSegment(i.x,i.y,s.x,s.y,t.x,t.y),u=c[0],l=c[1],h=c[2];h<o&&(r.x=u,r.y=l,o=h)}}),r},_prepareArrayForTween:function(t,e,n){var r,o=[],i=[];if(t.length>e.length){var a=e;e=t,t=a}for(r=0;r<t.length;r+=2)o.push({x:t[r],y:t[r+1]});for(r=0;r<e.length;r+=2)i.push({x:e[r],y:e[r+1]});var s=[];return i.forEach(function(t){var e=Konva.Util._getProjectionToLine(t,o,n);s.push(e.x),s.push(e.y)}),s},_prepareToStringify:function(t){var e;t.visitedByCircularReferenceRemoval=!0;for(var n in t)if(t.hasOwnProperty(n)&&t[n]&&"object"==typeof t[n])if(e=Object.getOwnPropertyDescriptor(t,n),t[n].visitedByCircularReferenceRemoval||Konva.Util._isElement(t[n])){if(!e.configurable)return null;delete t[n]}else if(null===Konva.Util._prepareToStringify(t[n])){if(!e.configurable)return null;delete t[n]}return delete t.visitedByCircularReferenceRemoval,t}}}(),function(){"use strict";var t=Konva.Util.createCanvasElement(),e=t.getContext("2d"),n=function(){return(Konva.window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}();Konva.Canvas=function(t){this.init(t)},Konva.Canvas.prototype={init:function(t){var e=t||{},r=e.pixelRatio||Konva.pixelRatio||n;this.pixelRatio=r,this._canvas=Konva.Util.createCanvasElement(),this._canvas.style.padding=0,this._canvas.style.margin=0,this._canvas.style.border=0,this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top=0,this._canvas.style.left=0},getContext:function(){return this.context},getPixelRatio:function(){return this.pixelRatio},setPixelRatio:function(t){var e=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/e,this.getHeight()/e)},setWidth:function(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var e=this.pixelRatio;this.getContext()._context.scale(e,e)},setHeight:function(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var e=this.pixelRatio;this.getContext()._context.scale(e,e)},getWidth:function(){return this.width},getHeight:function(){return this.height},setSize:function(t,e){this.setWidth(t),this.setHeight(e)},toDataURL:function(t,e){try{return this._canvas.toDataURL(t,e)}catch(t){try{return this._canvas.toDataURL()}catch(t){return Konva.Util.warn("Unable to get data URL. "+t.message),""}}}},Konva.SceneCanvas=function(t){var e=t||{},n=e.width||0,r=e.height||0;Konva.Canvas.call(this,e),this.context=new Konva.SceneContext(this),this.setSize(n,r)},Konva.Util.extend(Konva.SceneCanvas,Konva.Canvas),Konva.HitCanvas=function(t){var e=t||{},n=e.width||0,r=e.height||0;Konva.Canvas.call(this,e),this.context=new Konva.HitContext(this),this.setSize(n,r),this.hitCanvas=!0},Konva.Util.extend(Konva.HitCanvas,Konva.Canvas)}(),function(){"use strict";var t=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],e=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation"];Konva.Context=function(t){this.init(t)},Konva.Context.prototype={init:function(t){this.canvas=t,this._context=t._canvas.getContext("2d"),Konva.enableTrace&&(this.traceArr=[],this._enableTrace())},fillShape:function(t){t.getFillEnabled()&&this._fill(t)},strokeShape:function(t){t.getStrokeEnabled()&&this._stroke(t)},fillStrokeShape:function(t){t.getFillEnabled()&&this._fill(t),t.getStrokeEnabled()&&this._stroke(t)},getTrace:function(t){var e,n,r,o,i=this.traceArr,a=i.length,s="";for(e=0;e<a;e++)n=i[e],r=n.method,r?(o=n.args,s+=r,t?s+="()":Konva.Util._isArray(o[0])?s+="(["+o.join(",")+"])":s+="("+o.join(",")+")"):(s+=n.property,t||(s+="="+n.val)),s+=";";return s},clearTrace:function(){this.traceArr=[]},_trace:function(t){var e,n=this.traceArr;n.push(t),(e=n.length)>=Konva.traceArrMax&&n.shift()},reset:function(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)},getCanvas:function(){return this.canvas},clear:function(t){var e=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,e.getWidth()/e.pixelRatio,e.getHeight()/e.pixelRatio)},_applyLineCap:function(t){var e=t.getLineCap();e&&this.setAttr("lineCap",e)},_applyOpacity:function(t){var e=t.getAbsoluteOpacity();1!==e&&this.setAttr("globalAlpha",e)},_applyLineJoin:function(t){var e=t.getLineJoin();e&&this.setAttr("lineJoin",e)},setAttr:function(t,e){this._context[t]=e},arc:function(){var t=arguments;this._context.arc(t[0],t[1],t[2],t[3],t[4],t[5])},beginPath:function(){this._context.beginPath()},bezierCurveTo:function(){var t=arguments;this._context.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5])},clearRect:function(){var t=arguments;this._context.clearRect(t[0],t[1],t[2],t[3])},clip:function(){this._context.clip()},closePath:function(){this._context.closePath()},createImageData:function(){var t=arguments;return 2===t.length?this._context.createImageData(t[0],t[1]):1===t.length?this._context.createImageData(t[0]):void 0},createLinearGradient:function(){var t=arguments;return this._context.createLinearGradient(t[0],t[1],t[2],t[3])},createPattern:function(){var t=arguments;return this._context.createPattern(t[0],t[1])},createRadialGradient:function(){var t=arguments;return this._context.createRadialGradient(t[0],t[1],t[2],t[3],t[4],t[5])},drawImage:function(){var t=arguments,e=this._context;3===t.length?e.drawImage(t[0],t[1],t[2]):5===t.length?e.drawImage(t[0],t[1],t[2],t[3],t[4]):9===t.length&&e.drawImage(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},isPointInPath:function(t,e){return this._context.isPointInPath(t,e)},fill:function(){this._context.fill()},fillRect:function(t,e,n,r){this._context.fillRect(t,e,n,r)},strokeRect:function(t,e,n,r){this._context.strokeRect(t,e,n,r)},fillText:function(){var t=arguments;this._context.fillText(t[0],t[1],t[2])},measureText:function(t){return this._context.measureText(t)},getImageData:function(){var t=arguments;return this._context.getImageData(t[0],t[1],t[2],t[3])},lineTo:function(){var t=arguments;this._context.lineTo(t[0],t[1])},moveTo:function(){var t=arguments;this._context.moveTo(t[0],t[1])},rect:function(){var t=arguments;this._context.rect(t[0],t[1],t[2],t[3])},putImageData:function(){var t=arguments;this._context.putImageData(t[0],t[1],t[2])},quadraticCurveTo:function(){var t=arguments;this._context.quadraticCurveTo(t[0],t[1],t[2],t[3])},restore:function(){this._context.restore()},rotate:function(){var t=arguments;this._context.rotate(t[0])},save:function(){this._context.save()},scale:function(){var t=arguments;this._context.scale(t[0],t[1])},setLineDash:function(){var t=arguments,e=this._context;this._context.setLineDash?e.setLineDash(t[0]):"mozDash"in e?e.mozDash=t[0]:"webkitLineDash"in e&&(e.webkitLineDash=t[0])},getLineDash:function(){return this._context.getLineDash()},setTransform:function(){var t=arguments;this._context.setTransform(t[0],t[1],t[2],t[3],t[4],t[5])},stroke:function(){this._context.stroke()},strokeText:function(){var t=arguments;this._context.strokeText(t[0],t[1],t[2])},transform:function(){var t=arguments;this._context.transform(t[0],t[1],t[2],t[3],t[4],t[5])},translate:function(){var t=arguments;this._context.translate(t[0],t[1])},_enableTrace:function(){var e,n,r=this,o=t.length,i=Konva.Util._simplifyArray,a=this.setAttr;for(e=0;e<o;e++)!function(t){var e,o=r[t];r[t]=function(){return n=i(Array.prototype.slice.call(arguments,0)),e=o.apply(r,arguments),r._trace({method:t,args:n}),e}}(t[e]);r.setAttr=function(){a.apply(r,arguments);var t=arguments[0],e=arguments[1];"shadowOffsetX"!==t&&"shadowOffsetY"!==t&&"shadowBlur"!==t||(e/=this.canvas.getPixelRatio()),r._trace({property:t,val:e})}}},e.forEach(function(t){Object.defineProperty(Konva.Context.prototype,t,{get:function(){return this._context[t]},set:function(e){this._context[t]=e}})}),Konva.SceneContext=function(t){Konva.Context.call(this,t)},Konva.SceneContext.prototype={_fillColor:function(t){var e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)},_fillPattern:function(t){var e=t.getFillPatternX(),n=t.getFillPatternY(),r=t.getFillPatternScale(),o=Konva.getAngle(t.getFillPatternRotation()),i=t.getFillPatternOffset();(e||n)&&this.translate(e||0,n||0),o&&this.rotate(o),r&&this.scale(r.x,r.y),i&&this.translate(-1*i.x,-1*i.y),this.setAttr("fillStyle",this.createPattern(t.getFillPatternImage(),t.getFillPatternRepeat()||"repeat")),this.fill()},_fillLinearGradient:function(t){var e=t.getFillLinearGradientStartPoint(),n=t.getFillLinearGradientEndPoint(),r=t.getFillLinearGradientColorStops(),o=this.createLinearGradient(e.x,e.y,n.x,n.y);if(r){for(var i=0;i<r.length;i+=2)o.addColorStop(r[i],r[i+1]);this.setAttr("fillStyle",o),t._fillFunc(this)}},_fillRadialGradient:function(t){for(var e=t.getFillRadialGradientStartPoint(),n=t.getFillRadialGradientEndPoint(),r=t.getFillRadialGradientStartRadius(),o=t.getFillRadialGradientEndRadius(),i=t.getFillRadialGradientColorStops(),a=this.createRadialGradient(e.x,e.y,r,n.x,n.y,o),s=0;s<i.length;s+=2)a.addColorStop(i[s],i[s+1]);this.setAttr("fillStyle",a),this.fill()},_fill:function(t){var e=t.fill(),n=t.getFillPatternImage(),r=t.getFillLinearGradientColorStops(),o=t.getFillRadialGradientColorStops(),i=t.getFillPriority();e&&"color"===i?this._fillColor(t):n&&"pattern"===i?this._fillPattern(t):r&&"linear-gradient"===i?this._fillLinearGradient(t):o&&"radial-gradient"===i?this._fillRadialGradient(t):e?this._fillColor(t):n?this._fillPattern(t):r?this._fillLinearGradient(t):o&&this._fillRadialGradient(t)},_stroke:function(t){var e=t.dash(),n=t.getStrokeScaleEnabled()||t instanceof Konva.Text;t.hasStroke()&&(n||(this.save(),this.setTransform(1,0,0,1,0,0)),this._applyLineCap(t),e&&t.dashEnabled()&&(this.setLineDash(e),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),this.setAttr("strokeStyle",t.stroke()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),t._strokeFunc(this),n||this.restore())},_applyShadow:function(t){var e=Konva.Util,n=e.get(t.getShadowRGBA(),"black"),r=e.get(t.getShadowBlur(),5),o=e.get(t.getShadowOffset(),{x:0,y:0}),i=t.getAbsoluteScale(),a=this.canvas.getPixelRatio(),s=i.x*a,c=i.y*a;this.setAttr("shadowColor",n),this.setAttr("shadowBlur",r*a*Math.min(s,c)),this.setAttr("shadowOffsetX",o.x*s),this.setAttr("shadowOffsetY",o.y*c)}},Konva.Util.extend(Konva.SceneContext,Konva.Context),Konva.HitContext=function(t){Konva.Context.call(this,t)},Konva.HitContext.prototype={_fill:function(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()},_stroke:function(t){if(t.hasStroke()&&t.strokeHitEnabled()){var e=t.getStrokeScaleEnabled()||t instanceof Konva.Text;e||(this.save(),this.setTransform(1,0,0,1,0,0)),this._applyLineCap(t),this.setAttr("lineWidth",t.strokeWidth()),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),e||this.restore()}}},Konva.Util.extend(Konva.HitContext,Konva.Context)}(),function(){"use strict";Konva.Factory={addGetterSetter:function(t,e,n,r,o){this.addGetter(t,e,n),this.addSetter(t,e,r,o),this.addOverloadedGetterSetter(t,e)},addGetter:function(t,e,n){var r="get"+Konva.Util._capitalize(e);t.prototype[r]=function(){var t=this.attrs[e];return void 0===t?n:t}},addSetter:function(t,e,n,r){var o="set"+Konva.Util._capitalize(e);t.prototype[o]=function(t){return n&&(t=n.call(this,t)),this._setAttr(e,t),r&&r.call(this),this}},addComponentsGetterSetter:function(t,e,n,r,o){var i,a,s=n.length,c=Konva.Util._capitalize,u="get"+c(e),l="set"+c(e);t.prototype[u]=function(){var t={};for(i=0;i<s;i++)a=n[i],t[a]=this.getAttr(e+c(a));return t},t.prototype[l]=function(t){var n,i=this.attrs[e];r&&(t=r.call(this,t));for(n in t)t.hasOwnProperty(n)&&this._setAttr(e+c(n),t[n]);return this._fireChangeEvent(e,i,t),o&&o.call(this),this},this.addOverloadedGetterSetter(t,e)},addOverloadedGetterSetter:function(t,e){var n=Konva.Util._capitalize(e),r="set"+n,o="get"+n;t.prototype[e]=function(){return arguments.length?(this[r](arguments[0]),this):this[o]()}},addDeprecatedGetterSetter:function(t,e,n,r){var o="get"+Konva.Util._capitalize(e),i=e+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[o]=function(){Konva.Util.error(i);var t=this.attrs[e];return void 0===t?n:t},this.addSetter(t,e,r,function(){Konva.Util.error(i)}),this.addOverloadedGetterSetter(t,e)},backCompat:function(t,e){Konva.Util.each(e,function(e,n){var r=t.prototype[n];t.prototype[e]=function(){r.apply(this,arguments),Konva.Util.error(e+" method is deprecated and will be removed soon. Use "+n+" instead")}})},afterSetFilter:function(){this._filterUpToDate=!1}},Konva.Validators={RGBComponent:function(t){return t>255?255:t<0?0:Math.round(t)},alphaComponent:function(t){return t>1?1:t<1e-4?1e-4:t}}}(),function(t){"use strict";var e="Shape",n=["id"],r=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(" "),o=["scaleXChange.konva","scaleYChange.konva"].join(" ");t.Node=function(t){this._init(t)},t.Util.addMethods(t.Node,{_init:function(e){var n=this;this._id=t.idCounter++,this.eventListeners={},this.attrs={},this._cache={},this._filterUpToDate=!1,this._isUnderCache=!1,this.setAttrs(e),this.on(r,function(){this._clearCache("transform"),n._clearSelfAndDescendantCache("absoluteTransform")}),this.on(o,function(){n._clearSelfAndDescendantCache("absoluteScale")}),this.on("visibleChange.konva",function(){n._clearSelfAndDescendantCache("visible")}),this.on("listeningChange.konva",function(){n._clearSelfAndDescendantCache("listening")}),this.on("opacityChange.konva",function(){n._clearSelfAndDescendantCache("absoluteOpacity")})},_clearCache:function(t){t?delete this._cache[t]:this._cache={}},_getCache:function(t,e){return void 0===this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]},_clearSelfAndDescendantCache:function(t){this._clearCache(t),this.children&&this.getChildren().each(function(e){e._clearSelfAndDescendantCache(t)})},clearCache:function(){return delete this._cache.canvas,this._filterUpToDate=!1,this},cache:function(e){var n=e||{},r=this.getClientRect(!0),o=n.width||r.width,i=n.height||r.height,a=n.pixelRatio,s=n.x||r.x,c=n.y||r.y,u=n.offset||0,l=n.drawBorder||!1;if(!o||!i)throw new Error("Width or height of caching configuration equals 0.");o+=2*u,i+=2*u,s-=u,c-=u;var h=new t.SceneCanvas({pixelRatio:a,width:o,height:i}),d=new t.SceneCanvas({pixelRatio:a,width:o,height:i}),p=new t.HitCanvas({pixelRatio:1,width:o,height:i}),f=h.getContext(),v=p.getContext();return p.isCache=!0,this.clearCache(),f.save(),v.save(),f.translate(-s,-c),v.translate(-s,-c),this._isUnderCache=!0,this._clearSelfAndDescendantCache("absoluteOpacity"),this._clearSelfAndDescendantCache("absoluteScale"),this.drawScene(h,this,!0),this.drawHit(p,this,!0),this._isUnderCache=!1,f.restore(),v.restore(),l&&(f.save(),f.beginPath(),f.rect(0,0,o,i),f.closePath(),f.setAttr("strokeStyle","red"),f.setAttr("lineWidth",5),f.stroke(),f.restore()),this._cache.canvas={scene:h,filter:d,hit:p,x:s,y:c},this},getClientRect:function(){throw new Error('abstract "getClientRect" method call')},_transformedRect:function(t){var e,n,r,o,i=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],a=this.getTransform();return i.forEach(function(t){var i=a.point(t);void 0===e&&(e=r=i.x,n=o=i.y),e=Math.min(e,i.x),n=Math.min(n,i.y),r=Math.max(r,i.x),o=Math.max(o,i.y)}),{x:e,y:n,width:r-e,height:o-n}},_drawCachedSceneCanvas:function(t){t.save(),t._applyOpacity(this),t.translate(this._cache.canvas.x,this._cache.canvas.y);var e=this._getCachedSceneCanvas(),n=e.pixelRatio;t.drawImage(e._canvas,0,0,e.width/n,e.height/n),t.restore()},_drawCachedHitCanvas:function(t){var e=this._cache.canvas,n=e.hit;t.save(),t.translate(this._cache.canvas.x,this._cache.canvas.y),t.drawImage(n._canvas,0,0),t.restore()},_getCachedSceneCanvas:function(){var e,n,r,o,i=this.filters(),a=this._cache.canvas,s=a.scene,c=a.filter,u=c.getContext();if(i){if(!this._filterUpToDate){var l=s.pixelRatio;try{for(e=i.length,u.clear(),u.drawImage(s._canvas,0,0,s.getWidth()/l,s.getHeight()/l),n=u.getImageData(0,0,c.getWidth(),c.getHeight()),r=0;r<e;r++)o=i[r],"function"==typeof o?(o.call(this,n),u.putImageData(n,0,0)):t.Util.error("Filter should be type of function, but got "+typeof o+" insted. Please check correct filters")}catch(e){t.Util.error("Unable to apply filter. "+e.message)}this._filterUpToDate=!0}return c}return s},on:function(t,e){if(3===arguments.length)return this._delegate.apply(this,arguments);var n,r,o,i,a,s=t.split(" "),c=s.length;for(n=0;n<c;n++)r=s[n],o=r.split("."),i=o[0],a=o[1]||"",this.eventListeners[i]||(this.eventListeners[i]=[]),this.eventListeners[i].push({name:a,handler:e});return this},off:function(t){var e,n,r,o,i,a,s=(t||"").split(" "),c=s.length;if(!t)for(n in this.eventListeners)this._off(n);for(e=0;e<c;e++)if(r=s[e],o=r.split("."),i=o[0],a=o[1],i)this.eventListeners[i]&&this._off(i,a);else for(n in this.eventListeners)this._off(n,a);return this},dispatchEvent:function(t){var e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this},addEventListener:function(t,e){return this.on(t,function(t){e.call(this,t.evt)}),this},removeEventListener:function(t){return this.off(t),this},_delegate:function(e,n,r){var o=this;this.on(e,function(e){for(var i=e.target.findAncestors(n,!0,o),a=0;a<i.length;a++)e=t.Util.cloneObject(e),e.currentTarget=i[a],r.call(i[a],e)})},remove:function(){var t=this.getParent();return t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),delete this.parent),this._clearSelfAndDescendantCache("stage"),this._clearSelfAndDescendantCache("absoluteTransform"),this._clearSelfAndDescendantCache("visible"),this._clearSelfAndDescendantCache("listening"),this._clearSelfAndDescendantCache("absoluteOpacity"),this},destroy:function(){t._removeId(this.getId());for(var e=(this.getName()||"").split(/\s/g),n=0;n<e.length;n++){var r=e[n];t._removeName(r,this._id)}return this.remove(),this},getAttr:function(e){var n="get"+t.Util._capitalize(e);return t.Util._isFunction(this[n])?this[n]():this.attrs[e]},getAncestors:function(){for(var e=this.getParent(),n=new t.Collection;e;)n.push(e),e=e.getParent();return n},getAttrs:function(){return this.attrs||{}},setAttrs:function(e){var n,r;if(!e)return this;for(n in e)"children"!==n&&(r="set"+t.Util._capitalize(n),t.Util._isFunction(this[r])?this[r](e[n]):this._setAttr(n,e[n]));return this},isListening:function(){return this._getCache("listening",this._isListening)},_isListening:function(){var t=this.getListening(),e=this.getParent();return"inherit"===t?!e||e.isListening():t},isVisible:function(){return this._getCache("visible",this._isVisible)},_isVisible:function(){var t=this.getVisible(),e=this.getParent();return"inherit"===t?!e||e.isVisible():t},shouldDrawHit:function(t){var e=this.getLayer();return t&&t.isCache||e&&e.hitGraphEnabled()&&this.isListening()&&this.isVisible()},show:function(){return this.setVisible(!0),this},hide:function(){return this.setVisible(!1),this},getZIndex:function(){return this.index||0},getAbsoluteZIndex:function(){function t(u){for(n=[],r=u.length,o=0;o<r;o++)i=u[o],c++,i.nodeType!==e&&(n=n.concat(i.getChildren().toArray())),i._id===s._id&&(o=r);n.length>0&&n[0].getDepth()<=a&&t(n)}var n,r,o,i,a=this.getDepth(),s=this,c=0;return"Stage"!==s.nodeType&&t(s.getStage().getChildren()),c},getDepth:function(){for(var t=0,e=this.parent;e;)t++,e=e.parent;return t},setPosition:function(t){return this.setX(t.x),this.setY(t.y),this},getPosition:function(){return{x:this.getX(),y:this.getY()}},getAbsolutePosition:function(e){var n=this.getAbsoluteTransform(e).getMatrix(),r=new t.Transform,o=this.offset();return r.m=n.slice(),r.translate(o.x,o.y),r.getTranslation()},setAbsolutePosition:function(t){var e,n=this._clearTransform();return this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,e=this.getAbsoluteTransform(),e.invert(),e.translate(t.x,t.y),t={x:this.attrs.x+e.getTranslation().x,y:this.attrs.y+e.getTranslation().y},this.setPosition({x:t.x,y:t.y}),this._setTransform(n),this},_setTransform:function(t){var e;for(e in t)this.attrs[e]=t[e];this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")},_clearTransform:function(){var t={x:this.getX(),y:this.getY(),rotation:this.getRotation(),scaleX:this.getScaleX(),scaleY:this.getScaleY(),offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),skewX:this.getSkewX(),skewY:this.getSkewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform"),t},move:function(t){var e=t.x,n=t.y,r=this.getX(),o=this.getY();return void 0!==e&&(r+=e),void 0!==n&&(o+=n),this.setPosition({x:r,y:o}),this},_eachAncestorReverse:function(t,e){var n,r,o=[],i=this.getParent();if(e&&e._id===this._id)return t(this),!0;for(o.unshift(this);i&&(!e||i._id!==e._id);)o.unshift(i),i=i.parent;for(n=o.length,r=0;r<n;r++)t(o[r])},rotate:function(t){return this.setRotation(this.getRotation()+t),this},moveToTop:function(){if(!this.parent)return t.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var e=this.index;return this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0},moveUp:function(){if(!this.parent)return t.Util.warn("Node has no parent. moveUp function is ignored."),!1;var e=this.index;return e<this.parent.getChildren().length-1&&(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0)},moveDown:function(){if(!this.parent)return t.Util.warn("Node has no parent. moveDown function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0)},moveToBottom:function(){if(!this.parent)return t.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)},setZIndex:function(e){if(!this.parent)return t.Util.warn("Node has no parent. zIndex parameter is ignored."),!1;var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this},getAbsoluteOpacity:function(){return this._getCache("absoluteOpacity",this._getAbsoluteOpacity)},_getAbsoluteOpacity:function(){var t=this.getOpacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=this.getParent().getAbsoluteOpacity()),t},moveTo:function(t){return this.getParent()!==t&&((this.__originalRemove||this.remove).call(this),t.add(this)),this},toObject:function(){var e,n,r,o,i={},a=this.getAttrs();i.attrs={};for(e in a)n=a[e],r=this[e],delete a[e],o=r?r.call(this):null,a[e]=n,o!==n&&(i.attrs[e]=n);return i.className=this.getClassName(),t.Util._prepareToStringify(i)},toJSON:function(){return JSON.stringify(this.toObject())},getParent:function(){return this.parent},findAncestors:function(t,e,n){var r=[];e&&this._isMatch(t)&&r.push(this);for(var o=this.parent;o;){if(o===n)return r;o._isMatch(t)&&r.push(o),o=o.parent}return r},findAncestor:function(t,e,n){return this.findAncestors(t,e,n)[0]},_isMatch:function(e){if(!e)return!1;var n,r,o=e.replace(/ /g,"").split(","),i=o.length;for(n=0;n<i;n++)if(r=o[n],t.Util.isValidSelector(r)||(t.Util.warn('Selector "'+r+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),t.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),t.Util.warn("Konva is awesome, right?")),"#"===r.charAt(0)){if(this.id()===r.slice(1))return!0}else if("."===r.charAt(0)){if(this.hasName(r.slice(1)))return!0}else if(0!==this._get(r).length)return!0;return!1},getLayer:function(){var t=this.getParent();return t?t.getLayer():null},getStage:function(){return this._getCache("stage",this._getStage)},_getStage:function(){var t=this.getParent();return t?t.getStage():void 0},fire:function(t,e,n){return e=e||{},e.target=e.target||this,n?this._fireAndBubble(t,e):this._fire(t,e),this},getAbsoluteTransform:function(t){return t?this._getAbsoluteTransform(t):this._getCache("absoluteTransform",this._getAbsoluteTransform)},_getAbsoluteTransform:function(e){var n,r,o=new t.Transform;return this._eachAncestorReverse(function(t){n=t.transformsEnabled(),r=t.getTransform(),"all"===n?o.multiply(r):"position"===n&&o.translate(t.x(),t.y())},e),o},getAbsoluteScale:function(t){return t?this._getAbsoluteTransform(t):this._getCache("absoluteScale",this._getAbsoluteScale)},_getAbsoluteScale:function(t){for(var e=this;e;)e._isUnderCache&&(t=e),e=e.getParent();var n=1,r=1;return this._eachAncestorReverse(function(t){n*=t.scaleX(),r*=t.scaleY()},t),{x:n,y:r}},getTransform:function(){return this._getCache("transform",this._getTransform)},_getTransform:function(){var e=new t.Transform,n=this.getX(),r=this.getY(),o=t.getAngle(this.getRotation()),i=this.getScaleX(),a=this.getScaleY(),s=this.getSkewX(),c=this.getSkewY(),u=this.getOffsetX(),l=this.getOffsetY();return 0===n&&0===r||e.translate(n,r),0!==o&&e.rotate(o),0===s&&0===c||e.skew(s,c),1===i&&1===a||e.scale(i,a),0===u&&0===l||e.translate(-1*u,-1*l),e},clone:function(e){var r,o,i,a,s,c=t.Util.cloneObject(this.attrs);for(var u in n){delete c[n[u]]}for(r in e)c[r]=e[r];var l=new this.constructor(c);for(r in this.eventListeners)for(o=this.eventListeners[r],i=o.length,a=0;a<i;a++)s=o[a],s.name.indexOf("konva")<0&&(l.eventListeners[r]||(l.eventListeners[r]=[]),l.eventListeners[r].push(s));return l},_toKonvaCanvas:function(e){e=e||{};var n=this.getStage(),r=e.x||0,o=e.y||0,i=e.pixelRatio||1,a=new t.SceneCanvas({width:e.width||this.getWidth()||(n?n.getWidth():0),height:e.height||this.getHeight()||(n?n.getHeight():0),pixelRatio:i}),s=a.getContext();return s.save(),(r||o)&&s.translate(-1*r,-1*o),this.drawScene(a),s.restore(),a},toCanvas:function(t){return this._toKonvaCanvas(t)._canvas},toDataURL:function(t){t=t||{};var e=t.mimeType||null,n=t.quality||null;return this._toKonvaCanvas(t).toDataURL(e,n)},toImage:function(e){if(!e||!e.callback)throw"callback required for toImage method config argument";t.Util._getImage(this.toDataURL(e),function(t){e.callback(t)})},setSize:function(t){return this.setWidth(t.width),this.setHeight(t.height),this},getSize:function(){return{width:this.getWidth(),height:this.getHeight()}},getWidth:function(){return this.attrs.width||0},getHeight:function(){return this.attrs.height||0},getClassName:function(){return this.className||this.nodeType},getType:function(){return this.nodeType},getDragDistance:function(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():t.dragDistance},_get:function(t){return this.className===t||this.nodeType===t?[this]:[]},_off:function(t,e){var n,r,o=this.eventListeners[t];for(n=0;n<o.length;n++)if(!("konva"===(r=o[n].name)&&"konva"!==e||e&&r!==e)){if(o.splice(n,1),0===o.length){delete this.eventListeners[t];break}n--}},_fireChangeEvent:function(t,e,n){this._fire(t+"Change",{oldVal:e,newVal:n})},setId:function(e){var n=this.getId();return t._removeId(n),t._addId(this,e),this._setAttr("id",e),this},setName:function(e){var n,r,o=(this.getName()||"").split(/\s/g),i=(e||"").split(/\s/g);for(r=0;r<o.length;r++)n=o[r],i.indexOf(n)===-1&&n&&t._removeName(n,this._id);for(r=0;r<i.length;r++)n=i[r],o.indexOf(n)===-1&&n&&t._addName(this,n);return this._setAttr("name",e),this},addName:function(t){if(!this.hasName(t)){var e=this.name(),n=e?e+" "+t:t;this.setName(n)}return this},hasName:function(t){return(this.name()||"").split(/\s/g).indexOf(t)!==-1},removeName:function(t){var e=(this.name()||"").split(/\s/g),n=e.indexOf(t);return n!==-1&&(e.splice(n,1),this.setName(e.join(" "))),this},setAttr:function(e,n){var r="set"+t.Util._capitalize(e),o=this[r];return t.Util._isFunction(o)?o.call(this,n):this._setAttr(e,n),this},_setAttr:function(t,e){var n;(n=this.attrs[t])!==e&&(void 0===e||null===e?delete this.attrs[t]:this.attrs[t]=e,this._fireChangeEvent(t,n,e))},_setComponentAttr:function(t,e,n){var r;void 0!==n&&(r=this.attrs[t],r||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=n,this._fireChangeEvent(t,r,n))},_fireAndBubble:function(t,n,r){var o=!0;if(n&&this.nodeType===e&&(n.target=this),"mouseenter"===t&&r&&(this._id===r._id||this.isAncestorOf&&this.isAncestorOf(r))?o=!1:"mouseleave"===t&&r&&(this._id===r._id||this.isAncestorOf&&this.isAncestorOf(r))&&(o=!1),o){this._fire(t,n);var i=("mouseenter"===t||"mouseleave"===t)&&r&&r.isAncestorOf&&r.isAncestorOf(this)&&!r.isAncestorOf(this.parent);(n&&!n.cancelBubble||!n)&&this.parent&&this.parent.isListening()&&!i&&(r&&r.parent?this._fireAndBubble.call(this.parent,t,n,r.parent):this._fireAndBubble.call(this.parent,t,n))}},_fire:function(t,e){var n,r=this.eventListeners[t];if(e=e||{},e.currentTarget=this,e.type=t,r)for(n=0;n<r.length;n++)r[n].handler.call(this,e)},draw:function(){return this.drawScene(),this.drawHit(),this}}),t.Node.create=function(e,n){return t.Util._isString(e)&&(e=JSON.parse(e)),this._createNode(e,n)},t.Node._createNode=function(e,n){var r,o,i,a=t.Node.prototype.getClassName.call(e),s=e.children;if(n&&(e.attrs.container=n),r=new t[a](e.attrs),s)for(o=s.length,i=0;i<o;i++)r.add(this._createNode(s[i]));return r},t.Factory.addOverloadedGetterSetter(t.Node,"position"),t.Factory.addGetterSetter(t.Node,"x",0),t.Factory.addGetterSetter(t.Node,"y",0),t.Factory.addGetterSetter(t.Node,"opacity",1),t.Factory.addGetter(t.Node,"name"),t.Factory.addOverloadedGetterSetter(t.Node,"name"),t.Factory.addGetter(t.Node,"id"),t.Factory.addOverloadedGetterSetter(t.Node,"id"),t.Factory.addGetterSetter(t.Node,"rotation",0),t.Factory.addComponentsGetterSetter(t.Node,"scale",["x","y"]),t.Factory.addGetterSetter(t.Node,"scaleX",1),t.Factory.addGetterSetter(t.Node,"scaleY",1),t.Factory.addComponentsGetterSetter(t.Node,"skew",["x","y"]),t.Factory.addGetterSetter(t.Node,"skewX",0),t.Factory.addGetterSetter(t.Node,"skewY",0),t.Factory.addComponentsGetterSetter(t.Node,"offset",["x","y"]),t.Factory.addGetterSetter(t.Node,"offsetX",0),t.Factory.addGetterSetter(t.Node,"offsetY",0),t.Factory.addSetter(t.Node,"dragDistance"),t.Factory.addOverloadedGetterSetter(t.Node,"dragDistance"),t.Factory.addSetter(t.Node,"width",0),t.Factory.addOverloadedGetterSetter(t.Node,"width"),t.Factory.addSetter(t.Node,"height",0),t.Factory.addOverloadedGetterSetter(t.Node,"height"),t.Factory.addGetterSetter(t.Node,"listening","inherit"),t.Factory.addGetterSetter(t.Node,"preventDefault",!0),t.Factory.addGetterSetter(t.Node,"filters",void 0,function(t){return this._filterUpToDate=!1,t}),t.Factory.addGetterSetter(t.Node,"visible","inherit"),t.Factory.addGetterSetter(t.Node,"transformsEnabled","all"),t.Factory.addOverloadedGetterSetter(t.Node,"size"),t.Factory.backCompat(t.Node,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"}),t.Collection.mapMethods(t.Node)}(Konva),function(){"use strict";Konva.Filters.Grayscale=function(t){var e,n,r=t.data,o=r.length;for(e=0;e<o;e+=4)n=.34*r[e]+.5*r[e+1]+.16*r[e+2],r[e]=n,r[e+1]=n,r[e+2]=n}}(),function(){"use strict";Konva.Filters.Brighten=function(t){var e,n=255*this.brightness(),r=t.data,o=r.length;for(e=0;e<o;e+=4)r[e]+=n,r[e+1]+=n,r[e+2]+=n},Konva.Factory.addGetterSetter(Konva.Node,"brightness",0,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.Invert=function(t){var e,n=t.data,r=n.length;for(e=0;e<r;e+=4)n[e]=255-n[e],n[e+1]=255-n[e+1],n[e+2]=255-n[e+2]}}(),function(){"use strict";function t(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}function e(e,o){var i,a,s,c,u,l,h,d,p,f,v,g,m,y,_,b,C,x,S,w,T,P,E,K,k=e.data,M=e.width,A=e.height,R=o+o+1,D=M-1,O=A-1,F=o+1,I=F*(F+1)/2,N=new t,L=null,U=N,G=null,j=null,B=n[o],H=r[o];for(s=1;s<R;s++)U=U.next=new t,s===F&&(L=U);for(U.next=N,h=l=0,a=0;a<A;a++){for(b=C=x=S=d=p=f=v=0,g=F*(w=k[l]),m=F*(T=k[l+1]),y=F*(P=k[l+2]),_=F*(E=k[l+3]),d+=I*w,p+=I*T,f+=I*P,v+=I*E,U=N,s=0;s<F;s++)U.r=w,U.g=T,U.b=P,U.a=E,U=U.next;for(s=1;s<F;s++)c=l+((D<s?D:s)<<2),d+=(U.r=w=k[c])*(K=F-s),p+=(U.g=T=k[c+1])*K,f+=(U.b=P=k[c+2])*K,v+=(U.a=E=k[c+3])*K,b+=w,C+=T,x+=P,S+=E,U=U.next;for(G=N,j=L,i=0;i<M;i++)k[l+3]=E=v*B>>H,0!==E?(E=255/E,k[l]=(d*B>>H)*E,k[l+1]=(p*B>>H)*E,k[l+2]=(f*B>>H)*E):k[l]=k[l+1]=k[l+2]=0,d-=g,p-=m,f-=y,v-=_,g-=G.r,m-=G.g,y-=G.b,_-=G.a,c=h+((c=i+o+1)<D?c:D)<<2,b+=G.r=k[c],C+=G.g=k[c+1],x+=G.b=k[c+2],S+=G.a=k[c+3],d+=b,p+=C,f+=x,v+=S,G=G.next,g+=w=j.r,m+=T=j.g,y+=P=j.b,_+=E=j.a,b-=w,C-=T,x-=P,S-=E,j=j.next,l+=4;h+=M}for(i=0;i<M;i++){for(C=x=S=b=p=f=v=d=0,l=i<<2,g=F*(w=k[l]),m=F*(T=k[l+1]),y=F*(P=k[l+2]),_=F*(E=k[l+3]),d+=I*w,p+=I*T,f+=I*P,v+=I*E,U=N,s=0;s<F;s++)U.r=w,U.g=T,U.b=P,U.a=E,U=U.next;for(u=M,s=1;s<=o;s++)l=u+i<<2,d+=(U.r=w=k[l])*(K=F-s),p+=(U.g=T=k[l+1])*K,f+=(U.b=P=k[l+2])*K,v+=(U.a=E=k[l+3])*K,b+=w,C+=T,x+=P,S+=E,U=U.next,s<O&&(u+=M);for(l=i,G=N,j=L,a=0;a<A;a++)c=l<<2,k[c+3]=E=v*B>>H,E>0?(E=255/E,k[c]=(d*B>>H)*E,k[c+1]=(p*B>>H)*E,k[c+2]=(f*B>>H)*E):k[c]=k[c+1]=k[c+2]=0,d-=g,p-=m,f-=y,v-=_,g-=G.r,m-=G.g,y-=G.b,_-=G.a,c=i+((c=a+F)<O?c:O)*M<<2,d+=b+=G.r=k[c],p+=C+=G.g=k[c+1],f+=x+=G.b=k[c+2],v+=S+=G.a=k[c+3],G=G.next,g+=w=j.r,m+=T=j.g,y+=P=j.b,_+=E=j.a,b-=w,C-=T,x-=P,S-=E,j=j.next,l+=M}}var n=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],r=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];Konva.Filters.Blur=function(t){var n=Math.round(this.blurRadius());n>0&&e(t,n)},Konva.Factory.addGetterSetter(Konva.Node,"blurRadius",0,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";function t(t,e,n){var r=4*(n*t.width+e),o=[];return o.push(t.data[r++],t.data[r++],t.data[r++],t.data[r++]),o}function e(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}function n(t){for(var e=[0,0,0],n=0;n<t.length;n++)e[0]+=t[n][0],e[1]+=t[n][1],e[2]+=t[n][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}function r(r,o){var i=t(r,0,0),a=t(r,r.width-1,0),s=t(r,0,r.height-1),c=t(r,r.width-1,r.height-1),u=o||10;if(e(i,a)<u&&e(a,c)<u&&e(c,s)<u&&e(s,i)<u){for(var l=n([a,i,c,s]),h=[],d=0;d<r.width*r.height;d++){var p=e(l,[r.data[4*d],r.data[4*d+1],r.data[4*d+2]]);h[d]=p<u?0:255}return h}}function o(t,e){for(var n=0;n<t.width*t.height;n++)t.data[4*n+3]=e[n]}function i(t,e,n){for(var r=[1,1,1,1,0,1,1,1,1],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),a=[],s=0;s<n;s++)for(var c=0;c<e;c++){for(var u=s*e+c,l=0,h=0;h<o;h++)for(var d=0;d<o;d++){var p=s+h-i,f=c+d-i;if(p>=0&&p<n&&f>=0&&f<e){var v=p*e+f,g=r[h*o+d];l+=t[v]*g}}a[u]=2040===l?255:0}return a}function a(t,e,n){for(var r=[1,1,1,1,1,1,1,1,1],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),a=[],s=0;s<n;s++)for(var c=0;c<e;c++){for(var u=s*e+c,l=0,h=0;h<o;h++)for(var d=0;d<o;d++){var p=s+h-i,f=c+d-i;if(p>=0&&p<n&&f>=0&&f<e){var v=p*e+f,g=r[h*o+d];l+=t[v]*g}}a[u]=l>=1020?255:0}return a}function s(t,e,n){for(var r=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),a=[],s=0;s<n;s++)for(var c=0;c<e;c++){for(var u=s*e+c,l=0,h=0;h<o;h++)for(var d=0;d<o;d++){var p=s+h-i,f=c+d-i;if(p>=0&&p<n&&f>=0&&f<e){var v=p*e+f,g=r[h*o+d];l+=t[v]*g}}a[u]=l}return a}Konva.Filters.Mask=function(t){var e=this.threshold(),n=r(t,e);return n&&(n=i(n,t.width,t.height),n=a(n,t.width,t.height),n=s(n,t.width,t.height),o(t,n)),t},Konva.Factory.addGetterSetter(Konva.Node,"threshold",0,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.RGB=function(t){var e,n,r=t.data,o=r.length,i=this.red(),a=this.green(),s=this.blue();for(e=0;e<o;e+=4)n=(.34*r[e]+.5*r[e+1]+.16*r[e+2])/255,r[e]=n*i,r[e+1]=n*a,r[e+2]=n*s,r[e+3]=r[e+3]},Konva.Factory.addGetterSetter(Konva.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)}),Konva.Factory.addGetterSetter(Konva.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)}),Konva.Factory.addGetterSetter(Konva.Node,"blue",0,Konva.Validators.RGBComponent,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.RGBA=function(t){var e,n,r=t.data,o=r.length,i=this.red(),a=this.green(),s=this.blue(),c=this.alpha();for(e=0;e<o;e+=4)n=1-c,r[e]=i*c+r[e]*n,r[e+1]=a*c+r[e+1]*n,r[e+2]=s*c+r[e+2]*n},Konva.Factory.addGetterSetter(Konva.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)}),Konva.Factory.addGetterSetter(Konva.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)}),Konva.Factory.addGetterSetter(Konva.Node,"blue",0,Konva.Validators.RGBComponent,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"alpha",1,function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t})}(),function(){"use strict";Konva.Filters.HSV=function(t){var e,n,r,o,i,a=t.data,s=a.length,c=Math.pow(2,this.value()),u=Math.pow(2,this.saturation()),l=Math.abs(this.hue()+360)%360,h=c*u*Math.cos(l*Math.PI/180),d=c*u*Math.sin(l*Math.PI/180),p=.299*c+.701*h+.167*d,f=.587*c-.587*h+.33*d,v=.114*c-.114*h-.497*d,g=.299*c-.299*h-.328*d,m=.587*c+.413*h+.035*d,y=.114*c-.114*h+.293*d,_=.299*c-.3*h+1.25*d,b=.587*c-.586*h-1.05*d,C=.114*c+.886*h-.2*d;for(e=0;e<s;e+=4)n=a[e+0],r=a[e+1],o=a[e+2],i=a[e+3],a[e+0]=p*n+f*r+v*o,a[e+1]=g*n+m*r+y*o,a[e+2]=_*n+b*r+C*o,a[e+3]=i},Konva.Factory.addGetterSetter(Konva.Node,"hue",0,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"saturation",0,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"value",0,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Factory.addGetterSetter(Konva.Node,"hue",0,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"saturation",0,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"luminance",0,null,Konva.Factory.afterSetFilter),Konva.Filters.HSL=function(t){var e,n,r,o,i,a=t.data,s=a.length,c=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,l=127*this.luminance(),h=1*c*Math.cos(u*Math.PI/180),d=1*c*Math.sin(u*Math.PI/180),p=.299+.701*h+.167*d,f=.587-.587*h+.33*d,v=.114-.114*h-.497*d,g=.299-.299*h-.328*d,m=.587+.413*h+.035*d,y=.114-.114*h+.293*d,_=.299-.3*h+1.25*d,b=.587-.586*h-1.05*d,C=.114+.886*h-.2*d;for(e=0;e<s;e+=4)n=a[e+0],r=a[e+1],o=a[e+2],i=a[e+3],a[e+0]=p*n+f*r+v*o+l,a[e+1]=g*n+m*r+y*o+l,a[e+2]=_*n+b*r+C*o+l,a[e+3]=i}}(),function(){"use strict";Konva.Filters.Emboss=function(t){var e=10*this.embossStrength(),n=255*this.embossWhiteLevel(),r=this.embossDirection(),o=this.embossBlend(),i=0,a=0,s=t.data,c=t.width,u=t.height,l=4*c,h=u;switch(r){case"top-left":i=-1,a=-1;break;case"top":i=-1,a=0;break;case"top-right":i=-1,a=1;break;case"right":i=0,a=1;break;case"bottom-right":i=1,a=1;break;case"bottom":i=1,a=0;break;case"bottom-left":i=1,a=-1;break;case"left":i=0,a=-1;break;default:Konva.Util.error("Unknown emboss direction: "+r)}do{var d=(h-1)*l,p=i;h+p<1&&(p=0),h+p>u&&(p=0);var f=(h-1+p)*c*4,v=c;do{var g=d+4*(v-1),m=a;v+m<1&&(m=0),v+m>c&&(m=0);var y=f+4*(v-1+m),_=s[g]-s[y],b=s[g+1]-s[y+1],C=s[g+2]-s[y+2],x=_,S=x>0?x:-x,w=b>0?b:-b,T=C>0?C:-C;if(w>S&&(x=b),T>S&&(x=C),x*=e,o){var P=s[g]+x,E=s[g+1]+x,K=s[g+2]+x;s[g]=P>255?255:P<0?0:P,s[g+1]=E>255?255:E<0?0:E,s[g+2]=K>255?255:K<0?0:K}else{var k=n-x;k<0?k=0:k>255&&(k=255),s[g]=s[g+1]=s[g+2]=k}}while(--v)}while(--h)},Konva.Factory.addGetterSetter(Konva.Node,"embossStrength",.5,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"embossWhiteLevel",.5,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"embossDirection","top-left",null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"embossBlend",!1,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";function t(t,e,n,r,o){var i,a=n-e,s=o-r;return 0===a?r+s/2:0===s?r:(i=(t-e)/a,i=s*i+r)}Konva.Filters.Enhance=function(e){var n,r,o,i,a=e.data,s=a.length,c=a[0],u=c,l=a[1],h=l,d=a[2],p=d,f=this.enhance();if(0!==f){for(i=0;i<s;i+=4)n=a[i+0],n<c?c=n:n>u&&(u=n),r=a[i+1],r<l?l=r:r>h&&(h=r),o=a[i+2],o<d?d=o:o>p&&(p=o);u===c&&(u=255,c=0),h===l&&(h=255,l=0),p===d&&(p=255,d=0);var v,g,m,y,_,b,C,x,S;for(f>0?(g=u+f*(255-u),m=c-f*(c-0),_=h+f*(255-h),b=l-f*(l-0),x=p+f*(255-p),S=d-f*(d-0)):(v=.5*(u+c),g=u+f*(u-v),m=c+f*(c-v),y=.5*(h+l),_=h+f*(h-y),b=l+f*(l-y),C=.5*(p+d),x=p+f*(p-C),S=d+f*(d-C)),i=0;i<s;i+=4)a[i+0]=t(a[i+0],c,u,m,g),a[i+1]=t(a[i+1],l,h,b,_),a[i+2]=t(a[i+2],d,p,S,x)}},Konva.Factory.addGetterSetter(Konva.Node,"enhance",0,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.Posterize=function(t){var e,n=Math.round(254*this.levels())+1,r=t.data,o=r.length,i=255/n;for(e=0;e<o;e+=1)r[e]=Math.floor(r[e]/i)*i},Konva.Factory.addGetterSetter(Konva.Node,"levels",.5,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.Noise=function(t){var e,n=255*this.noise(),r=t.data,o=r.length,i=n/2;for(e=0;e<o;e+=4)r[e+0]+=i-2*i*Math.random(),r[e+1]+=i-2*i*Math.random(),r[e+2]+=i-2*i*Math.random()},Konva.Factory.addGetterSetter(Konva.Node,"noise",.2,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.Pixelate=function(t){var e,n,r,o,i,a,s,c,u,l,h,d,p,f,v=Math.ceil(this.pixelSize()),g=t.width,m=t.height,y=Math.ceil(g/v),_=Math.ceil(m/v);if(t=t.data,v<=0)return void Konva.Util.error("pixelSize value can not be <= 0");for(d=0;d<y;d+=1)for(p=0;p<_;p+=1){for(o=0,i=0,a=0,s=0,c=d*v,u=c+v,l=p*v,h=l+v,f=0,e=c;e<u;e+=1)if(!(e>=g))for(n=l;n<h;n+=1)n>=m||(r=4*(g*n+e),o+=t[r+0],i+=t[r+1],a+=t[r+2],s+=t[r+3],f+=1);for(o/=f,i/=f,a/=f,e=c;e<u;e+=1)if(!(e>=g))for(n=l;n<h;n+=1)n>=m||(r=4*(g*n+e),t[r+0]=o,t[r+1]=i,t[r+2]=a,t[r+3]=s)}},Konva.Factory.addGetterSetter(Konva.Node,"pixelSize",8,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.Threshold=function(t){var e,n=255*this.threshold(),r=t.data,o=r.length;for(e=0;e<o;e+=1)r[e]=r[e]<n?0:255},Konva.Factory.addGetterSetter(Konva.Node,"threshold",.5,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";/**
       * Sepia Filter
       * Based on: Pixastic Lib - Sepia filter - v0.1.0
       * Copyright (c) 2008 Jacob Seidelin, jseidelin@nihilogic.dk, http://blog.nihilogic.dk/
       * @function
       * @name Sepia
       * @memberof Konva.Filters
       * @param {Object} imageData
       * @author Jacob Seidelin <jseidelin@nihilogic.dk>
       * @license MPL v1.1 [http://www.pixastic.com/lib/license.txt]
       * @example
       * node.cache();
       * node.filters([Konva.Filters.Sepia]);
       */
  Konva.Filters.Sepia=function(t){var e,n,r,o,i,a,s,c,u,l=t.data,h=t.width,d=t.height,p=4*h;do{e=(d-1)*p,n=h;do{r=e+4*(n-1),o=l[r],i=l[r+1],a=l[r+2],s=.393*o+.769*i+.189*a,c=.349*o+.686*i+.168*a,u=.272*o+.534*i+.131*a,l[r]=s>255?255:s,l[r+1]=c>255?255:c,l[r+2]=u>255?255:u,l[r+3]=l[r+3]}while(--n)}while(--d)}}(),function(){"use strict";Konva.Filters.Solarize=function(t){var e=t.data,n=t.width,r=t.height,o=4*n,i=r;do{var a=(i-1)*o,s=n;do{var c=a+4*(s-1),u=e[c],l=e[c+1],h=e[c+2];u>127&&(u=255-u),l>127&&(l=255-l),h>127&&(h=255-h),e[c]=u,e[c+1]=l,e[c+2]=h}while(--s)}while(--i)}}(),function(){"use strict";var t=function(t,e,n){var r,o,i,a,s=t.data,c=e.data,u=t.width,l=t.height,h=n.polarCenterX||u/2,d=n.polarCenterY||l/2,p=0,f=0,v=0,g=0,m=Math.sqrt(h*h+d*d);o=u-h,i=l-d,a=Math.sqrt(o*o+i*i),m=a>m?a:m;var y,_,b,C,x=l,S=u,w=360/S*Math.PI/180;for(_=0;_<S;_+=1)for(b=Math.sin(_*w),C=Math.cos(_*w),y=0;y<x;y+=1)o=Math.floor(h+m*y/x*C),i=Math.floor(d+m*y/x*b),r=4*(i*u+o),p=s[r+0],f=s[r+1],v=s[r+2],g=s[r+3],r=4*(_+y*u),c[r+0]=p,c[r+1]=f,c[r+2]=v,c[r+3]=g},e=function(t,e,n){var r,o,i,a,s,c,u=t.data,l=e.data,h=t.width,d=t.height,p=n.polarCenterX||h/2,f=n.polarCenterY||d/2,v=0,g=0,m=0,y=0,_=Math.sqrt(p*p+f*f);o=h-p,i=d-f,c=Math.sqrt(o*o+i*i),_=c>_?c:_;var b,C,x,S,w=d,T=h,P=n.polarRotation||0;for(o=0;o<h;o+=1)for(i=0;i<d;i+=1)a=o-p,s=i-f,b=Math.sqrt(a*a+s*s)*w/_,C=(180*Math.atan2(s,a)/Math.PI+360+P)%360,C=C*T/360,x=Math.floor(C),S=Math.floor(b),r=4*(S*h+x),v=u[r+0],g=u[r+1],m=u[r+2],y=u[r+3],r=4*(i*h+o),l[r+0]=v,l[r+1]=g,l[r+2]=m,l[r+3]=y},n=Konva.Util.createCanvasElement();Konva.Filters.Kaleidoscope=function(r){var o,i,a,s,c,u,l,h,d,p,f=r.width,v=r.height,g=Math.round(this.kaleidoscopePower()),m=Math.round(this.kaleidoscopeAngle()),y=Math.floor(f*(m%360)/360);if(!(g<1)){n.width=f,n.height=v;var _=n.getContext("2d").getImageData(0,0,f,v);t(r,_,{polarCenterX:f/2,polarCenterY:v/2});for(var b=f/Math.pow(2,g);b<=8;)b*=2,g-=1;b=Math.ceil(b);var C=b,x=0,S=C,w=1;for(y+b>f&&(x=C,S=0,w=-1),i=0;i<v;i+=1)for(o=x;o!==S;o+=w)a=Math.round(o+y)%f,d=4*(f*i+a),c=_.data[d+0],u=_.data[d+1],l=_.data[d+2],h=_.data[d+3],p=4*(f*i+o),_.data[p+0]=c,_.data[p+1]=u,_.data[p+2]=l,_.data[p+3]=h;for(i=0;i<v;i+=1)for(C=Math.floor(b),s=0;s<g;s+=1){for(o=0;o<C+1;o+=1)d=4*(f*i+o),c=_.data[d+0],u=_.data[d+1],l=_.data[d+2],h=_.data[d+3],p=4*(f*i+2*C-o-1),_.data[p+0]=c,_.data[p+1]=u,_.data[p+2]=l,_.data[p+3]=h;C*=2}e(_,r,{polarRotation:0})}},Konva.Factory.addGetterSetter(Konva.Node,"kaleidoscopePower",2,null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"kaleidoscopeAngle",0,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Container=function(t){this.__init(t)},Konva.Util.addMethods(Konva.Container,{__init:function(t){this.children=new Konva.Collection,Konva.Node.call(this,t)},getChildren:function(t){if(!t)return this.children;var e=new Konva.Collection;return this.children.each(function(n){t(n)&&e.push(n)}),e},hasChildren:function(){return this.getChildren().length>0},removeChildren:function(){for(var t,e=Konva.Collection.toCollection(this.children),n=0;n<e.length;n++)t=e[n],delete t.parent,t.index=0,t.remove();return e=null,this.children=new Konva.Collection,this},destroyChildren:function(){for(var t,e=Konva.Collection.toCollection(this.children),n=0;n<e.length;n++)t=e[n],delete t.parent,t.index=0,t.destroy();return e=null,this.children=new Konva.Collection,this},add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}if(t.getParent())return t.moveTo(this),this;var n=this.children;return this._validateAdd(t),t.index=n.length,t.parent=this,n.push(t),this._fire("add",{child:t}),Konva.DD&&t.isDragging()&&Konva.DD.anim.setLayers(t.getLayer()),this},destroy:function(){return this.hasChildren()&&this.destroyChildren(),Konva.Node.prototype.destroy.call(this),this},find:function(t){var e,n,r,o,i,a,s,c=[],u=t.replace(/ /g,"").split(","),l=u.length;for(e=0;e<l;e++)if(r=u[e],Konva.Util.isValidSelector(r)||(Konva.Util.warn('Selector "'+r+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),Konva.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),Konva.Util.warn("Konva is awesome, right?")),"#"===r.charAt(0))(i=this._getNodeById(r.slice(1)))&&c.push(i);else if("."===r.charAt(0))o=this._getNodesByName(r.slice(1)),c=c.concat(o);else for(a=this.getChildren(),s=a.length,n=0;n<s;n++)c=c.concat(a[n]._get(r));return Konva.Collection.toCollection(c)},findOne:function(t){return this.find(t)[0]},_getNodeById:function(t){var e=Konva.ids[t];return void 0!==e&&this.isAncestorOf(e)?e:null},_getNodesByName:function(t){var e=Konva.names[t]||[];return this._getDescendants(e)},_get:function(t){for(var e=Konva.Node.prototype._get.call(this,t),n=this.getChildren(),r=n.length,o=0;o<r;o++)e=e.concat(n[o]._get(t));return e},toObject:function(){var t=Konva.Node.prototype.toObject.call(this);t.children=[];for(var e=this.getChildren(),n=e.length,r=0;r<n;r++){var o=e[r];t.children.push(o.toObject())}return t},_getDescendants:function(t){for(var e=[],n=t.length,r=0;r<n;r++){var o=t[r];this.isAncestorOf(o)&&e.push(o)}return e},isAncestorOf:function(t){for(var e=t.getParent();e;){if(e._id===this._id)return!0;e=e.getParent()}return!1},clone:function(t){var e=Konva.Node.prototype.clone.call(this,t);return this.getChildren().each(function(t){e.add(t.clone())}),e},getAllIntersections:function(t){var e=[];return this.find("Shape").each(function(n){n.isVisible()&&n.intersects(t)&&e.push(n)}),e},_setChildrenIndices:function(){this.children.each(function(t,e){t.index=e})},drawScene:function(t,e,n){var r=this.getLayer(),o=t||r&&r.getCanvas(),i=o&&o.getContext(),a=this._cache.canvas,s=a&&a.scene;return this.isVisible()&&(!n&&s?(i.save(),r._applyTransform(this,i,e),this._drawCachedSceneCanvas(i),i.restore()):this._drawChildren(o,"drawScene",e,!1,n)),this},drawHit:function(t,e,n){var r=this.getLayer(),o=t||r&&r.hitCanvas,i=o&&o.getContext(),a=this._cache.canvas,s=a&&a.hit;return this.shouldDrawHit(o)&&(r&&r.clearHitCache(),!n&&s?(i.save(),r._applyTransform(this,i,e),this._drawCachedHitCanvas(i),i.restore()):this._drawChildren(o,"drawHit",e)),this},_drawChildren:function(t,e,n,r,o){var i,a,s=this.getLayer(),c=t&&t.getContext(),u=this.getClipWidth(),l=this.getClipHeight(),h=this.getClipFunc(),d=u&&l||h;if(d&&s){c.save();var p=this.getAbsoluteTransform(n),f=p.getMatrix();c.transform(f[0],f[1],f[2],f[3],f[4],f[5]),c.beginPath(),h?h.call(this,c,this):(i=this.getClipX(),a=this.getClipY(),c.rect(i,a,u,l)),c.clip(),f=p.copy().invert().getMatrix(),c.transform(f[0],f[1],f[2],f[3],f[4],f[5])}this.children.each(function(i){i[e](t,n,r,o)}),d&&c.restore()},shouldDrawHit:function(t){var e=this.getLayer(),n=Konva.DD,r=n&&Konva.isDragging()&&Konva.DD.anim.getLayers().indexOf(e)!==-1;return t&&t.isCache||e&&e.hitGraphEnabled()&&this.isVisible()&&!r},getClientRect:function(t){var e,n,r,o,i={x:0,y:0,width:0,height:0};return this.children.each(function(t){var i=t.getClientRect();void 0===e?(e=i.x,n=i.y,r=i.x+i.width,o=i.y+i.height):(e=Math.min(e,i.x),n=Math.min(n,i.y),r=Math.max(r,i.x+i.width),o=Math.max(o,i.y+i.height))}),0!==this.children.length&&(i={x:e,y:n,width:r-e,height:o-n}),t?i:this._transformedRect(i)}}),Konva.Util.extend(Konva.Container,Konva.Node),Konva.Container.prototype.get=Konva.Container.prototype.find,Konva.Factory.addComponentsGetterSetter(Konva.Container,"clip",["x","y","width","height"]),Konva.Factory.addGetterSetter(Konva.Container,"clipX"),Konva.Factory.addGetterSetter(Konva.Container,"clipY"),Konva.Factory.addGetterSetter(Konva.Container,"clipWidth"),Konva.Factory.addGetterSetter(Konva.Container,"clipHeight"),Konva.Factory.addGetterSetter(Konva.Container,"clipFunc"),Konva.Collection.mapMethods(Konva.Container)}(),function(t){"use strict";function e(t){t.fill()}function n(t){t.stroke()}function r(t){t.fill()}function o(t){t.stroke()}function i(){this._clearCache(s)}function a(){this._clearCache(c)}var s="hasShadow",c="shadowRGBA";t.Shape=function(t){this.__init(t)},t.Util.addMethods(t.Shape,{__init:function(s){this.nodeType="Shape",this._fillFunc=e,this._strokeFunc=n,this._fillFuncHit=r,this._strokeFuncHit=o;for(var c,u=t.shapes;;)if((c=t.Util.getRandomColor())&&!(c in u))break;this.colorKey=c,u[c]=this,t.Node.call(this,s),this.on("shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",i),this.on("shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",a)},hasChildren:function(){return!1},getChildren:function(){return[]},getContext:function(){return this.getLayer().getContext()},getCanvas:function(){return this.getLayer().getCanvas()},hasShadow:function(){return this._getCache(s,this._hasShadow)},_hasShadow:function(){return this.getShadowEnabled()&&0!==this.getShadowOpacity()&&!!(this.getShadowColor()||this.getShadowBlur()||this.getShadowOffsetX()||this.getShadowOffsetY())},getShadowRGBA:function(){return this._getCache(c,this._getShadowRGBA)},_getShadowRGBA:function(){if(this.hasShadow()){var e=t.Util.colorToRGBA(this.shadowColor());return"rgba("+e.r+","+e.g+","+e.b+","+e.a*(this.getShadowOpacity()||1)+")"}},hasFill:function(){return!!(this.getFill()||this.getFillPatternImage()||this.getFillLinearGradientColorStops()||this.getFillRadialGradientColorStops())},hasStroke:function(){return this.strokeEnabled()&&!!this.stroke()},intersects:function(t){var e,n=this.getStage(),r=n.bufferHitCanvas;return r.getContext().clear(),this.drawScene(r),e=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,e[3]>0},destroy:function(){return t.Node.prototype.destroy.call(this),delete t.shapes[this.colorKey],this},_useBufferCanvas:function(t){return!t&&this.perfectDrawEnabled()&&1!==this.getAbsoluteOpacity()&&this.hasFill()&&this.hasStroke()&&this.getStage()||this.perfectDrawEnabled()&&this.hasShadow()&&1!==this.getAbsoluteOpacity()&&this.hasFill()&&this.hasStroke()&&this.getStage()},getSelfRect:function(){var t=this.getSize();return{x:this._centroid?Math.round(-t.width/2):0,y:this._centroid?Math.round(-t.height/2):0,width:t.width,height:t.height}},getClientRect:function(t){var e=this.getSelfRect(),n=this.hasStroke()&&this.strokeWidth()||0,r=e.width+n,o=e.height+n,i=this.hasShadow()?this.shadowOffsetX():0,a=this.hasShadow()?this.shadowOffsetY():0,s=r+Math.abs(i),c=o+Math.abs(a),u=this.hasShadow()&&this.shadowBlur()||0,l=s+2*u,h=c+2*u,d=0;Math.round(n/2)!==n/2&&(d=1);var p={width:l+d,height:h+d,x:-Math.round(n/2+u)+Math.min(i,0)+e.x,y:-Math.round(n/2+u)+Math.min(a,0)+e.y};return t?p:this._transformedRect(p)},drawScene:function(t,e,n,r){var o,i,a,s=this.getLayer(),c=t||s.getCanvas(),u=c.getContext(),l=this._cache.canvas,h=this.sceneFunc(),d=this.hasShadow(),p=this.hasStroke();if(!this.isVisible())return this;if(l)return u.save(),s._applyTransform(this,u,e),this._drawCachedSceneCanvas(u),u.restore(),this;if(!h)return this;if(u.save(),this._useBufferCanvas(n)&&!r){if(o=this.getStage(),i=o.bufferCanvas,a=i.getContext(),a.clear(),a.save(),a._applyLineJoin(this),!n)if(s)s._applyTransform(this,a,e);else{var f=this.getAbsoluteTransform(e).getMatrix();u.transform(f[0],f[1],f[2],f[3],f[4],f[5])}h.call(this,a),a.restore();var v=i.pixelRatio;d&&!c.hitCanvas?(u.save(),u._applyShadow(this),u._applyOpacity(this),u.drawImage(i._canvas,0,0,i.width/v,i.height/v),u.restore()):(u._applyOpacity(this),u.drawImage(i._canvas,0,0,i.width/v,i.height/v))}else{if(u._applyLineJoin(this),!n)if(s)s._applyTransform(this,u,e);else{var g=this.getAbsoluteTransform(e).getMatrix();u.transform(g[0],g[1],g[2],g[3],g[4],g[5])}d&&p&&!c.hitCanvas?(u.save(),n||u._applyOpacity(this),u._applyShadow(this),h.call(this,u),u.restore(),this.hasFill()&&this.getShadowForStrokeEnabled()&&h.call(this,u)):d&&!c.hitCanvas?(u.save(),n||u._applyOpacity(this),u._applyShadow(this),h.call(this,u),u.restore()):(n||u._applyOpacity(this),h.call(this,u))}return u.restore(),this},drawHit:function(t,e,n){var r=this.getLayer(),o=t||r.hitCanvas,i=o.getContext(),a=this.hitFunc()||this.sceneFunc(),s=this._cache.canvas,c=s&&s.hit;if(!this.shouldDrawHit(o))return this;if(r&&r.clearHitCache(),c)return i.save(),r._applyTransform(this,i,e),this._drawCachedHitCanvas(i),i.restore(),this;if(!a)return this;if(i.save(),i._applyLineJoin(this),!n)if(r)r._applyTransform(this,i,e);else{var u=this.getAbsoluteTransform(e).getMatrix();i.transform(u[0],u[1],u[2],u[3],u[4],u[5])}return a.call(this,i),i.restore(),this},drawHitFromCache:function(e){var n,r,o,i,a,s,c=e||0,u=this._cache.canvas,l=this._getCachedSceneCanvas(),h=u.hit,d=h.getContext(),p=h.getWidth(),f=h.getHeight();d.clear(),d.drawImage(l._canvas,0,0,p,f);try{for(n=d.getImageData(0,0,p,f),r=n.data,o=r.length,i=t.Util._hexToRgb(this.colorKey),a=0;a<o;a+=4)s=r[a+3],s>c?(r[a]=i.r,r[a+1]=i.g,r[a+2]=i.b,r[a+3]=255):r[a+3]=0;d.putImageData(n,0,0)}catch(e){t.Util.error("Unable to draw hit graph from cached scene canvas. "+e.message)}return this}}),t.Util.extend(t.Shape,t.Node),t.Factory.addGetterSetter(t.Shape,"stroke"),t.Factory.addDeprecatedGetterSetter(t.Shape,"strokeRed",0,t.Validators.RGBComponent),t.Factory.addDeprecatedGetterSetter(t.Shape,"strokeGreen",0,t.Validators.RGBComponent),t.Factory.addDeprecatedGetterSetter(t.Shape,"strokeBlue",0,t.Validators.RGBComponent),t.Factory.addDeprecatedGetterSetter(t.Shape,"strokeAlpha",1,t.Validators.alphaComponent),t.Factory.addGetterSetter(t.Shape,"strokeWidth",2),t.Factory.addGetterSetter(t.Shape,"strokeHitEnabled",!0),t.Factory.addGetterSetter(t.Shape,"perfectDrawEnabled",!0),t.Factory.addGetterSetter(t.Shape,"shadowForStrokeEnabled",!0),t.Factory.addGetterSetter(t.Shape,"lineJoin"),t.Factory.addGetterSetter(t.Shape,"lineCap"),t.Factory.addGetterSetter(t.Shape,"sceneFunc"),t.Factory.addGetterSetter(t.Shape,"hitFunc"),t.Factory.addGetterSetter(t.Shape,"dash"),t.Factory.addGetterSetter(t.Shape,"dashOffset",0),t.Factory.addGetterSetter(t.Shape,"shadowColor"),t.Factory.addDeprecatedGetterSetter(t.Shape,"shadowRed",0,t.Validators.RGBComponent),t.Factory.addDeprecatedGetterSetter(t.Shape,"shadowGreen",0,t.Validators.RGBComponent),t.Factory.addDeprecatedGetterSetter(t.Shape,"shadowBlue",0,t.Validators.RGBComponent),t.Factory.addDeprecatedGetterSetter(t.Shape,"shadowAlpha",1,t.Validators.alphaComponent),t.Factory.addGetterSetter(t.Shape,"shadowBlur"),t.Factory.addGetterSetter(t.Shape,"shadowOpacity"),t.Factory.addComponentsGetterSetter(t.Shape,"shadowOffset",["x","y"]),t.Factory.addGetterSetter(t.Shape,"shadowOffsetX",0),t.Factory.addGetterSetter(t.Shape,"shadowOffsetY",0),t.Factory.addGetterSetter(t.Shape,"fillPatternImage"),t.Factory.addGetterSetter(t.Shape,"fill"),t.Factory.addDeprecatedGetterSetter(t.Shape,"fillRed",0,t.Validators.RGBComponent),t.Factory.addDeprecatedGetterSetter(t.Shape,"fillGreen",0,t.Validators.RGBComponent),t.Factory.addDeprecatedGetterSetter(t.Shape,"fillBlue",0,t.Validators.RGBComponent),t.Factory.addDeprecatedGetterSetter(t.Shape,"fillAlpha",1,t.Validators.alphaComponent),t.Factory.addGetterSetter(t.Shape,"fillPatternX",0),t.Factory.addGetterSetter(t.Shape,"fillPatternY",0),t.Factory.addGetterSetter(t.Shape,"fillLinearGradientColorStops"),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientStartRadius",0),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientEndRadius",0),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientColorStops"),t.Factory.addGetterSetter(t.Shape,"fillPatternRepeat","repeat"),t.Factory.addGetterSetter(t.Shape,"fillEnabled",!0),t.Factory.addGetterSetter(t.Shape,"strokeEnabled",!0),t.Factory.addGetterSetter(t.Shape,"shadowEnabled",!0),t.Factory.addGetterSetter(t.Shape,"dashEnabled",!0),t.Factory.addGetterSetter(t.Shape,"strokeScaleEnabled",!0),t.Factory.addGetterSetter(t.Shape,"fillPriority","color"),t.Factory.addComponentsGetterSetter(t.Shape,"fillPatternOffset",["x","y"]),t.Factory.addGetterSetter(t.Shape,"fillPatternOffsetX",0),t.Factory.addGetterSetter(t.Shape,"fillPatternOffsetY",0),t.Factory.addComponentsGetterSetter(t.Shape,"fillPatternScale",["x","y"]),t.Factory.addGetterSetter(t.Shape,"fillPatternScaleX",1),t.Factory.addGetterSetter(t.Shape,"fillPatternScaleY",1),t.Factory.addComponentsGetterSetter(t.Shape,"fillLinearGradientStartPoint",["x","y"]),t.Factory.addGetterSetter(t.Shape,"fillLinearGradientStartPointX",0),t.Factory.addGetterSetter(t.Shape,"fillLinearGradientStartPointY",0),t.Factory.addComponentsGetterSetter(t.Shape,"fillLinearGradientEndPoint",["x","y"]),t.Factory.addGetterSetter(t.Shape,"fillLinearGradientEndPointX",0),t.Factory.addGetterSetter(t.Shape,"fillLinearGradientEndPointY",0),t.Factory.addComponentsGetterSetter(t.Shape,"fillRadialGradientStartPoint",["x","y"]),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientStartPointX",0),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientStartPointY",0),t.Factory.addComponentsGetterSetter(t.Shape,"fillRadialGradientEndPoint",["x","y"]),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientEndPointX",0),t.Factory.addGetterSetter(t.Shape,"fillRadialGradientEndPointY",0),t.Factory.addGetterSetter(t.Shape,"fillPatternRotation",0),t.Factory.backCompat(t.Shape,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"}),t.Collection.mapMethods(t.Shape)}(Konva),function(){"use strict";function t(t,n){t.content.addEventListener(n,function(r){t[e+n](r)},!1)}var e="_",n=["mousedown","mousemove","mouseup","mouseout","touchstart","touchmove","touchend","mouseover","DOMMouseScroll","mousewheel","wheel","contextmenu"],r=n.length;Konva.Stage=function(t){this.___init(t)},Konva.Util.addMethods(Konva.Stage,{___init:function(t){this.nodeType="Stage",Konva.Container.call(this,t),this._id=Konva.idCounter++,this._buildDOM(),this._bindContentEvents(),this._enableNestedTransforms=!1,Konva.stages.push(this)},_validateAdd:function(t){"Layer"!==t.getType()&&Konva.Util.throw("You may only add layers to the stage.")},setContainer:function(t){if("string"==typeof t){if("."===t.charAt(0)){var e=t.slice(1);t=Konva.document.getElementsByClassName(e)[0]}else{var n;n="#"!==t.charAt(0)?t:t.slice(1),t=Konva.document.getElementById(n)}if(!t)throw"Can not find container in document with id "+n}return this._setAttr("container",t),this},shouldDrawHit:function(){return!0},draw:function(){return Konva.Node.prototype.draw.call(this),this},setHeight:function(t){return Konva.Node.prototype.setHeight.call(this,t),this._resizeDOM(),this},setWidth:function(t){return Konva.Node.prototype.setWidth.call(this,t),this._resizeDOM(),this},clear:function(){var t,e=this.children,n=e.length;for(t=0;t<n;t++)e[t].clear();return this},clone:function(t){return t||(t={}),t.container=Konva.document.createElement("div"),Konva.Container.prototype.clone.call(this,t)},destroy:function(){var t=this.content;Konva.Container.prototype.destroy.call(this),t&&Konva.Util._isInDocument(t)&&this.getContainer().removeChild(t);var e=Konva.stages.indexOf(this);return e>-1&&Konva.stages.splice(e,1),this},getPointerPosition:function(){return this.pointerPos},getStage:function(){return this},getContent:function(){return this.content},toDataURL:function(t){t=t||{};var e=t.mimeType||null,n=t.quality||null,r=t.x||0,o=t.y||0,i=new Konva.SceneCanvas({width:t.width||this.getWidth(),height:t.height||this.getHeight(),pixelRatio:t.pixelRatio}),a=i.getContext()._context,s=this.children;(r||o)&&a.translate(-1*r,-1*o),s.each(function(t){var e=t.getCanvas().getWidth(),n=t.getCanvas().getHeight(),r=t.getCanvas().getPixelRatio();a.drawImage(t.getCanvas()._canvas,0,0,e/r,n/r)});var c=i.toDataURL(e,n);return t.callback&&t.callback(c),c},toImage:function(t){var e=t.callback;t.callback=function(t){Konva.Util._getImage(t,function(t){e(t)})},this.toDataURL(t)},getIntersection:function(t,e){var n,r,o=this.getChildren(),i=o.length,a=i-1;for(n=a;n>=0;n--)if(r=o[n].getIntersection(t,e))return r;return null},_resizeDOM:function(){if(this.content){var t,e,n=this.getWidth(),r=this.getHeight(),o=this.getChildren(),i=o.length;for(this.content.style.width=n+"px",this.content.style.height=r+"px",this.bufferCanvas.setSize(n,r),this.bufferHitCanvas.setSize(n,r),t=0;t<i;t++)e=o[t],e.setSize(n,r),e.batchDraw()}},add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return Konva.Container.prototype.add.call(this,t),t._setCanvasSize(this.width(),this.height()),t.draw(),this.content.appendChild(t.canvas._canvas),this},getParent:function(){return null},getLayer:function(){return null},getLayers:function(){return this.getChildren()},_bindContentEvents:function(){for(var e=0;e<r;e++)t(this,n[e])},_mouseover:function(t){Konva.UA.mobile||(this._setPointerPosition(t),this._fire("contentMouseover",{evt:t}))},_mouseout:function(t){if(!Konva.UA.mobile){this._setPointerPosition(t);var e=this.targetShape;e&&!Konva.isDragging()&&(e._fireAndBubble("mouseout",{evt:t}),e._fireAndBubble("mouseleave",{evt:t}),this.targetShape=null),this.pointerPos=void 0,this._fire("contentMouseout",{evt:t})}},_mousemove:function(t){if(Konva.UA.ieMobile)return this._touchmove(t);if((void 0!==t.movementX||void 0!==t.movementY)&&0===t.movementY&&0===t.movementX)return null;if(Konva.UA.mobile)return null;this._setPointerPosition(t);var e;Konva.isDragging()||(e=this.getIntersection(this.getPointerPosition()),e&&e.isListening()?Konva.isDragging()||this.targetShape&&this.targetShape._id===e._id?e._fireAndBubble("mousemove",{evt:t}):(this.targetShape&&(this.targetShape._fireAndBubble("mouseout",{evt:t},e),this.targetShape._fireAndBubble("mouseleave",{evt:t},e)),e._fireAndBubble("mouseover",{evt:t},this.targetShape),e._fireAndBubble("mouseenter",{evt:t},this.targetShape),this.targetShape=e):this.targetShape&&!Konva.isDragging()&&(this.targetShape._fireAndBubble("mouseout",{evt:t}),this.targetShape._fireAndBubble("mouseleave",{evt:t}),this.targetShape=null),this._fire("contentMousemove",{evt:t})),t.preventDefault&&t.preventDefault()},_mousedown:function(t){if(Konva.UA.ieMobile)return this._touchstart(t);if(!Konva.UA.mobile){this._setPointerPosition(t);var e=this.getIntersection(this.getPointerPosition());Konva.listenClickTap=!0,e&&e.isListening()&&(this.clickStartShape=e,e._fireAndBubble("mousedown",{evt:t})),this._fire("contentMousedown",{evt:t})}t.preventDefault&&t.preventDefault()},_mouseup:function(t){if(Konva.UA.ieMobile)return this._touchend(t);if(!Konva.UA.mobile){this._setPointerPosition(t);var e=this.getIntersection(this.getPointerPosition()),n=this.clickStartShape,r=!1,o=Konva.DD;Konva.inDblClickWindow?(r=!0,Konva.inDblClickWindow=!1):o&&o.justDragged?o&&(o.justDragged=!1):Konva.inDblClickWindow=!0,setTimeout(function(){Konva.inDblClickWindow=!1},Konva.dblClickWindow),e&&e.isListening()&&(e._fireAndBubble("mouseup",{evt:t}),Konva.listenClickTap&&n&&n._id===e._id&&(e._fireAndBubble("click",{evt:t}),r&&e._fireAndBubble("dblclick",{evt:t}))),this._fire("contentMouseup",{evt:t}),Konva.listenClickTap&&(this._fire("contentClick",{evt:t}),r&&this._fire("contentDblclick",{evt:t})),Konva.listenClickTap=!1}t.preventDefault&&t.preventDefault()},_contextmenu:function(t){this._fire("contentContextmenu",{evt:t})},_touchstart:function(t){this._setPointerPosition(t);var e=this.getIntersection(this.getPointerPosition());Konva.listenClickTap=!0,e&&e.isListening()&&(this.tapStartShape=e,e._fireAndBubble("touchstart",{evt:t}),e.isListening()&&e.preventDefault()&&t.preventDefault&&t.preventDefault()),this._fire("contentTouchstart",{evt:t})},_touchend:function(t){this._setPointerPosition(t);var e=this.getIntersection(this.getPointerPosition()),n=!1;Konva.inDblClickWindow?(n=!0,Konva.inDblClickWindow=!1):Konva.inDblClickWindow=!0,setTimeout(function(){Konva.inDblClickWindow=!1},Konva.dblClickWindow),e&&e.isListening()&&(e._fireAndBubble("touchend",{evt:t}),Konva.listenClickTap&&this.tapStartShape&&e._id===this.tapStartShape._id&&(e._fireAndBubble("tap",{evt:t}),n&&e._fireAndBubble("dbltap",{evt:t})),e.isListening()&&e.preventDefault()&&t.preventDefault&&t.preventDefault()),this._fire("contentTouchend",{evt:t}),Konva.listenClickTap&&(this._fire("contentTap",{evt:t}),n&&this._fire("contentDbltap",{evt:t})),Konva.listenClickTap=!1},_touchmove:function(t){this._setPointerPosition(t);var e,n=Konva.DD;Konva.isDragging()||(e=this.getIntersection(this.getPointerPosition()),e&&e.isListening()&&(e._fireAndBubble("touchmove",{evt:t}),e.isListening()&&e.preventDefault()&&t.preventDefault&&t.preventDefault()),this._fire("contentTouchmove",{evt:t})),n&&Konva.isDragging()&&Konva.DD.node.preventDefault()&&t.preventDefault()},_DOMMouseScroll:function(t){this._mousewheel(t)},_mousewheel:function(t){this._setPointerPosition(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()&&e._fireAndBubble("wheel",{evt:t}),this._fire("contentWheel",{evt:t})},_wheel:function(t){this._mousewheel(t)},_setPointerPosition:function(t){var e=this._getContentPosition(),n=null,r=null;if(t=t?t:window.event,void 0!==t.touches){if(t.touches.length>0){var o=t.touches[0];n=o.clientX-e.left,r=o.clientY-e.top}}else n=t.clientX-e.left,r=t.clientY-e.top;null!==n&&null!==r&&(this.pointerPos={x:n,y:r})},_getContentPosition:function(){var t=this.content.getBoundingClientRect?this.content.getBoundingClientRect():{top:0,left:0};return{top:t.top,left:t.left}},_buildDOM:function(){var t=this.getContainer();if(!t){if(Konva.Util.isBrowser())throw"Stage has no container. A container is required.";t=Konva.document.createElement("div")}t.innerHTML="",this.content=Konva.document.createElement("div"),this.content.style.position="relative",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this.bufferCanvas=new Konva.SceneCanvas,this.bufferHitCanvas=new Konva.HitCanvas({pixelRatio:1}),this._resizeDOM()},_onContent:function(t,e){var n,r,o=t.split(" "),i=o.length;for(n=0;n<i;n++)r=o[n],this.content.addEventListener(r,e,!1)},cache:function(){Konva.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes.")},clearCache:function(){}}),Konva.Util.extend(Konva.Stage,Konva.Container),Konva.Factory.addGetter(Konva.Stage,"container"),Konva.Factory.addOverloadedGetterSetter(Konva.Stage,"container")}(),function(){"use strict";Konva.BaseLayer=function(t){this.___init(t)},Konva.Util.addMethods(Konva.BaseLayer,{___init:function(t){this.nodeType="Layer",Konva.Container.call(this,t)},createPNGStream:function(){return this.canvas._canvas.createPNGStream()},getCanvas:function(){return this.canvas},getHitCanvas:function(){return this.hitCanvas},getContext:function(){return this.getCanvas().getContext()},clear:function(t){return this.getContext().clear(t),this},clearHitCache:function(){this._hitImageData=void 0},setZIndex:function(t){Konva.Node.prototype.setZIndex.call(this,t);var e=this.getStage();return e&&(e.content.removeChild(this.getCanvas()._canvas),t<e.getChildren().length-1?e.content.insertBefore(this.getCanvas()._canvas,e.getChildren()[t+1].getCanvas()._canvas):e.content.appendChild(this.getCanvas()._canvas)),this},moveToTop:function(){Konva.Node.prototype.moveToTop.call(this);var t=this.getStage();return t&&(t.content.removeChild(this.getCanvas()._canvas),t.content.appendChild(this.getCanvas()._canvas)),this},moveUp:function(){if(!Konva.Node.prototype.moveUp.call(this))return this;var t=this.getStage();return t?(t.content.removeChild(this.getCanvas()._canvas),this.index<t.getChildren().length-1?t.content.insertBefore(this.getCanvas()._canvas,t.getChildren()[this.index+1].getCanvas()._canvas):t.content.appendChild(this.getCanvas()._canvas),this):this},moveDown:function(){if(Konva.Node.prototype.moveDown.call(this)){var t=this.getStage();if(t){var e=t.getChildren();t.content.removeChild(this.getCanvas()._canvas),t.content.insertBefore(this.getCanvas()._canvas,e[this.index+1].getCanvas()._canvas)}}return this},moveToBottom:function(){if(Konva.Node.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var e=t.getChildren();t.content.removeChild(this.getCanvas()._canvas),t.content.insertBefore(this.getCanvas()._canvas,e[1].getCanvas()._canvas)}}return this},getLayer:function(){return this},remove:function(){var t=this.getCanvas()._canvas;return Konva.Node.prototype.remove.call(this),t&&t.parentNode&&Konva.Util._isInDocument(t)&&t.parentNode.removeChild(t),this},getStage:function(){return this.parent},setSize:function(t,e){return this.canvas.setSize(t,e),this},getWidth:function(){if(this.parent)return this.parent.getWidth()},setWidth:function(){Konva.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')},getHeight:function(){if(this.parent)return this.parent.getHeight()},setHeight:function(){Konva.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')},_applyTransform:function(t,e,n){var r=t.getAbsoluteTransform(n).getMatrix();e.transform(r[0],r[1],r[2],r[3],r[4],r[5])}}),Konva.Util.extend(Konva.BaseLayer,Konva.Container),Konva.Factory.addGetterSetter(Konva.BaseLayer,"clearBeforeDraw",!0),Konva.Collection.mapMethods(Konva.BaseLayer)}(),function(){"use strict";var t=[{x:0,y:0},{x:-1,y:0},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:1,y:0},{x:1,y:1},{x:0,y:1},{x:-1,y:1}],e=t.length;Konva.Layer=function(t){this.____init(t)},Konva.Util.addMethods(Konva.Layer,{____init:function(t){this.nodeType="Layer",this.canvas=new Konva.SceneCanvas,this.hitCanvas=new Konva.HitCanvas({pixelRatio:1}),Konva.BaseLayer.call(this,t)},_setCanvasSize:function(t,e){this.canvas.setSize(t,e),this.hitCanvas.setSize(t,e)},_validateAdd:function(t){var e=t.getType();"Group"!==e&&"Shape"!==e&&Konva.Util.throw("You may only add groups and shapes to a layer.")},getIntersection:function(n,r){var o,i,a,s;if(!this.hitGraphEnabled()||!this.isVisible())return null;for(var c=1,u=!1;;){for(i=0;i<e;i++){if(a=t[i],o=this._getIntersection({x:n.x+a.x*c,y:n.y+a.y*c}),(s=o.shape)&&r)return s.findAncestor(r,!0);if(s)return s;if(u=!!o.antialiased,!o.antialiased)break}if(!u)return null;c+=1}},_getImageData:function(t,e){var n=this.hitCanvas.width||1,r=this.hitCanvas.height||1,o=Math.round(e)*n+Math.round(t);return this._hitImageData||(this._hitImageData=this.hitCanvas.context.getImageData(0,0,n,r)),[this._hitImageData.data[4*o+0],this._hitImageData.data[4*o+1],this._hitImageData.data[4*o+2],this._hitImageData.data[4*o+3]]},_getIntersection:function(t){var e,n,r=this.hitCanvas.pixelRatio,o=this.hitCanvas.context.getImageData(Math.round(t.x*r),Math.round(t.y*r),1,1).data,i=o[3];return 255===i?(e=Konva.Util._rgbToHex(o[0],o[1],o[2]),n=Konva.shapes["#"+e],n?{shape:n}:{antialiased:!0}):i>0?{antialiased:!0}:{}},drawScene:function(t,e){var n=this.getLayer(),r=t||n&&n.getCanvas();return this._fire("beforeDraw",{node:this}),this.getClearBeforeDraw()&&r.getContext().clear(),Konva.Container.prototype.drawScene.call(this,r,e),this._fire("draw",{node:this}),this},drawHit:function(t,e){var n=this.getLayer(),r=t||n&&n.hitCanvas;return n&&n.getClearBeforeDraw()&&n.getHitCanvas().getContext().clear(),Konva.Container.prototype.drawHit.call(this,r,e),this.imageData=null,this},clear:function(t){return Konva.BaseLayer.prototype.clear.call(this,t),this.getHitCanvas().getContext().clear(t),this.imageData=null,this},setVisible:function(t){return Konva.Node.prototype.setVisible.call(this,t),t?(this.getCanvas()._canvas.style.display="block",this.hitCanvas._canvas.style.display="block"):(this.getCanvas()._canvas.style.display="none",this.hitCanvas._canvas.style.display="none"),this},enableHitGraph:function(){return this.setHitGraphEnabled(!0),this},disableHitGraph:function(){return this.setHitGraphEnabled(!1),this},setSize:function(t,e){return Konva.BaseLayer.prototype.setSize.call(this,t,e),this.hitCanvas.setSize(t,e),this}}),Konva.Util.extend(Konva.Layer,Konva.BaseLayer),Konva.Factory.addGetterSetter(Konva.Layer,"hitGraphEnabled",!0),Konva.Collection.mapMethods(Konva.Layer)}(),function(){"use strict";Konva.FastLayer=function(t){this.____init(t)},Konva.Util.addMethods(Konva.FastLayer,{____init:function(t){this.nodeType="Layer",this.canvas=new Konva.SceneCanvas,Konva.BaseLayer.call(this,t)},_validateAdd:function(t){"Shape"!==t.getType()&&Konva.Util.throw("You may only add shapes to a fast layer.")},_setCanvasSize:function(t,e){this.canvas.setSize(t,e)},hitGraphEnabled:function(){return!1},getIntersection:function(){return null},drawScene:function(t){var e=this.getLayer(),n=t||e&&e.getCanvas();return this.getClearBeforeDraw()&&n.getContext().clear(),Konva.Container.prototype.drawScene.call(this,n),this},draw:function(){return this.drawScene(),this},setVisible:function(t){return Konva.Node.prototype.setVisible.call(this,t),this.getCanvas()._canvas.style.display=t?"block":"none",this}}),Konva.Util.extend(Konva.FastLayer,Konva.BaseLayer),Konva.Collection.mapMethods(Konva.FastLayer)}(),function(){"use strict";Konva.Group=function(t){this.___init(t)},Konva.Util.addMethods(Konva.Group,{___init:function(t){this.nodeType="Group",Konva.Container.call(this,t)},_validateAdd:function(t){var e=t.getType();"Group"!==e&&"Shape"!==e&&Konva.Util.throw("You may only add groups and shapes to groups.")}}),Konva.Util.extend(Konva.Group,Konva.Container),Konva.Collection.mapMethods(Konva.Group)}(),function(t){"use strict";function e(t){setTimeout(t,1e3/60)}function n(){return o.apply(t.global,arguments)}var r=function(){return t.global.performance&&t.global.performance.now?function(){return t.global.performance.now()}:function(){return(new Date).getTime()}}(),o=function(){return t.global.requestAnimationFrame||t.global.webkitRequestAnimationFrame||t.global.mozRequestAnimationFrame||t.global.oRequestAnimationFrame||t.global.msRequestAnimationFrame||e}();t.Animation=function(e,n){var o=t.Animation;this.func=e,this.setLayers(n),this.id=o.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:r()}},t.Animation.prototype={setLayers:function(t){var e=[];return e=t?t.length>0?t:[t]:[],this.layers=e,this},getLayers:function(){return this.layers},addLayer:function(t){var e,n=this.layers,r=n.length;for(e=0;e<r;e++)if(n[e]._id===t._id)return!1;return this.layers.push(t),!0},isRunning:function(){var e,n=t.Animation,r=n.animations,o=r.length;for(e=0;e<o;e++)if(r[e].id===this.id)return!0;return!1},start:function(){var e=t.Animation;return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=r(),e._addAnimation(this),this},stop:function(){return t.Animation._removeAnimation(this),this},_updateFrameObject:function(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}},t.Animation.animations=[],t.Animation.animIdCounter=0,t.Animation.animRunning=!1,t.Animation._addAnimation=function(t){this.animations.push(t),this._handleAnimation()},t.Animation._removeAnimation=function(t){var e,n=t.id,r=this.animations,o=r.length;for(e=0;e<o;e++)if(r[e].id===n){this.animations.splice(e,1);break}},t.Animation._runFrames=function(){var t,e,n,o,i,a,s,c,u={},l=this.animations;for(o=0;o<l.length;o++)if(t=l[o],e=t.layers,n=t.func,t._updateFrameObject(r()),a=e.length,!n||n.call(t,t.frame)!==!1)for(i=0;i<a;i++)s=e[i],void 0!==s._id&&(u[s._id]=s);for(c in u)u.hasOwnProperty(c)&&u[c].draw()},t.Animation._animationLoop=function(){var e=t.Animation;e.animations.length?(e._runFrames(),n(e._animationLoop)):e.animRunning=!1},t.Animation._handleAnimation=function(){this.animRunning||(this.animRunning=!0,n(this._animationLoop))},t.BaseLayer.prototype.batchDraw=function(){var e=this,n=t.Animation;return this.batchAnim||(this.batchAnim=new n(function(){e.batchAnim.stop()},this)),this.batchAnim.isRunning()||this.batchAnim.start(),this},t.Stage.prototype.batchDraw=function(){return this.getChildren().each(function(t){t.batchDraw()}),this}}(Konva),function(){"use strict";var t={node:1,duration:1,easing:1,onFinish:1,yoyo:1},e=0,n=["fill","stroke","shadowColor"],r=function(t,e,n,r,o,i,a){this.prop=t,this.propFunc=e,this.begin=r,this._pos=r,this.duration=i,this._change=0,this.prevPos=0,this.yoyo=a,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=o-this.begin,this.pause()};r.prototype={fire:function(t){var e=this[t];e&&e()},setTime:function(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())},getTime:function(){return this._time},setPosition:function(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t},getPosition:function(t){return void 0===t&&(t=this._time),this.func(t,this.begin,this._change,this.duration)},play:function(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")},reverse:function(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")},seek:function(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")},reset:function(){this.pause(),this._time=0,this.update(),this.fire("onReset")},finish:function(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")},update:function(){this.setPosition(this.getPosition(this._time))},onEnterFrame:function(){var t=this.getTimer()-this._startTime;2===this.state?this.setTime(t):3===this.state&&this.setTime(this.duration-t)},pause:function(){this.state=1,this.fire("onPause")},getTimer:function(){return(new Date).getTime()}},Konva.Tween=function(n){var o,i,a=this,s=n.node,c=s._id,u=n.easing||Konva.Easings.Linear,l=!!n.yoyo;o=void 0===n.duration?1:0===n.duration?.001:n.duration,this.node=s,this._id=e++;var h=s.getLayer()||(s instanceof Konva.Stage?s.getLayers():null);h||Konva.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Konva.Animation(function(){a.tween.onEnterFrame()},h),this.tween=new r(i,function(t){a._tweenFunc(t)},u,0,1,1e3*o,l),this._addListeners(),Konva.Tween.attrs[c]||(Konva.Tween.attrs[c]={}),Konva.Tween.attrs[c][this._id]||(Konva.Tween.attrs[c][this._id]={}),Konva.Tween.tweens[c]||(Konva.Tween.tweens[c]={});for(i in n)void 0===t[i]&&this._addAttr(i,n[i]);this.reset(),this.onFinish=n.onFinish,this.onReset=n.onReset},Konva.Tween.attrs={},Konva.Tween.tweens={},Konva.Tween.prototype={_addAttr:function(t,e){var r,o,i,a,s,c,u,l=this.node,h=l._id;if(i=Konva.Tween.tweens[h][t],i&&delete Konva.Tween.attrs[h][i][t],r=l.getAttr(t),Konva.Util._isArray(e))for(o=[],s=Math.max(e.length,r.length),"points"===t&&e.length!==r.length&&(e.length>r.length?(u=r,r=Konva.Util._prepareArrayForTween(r,e,l.closed())):(c=e,e=Konva.Util._prepareArrayForTween(e,r,l.closed()))),a=0;a<s;a++)o.push(e[a]-r[a]);else if(n.indexOf(t)!==-1){r=Konva.Util.colorToRGBA(r);var d=Konva.Util.colorToRGBA(e);o={r:d.r-r.r,g:d.g-r.g,b:d.b-r.b,a:d.a-r.a}}else o=e-r;Konva.Tween.attrs[h][this._id][t]={start:r,diff:o,end:e,trueEnd:c,trueStart:u},Konva.Tween.tweens[h][t]=this._id},_tweenFunc:function(t){var e,r,o,i,a,s,c,u,l=this.node,h=Konva.Tween.attrs[l._id][this._id];for(e in h){if(r=h[e],o=r.start,i=r.diff,u=r.end,Konva.Util._isArray(o))for(a=[],c=Math.max(o.length,u.length),s=0;s<c;s++)a.push((o[s]||0)+i[s]*t);else a=n.indexOf(e)!==-1?"rgba("+Math.round(o.r+i.r*t)+","+Math.round(o.g+i.g*t)+","+Math.round(o.b+i.b*t)+","+(o.a+i.a*t)+")":o+i*t;l.setAttr(e,a)}},_addListeners:function(){var t=this;this.tween.onPlay=function(){t.anim.start()},this.tween.onReverse=function(){t.anim.start()},this.tween.onPause=function(){t.anim.stop()},this.tween.onFinish=function(){var e=t.node,n=Konva.Tween.attrs[e._id][t._id];n.points&&n.points.trueEnd&&e.points(n.points.trueEnd),t.onFinish&&t.onFinish.call(t)},this.tween.onReset=function(){var e=t.node,n=Konva.Tween.attrs[e._id][t._id];n.points&&n.points.trueStart&&e.points(n.points.trueStart),t.onReset&&t.onReset()}},play:function(){return this.tween.play(),this},reverse:function(){return this.tween.reverse(),this},reset:function(){return this.tween.reset(),this},seek:function(t){return this.tween.seek(1e3*t),this},pause:function(){return this.tween.pause(),this},finish:function(){return this.tween.finish(),this},destroy:function(){var t,e=this.node._id,n=this._id,r=Konva.Tween.tweens[e];this.pause();for(t in r)delete Konva.Tween.tweens[e][t];delete Konva.Tween.attrs[e][n]}},Konva.Node.prototype.to=function(t){var e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()},new Konva.Tween(t).play()},Konva.Easings={BackEaseIn:function(t,e,n,r){var o=1.70158;return n*(t/=r)*t*((o+1)*t-o)+e},BackEaseOut:function(t,e,n,r){var o=1.70158;return n*((t=t/r-1)*t*((o+1)*t+o)+1)+e},BackEaseInOut:function(t,e,n,r){var o=1.70158;return(t/=r/2)<1?n/2*(t*t*((1+(o*=1.525))*t-o))+e:n/2*((t-=2)*t*((1+(o*=1.525))*t+o)+2)+e},ElasticEaseIn:function(t,e,n,r,o,i){var a=0;return 0===t?e:1==(t/=r)?e+n:(i||(i=.3*r),!o||o<Math.abs(n)?(o=n,a=i/4):a=i/(2*Math.PI)*Math.asin(n/o),-(o*Math.pow(2,10*(t-=1))*Math.sin((t*r-a)*(2*Math.PI)/i))+e)},ElasticEaseOut:function(t,e,n,r,o,i){var a=0;return 0===t?e:1==(t/=r)?e+n:(i||(i=.3*r),!o||o<Math.abs(n)?(o=n,a=i/4):a=i/(2*Math.PI)*Math.asin(n/o),o*Math.pow(2,-10*t)*Math.sin((t*r-a)*(2*Math.PI)/i)+n+e)},ElasticEaseInOut:function(t,e,n,r,o,i){var a=0;return 0===t?e:2==(t/=r/2)?e+n:(i||(i=r*(.3*1.5)),!o||o<Math.abs(n)?(o=n,a=i/4):a=i/(2*Math.PI)*Math.asin(n/o),t<1?-.5*(o*Math.pow(2,10*(t-=1))*Math.sin((t*r-a)*(2*Math.PI)/i))+e:o*Math.pow(2,-10*(t-=1))*Math.sin((t*r-a)*(2*Math.PI)/i)*.5+n+e)},BounceEaseOut:function(t,e,n,r){return(t/=r)<1/2.75?n*(7.5625*t*t)+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e},BounceEaseIn:function(t,e,n,r){return n-Konva.Easings.BounceEaseOut(r-t,0,n,r)+e},BounceEaseInOut:function(t,e,n,r){return t<r/2?.5*Konva.Easings.BounceEaseIn(2*t,0,n,r)+e:.5*Konva.Easings.BounceEaseOut(2*t-r,0,n,r)+.5*n+e},EaseIn:function(t,e,n,r){return n*(t/=r)*t+e},EaseOut:function(t,e,n,r){return-n*(t/=r)*(t-2)+e},EaseInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},StrongEaseIn:function(t,e,n,r){return n*(t/=r)*t*t*t*t+e},StrongEaseOut:function(t,e,n,r){return n*((t=t/r-1)*t*t*t*t+1)+e},StrongEaseInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e},Linear:function(t,e,n,r){return n*t/r+e}}}(),function(){"use strict";Konva.DD={anim:new Konva.Animation(function(){var t=this.dirty;return this.dirty=!1,t}),isDragging:!1,justDragged:!1,offset:{x:0,y:0},node:null,_drag:function(t){var e=Konva.DD,n=e.node;if(n){if(!e.isDragging){var r=n.getStage().getPointerPosition(),o=n.dragDistance();if(Math.max(Math.abs(r.x-e.startPointerPos.x),Math.abs(r.y-e.startPointerPos.y))<o)return}n.getStage()._setPointerPosition(t),n._setDragPosition(t),e.isDragging||(e.isDragging=!0,n.fire("dragstart",{type:"dragstart",target:n,evt:t},!0)),n.fire("dragmove",{type:"dragmove",target:n,evt:t},!0)}},_endDragBefore:function(t){var e,n=Konva.DD,r=n.node;r&&(e=r.getLayer(),n.anim.stop(),n.isDragging&&(n.isDragging=!1,n.justDragged=!0,Konva.listenClickTap=!1,t&&(t.dragEndNode=r)),delete n.node,(r.getLayer()||e||r instanceof Konva.Stage)&&(e||r).draw())},_endDragAfter:function(t){t=t||{};var e=t.dragEndNode;t&&e&&e.fire("dragend",{type:"dragend",target:e,evt:t},!0)}},Konva.Node.prototype.startDrag=function(){var t=Konva.DD,e=this.getStage(),n=this.getLayer(),r=e.getPointerPosition(),o=this.getAbsolutePosition();r&&(t.node&&t.node.stopDrag(),t.node=this,t.startPointerPos=r,t.offset.x=r.x-o.x,t.offset.y=r.y-o.y,t.anim.setLayers(n||this.getLayers()),t.anim.start(),this._setDragPosition())},Konva.Node.prototype._setDragPosition=function(t){var e=Konva.DD,n=this.getStage().getPointerPosition(),r=this.getDragBoundFunc();if(n){var o={x:n.x-e.offset.x,y:n.y-e.offset.y};void 0!==r&&(o=r.call(this,o,t)),this.setAbsolutePosition(o),this._lastPos&&this._lastPos.x===o.x&&this._lastPos.y===o.y||(e.anim.dirty=!0),this._lastPos=o}},Konva.Node.prototype.stopDrag=function(){var t=Konva.DD,e={};t._endDragBefore(e),t._endDragAfter(e)},Konva.Node.prototype.setDraggable=function(t){this._setAttr("draggable",t),this._dragChange()};var t=Konva.Node.prototype.remove;Konva.Node.prototype.__originalRemove=t,Konva.Node.prototype.remove=function(){var e=Konva.DD;e.node&&e.node._id===this._id&&this.stopDrag(),t.call(this)},Konva.Node.prototype.isDragging=function(){var t=Konva.DD;return!(!t.node||t.node._id!==this._id||!t.isDragging)},Konva.Node.prototype._listenDrag=function(){var t=this;this._dragCleanup(),"Stage"===this.getClassName()?this.on("contentMousedown.konva contentTouchstart.konva",function(e){Konva.DD.node||t.startDrag(e)}):this.on("mousedown.konva touchstart.konva",function(e){1!==e.evt.button&&2!==e.evt.button&&(Konva.DD.node||t.startDrag(e))})},Konva.Node.prototype._dragChange=function(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage(),e=Konva.DD;t&&e.node&&e.node._id===this._id&&e.node.stopDrag()}},Konva.Node.prototype._dragCleanup=function(){"Stage"===this.getClassName()?(this.off("contentMousedown.konva"),this.off("contentTouchstart.konva")):(this.off("mousedown.konva"),this.off("touchstart.konva"))},Konva.Factory.addGetterSetter(Konva.Node,"dragBoundFunc"),Konva.Factory.addGetter(Konva.Node,"draggable",!1),Konva.Factory.addOverloadedGetterSetter(Konva.Node,"draggable");var e=Konva.document.documentElement;e.addEventListener("mouseup",Konva.DD._endDragBefore,!0),e.addEventListener("touchend",Konva.DD._endDragBefore,!0),e.addEventListener("mousemove",Konva.DD._drag),e.addEventListener("touchmove",Konva.DD._drag),e.addEventListener("mouseup",Konva.DD._endDragAfter,!1),e.addEventListener("touchend",Konva.DD._endDragAfter,!1)}(),function(){"use strict";Konva.Rect=function(t){this.___init(t)},Konva.Rect.prototype={___init:function(t){Konva.Shape.call(this,t),this.className="Rect",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e=this.getCornerRadius(),n=this.getWidth(),r=this.getHeight();t.beginPath(),e?(e=Math.min(e,n/2,r/2),t.moveTo(e,0),t.lineTo(n-e,0),t.arc(n-e,e,e,3*Math.PI/2,0,!1),t.lineTo(n,r-e),t.arc(n-e,r-e,e,0,Math.PI/2,!1),t.lineTo(e,r),t.arc(e,r-e,e,Math.PI/2,Math.PI,!1),t.lineTo(0,e),t.arc(e,e,e,Math.PI,3*Math.PI/2,!1)):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}},Konva.Util.extend(Konva.Rect,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Rect,"cornerRadius",0),Konva.Collection.mapMethods(Konva.Rect)}(),function(){"use strict";var t=2*Math.PI-1e-4;Konva.Circle=function(t){this.___init(t)},Konva.Circle.prototype={_centroid:!0,___init:function(t){Konva.Shape.call(this,t),this.className="Circle",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(e){e.beginPath(),e.arc(0,0,this.getRadius(),0,t,!1),e.closePath(),e.fillStrokeShape(this)},getWidth:function(){return 2*this.getRadius()},getHeight:function(){return 2*this.getRadius()},setWidth:function(t){Konva.Node.prototype.setWidth.call(this,t),this.radius()!==t/2&&this.setRadius(t/2)},setHeight:function(t){Konva.Node.prototype.setHeight.call(this,t),this.radius()!==t/2&&this.setRadius(t/2)}},Konva.Util.extend(Konva.Circle,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Circle,"radius",0),Konva.Factory.addOverloadedGetterSetter(Konva.Circle,"radius"),Konva.Collection.mapMethods(Konva.Circle)}(),function(){"use strict";var t=2*Math.PI-1e-4;Konva.Ellipse=function(t){this.___init(t)},Konva.Ellipse.prototype={_centroid:!0,___init:function(t){Konva.Shape.call(this,t),this.className="Ellipse",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(e){var n=this.getRadiusX(),r=this.getRadiusY();e.beginPath(),e.save(),n!==r&&e.scale(1,r/n),e.arc(0,0,n,0,t,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)},getWidth:function(){return 2*this.getRadiusX()},getHeight:function(){return 2*this.getRadiusY()},setWidth:function(t){Konva.Node.prototype.setWidth.call(this,t),this.setRadius({x:t/2})},setHeight:function(t){Konva.Node.prototype.setHeight.call(this,t),this.setRadius({y:t/2})}},Konva.Util.extend(Konva.Ellipse,Konva.Shape),Konva.Factory.addComponentsGetterSetter(Konva.Ellipse,"radius",["x","y"]),Konva.Factory.addGetterSetter(Konva.Ellipse,"radiusX",0),Konva.Factory.addGetterSetter(Konva.Ellipse,"radiusY",0),Konva.Collection.mapMethods(Konva.Ellipse)}(),function(){"use strict";var t=2*Math.PI-1e-4;Konva.Ring=function(t){this.___init(t)},Konva.Ring.prototype={_centroid:!0,___init:function(t){Konva.Shape.call(this,t),this.className="Ring",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(e){e.beginPath(),e.arc(0,0,this.getInnerRadius(),0,t,!1),e.moveTo(this.getOuterRadius(),0),e.arc(0,0,this.getOuterRadius(),t,0,!0),e.closePath(),e.fillStrokeShape(this)},getWidth:function(){return 2*this.getOuterRadius()},getHeight:function(){return 2*this.getOuterRadius()},setWidth:function(t){Konva.Node.prototype.setWidth.call(this,t),this.outerRadius()!==t/2&&this.setOuterRadius(t/2)},setHeight:function(t){Konva.Node.prototype.setHeight.call(this,t),this.outerRadius()!==t/2&&this.setOuterRadius(t/2)},setOuterRadius:function(t){this._setAttr("outerRadius",t),this.setWidth(2*t),this.setHeight(2*t)}},Konva.Util.extend(Konva.Ring,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Ring,"innerRadius",0),Konva.Factory.addGetter(Konva.Ring,"outerRadius",0),Konva.Factory.addOverloadedGetterSetter(Konva.Ring,"outerRadius"),Konva.Collection.mapMethods(Konva.Ring)}(),function(){"use strict";Konva.Wedge=function(t){this.___init(t)},Konva.Wedge.prototype={_centroid:!0,___init:function(t){Konva.Shape.call(this,t),this.className="Wedge",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){t.beginPath(),t.arc(0,0,this.getRadius(),0,Konva.getAngle(this.getAngle()),this.getClockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)},getWidth:function(){return 2*this.getRadius()},getHeight:function(){return 2*this.getRadius()},setWidth:function(t){Konva.Node.prototype.setWidth.call(this,t),this.radius()!==t/2&&this.setRadius(t/2)},setHeight:function(t){Konva.Node.prototype.setHeight.call(this,t),this.radius()!==t/2&&this.setRadius(t/2)}},Konva.Util.extend(Konva.Wedge,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Wedge,"radius",0),Konva.Factory.addGetterSetter(Konva.Wedge,"angle",0),Konva.Factory.addGetterSetter(Konva.Wedge,"clockwise",!1),Konva.Factory.backCompat(Konva.Wedge,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"}),Konva.Collection.mapMethods(Konva.Wedge)}(),function(){"use strict";Konva.Arc=function(t){this.___init(t)},Konva.Arc.prototype={_centroid:!0,___init:function(t){Konva.Shape.call(this,t),this.className="Arc",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e=Konva.getAngle(this.angle()),n=this.clockwise();t.beginPath(),t.arc(0,0,this.getOuterRadius(),0,e,n),t.arc(0,0,this.getInnerRadius(),e,0,!n),t.closePath(),t.fillStrokeShape(this)},getWidth:function(){return 2*this.getOuterRadius()},getHeight:function(){return 2*this.getOuterRadius()},setWidth:function(t){Konva.Node.prototype.setWidth.call(this,t),this.getOuterRadius()!==t/2&&this.setOuterRadius(t/2)},setHeight:function(t){Konva.Node.prototype.setHeight.call(this,t),this.getOuterRadius()!==t/2&&this.setOuterRadius(t/2)}},Konva.Util.extend(Konva.Arc,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Arc,"innerRadius",0),Konva.Factory.addGetterSetter(Konva.Arc,"outerRadius",0),Konva.Factory.addGetterSetter(Konva.Arc,"angle",0),Konva.Factory.addGetterSetter(Konva.Arc,"clockwise",!1),Konva.Collection.mapMethods(Konva.Arc)}(),function(){"use strict";Konva.Image=function(t){this.___init(t)},Konva.Image.prototype={___init:function(t){Konva.Shape.call(this,t),this.className="Image",this.sceneFunc(this._sceneFunc),this.hitFunc(this._hitFunc)},_useBufferCanvas:function(){return(this.hasShadow()||1!==this.getAbsoluteOpacity())&&this.hasStroke()&&this.getStage()},_sceneFunc:function(t){var e,n,r,o=this.getWidth(),i=this.getHeight(),a=this.getImage();a&&(e=this.getCropWidth(),n=this.getCropHeight(),r=e&&n?[a,this.getCropX(),this.getCropY(),e,n,0,0,o,i]:[a,0,0,o,i]),(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,o,i),t.closePath(),t.fillStrokeShape(this)),a&&t.drawImage.apply(t,r)},_hitFunc:function(t){var e=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)},getWidth:function(){var t=this.getImage();return this.attrs.width||(t?t.width:0)},getHeight:function(){var t=this.getImage();return this.attrs.height||(t?t.height:0)}},Konva.Util.extend(Konva.Image,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Image,"image"),Konva.Factory.addComponentsGetterSetter(Konva.Image,"crop",["x","y","width","height"]),Konva.Factory.addGetterSetter(Konva.Image,"cropX",0),Konva.Factory.addGetterSetter(Konva.Image,"cropY",0),Konva.Factory.addGetterSetter(Konva.Image,"cropWidth",0),Konva.Factory.addGetterSetter(Konva.Image,"cropHeight",0),Konva.Collection.mapMethods(Konva.Image),Konva.Image.fromURL=function(t,e){var n=new Image;n.onload=function(){var t=new Konva.Image({image:n});e(t)},n.src=t}}(),function(){"use strict";function t(t){t.fillText(this.partialText,0,0)}function e(t){t.strokeText(this.partialText,0,0)}var n=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","lineHeight","text","width","height","wrap","letterSpacing"],r=n.length,o=Konva.Util.createCanvasElement().getContext("2d");Konva.Text=function(t){this.___init(t)},Konva.Text.prototype={___init:function(o){o=o||{},o.fillLinearGradientColorStops||o.fillRadialGradientColorStops||(o.fill=o.fill||"black"),Konva.Shape.call(this,o),this._fillFunc=t,this._strokeFunc=e,this.className="Text";for(var i=0;i<r;i++)this.on(n[i]+"Change.konva",this._setTextData);this._setTextData(),this.sceneFunc(this._sceneFunc),this.hitFunc(this._hitFunc)},_sceneFunc:function(t){var e,n=this.getPadding(),r=this.getTextHeight(),o=this.getLineHeight()*r,i=this.textArr,a=i.length,s=this.getAlign(),c=this.getWidth(),u=this.getLetterSpacing(),l=this.textDecoration(),h=this.fill(),d=this.fontSize();for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline","middle"),t.setAttr("textAlign","left"),t.save(),n?(t.translate(n,0),t.translate(0,n+r/2)):t.translate(0,r/2),e=0;e<a;e++){var p=i[e],f=p.text,v=p.width;if(t.save(),"right"===s?t.translate(c-v-2*n,0):"center"===s&&t.translate((c-v-2*n)/2,0),l.indexOf("underline")!==-1&&(t.save(),t.beginPath(),t.moveTo(0,Math.round(o/2)),t.lineTo(Math.round(v),Math.round(o/2)),t.lineWidth=d/15,t.strokeStyle=h,t.stroke(),t.restore()),l.indexOf("line-through")!==-1&&(t.save(),t.beginPath(),t.moveTo(0,0),t.lineTo(Math.round(v),0),t.lineWidth=d/15,t.strokeStyle=h,t.stroke(),t.restore()),0!==u||"justify"===s)for(var g=f.split(" ").length-1,m=0;m<f.length;m++){var y=f[m];" "===y&&e!==a-1&&"justify"===s&&t.translate(Math.floor((c-v)/g),0),this.partialText=y,t.fillStrokeShape(this),t.translate(Math.round(this._getTextSize(y).width)+u,0)}else this.partialText=f,t.fillStrokeShape(this);t.restore(),t.translate(0,o)}t.restore()},_hitFunc:function(t){var e=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)},setText:function(t){var e=Konva.Util._isString(t)?t:(t||"").toString();return this._setAttr("text",e),this},getWidth:function(){return"auto"===this.attrs.width||void 0===this.attrs.width?this.getTextWidth()+2*this.getPadding():this.attrs.width},getHeight:function(){return"auto"===this.attrs.height||void 0===this.attrs.height?this.getTextHeight()*this.textArr.length*this.getLineHeight()+2*this.getPadding():this.attrs.height},getTextWidth:function(){return this.textWidth},getTextHeight:function(){return this.textHeight},_getTextSize:function(t){var e,n=o,r=this.getFontSize();return n.save(),n.font=this._getContextFont(),e=n.measureText(t),n.restore(),{width:e.width,height:parseInt(r,10)}},_getContextFont:function(){return Konva.UA.isIE?this.getFontStyle()+" "+this.getFontSize()+"px "+this.getFontFamily():this.getFontStyle()+" "+this.getFontVariant()+" "+this.getFontSize()+"px "+this.getFontFamily()},_addTextLine:function(t){"justify"===this.align()&&(t=t.trim());var e=this._getTextWidth(t);return this.textArr.push({text:t,width:e})},_getTextWidth:function(t){var e=this.getLetterSpacing(),n=t.length;return o.measureText(t).width+(n?e*(n-1):0)},_setTextData:function(){var t=this.getText().split("\n"),e=+this.getFontSize(),n=0,r=this.getLineHeight()*e,i=this.attrs.width,a=this.attrs.height,s="auto"!==i,c="auto"!==a,u=this.getPadding(),l=i-2*u,h=a-2*u,d=0,p=this.getWrap(),f="none"!==p,v="char"!==p&&f;this.textArr=[],o.save(),o.font=this._getContextFont();for(var g=0,m=t.length;g<m;++g){var y=t[g],_=this._getTextWidth(y);if(s&&_>l)for(;y.length>0;){for(var b=0,C=y.length,x="",S=0;b<C;){var w=b+C>>>1,T=y.slice(0,w+1),P=this._getTextWidth(T);P<=l?(b=w+1,x=T,S=P):C=w}if(!x)break;if(v){var E=Math.max(x.lastIndexOf(" "),x.lastIndexOf("-"))+1;E>0&&(b=E,x=x.slice(0,b),S=this._getTextWidth(x))}if(this._addTextLine(x),n=Math.max(n,S),d+=r,!f||c&&d+r>h)break;if(y=y.slice(b),y.length>0&&(_=this._getTextWidth(y))<=l){this._addTextLine(y),d+=r,n=Math.max(n,_);break}}else this._addTextLine(y),d+=r,n=Math.max(n,_);if(c&&d+r>h)break}o.restore(),this.textHeight=e,this.textWidth=n}},Konva.Util.extend(Konva.Text,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Text,"fontFamily","Arial"),Konva.Factory.addGetterSetter(Konva.Text,"fontSize",12),Konva.Factory.addGetterSetter(Konva.Text,"fontStyle","normal"),Konva.Factory.addGetterSetter(Konva.Text,"fontVariant","normal"),Konva.Factory.addGetterSetter(Konva.Text,"padding",0),Konva.Factory.addGetterSetter(Konva.Text,"align","left"),Konva.Factory.addGetterSetter(Konva.Text,"lineHeight",1),Konva.Factory.addGetterSetter(Konva.Text,"wrap","word"),Konva.Factory.addGetterSetter(Konva.Text,"letterSpacing",0),Konva.Factory.addGetter(Konva.Text,"text",""),Konva.Factory.addOverloadedGetterSetter(Konva.Text,"text"),Konva.Factory.addGetterSetter(Konva.Text,"textDecoration",""),Konva.Collection.mapMethods(Konva.Text)}(),function(){"use strict";Konva.Line=function(t){this.___init(t)},Konva.Line.prototype={___init:function(t){Konva.Shape.call(this,t),this.className="Line",this.on("pointsChange.konva tensionChange.konva closedChange.konva",function(){this._clearCache("tensionPoints")}),this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e,n,r,o=this.getPoints(),i=o.length,a=this.getTension(),s=this.getClosed();if(i){if(t.beginPath(),t.moveTo(o[0],o[1]),0!==a&&i>4){for(e=this.getTensionPoints(),n=e.length,r=s?0:4,s||t.quadraticCurveTo(e[0],e[1],e[2],e[3]);r<n-2;)t.bezierCurveTo(e[r++],e[r++],e[r++],e[r++],e[r++],e[r++]);s||t.quadraticCurveTo(e[n-2],e[n-1],o[i-2],o[i-1])}else for(r=2;r<i;r+=2)t.lineTo(o[r],o[r+1]);s?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}},getTensionPoints:function(){return this._getCache("tensionPoints",this._getTensionPoints)},_getTensionPoints:function(){return this.getClosed()?this._getTensionPointsClosed():Konva.Util._expandPoints(this.getPoints(),this.getTension())},_getTensionPointsClosed:function(){var t=this.getPoints(),e=t.length,n=this.getTension(),r=Konva.Util,o=r._getControlPoints(t[e-2],t[e-1],t[0],t[1],t[2],t[3],n),i=r._getControlPoints(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],n),a=Konva.Util._expandPoints(t,n);return[o[2],o[3]].concat(a).concat([i[0],i[1],t[e-2],t[e-1],i[2],i[3],o[0],o[1],t[0],t[1]])},getWidth:function(){return this.getSelfRect().width},getHeight:function(){return this.getSelfRect().height},getSelfRect:function(){var t;t=0!==this.getTension()?this._getTensionPoints():this.getPoints();for(var e,n,r=t[0],o=t[0],i=t[1],a=t[1],s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],r=Math.min(r,e),o=Math.max(o,e),i=Math.min(i,n),a=Math.max(a,n);return{x:Math.round(r),y:Math.round(i),width:Math.round(o-r),height:Math.round(a-i)}}},Konva.Util.extend(Konva.Line,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Line,"closed",!1),Konva.Factory.addGetterSetter(Konva.Line,"tension",0),Konva.Factory.addGetterSetter(Konva.Line,"points",[]),Konva.Collection.mapMethods(Konva.Line)}(),function(){"use strict";Konva.Sprite=function(t){this.___init(t)},Konva.Sprite.prototype={___init:function(t){Konva.Shape.call(this,t),this.className="Sprite",this._updated=!0;var e=this;this.anim=new Konva.Animation(function(){var t=e._updated;return e._updated=!1,t}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())}),this.sceneFunc(this._sceneFunc),this.hitFunc(this._hitFunc)},_sceneFunc:function(t){var e=this.getAnimation(),n=this.frameIndex(),r=4*n,o=this.getAnimations()[e],i=this.frameOffsets(),a=o[r+0],s=o[r+1],c=o[r+2],u=o[r+3],l=this.getImage();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,c,u),t.closePath(),t.fillStrokeShape(this)),l)if(i){var h=i[e],d=2*n;t.drawImage(l,a,s,c,u,h[d+0],h[d+1],c,u)}else t.drawImage(l,a,s,c,u,0,0,c,u)},_hitFunc:function(t){var e=this.getAnimation(),n=this.frameIndex(),r=4*n,o=this.getAnimations()[e],i=this.frameOffsets(),a=o[r+2],s=o[r+3];if(t.beginPath(),i){var c=i[e],u=2*n;t.rect(c[u+0],c[u+1],a,s)}else t.rect(0,0,a,s);t.closePath(),t.fillShape(this)},_useBufferCanvas:function(){return(this.hasShadow()||1!==this.getAbsoluteOpacity())&&this.hasStroke()},_setInterval:function(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.getFrameRate())},start:function(){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()},stop:function(){this.anim.stop(),clearInterval(this.interval)},isRunning:function(){return this.anim.isRunning()},_updateIndex:function(){var t=this.frameIndex(),e=this.getAnimation();t<this.getAnimations()[e].length/4-1?this.frameIndex(t+1):this.frameIndex(0)}},Konva.Util.extend(Konva.Sprite,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Sprite,"animation"),Konva.Factory.addGetterSetter(Konva.Sprite,"animations"),Konva.Factory.addGetterSetter(Konva.Sprite,"frameOffsets"),Konva.Factory.addGetterSetter(Konva.Sprite,"image"),Konva.Factory.addGetterSetter(Konva.Sprite,"frameIndex",0),Konva.Factory.addGetterSetter(Konva.Sprite,"frameRate",17),Konva.Factory.backCompat(Konva.Sprite,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"}),Konva.Collection.mapMethods(Konva.Sprite)}(),function(){"use strict";Konva.Path=function(t){this.___init(t)},Konva.Path.prototype={___init:function(t){this.dataArray=[];var e=this;Konva.Shape.call(this,t),this.className="Path",this.dataArray=Konva.Path.parsePathData(this.getData()),this.on("dataChange.konva",function(){e.dataArray=Konva.Path.parsePathData(this.getData())}),this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e=this.dataArray;t.beginPath();for(var n=0;n<e.length;n++){var r=e[n].command,o=e[n].points;switch(r){case"L":t.lineTo(o[0],o[1]);break;case"M":t.moveTo(o[0],o[1]);break;case"C":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":t.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":var i=o[0],a=o[1],s=o[2],c=o[3],u=o[4],l=o[5],h=o[6],d=o[7],p=s>c?s:c,f=s>c?1:s/c,v=s>c?c/s:1;t.translate(i,a),t.rotate(h),t.scale(f,v),t.arc(0,0,p,u,u+l,1-d),t.scale(1/f,1/v),t.rotate(-h),t.translate(-i,-a);break;case"z":t.closePath()}}t.fillStrokeShape(this)},getSelfRect:function(){var t=[];this.dataArray.forEach(function(e){t=t.concat(e.points)});for(var e,n,r=t[0],o=t[0],i=t[1],a=t[1],s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],r=Math.min(r,e),o=Math.max(o,e),i=Math.min(i,n),a=Math.max(a,n);return{x:Math.round(r),y:Math.round(i),width:Math.round(o-r),height:Math.round(a-i)}}},Konva.Util.extend(Konva.Path,Konva.Shape),Konva.Path.getLineLength=function(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))},Konva.Path.getPointOnLine=function(t,e,n,r,o,i,a){void 0===i&&(i=e),void 0===a&&(a=n);var s=(o-n)/(r-e+1e-8),c=Math.sqrt(t*t/(1+s*s));r<e&&(c*=-1);var u,l=s*c;if(r===e)u={x:i,y:a+l};else if((a-n)/(i-e+1e-8)===s)u={x:i+c,y:a+l};else{var h,d,p=this.getLineLength(e,n,r,o);if(p<1e-8)return;var f=(i-e)*(r-e)+(a-n)*(o-n);f/=p*p,h=e+f*(r-e),d=n+f*(o-n);var v=this.getLineLength(i,a,h,d),g=Math.sqrt(t*t-v*v);c=Math.sqrt(g*g/(1+s*s)),r<e&&(c*=-1),l=s*c,u={x:h+c,y:d+l}}return u},Konva.Path.getPointOnCubicBezier=function(t,e,n,r,o,i,a,s,c){function u(t){return t*t*t}function l(t){return 3*t*t*(1-t)}function h(t){return 3*t*(1-t)*(1-t)}function d(t){return(1-t)*(1-t)*(1-t)}return{x:s*u(t)+i*l(t)+r*h(t)+e*d(t),y:c*u(t)+a*l(t)+o*h(t)+n*d(t)}},Konva.Path.getPointOnQuadraticBezier=function(t,e,n,r,o,i,a){function s(t){return t*t}function c(t){return 2*t*(1-t)}function u(t){return(1-t)*(1-t)}return{x:i*s(t)+r*c(t)+e*u(t),y:a*s(t)+o*c(t)+n*u(t)}},Konva.Path.getPointOnEllipticalArc=function(t,e,n,r,o,i){var a=Math.cos(i),s=Math.sin(i),c={x:n*Math.cos(o),y:r*Math.sin(o)};return{x:t+(c.x*a-c.y*s),y:e+(c.x*s+c.y*a)}},Konva.Path.parsePathData=function(t){if(!t)return[];var e=t,n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];e=e.replace(new RegExp(" ","g"),",");for(var r=0;r<n.length;r++)e=e.replace(new RegExp(n[r],"g"),"|"+n[r]);var o=e.split("|"),i=[],a=0,s=0;for(r=1;r<o.length;r++){var c=o[r],u=c.charAt(0);c=c.slice(1),c=c.replace(new RegExp(",-","g"),"-"),c=c.replace(new RegExp("-","g"),",-"),c=c.replace(new RegExp("e,-","g"),"e-");var l=c.split(",");l.length>0&&""===l[0]&&l.shift();for(var h=0;h<l.length;h++)l[h]=parseFloat(l[h]);for(;l.length>0&&!isNaN(l[0]);){var d,p,f,v,g,m,y,_,b,C,x=null,S=[],w=a,T=s;switch(u){case"l":a+=l.shift(),s+=l.shift(),x="L",S.push(a,s);break;case"L":a=l.shift(),s=l.shift(),S.push(a,s);break;case"m":var P=l.shift(),E=l.shift();if(a+=P,s+=E,x="M",i.length>2&&"z"===i[i.length-1].command)for(var K=i.length-2;K>=0;K--)if("M"===i[K].command){a=i[K].points[0]+P,s=i[K].points[1]+E;break}S.push(a,s),u="l";break;case"M":a=l.shift(),s=l.shift(),x="M",S.push(a,s),u="L";break;case"h":a+=l.shift(),x="L",S.push(a,s);break;case"H":a=l.shift(),x="L",S.push(a,s);break;case"v":s+=l.shift(),x="L",S.push(a,s);break;case"V":s=l.shift(),x="L",S.push(a,s);break;case"C":S.push(l.shift(),l.shift(),l.shift(),l.shift()),a=l.shift(),s=l.shift(),S.push(a,s);break;case"c":S.push(a+l.shift(),s+l.shift(),a+l.shift(),s+l.shift()),a+=l.shift(),s+=l.shift(),x="C",S.push(a,s);break;case"S":p=a,f=s,d=i[i.length-1],"C"===d.command&&(p=a+(a-d.points[2]),f=s+(s-d.points[3])),S.push(p,f,l.shift(),l.shift()),a=l.shift(),s=l.shift(),x="C",S.push(a,s);break;case"s":p=a,f=s,d=i[i.length-1],"C"===d.command&&(p=a+(a-d.points[2]),f=s+(s-d.points[3])),S.push(p,f,a+l.shift(),s+l.shift()),a+=l.shift(),s+=l.shift(),x="C",S.push(a,s);break;case"Q":S.push(l.shift(),l.shift()),a=l.shift(),s=l.shift(),S.push(a,s);break;case"q":S.push(a+l.shift(),s+l.shift()),a+=l.shift(),s+=l.shift(),x="Q",S.push(a,s);break;case"T":p=a,f=s,d=i[i.length-1],"Q"===d.command&&(p=a+(a-d.points[0]),f=s+(s-d.points[1])),a=l.shift(),s=l.shift(),x="Q",S.push(p,f,a,s);break;case"t":p=a,f=s,d=i[i.length-1],"Q"===d.command&&(p=a+(a-d.points[0]),f=s+(s-d.points[1])),a+=l.shift(),s+=l.shift(),x="Q",S.push(p,f,a,s);break;case"A":v=l.shift(),g=l.shift(),m=l.shift(),y=l.shift(),_=l.shift(),b=a,C=s,a=l.shift(),s=l.shift(),x="A",S=this.convertEndpointToCenterParameterization(b,C,a,s,y,_,v,g,m);break;case"a":v=l.shift(),g=l.shift(),m=l.shift(),y=l.shift(),_=l.shift(),b=a,C=s,a+=l.shift(),s+=l.shift(),x="A",S=this.convertEndpointToCenterParameterization(b,C,a,s,y,_,v,g,m)}i.push({command:x||u,points:S,start:{x:w,y:T},pathLength:this.calcLength(w,T,x||u,S)})}"z"!==u&&"Z"!==u||i.push({command:"z",points:[],start:void 0,pathLength:0})}return i},Konva.Path.calcLength=function(t,e,n,r){var o,i,a,s,c=Konva.Path;switch(n){case"L":return c.getLineLength(t,e,r[0],r[1]);case"C":for(o=0,i=c.getPointOnCubicBezier(0,t,e,r[0],r[1],r[2],r[3],r[4],r[5]),s=.01;s<=1;s+=.01)a=c.getPointOnCubicBezier(s,t,e,r[0],r[1],r[2],r[3],r[4],r[5]),o+=c.getLineLength(i.x,i.y,a.x,a.y),i=a;return o;case"Q":for(o=0,i=c.getPointOnQuadraticBezier(0,t,e,r[0],r[1],r[2],r[3]),s=.01;s<=1;s+=.01)a=c.getPointOnQuadraticBezier(s,t,e,r[0],r[1],r[2],r[3]),o+=c.getLineLength(i.x,i.y,a.x,a.y),i=a;return o;case"A":o=0;var u=r[4],l=r[5],h=r[4]+l,d=Math.PI/180;if(Math.abs(u-h)<d&&(d=Math.abs(u-h)),i=c.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],u,0),l<0)for(s=u-d;s>h;s-=d)a=c.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],s,0),o+=c.getLineLength(i.x,i.y,a.x,a.y),i=a;else for(s=u+d;s<h;s+=d)a=c.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],s,0),o+=c.getLineLength(i.x,i.y,a.x,a.y),i=a;return a=c.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],h,0),o+=c.getLineLength(i.x,i.y,a.x,a.y)}return 0},Konva.Path.convertEndpointToCenterParameterization=function(t,e,n,r,o,i,a,s,c){var u=c*(Math.PI/180),l=Math.cos(u)*(t-n)/2+Math.sin(u)*(e-r)/2,h=-1*Math.sin(u)*(t-n)/2+Math.cos(u)*(e-r)/2,d=l*l/(a*a)+h*h/(s*s);d>1&&(a*=Math.sqrt(d),s*=Math.sqrt(d));var p=Math.sqrt((a*a*(s*s)-a*a*(h*h)-s*s*(l*l))/(a*a*(h*h)+s*s*(l*l)));o===i&&(p*=-1),isNaN(p)&&(p=0);var f=p*a*h/s,v=p*-s*l/a,g=(t+n)/2+Math.cos(u)*f-Math.sin(u)*v,m=(e+r)/2+Math.sin(u)*f+Math.cos(u)*v,y=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},_=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(y(t)*y(e))},b=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(_(t,e))},C=b([1,0],[(l-f)/a,(h-v)/s]),x=[(l-f)/a,(h-v)/s],S=[(-1*l-f)/a,(-1*h-v)/s],w=b(x,S);return _(x,S)<=-1&&(w=Math.PI),_(x,S)>=1&&(w=0),0===i&&w>0&&(w-=2*Math.PI),1===i&&w<0&&(w+=2*Math.PI),[g,m,a,s,C,w,u,i]},Konva.Factory.addGetterSetter(Konva.Path,"data"),Konva.Collection.mapMethods(Konva.Path)}(),function(){"use strict";function t(t){t.fillText(this.partialText,0,0)}function e(t){t.strokeText(this.partialText,0,0)}Konva.TextPath=function(t){this.___init(t)},Konva.TextPath.prototype={___init:function(n){var r=this;this.dummyCanvas=Konva.Util.createCanvasElement(),this.dataArray=[],Konva.Shape.call(this,n),this._fillFunc=t,this._strokeFunc=e,this._fillFuncHit=t,this._strokeFuncHit=e,this.className="TextPath",this.dataArray=Konva.Path.parsePathData(this.attrs.data),this.on("dataChange.konva",function(){r.dataArray=Konva.Path.parsePathData(this.attrs.data),r._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva",r._setTextData),r._setTextData(),this.sceneFunc(this._sceneFunc),this.hitFunc(this._hitFunc)},_sceneFunc:function(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.getTextBaseline()),t.setAttr("textAlign","left"),t.save();var e=this.textDecoration(),n=this.fill(),r=this.fontSize(),o=this.glyphInfo;"underline"===e&&t.beginPath();for(var i=0;i<o.length;i++){t.save();var a=o[i].p0;t.translate(a.x,a.y),t.rotate(o[i].rotation),this.partialText=o[i].text,t.fillStrokeShape(this),"underline"===e&&(0===i&&t.moveTo(0,r/2+1),t.lineTo(r,r/2+1)),t.restore()}"underline"===e&&(t.strokeStyle=n,t.lineWidth=r/20,t.stroke()),t.restore()},_hitFunc:function(t){t.beginPath();var e=this.glyphInfo;if(e.length>=1){var n=e[0].p0;t.moveTo(n.x,n.y)}for(var r=0;r<e.length;r++){var o=e[r].p1;t.lineTo(o.x,o.y)}t.setAttr("lineWidth",this.getFontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()},getTextWidth:function(){return this.textWidth},getTextHeight:function(){return this.textHeight},setText:function(t){Konva.Text.prototype.setText.call(this,t)},_getTextSize:function(t){var e=this.dummyCanvas,n=e.getContext("2d");n.save(),n.font=this._getContextFont();var r=n.measureText(t);return n.restore(),{width:r.width,height:parseInt(this.attrs.fontSize,10)}},_setTextData:function(){var t=this,e=this._getTextSize(this.attrs.text),n=this.getLetterSpacing(),r=this.align();this.textWidth=e.width,this.textHeight=e.height;var o=Math.max(this.textWidth+((this.attrs.text||"").length-1)*n,0);this.glyphInfo=[];for(var i=0,a=0;a<t.dataArray.length;a++)t.dataArray[a].pathLength>0&&(i+=t.dataArray[a].pathLength);var s=0;"center"===r&&(s=Math.max(0,i/2-o/2)),"right"===r&&(s=Math.max(0,i-o));for(var c,u,l,h=this.getText().split(""),d=this.getText().split(" ").length-1,p=-1,f=0,v=function(){f=0;for(var e=t.dataArray,n=p+1;n<e.length;n++){if(e[n].pathLength>0)return p=n,e[n];"M"===e[n].command&&(c={x:e[n].points[0],y:e[n].points[1]})}return{}},g=function(e){var a=t._getTextSize(e).width+n;" "===e&&"justify"===r&&(a+=(i-o)/d);var s=0,h=0;for(u=void 0;Math.abs(a-s)/a>.01&&h<25;){h++;for(var p=s;void 0===l;)(l=v())&&p+l.pathLength<a&&(p+=l.pathLength,l=void 0);if(l==={}||void 0===c)return;var g=!1;switch(l.command){case"L":Konva.Path.getLineLength(c.x,c.y,l.points[0],l.points[1])>a?u=Konva.Path.getPointOnLine(a,c.x,c.y,l.points[0],l.points[1],c.x,c.y):l=void 0;break;case"A":var m=l.points[4],y=l.points[5],_=l.points[4]+y;0===f?f=m+1e-8:a>s?f+=Math.PI/180*y/Math.abs(y):f-=Math.PI/360*y/Math.abs(y),(y<0&&f<_||y>=0&&f>_)&&(f=_,g=!0),u=Konva.Path.getPointOnEllipticalArc(l.points[0],l.points[1],l.points[2],l.points[3],f,l.points[6]);break;case"C":0===f?f=a>l.pathLength?1e-8:a/l.pathLength:a>s?f+=(a-s)/l.pathLength:f-=(s-a)/l.pathLength,f>1&&(f=1,g=!0),u=Konva.Path.getPointOnCubicBezier(f,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3],l.points[4],l.points[5]);break;case"Q":0===f?f=a/l.pathLength:a>s?f+=(a-s)/l.pathLength:f-=(s-a)/l.pathLength,f>1&&(f=1,g=!0),u=Konva.Path.getPointOnQuadraticBezier(f,l.start.x,l.start.y,l.points[0],l.points[1],l.points[2],l.points[3])}void 0!==u&&(s=Konva.Path.getLineLength(c.x,c.y,u.x,u.y)),g&&(g=!1,l=void 0)}},m=t._getTextSize("C").width+n,y=0;y<s/m&&(g("C"),void 0!==c&&void 0!==u);y++)c=u;for(var _=0;_<h.length&&(g(h[_]),void 0!==c&&void 0!==u);_++){var b=Konva.Path.getLineLength(c.x,c.y,u.x,u.y),C=Konva.Path.getPointOnLine(0+b/2,c.x,c.y,u.x,u.y),x=Math.atan2(u.y-c.y,u.x-c.x);this.glyphInfo.push({transposeX:C.x,transposeY:C.y,text:h[_],rotation:x,p0:c,p1:u}),c=u}},getSelfRect:function(){var t=[];this.glyphInfo.forEach(function(e){t.push(e.p0.x),t.push(e.p0.y),t.push(e.p1.x),t.push(e.p1.y)});for(var e,n,r=t[0],o=t[0],i=t[0],a=t[0],s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],r=Math.min(r,e),o=Math.max(o,e),i=Math.min(i,n),a=Math.max(a,n);var c=this.fontSize();return{x:Math.round(r)-c/2,y:Math.round(i)-c/2,width:Math.round(o-r)+c,height:Math.round(a-i)+c}}},Konva.TextPath.prototype._getContextFont=Konva.Text.prototype._getContextFont,Konva.Util.extend(Konva.TextPath,Konva.Shape),Konva.Factory.addGetterSetter(Konva.TextPath,"fontFamily","Arial"),Konva.Factory.addGetterSetter(Konva.TextPath,"fontSize",12),Konva.Factory.addGetterSetter(Konva.TextPath,"fontStyle","normal"),Konva.Factory.addGetterSetter(Konva.TextPath,"align","left"),Konva.Factory.addGetterSetter(Konva.TextPath,"letterSpacing",0),Konva.Factory.addGetterSetter(Konva.TextPath,"textBaseline","middle"),Konva.Factory.addGetterSetter(Konva.TextPath,"fontVariant","normal"),Konva.Factory.addGetter(Konva.TextPath,"text",""),Konva.Factory.addGetterSetter(Konva.TextPath,"textDecoration",null),Konva.Collection.mapMethods(Konva.TextPath)}(),function(){"use strict";Konva.RegularPolygon=function(t){this.___init(t)},Konva.RegularPolygon.prototype={_centroid:!0,___init:function(t){Konva.Shape.call(this,t),this.className="RegularPolygon",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e,n,r,o=this.attrs.sides,i=this.attrs.radius;for(t.beginPath(),t.moveTo(0,0-i),e=1;e<o;e++)n=i*Math.sin(2*e*Math.PI/o),r=-1*i*Math.cos(2*e*Math.PI/o),t.lineTo(n,r);t.closePath(),t.fillStrokeShape(this)},getWidth:function(){return 2*this.getRadius()},getHeight:function(){return 2*this.getRadius()},setWidth:function(t){Konva.Node.prototype.setWidth.call(this,t),this.radius()!==t/2&&this.setRadius(t/2)},setHeight:function(t){Konva.Node.prototype.setHeight.call(this,t),this.radius()!==t/2&&this.setRadius(t/2)}},Konva.Util.extend(Konva.RegularPolygon,Konva.Shape),Konva.Factory.addGetterSetter(Konva.RegularPolygon,"radius",0),Konva.Factory.addGetterSetter(Konva.RegularPolygon,"sides",0),Konva.Collection.mapMethods(Konva.RegularPolygon)}(),function(){"use strict";Konva.Star=function(t){this.___init(t)},Konva.Star.prototype={_centroid:!0,___init:function(t){Konva.Shape.call(this,t),this.className="Star",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();t.beginPath(),t.moveTo(0,0-n);for(var o=1;o<2*r;o++){var i=o%2==0?n:e,a=i*Math.sin(o*Math.PI/r),s=-1*i*Math.cos(o*Math.PI/r);t.lineTo(a,s)}t.closePath(),t.fillStrokeShape(this)},getWidth:function(){return 2*this.getOuterRadius()},getHeight:function(){return 2*this.getOuterRadius()},setWidth:function(t){Konva.Node.prototype.setWidth.call(this,t),this.outerRadius()!==t/2&&this.setOuterRadius(t/2)},setHeight:function(t){Konva.Node.prototype.setHeight.call(this,t),this.outerRadius()!==t/2&&this.setOuterRadius(t/2)}},Konva.Util.extend(Konva.Star,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Star,"numPoints",5),Konva.Factory.addGetterSetter(Konva.Star,"innerRadius",0),Konva.Factory.addGetterSetter(Konva.Star,"outerRadius",0),Konva.Collection.mapMethods(Konva.Star)}(),function(){"use strict";var t=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width"],e=t.length;Konva.Label=function(t){this.____init(t)},Konva.Label.prototype={____init:function(t){var e=this;Konva.Group.call(this,t),this.className="Label",this.on("add.konva",function(t){e._addListeners(t.child),e._sync()})},getText:function(){return this.find("Text")[0]},getTag:function(){return this.find("Tag")[0]},_addListeners:function(n){var r,o=this,i=function(){o._sync()};for(r=0;r<e;r++)n.on(t[r]+"Change.konva",i)},getWidth:function(){return this.getText().getWidth()},getHeight:function(){return this.getText().getHeight()},_sync:function(){var t,e,n,r,o,i,a,s=this.getText(),c=this.getTag();if(s&&c){switch(t=s.getWidth(),e=s.getHeight(),n=c.getPointerDirection(),r=c.getPointerWidth(),a=c.getPointerHeight(),o=0,i=0,n){case"up":o=t/2,i=-1*a;break;case"right":o=t+r,i=e/2;break;case"down":o=t/2,i=e+a;break;case"left":o=-1*r,i=e/2}c.setAttrs({x:-1*o,y:-1*i,width:t,height:e}),s.setAttrs({x:-1*o,y:-1*i})}}},Konva.Util.extend(Konva.Label,Konva.Group),Konva.Collection.mapMethods(Konva.Label),Konva.Tag=function(t){this.___init(t)},Konva.Tag.prototype={___init:function(t){Konva.Shape.call(this,t),this.className="Tag",this.sceneFunc(this._sceneFunc)},_sceneFunc:function(t){var e=this.getWidth(),n=this.getHeight(),r=this.getPointerDirection(),o=this.getPointerWidth(),i=this.getPointerHeight(),a=Math.min(this.getCornerRadius(),e/2,n/2);t.beginPath(),a?t.moveTo(a,0):t.moveTo(0,0),"up"===r&&(t.lineTo((e-o)/2,0),t.lineTo(e/2,-1*i),t.lineTo((e+o)/2,0)),a?(t.lineTo(e-a,0),t.arc(e-a,a,a,3*Math.PI/2,0,!1)):t.lineTo(e,0),"right"===r&&(t.lineTo(e,(n-i)/2),t.lineTo(e+o,n/2),t.lineTo(e,(n+i)/2)),a?(t.lineTo(e,n-a),t.arc(e-a,n-a,a,0,Math.PI/2,!1)):t.lineTo(e,n),"down"===r&&(t.lineTo((e+o)/2,n),t.lineTo(e/2,n+i),t.lineTo((e-o)/2,n)),a?(t.lineTo(a,n),t.arc(a,n-a,a,Math.PI/2,Math.PI,!1)):t.lineTo(0,n),"left"===r&&(t.lineTo(0,(n+i)/2),t.lineTo(-1*o,n/2),t.lineTo(0,(n-i)/2)),a&&(t.lineTo(0,a),t.arc(a,a,a,Math.PI,3*Math.PI/2,!1)),t.closePath(),t.fillStrokeShape(this)},getSelfRect:function(){var t=0,e=0,n=this.getPointerWidth(),r=this.getPointerHeight(),o=this.pointerDirection(),i=this.getWidth(),a=this.getHeight();return"up"===o?(e-=r,a+=r):"down"===o?a+=r:"left"===o?(t-=1.5*n,i+=n):"right"===o&&(i+=1.5*n),{x:t,y:e,width:i,height:a}}},Konva.Util.extend(Konva.Tag,Konva.Shape),Konva.Factory.addGetterSetter(Konva.Tag,"pointerDirection","none"),Konva.Factory.addGetterSetter(Konva.Tag,"pointerWidth",0),Konva.Factory.addGetterSetter(Konva.Tag,"pointerHeight",0),Konva.Factory.addGetterSetter(Konva.Tag,"cornerRadius",0),Konva.Collection.mapMethods(Konva.Tag)}(),function(){"use strict";Konva.Arrow=function(t){this.____init(t)},Konva.Arrow.prototype={____init:function(t){Konva.Line.call(this,t),this.className="Arrow"},_sceneFunc:function(t){Konva.Line.prototype._sceneFunc.apply(this,arguments);var e=2*Math.PI,n=this.points(),r=n.length,o=n[r-2]-n[r-4],i=n[r-1]-n[r-3],a=(Math.atan2(i,o)+e)%e,s=this.pointerLength(),c=this.pointerWidth();t.save(),t.beginPath(),t.translate(n[r-2],n[r-1]),t.rotate(a),t.moveTo(0,0),t.lineTo(-s,c/2),t.lineTo(-s,-c/2),t.closePath(),t.restore(),this.pointerAtBeginning()&&(t.save(),t.translate(n[0],n[1]),o=n[2]-n[0],i=n[3]-n[1],t.rotate((Math.atan2(-i,-o)+e)%e),t.moveTo(0,0),t.lineTo(-s,c/2),t.lineTo(-s,-c/2),t.closePath(),t.restore()),t.fillStrokeShape(this)}},Konva.Util.extend(Konva.Arrow,Konva.Line),Konva.Factory.addGetterSetter(Konva.Arrow,"pointerLength",10),Konva.Factory.addGetterSetter(Konva.Arrow,"pointerWidth",10),Konva.Factory.addGetterSetter(Konva.Arrow,"pointerAtBeginning",!1),Konva.Collection.mapMethods(Konva.Arrow)}()}).call(e,n(122))},function(t,e,n){"use strict";t.exports=n(203)},function(t,e,n){"use strict";var r={Properties:{"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},DOMAttributeNames:{},DOMPropertyNames:{}};t.exports=r},function(t,e,n){"use strict";var r=n(4),o=n(93),i={focusDOMComponent:function(){o(r.getNodeFromInstance(this))}};t.exports=i},function(t,e,n){"use strict";function r(t){return(t.ctrlKey||t.altKey||t.metaKey)&&!(t.ctrlKey&&t.altKey)}function o(t){switch(t){case"topCompositionStart":return T.compositionStart;case"topCompositionEnd":return T.compositionEnd;case"topCompositionUpdate":return T.compositionUpdate}}function i(t,e){return"topKeyDown"===t&&e.keyCode===y}function a(t,e){switch(t){case"topKeyUp":return m.indexOf(e.keyCode)!==-1;case"topKeyDown":return e.keyCode!==y;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function s(t){var e=t.detail;return"object"==typeof e&&"data"in e?e.data:null}function c(t,e,n,r){var c,u;if(_?c=o(t):E?a(t,n)&&(c=T.compositionEnd):i(t,n)&&(c=T.compositionStart),!c)return null;x&&(E||c!==T.compositionStart?c===T.compositionEnd&&E&&(u=E.getData()):E=f.getPooled(r));var l=v.getPooled(c,e,n,r);if(u)l.data=u;else{var h=s(n);null!==h&&(l.data=h)}return d.accumulateTwoPhaseDispatches(l),l}function u(t,e){switch(t){case"topCompositionEnd":return s(e);case"topKeyPress":return e.which!==S?null:(P=!0,w);case"topTextInput":var n=e.data;return n===w&&P?null:n;default:return null}}function l(t,e){if(E){if("topCompositionEnd"===t||!_&&a(t,e)){var n=E.getData();return f.release(E),E=null,n}return null}switch(t){case"topPaste":return null;case"topKeyPress":return e.which&&!r(e)?String.fromCharCode(e.which):null;case"topCompositionEnd":return x?null:e.data;default:return null}}function h(t,e,n,r){var o;if(!(o=C?u(t,n):l(t,n)))return null;var i=g.getPooled(T.beforeInput,e,n,r);return i.data=o,d.accumulateTwoPhaseDispatches(i),i}var d=n(34),p=n(5),f=n(198),v=n(234),g=n(237),m=[9,13,27,32],y=229,_=p.canUseDOM&&"CompositionEvent"in window,b=null;p.canUseDOM&&"documentMode"in document&&(b=document.documentMode);var C=p.canUseDOM&&"TextEvent"in window&&!b&&!function(){var t=window.opera;return"object"==typeof t&&"function"==typeof t.version&&parseInt(t.version(),10)<=12}(),x=p.canUseDOM&&(!_||b&&b>8&&b<=11),S=32,w=String.fromCharCode(S),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"]}},P=!1,E=null,K={eventTypes:T,extractEvents:function(t,e,n,r){return[c(t,e,n,r),h(t,e,n,r)]}};t.exports=K},function(t,e,n){"use strict";var r=n(96),o=n(5),i=(n(7),n(177),n(243)),a=n(184),s=n(187),c=(n(1),s(function(t){return a(t)})),u=!1,l="cssFloat";if(o.canUseDOM){var h=document.createElement("div").style;try{h.font=""}catch(t){u=!0}void 0===document.documentElement.style.cssFloat&&(l="styleFloat")}var d={createMarkupForStyles:function(t,e){var n="";for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];null!=o&&(n+=c(r)+":",n+=i(r,o,e)+";")}return n||null},setValueForStyles:function(t,e,n){var o=t.style;for(var a in e)if(e.hasOwnProperty(a)){var s=i(a,e[a],n);if("float"!==a&&"cssFloat"!==a||(a=l),s)o[a]=s;else{var c=u&&r.shorthandPropertyExpansions[a];if(c)for(var h in c)o[h]="";else o[a]=""}}}};t.exports=d},function(t,e,n){"use strict";function r(t){var e=t.nodeName&&t.nodeName.toLowerCase();return"select"===e||"input"===e&&"file"===t.type}function o(t){var e=S.getPooled(E.change,k,t,w(t));_.accumulateTwoPhaseDispatches(e),x.batchedUpdates(i,e)}function i(t){y.enqueueEvents(t),y.processEventQueue(!1)}function a(t,e){K=t,k=e,K.attachEvent("onchange",o)}function s(){K&&(K.detachEvent("onchange",o),K=null,k=null)}function c(t,e){if("topChange"===t)return e}function u(t,e,n){"topFocus"===t?(s(),a(e,n)):"topBlur"===t&&s()}function l(t,e){K=t,k=e,M=t.value,A=Object.getOwnPropertyDescriptor(t.constructor.prototype,"value"),Object.defineProperty(K,"value",O),K.attachEvent?K.attachEvent("onpropertychange",d):K.addEventListener("propertychange",d,!1)}function h(){K&&(delete K.value,K.detachEvent?K.detachEvent("onpropertychange",d):K.removeEventListener("propertychange",d,!1),K=null,k=null,M=null,A=null)}function d(t){if("value"===t.propertyName){var e=t.srcElement.value;e!==M&&(M=e,o(t))}}function p(t,e){if("topInput"===t)return e}function f(t,e,n){"topFocus"===t?(h(),l(e,n)):"topBlur"===t&&h()}function v(t,e){if(("topSelectionChange"===t||"topKeyUp"===t||"topKeyDown"===t)&&K&&K.value!==M)return M=K.value,k}function g(t){return t.nodeName&&"input"===t.nodeName.toLowerCase()&&("checkbox"===t.type||"radio"===t.type)}function m(t,e){if("topClick"===t)return e}var y=n(33),_=n(34),b=n(5),C=n(4),x=n(8),S=n(10),w=n(73),T=n(74),P=n(114),E={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}},K=null,k=null,M=null,A=null,R=!1;b.canUseDOM&&(R=T("change")&&(!document.documentMode||document.documentMode>8));var D=!1;b.canUseDOM&&(D=T("input")&&(!document.documentMode||document.documentMode>11));var O={get:function(){return A.get.call(this)},set:function(t){M=""+t,A.set.call(this,t)}},F={eventTypes:E,extractEvents:function(t,e,n,o){var i,a,s=e?C.getNodeFromInstance(e):window;if(r(s)?R?i=c:a=u:P(s)?D?i=p:(i=v,a=f):g(s)&&(i=m),i){var l=i(t,e);if(l){var h=S.getPooled(E.change,l,n,o);return h.type="change",_.accumulateTwoPhaseDispatches(h),h}}a&&a(t,s,e)}};t.exports=F},function(t,e,n){"use strict";var r=n(2),o=n(24),i=n(5),a=n(180),s=n(6),c=(n(0),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(i.canUseDOM||r("56"),e||r("57"),"HTML"===t.nodeName&&r("58"),"string"==typeof e){var n=a(e,s)[0];t.parentNode.replaceChild(n,t)}else o.replaceChildWithTree(t,e)}});t.exports=c},function(t,e,n){"use strict";var r=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"];t.exports=r},function(t,e,n){"use strict";var r=n(34),o=n(4),i=n(40),a={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},s={eventTypes:a,extractEvents:function(t,e,n,s){if("topMouseOver"===t&&(n.relatedTarget||n.fromElement))return null;if("topMouseOut"!==t&&"topMouseOver"!==t)return null;var c;if(s.window===s)c=s;else{var u=s.ownerDocument;c=u?u.defaultView||u.parentWindow:window}var l,h;if("topMouseOut"===t){l=e;var d=n.relatedTarget||n.toElement;h=d?o.getClosestInstanceFromNode(d):null}else l=null,h=e;if(l===h)return null;var p=null==l?c:o.getNodeFromInstance(l),f=null==h?c:o.getNodeFromInstance(h),v=i.getPooled(a.mouseLeave,l,n,s);v.type="mouseleave",v.target=p,v.relatedTarget=f;var g=i.getPooled(a.mouseEnter,h,n,s);return g.type="mouseenter",g.target=f,g.relatedTarget=p,r.accumulateEnterLeaveDispatches(v,g,l,h),[v,g]}};t.exports=s},function(t,e,n){"use strict";function r(t){this._root=t,this._startText=this.getText(),this._fallbackText=null}var o=n(3),i=n(18),a=n(112);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 t,e,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(t=0;t<r&&n[t]===o[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===o[i-e];e++);var s=e>1?1-e:void 0;return this._fallbackText=o.slice(t,s),this._fallbackText}}),i.addPoolingTo(r),t.exports=r},function(t,e,n){"use strict";var r=n(25),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,c=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,u={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:c,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:{}};t.exports=u},function(t,e,n){"use strict";(function(e){function r(t,e,n,r){var o=void 0===t[n];null!=e&&o&&(t[n]=i(e,!0))}var o=n(27),i=n(113),a=(n(65),n(75)),s=n(116);n(1);void 0!==e&&e.env;var c={instantiateChildren:function(t,e,n,o){if(null==t)return null;var i={};return s(t,r,i),i},updateChildren:function(t,e,n,r,s,c,u,l,h){if(e||t){var d,p;for(d in e)if(e.hasOwnProperty(d)){p=t&&t[d];var f=p&&p._currentElement,v=e[d];if(null!=p&&a(f,v))o.receiveComponent(p,v,s,l),e[d]=p;else{p&&(r[d]=o.getHostNode(p),o.unmountComponent(p,!1));var g=i(v,!0);e[d]=g;var m=o.mountComponent(g,s,c,u,l,h);n.push(m)}}for(d in t)!t.hasOwnProperty(d)||e&&e.hasOwnProperty(d)||(p=t[d],r[d]=o.getHostNode(p),o.unmountComponent(p,!1))}},unmountChildren:function(t,e){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];o.unmountComponent(r,e)}}};t.exports=c}).call(e,n(95))},function(t,e,n){"use strict";var r=n(61),o=n(208),i={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};t.exports=i},function(t,e,n){"use strict";function r(t){}function o(t){return!(!t.prototype||!t.prototype.isReactComponent)}function i(t){return!(!t.prototype||!t.prototype.isPureReactComponent)}var a=n(2),s=n(3),c=n(19),u=n(67),l=n(11),h=n(68),d=n(26),p=(n(7),n(107)),f=n(27),v=n(23),g=(n(0),n(60)),m=n(75),y=(n(1),{ImpureClass:0,PureClass:1,StatelessFunctional:2});r.prototype.render=function(){var t=d.get(this)._currentElement.type,e=t(this.props,this.context,this.updater);return e};var _=1,b={construct:function(t){this._currentElement=t,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(t,e,n,s){this._context=s,this._mountOrder=_++,this._hostParent=e,this._hostContainerInfo=n;var u,l=this._currentElement.props,h=this._processContext(s),p=this._currentElement.type,f=t.getUpdateQueue(),g=o(p),m=this._constructComponent(g,l,h,f);g||null!=m&&null!=m.render?i(p)?this._compositeType=y.PureClass:this._compositeType=y.ImpureClass:(u=m,null===m||m===!1||c.isValidElement(m)||a("105",p.displayName||p.name||"Component"),m=new r(p),this._compositeType=y.StatelessFunctional);m.props=l,m.context=h,m.refs=v,m.updater=f,this._instance=m,d.set(m,this);var b=m.state;void 0===b&&(m.state=b=null),("object"!=typeof b||Array.isArray(b))&&a("106",this.getName()||"ReactCompositeComponent"),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var C;return C=m.unstable_handleError?this.performInitialMountWithErrorHandling(u,e,n,t,s):this.performInitialMount(u,e,n,t,s),m.componentDidMount&&t.getReactMountReady().enqueue(m.componentDidMount,m),C},_constructComponent:function(t,e,n,r){return this._constructComponentWithoutOwner(t,e,n,r)},_constructComponentWithoutOwner:function(t,e,n,r){var o=this._currentElement.type;return t?new o(e,n,r):o(e,n,r)},performInitialMountWithErrorHandling:function(t,e,n,r,o){var i,a=r.checkpoint();try{i=this.performInitialMount(t,e,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(t,e,n,r,o)}return i},performInitialMount:function(t,e,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===t&&(t=this._renderValidatedComponent());var s=p.getType(t);this._renderedNodeType=s;var c=this._instantiateReactComponent(t,s!==p.EMPTY);this._renderedComponent=c;var u=f.mountComponent(c,r,e,n,this._processChildContext(o),a);return u},getHostNode:function(){return f.getHostNode(this._renderedComponent)},unmountComponent:function(t){if(this._renderedComponent){var e=this._instance;if(e.componentWillUnmount&&!e._calledComponentWillUnmount)if(e._calledComponentWillUnmount=!0,t){var n=this.getName()+".componentWillUnmount()";h.invokeGuardedCallback(n,e.componentWillUnmount.bind(e))}else e.componentWillUnmount();this._renderedComponent&&(f.unmountComponent(this._renderedComponent,t),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,d.remove(e)}},_maskContext:function(t){var e=this._currentElement.type,n=e.contextTypes;if(!n)return v;var r={};for(var o in n)r[o]=t[o];return r},_processContext:function(t){var e=this._maskContext(t);return e},_processChildContext:function(t){var e,n=this._currentElement.type,r=this._instance;if(r.getChildContext&&(e=r.getChildContext()),e){"object"!=typeof n.childContextTypes&&a("107",this.getName()||"ReactCompositeComponent");for(var o in e)o in n.childContextTypes||a("108",this.getName()||"ReactCompositeComponent",o);return s({},t,e)}return t},_checkContextTypes:function(t,e,n){},receiveComponent:function(t,e,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(e,r,t,o,n)},performUpdateIfNecessary:function(t){null!=this._pendingElement?f.receiveComponent(this,this._pendingElement,t,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(t,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(t,e,n,r,o){var i=this._instance;null==i&&a("136",this.getName()||"ReactCompositeComponent");var s,c=!1;this._context===o?s=i.context:(s=this._processContext(o),c=!0);var u=e.props,l=n.props;e!==n&&(c=!0),c&&i.componentWillReceiveProps&&i.componentWillReceiveProps(l,s);var h=this._processPendingState(l,s),d=!0;this._pendingForceUpdate||(i.shouldComponentUpdate?d=i.shouldComponentUpdate(l,h,s):this._compositeType===y.PureClass&&(d=!g(u,l)||!g(i.state,h))),this._updateBatchNumber=null,d?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,l,h,s,t,o)):(this._currentElement=n,this._context=o,i.props=l,i.state=h,i.context=s)},_processPendingState:function(t,e){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<r.length;a++){var c=r[a];s(i,"function"==typeof c?c.call(n,i,t,e):c)}return i},_performComponentUpdate:function(t,e,n,r,o,i){var a,s,c,u=this._instance,l=Boolean(u.componentDidUpdate);l&&(a=u.props,s=u.state,c=u.context),u.componentWillUpdate&&u.componentWillUpdate(e,n,r),this._currentElement=t,this._context=i,u.props=e,u.state=n,u.context=r,this._updateRenderedComponent(o,i),l&&o.getReactMountReady().enqueue(u.componentDidUpdate.bind(u,a,s,c),u)},_updateRenderedComponent:function(t,e){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent(),i=0;if(m(r,o))f.receiveComponent(n,o,t,this._processChildContext(e));else{var a=f.getHostNode(n);f.unmountComponent(n,!1);var s=p.getType(o);this._renderedNodeType=s;var c=this._instantiateReactComponent(o,s!==p.EMPTY);this._renderedComponent=c;var u=f.mountComponent(c,t,this._hostParent,this._hostContainerInfo,this._processChildContext(e),i);this._replaceNodeWithMarkup(a,u,n)}},_replaceNodeWithMarkup:function(t,e,n){u.replaceNodeWithMarkup(t,e,n)},_renderValidatedComponentWithoutOwnerOrContext:function(){var t=this._instance;return t.render()},_renderValidatedComponent:function(){var t;if(this._compositeType!==y.StatelessFunctional){l.current=this;try{t=this._renderValidatedComponentWithoutOwnerOrContext()}finally{l.current=null}}else t=this._renderValidatedComponentWithoutOwnerOrContext();return null===t||t===!1||c.isValidElement(t)||a("109",this.getName()||"ReactCompositeComponent"),t},attachRef:function(t,e){var n=this.getPublicInstance();null==n&&a("110");var r=e.getPublicInstance();(n.refs===v?n.refs={}:n.refs)[t]=r},detachRef:function(t){delete this.getPublicInstance().refs[t]},getName:function(){var t=this._currentElement.type,e=this._instance&&this._instance.constructor;return t.displayName||e&&e.displayName||t.name||e&&e.name||null},getPublicInstance:function(){var t=this._instance;return this._compositeType===y.StatelessFunctional?null:t},_instantiateReactComponent:null};t.exports=b},function(t,e,n){"use strict";var r=n(4),o=n(216),i=n(105),a=n(27),s=n(8),c=n(228),u=n(244),l=n(111),h=n(252);n(1);o.inject();var d={findDOMNode:u,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:c,unstable_batchedUpdates:s.batchedUpdates,unstable_renderSubtreeIntoContainer:h};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=l(t)),t?r.getNodeFromInstance(t):null}},Mount:i,Reconciler:a});t.exports=d},function(t,e,n){"use strict";function r(t){if(t){var e=t._currentElement._owner||null;if(e){var n=e.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function o(t,e){e&&(q[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML)&&v("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""),null!=e.dangerouslySetInnerHTML&&(null!=e.children&&v("60"),"object"==typeof e.dangerouslySetInnerHTML&&j in e.dangerouslySetInnerHTML||v("61")),null!=e.style&&"object"!=typeof e.style&&v("62",r(t)))}function i(t,e,n,r){if(!(r instanceof D)){var o=t._hostContainerInfo,i=o._node&&o._node.nodeType===H,s=i?o._node:o._ownerDocument;L(e,s),r.getReactMountReady().enqueue(a,{inst:t,registrationName:e,listener:n})}}function a(){var t=this;S.putListener(t.inst,t.registrationName,t.listener)}function s(){var t=this;K.postMountWrapper(t)}function c(){var t=this;A.postMountWrapper(t)}function u(){var t=this;k.postMountWrapper(t)}function l(){var t=this;t._rootNodeID||v("63");var e=N(t);switch(e||v("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[T.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var n in W)W.hasOwnProperty(n)&&t._wrapperState.listeners.push(T.trapBubbledEvent(n,W[n],e));break;case"source":t._wrapperState.listeners=[T.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[T.trapBubbledEvent("topError","error",e),T.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[T.trapBubbledEvent("topReset","reset",e),T.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[T.trapBubbledEvent("topInvalid","invalid",e)]}}function h(){M.postUpdateWrapper(this)}function d(t){Q.call(X,t)||(Y.test(t)||v("65",t),X[t]=!0)}function p(t,e){return t.indexOf("-")>=0||null!=e.is}function f(t){var e=t.type;d(e),this._currentElement=t,this._tag=e.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 v=n(2),g=n(3),m=n(191),y=n(193),_=n(24),b=n(62),C=n(25),x=n(98),S=n(33),w=n(63),T=n(39),P=n(99),E=n(4),K=n(209),k=n(210),M=n(100),A=n(213),R=(n(7),n(106)),D=n(226),O=(n(6),n(42)),F=(n(0),n(74),n(60),n(76),n(1),P),I=S.deleteListener,N=E.getNodeFromInstance,L=T.listenTo,U=w.registrationNameModules,G={string:!0,number:!0},j="__html",B={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},H=11,W={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"},V={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},z={listing:!0,pre:!0,textarea:!0},q=g({menuitem:!0},V),Y=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,X={},Q={}.hasOwnProperty,$=1;f.displayName="ReactDOMComponent",f.Mixin={mountComponent:function(t,e,n,r){this._rootNodeID=$++,this._domID=n._idCounter++,this._hostParent=e,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},t.getReactMountReady().enqueue(l,this);break;case"input":K.mountWrapper(this,i,e),i=K.getHostProps(this,i),t.getReactMountReady().enqueue(l,this);break;case"option":k.mountWrapper(this,i,e),i=k.getHostProps(this,i);break;case"select":M.mountWrapper(this,i,e),i=M.getHostProps(this,i),t.getReactMountReady().enqueue(l,this);break;case"textarea":A.mountWrapper(this,i,e),i=A.getHostProps(this,i),t.getReactMountReady().enqueue(l,this)}o(this,i);var a,h;null!=e?(a=e._namespaceURI,h=e._tag):n._tag&&(a=n._namespaceURI,h=n._tag),(null==a||a===b.svg&&"foreignobject"===h)&&(a=b.html),a===b.html&&("svg"===this._tag?a=b.svg:"math"===this._tag&&(a=b.mathml)),this._namespaceURI=a;var d;if(t.useCreateElement){var p,f=n._ownerDocument;if(a===b.html)if("script"===this._tag){var v=f.createElement("div"),g=this._currentElement.type;v.innerHTML="<"+g+"></"+g+">",p=v.removeChild(v.firstChild)}else p=i.is?f.createElement(this._currentElement.type,i.is):f.createElement(this._currentElement.type);else p=f.createElementNS(a,this._currentElement.type);E.precacheNode(this,p),this._flags|=F.hasCachedChildNodes,this._hostParent||x.setAttributeForRoot(p),this._updateDOMProperties(null,i,t);var y=_(p);this._createInitialChildren(t,i,r,y),d=y}else{var C=this._createOpenTagMarkupAndPutListeners(t,i),S=this._createContentMarkup(t,i,r);d=!S&&V[this._tag]?C+"/>":C+">"+S+"</"+this._currentElement.type+">"}switch(this._tag){case"input":t.getReactMountReady().enqueue(s,this),i.autoFocus&&t.getReactMountReady().enqueue(m.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(c,this),i.autoFocus&&t.getReactMountReady().enqueue(m.focusDOMComponent,this);break;case"select":i.autoFocus&&t.getReactMountReady().enqueue(m.focusDOMComponent,this);break;case"button":i.autoFocus&&t.getReactMountReady().enqueue(m.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(u,this)}return d},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];if(null!=o)if(U.hasOwnProperty(r))o&&i(this,r,o,t);else{"style"===r&&(o&&(o=this._previousStyleCopy=g({},e.style)),o=y.createMarkupForStyles(o,this));var a=null;null!=this._tag&&p(this._tag,e)?B.hasOwnProperty(r)||(a=x.createMarkupForCustomAttribute(r,o)):a=x.createMarkupForProperty(r,o),a&&(n+=" "+a)}}return t.renderToStaticMarkup?n:(this._hostParent||(n+=" "+x.createMarkupForRoot()),n+=" "+x.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,n){var r="",o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=G[typeof e.children]?e.children:null,a=null!=i?null:e.children;if(null!=i)r=O(i);else if(null!=a){var s=this.mountChildren(a,t,n);r=s.join("")}}return z[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(t,e,n,r){var o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&_.queueHTML(r,o.__html);else{var i=G[typeof e.children]?e.children:null,a=null!=i?null:e.children;if(null!=i)""!==i&&_.queueText(r,i);else if(null!=a)for(var s=this.mountChildren(a,t,n),c=0;c<s.length;c++)_.queueChild(r,s[c])}},receiveComponent:function(t,e,n){var r=this._currentElement;this._currentElement=t,this.updateComponent(e,r,t,n)},updateComponent:function(t,e,n,r){var i=e.props,a=this._currentElement.props;switch(this._tag){case"input":i=K.getHostProps(this,i),a=K.getHostProps(this,a);break;case"option":i=k.getHostProps(this,i),a=k.getHostProps(this,a);break;case"select":i=M.getHostProps(this,i),a=M.getHostProps(this,a);break;case"textarea":i=A.getHostProps(this,i),a=A.getHostProps(this,a)}switch(o(this,a),this._updateDOMProperties(i,a,t),this._updateDOMChildren(i,a,t,r),this._tag){case"input":K.updateWrapper(this);break;case"textarea":A.updateWrapper(this);break;case"select":t.getReactMountReady().enqueue(h,this)}},_updateDOMProperties:function(t,e,n){var r,o,a;for(r in t)if(!e.hasOwnProperty(r)&&t.hasOwnProperty(r)&&null!=t[r])if("style"===r){var s=this._previousStyleCopy;for(o in s)s.hasOwnProperty(o)&&(a=a||{},a[o]="");this._previousStyleCopy=null}else U.hasOwnProperty(r)?t[r]&&I(this,r):p(this._tag,t)?B.hasOwnProperty(r)||x.deleteValueForAttribute(N(this),r):(C.properties[r]||C.isCustomAttribute(r))&&x.deleteValueForProperty(N(this),r);for(r in e){var c=e[r],u="style"===r?this._previousStyleCopy:null!=t?t[r]:void 0;if(e.hasOwnProperty(r)&&c!==u&&(null!=c||null!=u))if("style"===r)if(c?c=this._previousStyleCopy=g({},c):this._previousStyleCopy=null,u){for(o in u)!u.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(a=a||{},a[o]="");for(o in c)c.hasOwnProperty(o)&&u[o]!==c[o]&&(a=a||{},a[o]=c[o])}else a=c;else if(U.hasOwnProperty(r))c?i(this,r,c,n):u&&I(this,r);else if(p(this._tag,e))B.hasOwnProperty(r)||x.setValueForAttribute(N(this),r,c);else if(C.properties[r]||C.isCustomAttribute(r)){var l=N(this);null!=c?x.setValueForProperty(l,r,c):x.deleteValueForProperty(l,r)}}a&&y.setValueForStyles(N(this),a,this)},_updateDOMChildren:function(t,e,n,r){var o=G[typeof t.children]?t.children:null,i=G[typeof e.children]?e.children:null,a=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,s=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,c=null!=o?null:t.children,u=null!=i?null:e.children,l=null!=o||null!=a,h=null!=i||null!=s;null!=c&&null==u?this.updateChildren(null,n,r):l&&!h&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=s?a!==s&&this.updateMarkup(""+s):null!=u&&this.updateChildren(u,n,r)},getHostNode:function(){return N(this)},unmountComponent:function(t){switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":var e=this._wrapperState.listeners;if(e)for(var n=0;n<e.length;n++)e[n].remove();break;case"html":case"head":case"body":v("66",this._tag)}this.unmountChildren(t),E.uncacheNode(this),S.deleteAllListeners(this),this._rootNodeID=0,this._domID=0,this._wrapperState=null},getPublicInstance:function(){return N(this)}},g(f.prototype,f.Mixin,R.Mixin),t.exports=f},function(t,e,n){"use strict";function r(t,e){var n={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===o?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return n}var o=(n(76),9);t.exports=r},function(t,e,n){"use strict";var r=n(3),o=n(24),i=n(4),a=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};r(a.prototype,{mountComponent:function(t,e,n,r){var a=n._idCounter++;this._domID=a,this._hostParent=e,this._hostContainerInfo=n;var s=" react-empty: "+this._domID+" ";if(t.useCreateElement){var c=n._ownerDocument,u=c.createComment(s);return i.precacheNode(this,u),o(u)}return t.renderToStaticMarkup?"":"<!--"+s+"-->"},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),t.exports=a},function(t,e,n){"use strict";var r={useCreateElement:!0,useFiber:!1};t.exports=r},function(t,e,n){"use strict";var r=n(61),o=n(4),i={dangerouslyProcessChildrenUpdates:function(t,e){var n=o.getNodeFromInstance(t);r.processUpdates(n,e)}};t.exports=i},function(t,e,n){"use strict";function r(){this._rootNodeID&&h.updateWrapper(this)}function o(t){var e=this._currentElement.props,n=c.executeOnChange(e,t);l.asap(r,this);var o=e.name;if("radio"===e.type&&null!=o){for(var a=u.getNodeFromInstance(this),s=a;s.parentNode;)s=s.parentNode;for(var h=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),d=0;d<h.length;d++){var p=h[d];if(p!==a&&p.form===a.form){var f=u.getInstanceFromNode(p);f||i("90"),l.asap(r,f)}}}return n}var i=n(2),a=n(3),s=n(98),c=n(66),u=n(4),l=n(8),h=(n(0),n(1),{getHostProps:function(t,e){var n=c.getValue(e),r=c.getChecked(e);return a({type:void 0,step:void 0,min:void 0,max:void 0},e,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:t._wrapperState.initialValue,checked:null!=r?r:t._wrapperState.initialChecked,onChange:t._wrapperState.onChange})},mountWrapper:function(t,e){var n=e.defaultValue;t._wrapperState={initialChecked:null!=e.checked?e.checked:e.defaultChecked,initialValue:null!=e.value?e.value:n,listeners:null,onChange:o.bind(t)}},updateWrapper:function(t){var e=t._currentElement.props,n=e.checked;null!=n&&s.setValueForProperty(u.getNodeFromInstance(t),"checked",n||!1);var r=u.getNodeFromInstance(t),o=c.getValue(e);if(null!=o){var i=""+o;i!==r.value&&(r.value=i)}else null==e.value&&null!=e.defaultValue&&r.defaultValue!==""+e.defaultValue&&(r.defaultValue=""+e.defaultValue),null==e.checked&&null!=e.defaultChecked&&(r.defaultChecked=!!e.defaultChecked)},postMountWrapper:function(t){var e=t._currentElement.props,n=u.getNodeFromInstance(t);switch(e.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":n.value="",n.value=n.defaultValue;break;default:n.value=n.value}var r=n.name;""!==r&&(n.name=""),n.defaultChecked=!n.defaultChecked,n.defaultChecked=!n.defaultChecked,""!==r&&(n.name=r)}});t.exports=h},function(t,e,n){"use strict";function r(t){var e="";return i.Children.forEach(t,function(t){null!=t&&("string"==typeof t||"number"==typeof t?e+=t:c||(c=!0))}),e}var o=n(3),i=n(19),a=n(4),s=n(100),c=(n(1),!1),u={mountWrapper:function(t,e,n){var o=null;if(null!=n){var i=n;"optgroup"===i._tag&&(i=i._hostParent),null!=i&&"select"===i._tag&&(o=s.getSelectValueContext(i))}var a=null;if(null!=o){var c;if(c=null!=e.value?e.value+"":r(e.children),a=!1,Array.isArray(o)){for(var u=0;u<o.length;u++)if(""+o[u]===c){a=!0;break}}else a=""+o===c}t._wrapperState={selected:a}},postMountWrapper:function(t){var e=t._currentElement.props;if(null!=e.value){a.getNodeFromInstance(t).setAttribute("value",e.value)}},getHostProps:function(t,e){var n=o({selected:void 0,children:void 0},e);null!=t._wrapperState.selected&&(n.selected=t._wrapperState.selected);var i=r(e.children);return i&&(n.children=i),n}};t.exports=u},function(t,e,n){"use strict";function r(t,e,n,r){return t===n&&e===r}function o(t){var e=document.selection,n=e.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(t),o.setEndPoint("EndToStart",n);var i=o.text.length;return{start:i,end:i+r}}function i(t){var e=window.getSelection&&window.getSelection();if(!e||0===e.rangeCount)return null;var n=e.anchorNode,o=e.anchorOffset,i=e.focusNode,a=e.focusOffset,s=e.getRangeAt(0);try{s.startContainer.nodeType,s.endContainer.nodeType}catch(t){return null}var c=r(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset),u=c?0:s.toString().length,l=s.cloneRange();l.selectNodeContents(t),l.setEnd(s.startContainer,s.startOffset);var h=r(l.startContainer,l.startOffset,l.endContainer,l.endOffset),d=h?0:l.toString().length,p=d+u,f=document.createRange();f.setStart(n,o),f.setEnd(i,a);var v=f.collapsed;return{start:v?p:d,end:v?d:p}}function a(t,e){var n,r,o=document.selection.createRange().duplicate();void 0===e.end?(n=e.start,r=n):e.start>e.end?(n=e.end,r=e.start):(n=e.start,r=e.end),o.moveToElementText(t),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function s(t,e){if(window.getSelection){var n=window.getSelection(),r=t[l()].length,o=Math.min(e.start,r),i=void 0===e.end?o:Math.min(e.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=u(t,o),c=u(t,i);if(s&&c){var h=document.createRange();h.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(h),n.extend(c.node,c.offset)):(h.setEnd(c.node,c.offset),n.addRange(h))}}}var c=n(5),u=n(249),l=n(112),h=c.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:h?o:i,setOffsets:h?a:s};t.exports=d},function(t,e,n){"use strict";var r=n(2),o=n(3),i=n(61),a=n(24),s=n(4),c=n(42),u=(n(0),n(76),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(u.prototype,{mountComponent:function(t,e,n,r){var o=n._idCounter++,i=" react-text: "+o+" ";if(this._domID=o,this._hostParent=e,t.useCreateElement){var u=n._ownerDocument,l=u.createComment(i),h=u.createComment(" /react-text "),d=a(u.createDocumentFragment());return a.queueChild(d,a(l)),this._stringText&&a.queueChild(d,a(u.createTextNode(this._stringText))),a.queueChild(d,a(h)),s.precacheNode(this,l),this._closingComment=h,d}var p=c(this._stringText);return t.renderToStaticMarkup?p:"<!--"+i+"-->"+p+"<!-- /react-text -->"},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();i.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=s.getNodeFromInstance(this),n=e.nextSibling;;){if(null==n&&r("67",this._domID),8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),t.exports=u},function(t,e,n){"use strict";function r(){this._rootNodeID&&l.updateWrapper(this)}function o(t){var e=this._currentElement.props,n=s.executeOnChange(e,t);return u.asap(r,this),n}var i=n(2),a=n(3),s=n(66),c=n(4),u=n(8),l=(n(0),n(1),{getHostProps:function(t,e){return null!=e.dangerouslySetInnerHTML&&i("91"),a({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue,onChange:t._wrapperState.onChange})},mountWrapper:function(t,e){var n=s.getValue(e),r=n;if(null==n){var a=e.defaultValue,c=e.children;null!=c&&(null!=a&&i("92"),Array.isArray(c)&&(c.length<=1||i("93"),c=c[0]),a=""+c),null==a&&(a=""),r=a}t._wrapperState={initialValue:""+r,listeners:null,onChange:o.bind(t)}},updateWrapper:function(t){var e=t._currentElement.props,n=c.getNodeFromInstance(t),r=s.getValue(e);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==e.defaultValue&&(n.defaultValue=o)}null!=e.defaultValue&&(n.defaultValue=e.defaultValue)},postMountWrapper:function(t){var e=c.getNodeFromInstance(t),n=e.textContent;n===t._wrapperState.initialValue&&(e.value=n)}});t.exports=l},function(t,e,n){"use strict";function r(t,e){"_hostNode"in t||c("33"),"_hostNode"in e||c("33");for(var n=0,r=t;r;r=r._hostParent)n++;for(var o=0,i=e;i;i=i._hostParent)o++;for(;n-o>0;)t=t._hostParent,n--;for(;o-n>0;)e=e._hostParent,o--;for(var a=n;a--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function o(t,e){"_hostNode"in t||c("35"),"_hostNode"in e||c("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function i(t){return"_hostNode"in t||c("36"),t._hostParent}function a(t,e,n){for(var r=[];t;)r.push(t),t=t._hostParent;var o;for(o=r.length;o-- >0;)e(r[o],"captured",n);for(o=0;o<r.length;o++)e(r[o],"bubbled",n)}function s(t,e,n,o,i){for(var a=t&&e?r(t,e):null,s=[];t&&t!==a;)s.push(t),t=t._hostParent;for(var c=[];e&&e!==a;)c.push(e),e=e._hostParent;var u;for(u=0;u<s.length;u++)n(s[u],"bubbled",o);for(u=c.length;u-- >0;)n(c[u],"captured",i)}var c=n(2);n(0);t.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:s}},function(t,e,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(3),i=n(8),a=n(41),s=n(6),c={initialize:s,close:function(){d.isBatchingUpdates=!1}},u={initialize:s,close:i.flushBatchedUpdates.bind(i)},l=[u,c];o(r.prototype,a,{getTransactionWrappers:function(){return l}});var h=new r,d={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,r,o,i){var a=d.isBatchingUpdates;return d.isBatchingUpdates=!0,a?t(e,n,r,o,i):h.perform(t,null,e,n,r,o,i)}};t.exports=d},function(t,e,n){"use strict";function r(){S||(S=!0,y.EventEmitter.injectReactEventListener(m),y.EventPluginHub.injectEventPluginOrder(s),y.EventPluginUtils.injectComponentTree(d),y.EventPluginUtils.injectTreeTraversal(f),y.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:x,EnterLeaveEventPlugin:c,ChangeEventPlugin:a,SelectEventPlugin:C,BeforeInputEventPlugin:i}),y.HostComponent.injectGenericComponentClass(h),y.HostComponent.injectTextComponentClass(v),y.DOMProperty.injectDOMPropertyConfig(o),y.DOMProperty.injectDOMPropertyConfig(u),y.DOMProperty.injectDOMPropertyConfig(b),y.EmptyComponent.injectEmptyComponentFactory(function(t){return new p(t)}),y.Updates.injectReconcileTransaction(_),y.Updates.injectBatchingStrategy(g),y.Component.injectEnvironment(l))}var o=n(190),i=n(192),a=n(194),s=n(196),c=n(197),u=n(199),l=n(201),h=n(204),d=n(4),p=n(206),f=n(214),v=n(212),g=n(215),m=n(219),y=n(220),_=n(224),b=n(229),C=n(230),x=n(231),S=!1;t.exports={inject:r}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=r},function(t,e,n){"use strict";function r(t){o.enqueueEvents(t),o.processEventQueue(!1)}var o=n(33),i={handleTopLevel:function(t,e,n,i){r(o.extractEvents(t,e,n,i))}};t.exports=i},function(t,e,n){"use strict";function r(t){for(;t._hostParent;)t=t._hostParent;var e=h.getNodeFromInstance(t),n=e.parentNode;return h.getClosestInstanceFromNode(n)}function o(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function i(t){var e=p(t.nativeEvent),n=h.getClosestInstanceFromNode(e),o=n;do{t.ancestors.push(o),o=o&&r(o)}while(o);for(var i=0;i<t.ancestors.length;i++)n=t.ancestors[i],v._handleTopLevel(t.topLevelType,n,t.nativeEvent,p(t.nativeEvent))}function a(t){t(f(window))}var s=n(3),c=n(92),u=n(5),l=n(18),h=n(4),d=n(8),p=n(73),f=n(182);s(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),l.addPoolingTo(o,l.twoArgumentPooler);var v={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:u.canUseDOM?window:null,setHandleTopLevel:function(t){v._handleTopLevel=t},setEnabled:function(t){v._enabled=!!t},isEnabled:function(){return v._enabled},trapBubbledEvent:function(t,e,n){return n?c.listen(n,e,v.dispatchEvent.bind(null,t)):null},trapCapturedEvent:function(t,e,n){return n?c.capture(n,e,v.dispatchEvent.bind(null,t)):null},monitorScrollValue:function(t){var e=a.bind(null,t);c.listen(window,"scroll",e)},dispatchEvent:function(t,e){if(v._enabled){var n=o.getPooled(t,e);try{d.batchedUpdates(i,n)}finally{o.release(n)}}}};t.exports=v},function(t,e,n){"use strict";var r=n(25),o=n(33),i=n(64),a=n(67),s=n(101),c=n(39),u=n(103),l=n(8),h={Component:a.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:o.injection,EventPluginUtils:i.injection,EventEmitter:c.injection,HostComponent:u.injection,Updates:l.injection};t.exports=h},function(t,e,n){"use strict";var r=n(242),o=/^<\!\-\-/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=r(t);return o.test(t)?t:t.replace(/\/?>/," "+i.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(i.CHECKSUM_ATTR_NAME);return n=n&&parseInt(n,10),r(t)===n}};t.exports=i},function(t,e,n){"use strict";function r(t){return!(!t||"function"!=typeof t.attachRef||"function"!=typeof t.detachRef)}var o=n(2),i=(n(0),{addComponentAsRefTo:function(t,e,n){r(n)||o("119"),n.attachRef(e,t)},removeComponentAsRefFrom:function(t,e,n){r(n)||o("120");var i=n.getPublicInstance();i&&i.refs[e]===t.getPublicInstance()&&n.detachRef(e)}});t.exports=i},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";function r(t){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.useCreateElement=t}var o=n(3),i=n(97),a=n(18),s=n(39),c=n(104),u=(n(7),n(41)),l=n(69),h={initialize:c.getSelectionInformation,close:c.restoreSelection},d={initialize:function(){var t=s.isEnabled();return s.setEnabled(!1),t},close:function(t){s.setEnabled(t)}},p={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},f=[h,d,p],v={getTransactionWrappers:function(){return f},getReactMountReady:function(){return this.reactMountReady},getUpdateQueue:function(){return l},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(t){this.reactMountReady.rollback(t)},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};o(r.prototype,u,v),a.addPoolingTo(r),t.exports=r},function(t,e,n){"use strict";function r(t,e,n){"function"==typeof t?t(e.getPublicInstance()):i.addComponentAsRefTo(e,t,n)}function o(t,e,n){"function"==typeof t?t(null):i.removeComponentAsRefFrom(e,t,n)}var i=n(222),a={};a.attachRefs=function(t,e){if(null!==e&&"object"==typeof e){var n=e.ref;null!=n&&r(n,t,e._owner)}},a.shouldUpdateRefs=function(t,e){var n=null,r=null;null!==t&&"object"==typeof t&&(n=t.ref,r=t._owner);var o=null,i=null;return null!==e&&"object"==typeof e&&(o=e.ref,i=e._owner),n!==o||"string"==typeof o&&i!==r},a.detachRefs=function(t,e){if(null!==e&&"object"==typeof e){var n=e.ref;null!=n&&o(n,t,e._owner)}},t.exports=a},function(t,e,n){"use strict";function r(t){this.reinitializeTransaction(),this.renderToStaticMarkup=t,this.useCreateElement=!1,this.updateQueue=new s(this)}var o=n(3),i=n(18),a=n(41),s=(n(7),n(227)),c=[],u={enqueue:function(){}},l={getTransactionWrappers:function(){return c},getReactMountReady:function(){return u},getUpdateQueue:function(){return this.updateQueue},destructor:function(){},checkpoint:function(){},rollback:function(){}};o(r.prototype,a,l),i.addPoolingTo(r),t.exports=r},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n(69),i=(n(1),function(){function t(e){r(this,t),this.transaction=e}return t.prototype.isMounted=function(t){return!1},t.prototype.enqueueCallback=function(t,e,n){this.transaction.isInTransaction()&&o.enqueueCallback(t,e,n)},t.prototype.enqueueForceUpdate=function(t){this.transaction.isInTransaction()&&o.enqueueForceUpdate(t)},t.prototype.enqueueReplaceState=function(t,e){this.transaction.isInTransaction()&&o.enqueueReplaceState(t,e)},t.prototype.enqueueSetState=function(t,e){this.transaction.isInTransaction()&&o.enqueueSetState(t,e)},t}());t.exports=i},function(t,e,n){"use strict";t.exports="15.4.2"},function(t,e,n){"use strict";var r={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},o={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},i={Properties:{},DOMAttributeNamespaces:{xlinkActuate:r.xlink,xlinkArcrole:r.xlink,xlinkHref:r.xlink,xlinkRole:r.xlink,xlinkShow:r.xlink,xlinkTitle:r.xlink,xlinkType:r.xlink,xmlBase:r.xml,xmlLang:r.xml,xmlSpace:r.xml},DOMAttributeNames:{}};Object.keys(o).forEach(function(t){i.Properties[t]=0,o[t]&&(i.DOMAttributeNames[t]=o[t])}),t.exports=i},function(t,e,n){"use strict";function r(t){if("selectionStart"in t&&c.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(t,e){if(y||null==v||v!==l())return null;var n=r(v);if(!m||!d(m,n)){m=n;var o=u.getPooled(f.select,g,t,e);return o.type="select",o.target=v,i.accumulateTwoPhaseDispatches(o),o}return null}var i=n(34),a=n(5),s=n(4),c=n(104),u=n(10),l=n(94),h=n(114),d=n(60),p=a.canUseDOM&&"documentMode"in document&&document.documentMode<=11,f={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},v=null,g=null,m=null,y=!1,_=!1,b={eventTypes:f,extractEvents:function(t,e,n,r){if(!_)return null;var i=e?s.getNodeFromInstance(e):window;switch(t){case"topFocus":(h(i)||"true"===i.contentEditable)&&(v=i,g=e,m=null);break;case"topBlur":v=null,g=null,m=null;break;case"topMouseDown":y=!0;break;case"topContextMenu":case"topMouseUp":return y=!1,o(n,r);case"topSelectionChange":if(p)break;case"topKeyDown":case"topKeyUp":return o(n,r)}return null},didPutListener:function(t,e,n){"onSelect"===e&&(_=!0)}};t.exports=b},function(t,e,n){"use strict";function r(t){return"."+t._rootNodeID}function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var i=n(2),a=n(92),s=n(34),c=n(4),u=n(232),l=n(233),h=n(10),d=n(236),p=n(238),f=n(40),v=n(235),g=n(239),m=n(240),y=n(35),_=n(241),b=n(6),C=n(71),x=(n(0),{}),S={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),n="on"+e,r="top"+e,o={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[r]};x[t]=o,S[r]=o});var w={},T={eventTypes:x,extractEvents:function(t,e,n,r){var o=S[t];if(!o)return null;var a;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":a=h;break;case"topKeyPress":if(0===C(n))return null;case"topKeyDown":case"topKeyUp":a=p;break;case"topBlur":case"topFocus":a=d;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":a=f;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":a=v;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":a=g;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":a=u;break;case"topTransitionEnd":a=m;break;case"topScroll":a=y;break;case"topWheel":a=_;break;case"topCopy":case"topCut":case"topPaste":a=l}a||i("86",t);var c=a.getPooled(o,e,n,r);return s.accumulateTwoPhaseDispatches(c),c},didPutListener:function(t,e,n){if("onClick"===e&&!o(t._tag)){var i=r(t),s=c.getNodeFromInstance(t);w[i]||(w[i]=a.listen(s,"click",b))}},willDeleteListener:function(t,e){if("onClick"===e&&!o(t._tag)){var n=r(t);w[n].remove(),delete w[n]}}};t.exports=T},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(10),i={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(10),i={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(10),i={data:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(40),i={dataTransfer:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(35),i={relatedTarget:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(10),i={data:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(35),i=n(71),a=n(246),s=n(72),c={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(t){return"keypress"===t.type?i(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?i(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};o.augmentClass(r,c),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(35),i=n(72),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(10),i={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(40),i={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t){for(var e=1,n=0,r=0,i=t.length,a=i&-4;r<a;){for(var s=Math.min(r+4096,a);r<s;r+=4)n+=(e+=t.charCodeAt(r))+(e+=t.charCodeAt(r+1))+(e+=t.charCodeAt(r+2))+(e+=t.charCodeAt(r+3));e%=o,n%=o}for(;r<i;r++)n+=e+=t.charCodeAt(r);return e%=o,n%=o,e|n<<16}var o=65521;t.exports=r},function(t,e,n){"use strict";function r(t,e,n){if(null==e||"boolean"==typeof e||""===e)return"";if(isNaN(e)||0===e||i.hasOwnProperty(t)&&i[t])return""+e;if("string"==typeof e){e=e.trim()}return e+"px"}var o=n(96),i=(n(1),o.isUnitlessNumber);t.exports=r},function(t,e,n){"use strict";function r(t){if(null==t)return null;if(1===t.nodeType)return t;var e=a.get(t);if(e)return e=s(e),e?i.getNodeFromInstance(e):null;"function"==typeof t.render?o("44"):o("45",Object.keys(t))}var o=n(2),i=(n(11),n(4)),a=n(26),s=n(111);n(0),n(1);t.exports=r},function(t,e,n){"use strict";(function(e){function r(t,e,n,r){if(t&&"object"==typeof t){var o=t,i=void 0===o[n];i&&null!=e&&(o[n]=e)}}function o(t,e){if(null==t)return t;var n={};return i(t,r,n),n}var i=(n(65),n(116));n(1);void 0!==e&&e.env,t.exports=o}).call(e,n(95))},function(t,e,n){"use strict";function r(t){if(t.key){var e=i[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var n=o(t);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===t.type||"keyup"===t.type?a[t.keyCode]||"Unidentified":""}var o=n(71),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=r},function(t,e,n){"use strict";function r(t){var e=t&&(o&&t[o]||t[i]);if("function"==typeof e)return e}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";t.exports=r},function(t,e,n){"use strict";function r(){return o++}var o=1;t.exports=r},function(t,e,n){"use strict";function r(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function o(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function i(t,e){for(var n=r(t),i=0,a=0;n;){if(3===n.nodeType){if(a=i+n.textContent.length,i<=e&&a>=e)return{node:n,offset:e-i};i=a}n=r(o(n))}}t.exports=i},function(t,e,n){"use strict";function r(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n["ms"+t]="MS"+e,n["O"+t]="o"+e.toLowerCase(),n}function o(t){if(s[t])return s[t];if(!a[t])return t;var e=a[t];for(var n in e)if(e.hasOwnProperty(n)&&n in c)return s[t]=e[n];return""}var i=n(5),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},s={},c={};i.canUseDOM&&(c=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),t.exports=o},function(t,e,n){"use strict";function r(t){return'"'+o(t)+'"'}var o=n(42);t.exports=r},function(t,e,n){"use strict";var r=n(105);t.exports=r.renderSubtreeIntoContainer},function(t,e,n){t.exports=n(256)},function(t,e,n){"use strict";t.exports=n(255)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(79),c=s.Component,u=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return i(e,t),a(e,[{key:"render",value:function(){return this.props.component?s.createElement(this.props.component,this.props.props):s.Children.only(this.props.children)}}]),e}(c);t.exports=u},function(t,e,n){"use strict";var r=n(254);t.exports=function(t){throw this&&this.callback?new Error('React Hot Loader: The Webpack loader is now exported separately. If you use Babel, we recommend that you remove "react-hot-loader" from the "loaders" section of your Webpack configuration altogether, and instead add "react-hot-loader/babel" to the "plugins" section of your .babelrc file. If you prefer not to use Babel, replace "react-hot-loader" or "react-hot" with "react-hot-loader/webpack" in the "loaders" section of your Webpack configuration.'):t&&t.types&&t.types.IfStatement?new Error('React Hot Loader: The Babel plugin is exported separately. Replace "react-hot-loader" with "react-hot-loader/babel" in the "plugins" section of your .babelrc file. While we recommend the above, if you prefer not to use Babel, you may remove "react-hot-loader" from the "plugins" section of your .babelrc file altogether, and instead add "react-hot-loader/webpack" to the "loaders" section of your Webpack configuration.'):new Error('React Hot Loader does not have a default export. If you use the import statement, make sure to include the curly braces: import { AppContainer } from "react-hot-loader". If you use CommonJS, make sure to read the named export: require("react-hot-loader").AppContainer.')},t.exports.AppContainer=r},function(t,e,n){"use strict";t.exports=n(258)},function(t,e,n){"use strict"},function(t,e,n){function r(t){var e=function(t){this.node=null,this.subscriptions=null,this.listeners=null,this._mountImage=null,this._renderedChildren=null,this._mostRecentlyPlacedChild=null,this._initialProps=t.props,this._currentElement=t};e.displayName=t;for(var n=1,r=arguments.length;n<r;n++)u(e.prototype,arguments[n]);return e}var o=n(188),i=n(19),a=n(26),s=n(106),c=n(8),u=n(3),l=n(23),h=o.Container.prototype.add;o.Container.prototype.add=function(t){t.parentNode=this,h.apply(this,arguments)},o.Container.prototype.replaceChild=function(t,e){var n=e.index,r=e.parent;e.destroy(),e.parentNode=null,r.add(t),t.index!==n&&t.setZIndex(n),r.getLayer().batchDraw()};var d=u({},s.Mixin,{moveChild:function(t,e,n,r){var o=t._mountImage.node;if(o.index!==n){o.setZIndex(n);var i=o.getLayer();i&&i.batchDraw()}},createChild:function(t,e,n){t._mountImage=n;var r=n.node;r.moveTo(this.node),r.parentNode=this.node,t._mountIndex!==r.index&&r.setZIndex(t._mountIndex),this._mostRecentlyPlacedChild=r;var o=r.getLayer();o&&o.batchDraw()},removeChild:function(t,e){var n=t._mountImage.node.getLayer();t._mountImage.node.destroy(),t._mountImage.node.parentNode=null,n&&n.batchDraw(),t._mountImage=null},updateChildrenAtRoot:function(t,e){this.updateChildren(t,e,l)},mountAndInjectChildrenAtRoot:function(t,e){this.mountAndInjectChildren(t,e,l)},updateChildren:function(t,e,n){this._mostRecentlyPlacedChild=null,this._updateChildren(t,e,n)},mountAndInjectChildren:function(t,e,n){var r=this.mountChildren(t,e,n),i=0;for(var a in this._renderedChildren)if(this._renderedChildren.hasOwnProperty(a)){var s=this._renderedChildren[a];s._mountImage=r[i];var c=r[i].node;if(!c instanceof o.Node){console.error("Looks like one of child element is not Konva.Node.react-konva do not support in for now.",this);continue}c.parent!==this.node&&c.moveTo(this.node),i++}},mountAndAddChildren:function(){console.log("mountAndAddChildren")}}),p={children:!0,ref:!0,key:!0},f={construct:function(t){this._currentElement=t},receiveComponent:function(t,e,n){var r=t.props,o=this._currentElement.props||this._initialProps;this.applyNodeProps(o,r),this.updateChildren(r.children,e,n),this._currentElement=t},getPublicInstance:function(){return this.node},putEventListener:function(t,e){},handleEvent:function(t){},getNativeNode:function(){return this.node},applyNodeProps:function(t,e){var n={},r=!1;for(var o in t)if(!p[o]){var i="on"===o.slice(0,2),a=t[o]!==e[o];if(i&&a){var s=o.substr(2).toLowerCase();"content"===s.substr(0,7)&&(s="content"+s.substr(7,1).toUpperCase()+s.substr(8)),this.node.off(s,t[o])}var c=!e.hasOwnProperty(o);c&&this.node.setAttr(o,void 0)}for(var o in e)if(!p[o]){var i="on"===o.slice(0,2),u=t[o]!==e[o];if(i&&u){var s=o.substr(2).toLowerCase();"content"===s.substr(0,7)&&(s="content"+s.substr(7,1).toUpperCase()+s.substr(8)),this.node.on(s,e[o])}i||e[o]===t[o]&&e[o]===this.node.getAttr(o)||(r=!0,n[o]=e[o])}if(r){this.node.setAttrs(n);var l=this.node.getLayer()||this.node.getStage();l&&l.batchDraw();var h,d;for(d in n)if((h=n[d])instanceof Image&&!h.complete){var f=this.node;h.addEventListener("load",function(){var t=f.getLayer();t&&t.batchDraw()})}}},unmountComponent:function(){},mountComponentIntoNode:function(t,e){throw new Error("You cannot render an ART component standalone. You need to wrap it in a Stage.")}},v=i.createClass({propTypes:{width:i.PropTypes.oneOfType([i.PropTypes.number,i.PropTypes.string]),height:i.PropTypes.oneOfType([i.PropTypes.number,i.PropTypes.string])},displayName:"Stage",mixins:[d],componentDidMount:function(){this.node=new o.Stage({container:this.domNode,width:this.props.width,height:this.props.height}),this.applyNodeProps(l,this.props),this._debugID=this._reactInternalInstance._debugID;var t=c.ReactReconcileTransaction.getPooled();t.perform(this.mountAndInjectChildren,this,this.props.children,t,a.get(this)._context),c.ReactReconcileTransaction.release(t),this.node.draw()},getStage:function(){return this.node},componentDidUpdate:function(t){this.node;this.applyNodeProps(t,this.props);var e=c.ReactReconcileTransaction.getPooled();e.perform(this.updateChildren,this,this.props.children,e,a.get(this)._context),c.ReactReconcileTransaction.release(e)},componentWillUnmount:function(){this.unmountChildren(),this.node.destroy(),this.node.parentNode=null},applyNodeProps:f.applyNodeProps,render:function(){var t=this.props;return i.createElement("div",{ref:function(t){return this.domNode=t}.bind(this),className:t.className,role:t.role,style:t.style,tabIndex:t.tabIndex,title:t.title})}}),g={mountComponent:function(t,e,n,r){this.node=new o[this.constructor.displayName],e.node.add(this.node);var i=this._initialProps;return this.applyNodeProps(l,i),this.mountAndInjectChildren(i.children,t,r),{children:[],node:this.node,html:null,text:null}},unmountComponent:function(){this.unmountChildren()}},m={construct:function(t){this._currentElement=t,this._oldPath=null},mountComponent:function(t,e,n,r){return this.node=new o[this.constructor.displayName],e&&e.node.add(this.node),this.applyNodeProps(l,this._initialProps),{children:[],node:this.node,html:null,text:null}},receiveComponent:function(t,e,n){var r=t.props,o=this._currentElement.props||this._initialProps;this.applyNodeProps(o,r),this._currentElement=t}},y=r("Group",f,d,g),_=r("Layer",f,d,g),b=r("FastLayer",f,d,g),C=r("Label",f,d,g),x={Stage:v,Group:y,Layer:_,FastLayer:b,Label:C};["Rect","Circle","Ellipse","Wedge","Line","Sprite","Image","Text","TextPath","Star","Ring","Arc","Tag","Path","RegularPolygon","Arrow","Shape"].forEach(function(t){x[t]=r(t,f,m)}),t.exports=x},function(t,e,n){"use strict";function r(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}function o(t){var e={"=0":"=","=2":":"};return(""+("."===t[0]&&"$"===t[1]?t.substring(2):t.substring(1))).replace(/(=0|=2)/g,function(t){return e[t]})}var i={escape:r,unescape:o};t.exports=i},function(t,e,n){"use strict";var r=n(29),o=(n(0),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),i=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n),o}return new r(t,e,n)},s=function(t,e,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n,r),i}return new o(t,e,n,r)},c=function(t){var e=this;t instanceof e||r("25"),t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},u=o,l=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||u,n.poolSize||(n.poolSize=10),n.release=c,n},h={addPoolingTo:l,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:s};t.exports=h},function(t,e,n){"use strict";function r(t){return(""+t).replace(b,"$&/")}function o(t,e){this.func=t,this.context=e,this.count=0}function i(t,e,n){var r=t.func,o=t.context;r.call(o,e,t.count++)}function a(t,e,n){if(null==t)return t;var r=o.getPooled(e,n);m(t,i,r),o.release(r)}function s(t,e,n,r){this.result=t,this.keyPrefix=e,this.func=n,this.context=r,this.count=0}function c(t,e,n){var o=t.result,i=t.keyPrefix,a=t.func,s=t.context,c=a.call(s,e,t.count++);Array.isArray(c)?u(c,o,n,g.thatReturnsArgument):null!=c&&(v.isValidElement(c)&&(c=v.cloneAndReplaceKey(c,i+(!c.key||e&&e.key===c.key?"":r(c.key)+"/")+n)),o.push(c))}function u(t,e,n,o,i){var a="";null!=n&&(a=r(n)+"/");var u=s.getPooled(e,a,o,i);m(t,c,u),s.release(u)}function l(t,e,n){if(null==t)return t;var r=[];return u(t,r,null,e,n),r}function h(t,e,n){return null}function d(t,e){return m(t,h,null)}function p(t){var e=[];return u(t,e,null,g.thatReturnsArgument),e}var f=n(261),v=n(28),g=n(6),m=n(270),y=f.twoArgumentPooler,_=f.fourArgumentPooler,b=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},f.addPoolingTo(o,y),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},f.addPoolingTo(s,_);var C={forEach:a,map:l,mapIntoWithKeyPrefixInternal:u,count:d,toArray:p};t.exports=C},function(t,e,n){"use strict";function r(t){return t}function o(t,e){var n=b.hasOwnProperty(e)?b[e]:null;x.hasOwnProperty(e)&&"OVERRIDE_BASE"!==n&&d("73",e),t&&"DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n&&d("74",e)}function i(t,e){if(e){"function"==typeof e&&d("75"),v.isValidElement(e)&&d("76");var n=t.prototype,r=n.__reactAutoBindPairs;e.hasOwnProperty(y)&&C.mixins(t,e.mixins);for(var i in e)if(e.hasOwnProperty(i)&&i!==y){var a=e[i],s=n.hasOwnProperty(i);if(o(s,i),C.hasOwnProperty(i))C[i](t,a);else{var l=b.hasOwnProperty(i),h="function"==typeof a,p=h&&!l&&!s&&e.autobind!==!1;if(p)r.push(i,a),n[i]=a;else if(s){var f=b[i];(!l||"DEFINE_MANY_MERGED"!==f&&"DEFINE_MANY"!==f)&&d("77",f,i),"DEFINE_MANY_MERGED"===f?n[i]=c(n[i],a):"DEFINE_MANY"===f&&(n[i]=u(n[i],a))}else n[i]=a}}}else;}function a(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var o=n in C;o&&d("78",n);var i=n in t;i&&d("79",n),t[n]=r}}}function s(t,e){t&&e&&"object"==typeof t&&"object"==typeof e||d("80");for(var n in e)e.hasOwnProperty(n)&&(void 0!==t[n]&&d("81",n),t[n]=e[n]);return t}function c(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return s(o,n),s(o,r),o}}function u(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function l(t,e){var n=e.bind(t);return n}function h(t){for(var e=t.__reactAutoBindPairs,n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];t[r]=l(t,o)}}var d=n(29),p=n(3),f=n(77),v=n(28),g=(n(119),n(78)),m=n(23),y=(n(0),n(1),"mixins"),_=[],b={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},C={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)i(t,e[n])},childContextTypes:function(t,e){t.childContextTypes=p({},t.childContextTypes,e)},contextTypes:function(t,e){t.contextTypes=p({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps?t.getDefaultProps=c(t.getDefaultProps,e):t.getDefaultProps=e},propTypes:function(t,e){t.propTypes=p({},t.propTypes,e)},statics:function(t,e){a(t,e)},autobind:function(){}},x={replaceState:function(t,e){this.updater.enqueueReplaceState(this,t),e&&this.updater.enqueueCallback(this,e,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},S=function(){};p(S.prototype,f.prototype,x);var w={createClass:function(t){var e=r(function(t,n,r){this.__reactAutoBindPairs.length&&h(this),this.props=t,this.context=n,this.refs=m,this.updater=r||g,this.state=null;var o=this.getInitialState?this.getInitialState():null;("object"!=typeof o||Array.isArray(o))&&d("82",e.displayName||"ReactCompositeComponent"),this.state=o});e.prototype=new S,e.prototype.constructor=e,e.prototype.__reactAutoBindPairs=[],_.forEach(i.bind(null,e)),i(e,t),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),e.prototype.render||d("83");for(var n in b)e.prototype[n]||(e.prototype[n]=null);return e},injection:{injectMixin:function(t){_.push(t)}}};t.exports=w},function(t,e,n){"use strict";var r=n(28),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};t.exports=i},function(t,e,n){"use strict";function r(t,e){return t===e?0!==t||1/t==1/e:t!==t&&e!==e}function o(t){this.message=t,this.stack=""}function i(t){function e(e,n,r,i,a,s,c){i=i||S,s=s||r;if(null==n[r]){var u=_[a];return e?new o(null===n[r]?"The "+u+" `"+s+"` is marked as required in `"+i+"`, but its value is `null`.":"The "+u+" `"+s+"` is marked as required in `"+i+"`, but its value is `undefined`."):null}return t(n,r,i,a,s)}var n=e.bind(null,!1);return n.isRequired=e.bind(null,!0),n}function a(t){function e(e,n,r,i,a,s){var c=e[n];if(v(c)!==t)return new o("Invalid "+_[i]+" `"+a+"` of type `"+g(c)+"` supplied to `"+r+"`, expected `"+t+"`.");return null}return i(e)}function s(t){function e(e,n,r,i,a){if("function"!=typeof t)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=e[n];if(!Array.isArray(s)){return new o("Invalid "+_[i]+" `"+a+"` of type `"+v(s)+"` supplied to `"+r+"`, expected an array.")}for(var c=0;c<s.length;c++){var u=t(s,c,r,i,a+"["+c+"]",b);if(u instanceof Error)return u}return null}return i(e)}function c(t){function e(e,n,r,i,a){if(!(e[n]instanceof t)){var s=_[i],c=t.name||S;return new o("Invalid "+s+" `"+a+"` of type `"+m(e[n])+"` supplied to `"+r+"`, expected instance of `"+c+"`.")}return null}return i(e)}function u(t){function e(e,n,i,a,s){for(var c=e[n],u=0;u<t.length;u++)if(r(c,t[u]))return null;return new o("Invalid "+_[a]+" `"+s+"` of value `"+c+"` supplied to `"+i+"`, expected one of "+JSON.stringify(t)+".")}return Array.isArray(t)?i(e):C.thatReturnsNull}function l(t){function e(e,n,r,i,a){if("function"!=typeof t)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=e[n],c=v(s);if("object"!==c){return new o("Invalid "+_[i]+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected an object.")}for(var u in s)if(s.hasOwnProperty(u)){var l=t(s,u,r,i,a+"."+u,b);if(l instanceof Error)return l}return null}return i(e)}function h(t){function e(e,n,r,i,a){for(var s=0;s<t.length;s++){if(null==(0,t[s])(e,n,r,i,a,b))return null}return new o("Invalid "+_[i]+" `"+a+"` supplied to `"+r+"`.")}return Array.isArray(t)?i(e):C.thatReturnsNull}function d(t){function e(e,n,r,i,a){var s=e[n],c=v(s);if("object"!==c){return new o("Invalid "+_[i]+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.")}for(var u in t){var l=t[u];if(l){var h=l(s,u,r,i,a+"."+u,b);if(h)return h}}return null}return i(e)}function p(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(p);if(null===t||y.isValidElement(t))return!0;var e=x(t);if(!e)return!1;var n,r=e.call(t);if(e!==t.entries){for(;!(n=r.next()).done;)if(!p(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!p(o[1]))return!1}return!0;default:return!1}}function f(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}function v(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":f(e,t)?"symbol":e}function g(t){var e=v(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function m(t){return t.constructor&&t.constructor.name?t.constructor.name:S}var y=n(28),_=n(119),b=n(266),C=n(6),x=n(121),S=(n(1),"<<anonymous>>"),w={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:function(){return i(C.thatReturns(null))}(),arrayOf:s,element:function(){function t(t,e,n,r,i){var a=t[e];if(!y.isValidElement(a)){return new o("Invalid "+_[r]+" `"+i+"` of type `"+v(a)+"` supplied to `"+n+"`, expected a single ReactElement.")}return null}return i(t)}(),instanceOf:c,node:function(){function t(t,e,n,r,i){if(!p(t[e])){return new o("Invalid "+_[r]+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}return null}return i(t)}(),objectOf:l,oneOf:u,oneOfType:h,shape:d};o.prototype=Error.prototype,t.exports=w},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";function r(t,e,n){this.props=t,this.context=e,this.refs=c,this.updater=n||s}function o(){}var i=n(3),a=n(77),s=n(78),c=n(23);o.prototype=a.prototype,r.prototype=new o,r.prototype.constructor=r,i(r.prototype,a.prototype),r.prototype.isPureReactComponent=!0,t.exports=r},function(t,e,n){"use strict";t.exports="15.4.2"},function(t,e,n){"use strict";function r(t){return i.isValidElement(t)||o("143"),t}var o=n(29),i=n(28);n(0);t.exports=r},function(t,e,n){"use strict";function r(t,e){return t&&"object"==typeof t&&null!=t.key?u.escape(t.key):e.toString(36)}function o(t,e,n,i){var d=typeof t;if("undefined"!==d&&"boolean"!==d||(t=null),null===t||"string"===d||"number"===d||"object"===d&&t.$$typeof===s)return n(i,t,""===e?l+r(t,0):e),1;var p,f,v=0,g=""===e?l:e+h;if(Array.isArray(t))for(var m=0;m<t.length;m++)p=t[m],f=g+r(p,m),v+=o(p,f,n,i);else{var y=c(t);if(y){var _,b=y.call(t);if(y!==t.entries)for(var C=0;!(_=b.next()).done;)p=_.value,f=g+r(p,C++),v+=o(p,f,n,i);else for(;!(_=b.next()).done;){var x=_.value;x&&(p=x[1],f=g+u.escape(x[0])+h+r(p,0),v+=o(p,f,n,i))}}else if("object"===d){var S="",w=String(t);a("31","[object Object]"===w?"object with keys {"+Object.keys(t).join(", ")+"}":w,S)}}return v}function i(t,e,n){return null==t?0:o(t,"",e,n)}var a=n(29),s=(n(11),n(118)),c=n(121),u=(n(0),n(260)),l=(n(1),"."),h=":";t.exports=i},function(t,e){function n(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=d[r.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(c(r.parts[i],e))}else{for(var a=[],i=0;i<r.parts.length;i++)a.push(c(r.parts[i],e));d[r.id]={id:r.id,refs:1,parts:a}}}}function r(t){for(var e=[],n={},r=0;r<t.length;r++){var o=t[r],i=o[0],a=o[1],s=o[2],c=o[3],u={css:a,media:s,sourceMap:c};n[i]?n[i].parts.push(u):e.push(n[i]={id:i,parts:[u]})}return e}function o(t,e){var n=v(),r=y[y.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),y.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function i(t){t.parentNode.removeChild(t);var e=y.indexOf(t);e>=0&&y.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",o(t,e),e}function s(t){var e=document.createElement("link");return e.rel="stylesheet",o(t,e),e}function c(t,e){var n,r,o;if(e.singleton){var c=m++;n=g||(g=a(e)),r=u.bind(null,n,c,!1),o=u.bind(null,n,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=s(e),r=h.bind(null,n),o=function(){i(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(e),r=l.bind(null,n),o=function(){i(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}function u(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=_(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function l(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function h(t,e){var n=e.css,r=e.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),i=t.href;t.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var d={},p=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}},f=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=p(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,m=0,y=[];t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},void 0===e.singleton&&(e.singleton=f()),void 0===e.insertAt&&(e.insertAt="bottom");var o=r(t);return n(o,e),function(t){for(var i=[],a=0;a<o.length;a++){var s=o[a],c=d[s.id];c.refs--,i.push(c)}if(t){n(r(t),e)}for(var a=0;a<i.length;a++){var c=i[a];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete d[c.id]}}}};var _=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e,n){var r=n(59);"string"==typeof r&&(r=[[t.i,r,""]]);var o=n(271)(r,{});r.locals&&(t.exports=r.locals),r.locals||t.hot.accept(59,function(){var e=n(59);"string"==typeof e&&(e=[[t.i,e,""]]),o(e)}),t.hot.dispose(function(){o()})},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){},function(t,e){},function(t,e,n){n(124),t.exports=n(123)}]);
  //# sourceMappingURL=bundle.js.map