chessboardjsx
Version:
Chessboard.jsx is a chessboard for React. Inspired by chessboard.js
1 lines • 174 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.chessboardjsx=t(require("react")):e.chessboardjsx=t(e.react)}(window,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=50)}([function(t,r){t.exports=e},function(e,t,r){e.exports=r(138)()},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o,i,a,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,i,a,u],l=0;(s=new Error(t.replace(/%s/g,function(){return c[l++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(45);Object.defineProperty(t,"DragDropContext",{enumerable:!0,get:function(){return s(n).default}});var o=r(93);Object.defineProperty(t,"DragDropContextProvider",{enumerable:!0,get:function(){return s(o).default}});var i=r(92);Object.defineProperty(t,"DragLayer",{enumerable:!0,get:function(){return s(i).default}});var a=r(91);Object.defineProperty(t,"DragSource",{enumerable:!0,get:function(){return s(a).default}});var u=r(81);function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"DropTarget",{enumerable:!0,get:function(){return s(u).default}})},function(e,t){var r=Array.isArray;e.exports=r},function(e,t,r){var n=r(44),o=r(131),i=r(43),a=Function.prototype,u=Object.prototype,s=a.toString,c=u.hasOwnProperty,l=s.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=n(e))return!1;var t=o(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==l}},function(e,t,r){var n=r(125),o=r(124),i=r(122);e.exports=function(e,t){return i(o(e,t,n),e+"")}},function(e,t,r){var n=r(26);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addSource=function(e){return{type:n,sourceId:e}},t.addTarget=function(e){return{type:o,targetId:e}},t.removeSource=function(e){return{type:i,sourceId:e}},t.removeTarget=function(e){return{type:a,targetId:e}};var n=t.ADD_SOURCE="dnd-core/ADD_SOURCE",o=t.ADD_TARGET="dnd-core/ADD_TARGET",i=t.REMOVE_SOURCE="dnd-core/REMOVE_SOURCE",a=t.REMOVE_TARGET="dnd-core/REMOVE_TARGET"},function(e,t,r){var n=r(121),o=r(43);e.exports=function(e){return o(e)&&n(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.END_DRAG=t.DROP=t.HOVER=t.PUBLISH_DRAG_SOURCE=t.BEGIN_DRAG=void 0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.beginDrag=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0,clientOffset:null},r=t.publishSource,n=t.clientOffset,u=t.getSourceClientOffset;(0,o.default)((0,i.default)(e),"Expected sourceIds to be an array.");var s=this.getMonitor(),l=this.getRegistry();(0,o.default)(!s.isDragging(),"Cannot call beginDrag while dragging.");for(var f=0;f<e.length;f++)(0,o.default)(l.getSource(e[f]),"Expected sourceIds to be registered.");for(var d=null,p=e.length-1;p>=0;p--)if(s.canDragSource(e[p])){d=e[p];break}if(null!==d){var h=null;n&&((0,o.default)("function"==typeof u,"When clientOffset is provided, getSourceClientOffset must be a function."),h=u(d));var y=l.getSource(d).beginDrag(s,d);(0,o.default)((0,a.default)(y),"Item must be an object."),l.pinSource(d);var g=l.getSourceType(d);return{type:c,itemType:g,item:y,sourceId:d,clientOffset:n,sourceClientOffset:h,isSourcePublic:r}}},t.publishDragSource=function(){if(this.getMonitor().isDragging())return{type:l}},t.hover=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).clientOffset,r=void 0===t?null:t;(0,o.default)((0,i.default)(e),"Expected targetIds to be an array.");var n=e.slice(0),a=this.getMonitor(),s=this.getRegistry();(0,o.default)(a.isDragging(),"Cannot call hover while not dragging."),(0,o.default)(!a.didDrop(),"Cannot call hover after drop.");for(var c=0;c<n.length;c++){var l=n[c];(0,o.default)(n.lastIndexOf(l)===c,"Expected targetIds to be unique in the passed array.");var d=s.getTarget(l);(0,o.default)(d,"Expected targetIds to be registered.")}for(var p=a.getItemType(),h=n.length-1;h>=0;h--){var y=n[h],g=s.getTargetType(y);(0,u.default)(g,p)||n.splice(h,1)}for(var v=0;v<n.length;v++){var b=n[v];s.getTarget(b).hover(a,b)}return{type:f,targetIds:n,clientOffset:r}},t.drop=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this.getMonitor(),i=this.getRegistry();(0,o.default)(r.isDragging(),"Cannot call drop while not dragging."),(0,o.default)(!r.didDrop(),"Cannot call drop twice during one drag operation.");var u=r.getTargetIds().filter(r.canDropOnTarget,r);u.reverse(),u.forEach(function(u,s){var c=i.getTarget(u).drop(r,u);(0,o.default)(void 0===c||(0,a.default)(c),"Drop result must either be an object or undefined."),void 0===c&&(c=0===s?{}:r.getDropResult()),e.store.dispatch({type:d,dropResult:n({},t,c)})})},t.endDrag=function(){var e=this.getMonitor(),t=this.getRegistry();(0,o.default)(e.isDragging(),"Cannot call endDrag while not dragging.");var r=e.getSourceId();return t.getSource(r,!0).endDrag(e,r),t.unpinSource(),{type:p}};var o=s(r(2)),i=s(r(4)),a=s(r(41)),u=s(r(40));function s(e){return e&&e.__esModule?e:{default:e}}var c=t.BEGIN_DRAG="dnd-core/BEGIN_DRAG",l=t.PUBLISH_DRAG_SOURCE="dnd-core/PUBLISH_DRAG_SOURCE",f=t.HOVER="dnd-core/HOVER",d=t.DROP="dnd-core/DROP",p=t.END_DRAG="dnd-core/END_DRAG"},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE="__NATIVE_FILE__",t.URL="__NATIVE_URL__",t.TEXT="__NATIVE_TEXT__"},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){return Boolean(e&&"function"==typeof e.dispose)},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e===t)return!0;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,i=0;i<r.length;i+=1){if(!o.call(t,r[i])||e[r[i]]!==t[r[i]])return!1;if(e[r[i]]!==t[r[i]])return!1}return!0}},function(e,t,r){"use strict";var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i=Object.defineProperty,a=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,s=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,l=c&&c(Object);e.exports=function e(t,r,f){if("string"!=typeof r){if(l){var d=c(r);d&&d!==l&&e(t,d,f)}var p=a(r);u&&(p=p.concat(u(r)));for(var h=0;h<p.length;++h){var y=p[h];if(!(n[y]||o[y]||f&&f[y])){var g=s(r,y);try{i(t,y,g)}catch(e){}}}return t}return t}},function(e,t,r){var n=r(37);e.exports=function(e,t){return!(null==e||!e.length)&&n(e,t,0)>-1}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},function(e,t){e.exports=function(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}},function(e,t,r){var n=r(37);e.exports=function(e,t){return!(null==e||!e.length)&&n(e,t,0)>-1}},function(e,t,r){var n=r(4);e.exports=function(){if(!arguments.length)return[];var e=arguments[0];return n(e)?e:[e]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(76),o=r(58);t.getEmptyImage=o.default;var i=r(13);t.NativeTypes=i,t.default=function(e){return new n.default(e)}},function(e,t,r){(function(e,r){var n=1,o=2,i=9007199254740991,a="[object Arguments]",u="[object Array]",s="[object AsyncFunction]",c="[object Boolean]",l="[object Date]",f="[object Error]",d="[object Function]",p="[object GeneratorFunction]",h="[object Map]",y="[object Number]",g="[object Null]",v="[object Object]",b="[object Proxy]",m="[object RegExp]",w="[object Set]",O="[object String]",S="[object Symbol]",D="[object Undefined]",k="[object ArrayBuffer]",C="[object DataView]",_=/^\[object .+?Constructor\]$/,E=/^(?:0|[1-9]\d*)$/,T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T[a]=T[u]=T[k]=T[c]=T[C]=T[l]=T[f]=T[d]=T[h]=T[y]=T[v]=T[m]=T[w]=T[O]=T["[object WeakMap]"]=!1;var j="object"==typeof e&&e&&e.Object===Object&&e,P="object"==typeof self&&self&&self.Object===Object&&self,M=j||P||Function("return this")(),x="object"==typeof t&&t&&!t.nodeType&&t,L=x&&"object"==typeof r&&r&&!r.nodeType&&r,I=L&&L.exports===x,R=I&&j.process,q=function(){try{return R&&R.binding&&R.binding("util")}catch(e){}}(),N=q&&q.isTypedArray;function A(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function z(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function B(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var F,H,U,W=Array.prototype,G=Function.prototype,V=Object.prototype,K=M["__core-js_shared__"],Y=G.toString,X=V.hasOwnProperty,$=(F=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||""))?"Symbol(src)_1."+F:"",Q=V.toString,J=RegExp("^"+Y.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=I?M.Buffer:void 0,ee=M.Symbol,te=M.Uint8Array,re=V.propertyIsEnumerable,ne=W.splice,oe=ee?ee.toStringTag:void 0,ie=Object.getOwnPropertySymbols,ae=Z?Z.isBuffer:void 0,ue=(H=Object.keys,U=Object,function(e){return H(U(e))}),se=Le(M,"DataView"),ce=Le(M,"Map"),le=Le(M,"Promise"),fe=Le(M,"Set"),de=Le(M,"WeakMap"),pe=Le(Object,"create"),he=Ne(se),ye=Ne(ce),ge=Ne(le),ve=Ne(fe),be=Ne(de),me=ee?ee.prototype:void 0,we=me?me.valueOf:void 0;function Oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Se(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function De(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ke(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new De;++t<r;)this.add(e[t])}function Ce(e){var t=this.__data__=new Se(e);this.size=t.size}function _e(e,t){for(var r=e.length;r--;)if(Ae(e[r][0],t))return r;return-1}function Ee(e){return null==e?void 0===e?D:g:oe&&oe in Object(e)?function(e){var t=X.call(e,oe),r=e[oe];try{e[oe]=void 0;var n=!0}catch(e){}var o=Q.call(e);return n&&(t?e[oe]=r:delete e[oe]),o}(e):function(e){return Q.call(e)}(e)}function Te(e){return Ge(e)&&Ee(e)==a}function je(e,t,r,i,s){return e===t||(null==e||null==t||!Ge(e)&&!Ge(t)?e!=e&&t!=t:function(e,t,r,i,s,d){var p=Be(e),g=Be(t),b=p?u:Re(e),D=g?u:Re(t),_=(b=b==a?v:b)==v,E=(D=D==a?v:D)==v,T=b==D;if(T&&Fe(e)){if(!Fe(t))return!1;p=!0,_=!1}if(T&&!_)return d||(d=new Ce),p||Ve(e)?Pe(e,t,r,i,s,d):function(e,t,r,i,a,u,s){switch(b){case C:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!u(new te(e),new te(t)));case c:case l:case y:return Ae(+e,+t);case f:return e.name==t.name&&e.message==t.message;case m:case O:return e==t+"";case h:var d=z;case w:var p=i&n;if(d||(d=B),e.size!=t.size&&!p)return!1;var g=s.get(e);if(g)return g==t;i|=o,s.set(e,t);var v=Pe(d(e),d(t),i,a,u,s);return s.delete(e),v;case S:if(we)return we.call(e)==we.call(t)}return!1}(e,t,0,r,i,s,d);if(!(r&n)){var j=_&&X.call(e,"__wrapped__"),P=E&&X.call(t,"__wrapped__");if(j||P){var M=j?e.value():e,x=P?t.value():t;return d||(d=new Ce),s(M,x,r,i,d)}}return!!T&&(d||(d=new Ce),function(e,t,r,o,i,a){var u=r&n,s=Me(e),c=s.length;if(c!=Me(t).length&&!u)return!1;for(var l=c;l--;){var f=s[l];if(!(u?f in t:X.call(t,f)))return!1}var d=a.get(e);if(d&&a.get(t))return d==t;var p=!0;a.set(e,t),a.set(t,e);for(var h=u;++l<c;){var y=e[f=s[l]],g=t[f];if(o)var v=u?o(g,y,f,t,e,a):o(y,g,f,e,t,a);if(!(void 0===v?y===g||i(y,g,r,o,a):v)){p=!1;break}h||(h="constructor"==f)}if(p&&!h){var b=e.constructor,m=t.constructor;b!=m&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m)&&(p=!1)}return a.delete(e),a.delete(t),p}(e,t,r,i,s,d))}(e,t,r,i,je,s))}function Pe(e,t,r,i,a,u){var s=r&n,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;var f=u.get(e);if(f&&u.get(t))return f==t;var d=-1,p=!0,h=r&o?new ke:void 0;for(u.set(e,t),u.set(t,e);++d<c;){var y=e[d],g=t[d];if(i)var v=s?i(g,y,d,t,e,u):i(y,g,d,e,t,u);if(void 0!==v){if(v)continue;p=!1;break}if(h){if(!A(t,function(e,t){if(n=t,!h.has(n)&&(y===e||a(y,e,r,i,u)))return h.push(t);var n})){p=!1;break}}else if(y!==g&&!a(y,g,r,i,u)){p=!1;break}}return u.delete(e),u.delete(t),p}function Me(e){return function(e,t,r){var n=Ke(e);return Be(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,0,Ie)}function xe(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function Le(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!We(e)||$&&$ in e)&&(He(e)?J:_).test(Ne(e))}(r)?r:void 0}Oe.prototype.clear=function(){this.__data__=pe?pe(null):{},this.size=0},Oe.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Oe.prototype.get=function(e){var t=this.__data__;if(pe){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return X.call(t,e)?t[e]:void 0},Oe.prototype.has=function(e){var t=this.__data__;return pe?void 0!==t[e]:X.call(t,e)},Oe.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pe&&void 0===t?"__lodash_hash_undefined__":t,this},Se.prototype.clear=function(){this.__data__=[],this.size=0},Se.prototype.delete=function(e){var t=this.__data__,r=_e(t,e);return!(r<0||(r==t.length-1?t.pop():ne.call(t,r,1),--this.size,0))},Se.prototype.get=function(e){var t=this.__data__,r=_e(t,e);return r<0?void 0:t[r][1]},Se.prototype.has=function(e){return _e(this.__data__,e)>-1},Se.prototype.set=function(e,t){var r=this.__data__,n=_e(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},De.prototype.clear=function(){this.size=0,this.__data__={hash:new Oe,map:new(ce||Se),string:new Oe}},De.prototype.delete=function(e){var t=xe(this,e).delete(e);return this.size-=t?1:0,t},De.prototype.get=function(e){return xe(this,e).get(e)},De.prototype.has=function(e){return xe(this,e).has(e)},De.prototype.set=function(e,t){var r=xe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ke.prototype.add=ke.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ke.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.clear=function(){this.__data__=new Se,this.size=0},Ce.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Ce.prototype.get=function(e){return this.__data__.get(e)},Ce.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Se){var n=r.__data__;if(!ce||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new De(n)}return r.set(e,t),this.size=r.size,this};var Ie=ie?function(e){return null==e?[]:(e=Object(e),function(t,r){for(var n=-1,o=null==t?0:t.length,i=0,a=[];++n<o;){var u=t[n];s=u,re.call(e,s)&&(a[i++]=u)}var s;return a}(ie(e)))}:function(){return[]},Re=Ee;function qe(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||E.test(e))&&e>-1&&e%1==0&&e<t}function Ne(e){if(null!=e){try{return Y.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ae(e,t){return e===t||e!=e&&t!=t}(se&&Re(new se(new ArrayBuffer(1)))!=C||ce&&Re(new ce)!=h||le&&"[object Promise]"!=Re(le.resolve())||fe&&Re(new fe)!=w||de&&"[object WeakMap]"!=Re(new de))&&(Re=function(e){var t=Ee(e),r=t==v?e.constructor:void 0,n=r?Ne(r):"";if(n)switch(n){case he:return C;case ye:return h;case ge:return"[object Promise]";case ve:return w;case be:return"[object WeakMap]"}return t});var ze=Te(function(){return arguments}())?Te:function(e){return Ge(e)&&X.call(e,"callee")&&!re.call(e,"callee")},Be=Array.isArray,Fe=ae||function(){return!1};function He(e){if(!We(e))return!1;var t=Ee(e);return t==d||t==p||t==s||t==b}function Ue(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function We(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ge(e){return null!=e&&"object"==typeof e}var Ve=N?function(e){return function(t){return e(t)}}(N):function(e){return Ge(e)&&Ue(e.length)&&!!T[Ee(e)]};function Ke(e){return null!=(t=e)&&Ue(t.length)&&!He(t)?function(e,t){var r=Be(e),n=!r&&ze(e),o=!r&&!n&&Fe(e),i=!r&&!n&&!o&&Ve(e),a=r||n||o||i,u=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],s=u.length;for(var c in e)!t&&!X.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||qe(c,s))||u.push(c);return u}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||V))return ue(e);var t,r,n=[];for(var o in Object(e))X.call(e,o)&&"constructor"!=o&&n.push(o);return n}(e);var t}r.exports=function(e,t){return je(e,t)}}).call(this,r(12),r(57)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return{_isMBTransition:!0,event:e,check:t}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTransition=t.MouseTransition=t.TouchTransition=t.HTML5DragTransition=void 0;var n=a(r(56)),o=r(54),i=a(r(24));function a(e){return e&&e.__esModule?e:{default:e}}t.HTML5DragTransition=o.HTML5DragTransition,t.TouchTransition=o.TouchTransition,t.MouseTransition=o.MouseTransition,t.createTransition=i.default,t.default=function(e){return e.getMonitor?new n.default(e):function(t){return new n.default(t,e)}}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(73);t.isFirefox=n(function(){return/firefox/i.test(navigator.userAgent)}),t.isSafari=n(function(){return Boolean(window.safari)})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function e(t,r){return"string"==typeof t||"symbol"===(void 0===t?"undefined":n(t))||r&&(0,i.default)(t)&&t.every(function(t){return e(t,!1)})};var o,i=(o=r(4))&&o.__esModule?o:{default:o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return t===e||null!==t&&null!==e&&(0,o.default)(t,e)};var n,o=(n=r(15))&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={};return Object.keys(e).forEach(function(r){var n,a=(n=e[r],function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if((0,o.isValidElement)(e)){var r=e;!function(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors.You can either wrap "+t+" into a <div>, or turn it into a drag source or a drop target itself.")}}(r);var a=t?function(e){return n(e,t)}:n;return(0,i.default)(r,a)}n(e,t)});t[r]=function(){return a}}),t};var n,o=r(0),i=(n=r(82))&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.default=function(e){var t,r,h=e.DecoratedComponent,g=e.createHandler,v=e.createMonitor,b=e.createConnector,m=e.registerHandler,w=e.containerDisplayName,O=e.getType,S=e.collect,D=e.options.arePropsEqual,k=void 0===D?p.default:D,C=h.displayName||h.name||"Component",_=(r=t=function(e){function t(e,r){!function(e,r){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return n.handleChange=n.handleChange.bind(n),n.handleChildRef=n.handleChildRef.bind(n),(0,l.default)("object"===o(n.context.dragDropManager),"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://react-dnd.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",C,C),n.manager=n.context.dragDropManager,n.handlerMonitor=v(n.manager),n.handlerConnector=b(n.manager.getBackend()),n.handler=g(n.handlerMonitor),n.disposable=new c.SerialDisposable,n.receiveProps(e),n.state=n.getCurrentState(),n.dispose(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.Component),i(t,[{key:"getHandlerId",value:function(){return this.handlerId}},{key:"getDecoratedComponentInstance",value:function(){return this.decoratedComponentInstance}},{key:"shouldComponentUpdate",value:function(e,t){return!k(e,this.props)||!(0,d.default)(t,this.state)}}]),i(t,[{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0,this.disposable=new c.SerialDisposable,this.currentType=null,this.receiveProps(this.props),this.handleChange()}},{key:"componentWillReceiveProps",value:function(e){k(e,this.props)||(this.receiveProps(e),this.handleChange())}},{key:"componentWillUnmount",value:function(){this.dispose(),this.isCurrentlyMounted=!1}},{key:"receiveProps",value:function(e){this.handler.receiveProps(e),this.receiveType(O(e))}},{key:"receiveType",value:function(e){if(e!==this.currentType){this.currentType=e;var t=m(e,this.handler,this.manager),r=t.handlerId,n=t.unregister;this.handlerId=r,this.handlerMonitor.receiveHandlerId(r),this.handlerConnector.receiveHandlerId(r);var o=this.manager.getMonitor().subscribeToStateChange(this.handleChange,{handlerIds:[r]});this.disposable.setDisposable(new c.CompositeDisposable(new c.Disposable(o),new c.Disposable(n)))}}},{key:"handleChange",value:function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();(0,d.default)(e,this.state)||this.setState(e)}}},{key:"dispose",value:function(){this.disposable.dispose(),this.handlerConnector.receiveHandlerId(null)}},{key:"handleChildRef",value:function(e){this.decoratedComponentInstance=e,this.handler.receiveComponent(e)}},{key:"getCurrentState",value:function(){return S(this.handlerConnector.hooks,this.handlerMonitor)}},{key:"render",value:function(){return u.default.createElement(h,n({},this.props,this.state,{ref:y(h)?this.handleChildRef:null}))}}]),t}(),t.DecoratedComponent=h,t.displayName=w+"("+C+")",t.contextTypes={dragDropManager:s.default.object.isRequired},r);return(0,f.default)(_,h)};var a=r(0),u=h(a),s=h(r(1)),c=r(90),l=(h(r(5)),h(r(2))),f=h(r(16)),d=h(r(15)),p=h(r(32));function h(e){return e&&e.__esModule?e:{default:e}}var y=function(e){return Boolean(e&&e.prototype&&"function"==typeof e.prototype.render)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(e,t){if(e===t)return!0;if("object"!==(void 0===e?"undefined":n(e))||null===e||"object"!==(void 0===t?"undefined":n(t))||null===t)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(var i=Object.prototype.hasOwnProperty,a=0;a<r.length;a+=1){if(!i.call(t,r[a]))return!1;var u=e[r[a]],s=t[r[a]];if(u!==s||"object"===(void 0===u?"undefined":n(u))||"object"===(void 0===s?"undefined":n(s)))return!1}return!0}},function(e,t,r){var n=r(21),o=r(20),i=r(19),a=r(17),u=r(108),s=r(107);e.exports=function(e,t,r){var c=-1,l=o,f=e.length,d=!0,p=[],h=p;if(r)d=!1,l=i;else if(f>=200){var y=t?null:u(e);if(y)return s(y);d=!1,l=a,h=new n}else h=t?[]:p;e:for(;++c<f;){var g=e[c],v=t?t(g):g;if(g=r||0!==g?g:0,d&&v==v){for(var b=h.length;b--;)if(h[b]===v)continue e;t&&h.push(v),p.push(g)}else l(h,v,r)||(h!==p&&h.push(v),p.push(g))}return p}},function(e,t,r){var n=r(114),o=r(113);e.exports=function e(t,r,i,a,u){var s=-1,c=t.length;for(i||(i=o),u||(u=[]);++s<c;){var l=t[s];r>0&&i(l)?r>1?e(l,r-1,i,a,u):n(u,l):a||(u[u.length]=l)}return u}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e=arguments[1],t=arguments[2];switch(e.type){case i.HOVER:break;case a.ADD_SOURCE:case a.ADD_TARGET:case a.REMOVE_TARGET:case a.REMOVE_SOURCE:return s;case i.BEGIN_DRAG:case i.PUBLISH_DRAG_SOURCE:case i.END_DRAG:case i.DROP:default:return c}var r=e.targetIds,o=t.targetIds,u=(0,n.default)(r,o),l=!1;if(0===u.length){for(var f=0;f<r.length;f++)if(r[f]!==o[f]){l=!0;break}}else l=!0;if(!l)return s;var d=o[o.length-1],p=r[r.length-1];return d!==p&&(d&&u.push(d),p&&u.push(p)),u},t.areDirty=function(e,t){return e!==s&&(e===c||void 0===t||(0,o.default)(t,e).length>0)};var n=u(r(117)),o=u(r(106)),i=r(11),a=r(9);function u(e){return e&&e.__esModule?e:{default:e}}var s=[],c=[]},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t){e.exports=function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}},function(e,t,r){var n=r(21),o=r(20),i=r(19),a=r(18),u=r(36),s=r(17);e.exports=function(e,t,r,c){var l=-1,f=o,d=!0,p=e.length,h=[],y=t.length;if(!p)return h;r&&(t=a(t,u(r))),c?(f=i,d=!1):t.length>=200&&(f=s,d=!1,t=new n(t));e:for(;++l<p;){var g=e[l],v=null==r?g:r(g);if(g=c||0!==g?g:0,d&&v==v){for(var b=y;b--;)if(t[b]===v)continue e;h.push(g)}else f(t,v,c)||h.push(g)}return h}},function(e,t,r){var n=r(38),o=r(6),i=r(10),a=o(function(e,t){return i(e)?n(e,t):[]});e.exports=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e)?e.some(function(e){return e===t}):e===t};var n,o=(n=r(4))&&n.__esModule?n:{default:n}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.default=function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,a=arguments[1];switch(a.type){case o.BEGIN_DRAG:return{initialSourceClientOffset:a.sourceClientOffset,initialClientOffset:a.clientOffset,clientOffset:a.clientOffset};case o.HOVER:return e=r.clientOffset,t=a.clientOffset,e===t||e&&t&&e.x===t.x&&e.y===t.y?r:n({},r,{clientOffset:a.clientOffset});case o.END_DRAG:case o.DROP:return i;default:return r}},t.getSourceClientOffset=function(e){var t=e.clientOffset,r=e.initialClientOffset,n=e.initialSourceClientOffset;return t&&r&&n?{x:t.x+n.x-r.x,y:t.y+n.y-r.y}:null},t.getDifferenceFromInitialOffset=function(e){var t=e.clientOffset,r=e.initialClientOffset;return t&&r?{x:t.x-r.x,y:t.y-r.y}:null};var o=r(11),i={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unpackBackendForEs5Users=t.createChildContext=t.CHILD_CONTEXT_TYPES=void 0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(e){d.default.apply(void 0,["DragDropContext","backend"].concat(Array.prototype.slice.call(arguments)));var t=g(e),r=y(t);return function(e){var t,i,s=e.displayName||e.name||"Component",c=(i=t=function(t){function i(){return function(e,t){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,a.Component),o(i,[{key:"getDecoratedComponentInstance",value:function(){return(0,l.default)(this.child,"In order to access an instance of the decorated component it can not be a stateless component."),this.child}},{key:"getManager",value:function(){return r.dragDropManager}},{key:"getChildContext",value:function(){return r}},{key:"render",value:function(){var t=this;return u.default.createElement(e,n({},this.props,{ref:function(e){t.child=e}}))}}]),i}(),t.DecoratedComponent=e,t.displayName="DragDropContext("+s+")",t.childContextTypes=h,i);return(0,f.default)(c,e)}};var a=r(0),u=p(a),s=p(r(1)),c=r(134),l=p(r(2)),f=p(r(16)),d=p(r(8));function p(e){return e&&e.__esModule?e:{default:e}}var h=t.CHILD_CONTEXT_TYPES={dragDropManager:s.default.object.isRequired},y=t.createChildContext=function(e,t){return{dragDropManager:new c.DragDropManager(e,t)}},g=t.unpackBackendForEs5Users=function(e){var t=e;return"object"===(void 0===t?"undefined":i(t))&&"function"==typeof t.default&&(t=t.default),(0,l.default)("function"==typeof t,"Expected the backend to be a function or an ES6 module exporting a default function. Read more: http://react-dnd.github.io/react-dnd/docs-drag-drop-context.html"),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(r(22)),o=a(r(51)),i=r(25);function a(e){return e&&e.__esModule?e:{default:e}}t.default={backends:[{backend:n.default,transition:i.MouseTransition},{backend:(0,o.default)({enableMouseEvents:!0}),preview:!0,transition:i.TouchTransition}]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTransition=t.MouseTransition=t.TouchTransition=t.HTML5DragTransition=t.Preview=void 0;var n=r(25),o=a(n),i=a(r(53));function a(e){return e&&e.__esModule?e:{default:e}}t.Preview=i.default,t.HTML5DragTransition=n.HTML5DragTransition,t.TouchTransition=n.TouchTransition,t.MouseTransition=n.MouseTransition,t.createTransition=n.createTransition,t.default=o.default},function(e,t,r){var n,o;o=function(e){var t=["N","E","A","D"];function r(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function n(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function o(e,t,r){o.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:r,enumerable:!0})}function i(e,t){i.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function a(e,t){a.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function u(e,t,r){u.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:r,enumerable:!0})}function s(e,t,r){var n=e.slice((r||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n),e}function c(e){var t=typeof e;return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function l(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r),t&=t}return t}function f(e){var t=0,r=c(e);if("array"===r)return e.forEach(function(e){t+=f(e)}),t+l("[type: array, hash: "+t+"]");if("object"===r){for(var n in e)if(e.hasOwnProperty(n)){var o="[ type: object, key: "+n+", value hash: "+f(e[n])+"]";t+=l(o)}return t}return t+l("[ type: "+r+" ; value: "+e+"]")}function d(e,t,r,n,s,l,p,h){r=r||[],s=s||[],p=p||[];var y=s.slice(0);if(void 0!==l&&null!==l){if(n){if("function"==typeof n&&n(y,l))return;if("object"==typeof n){if(n.prefilter&&n.prefilter(y,l))return;if(n.normalize){var g=n.normalize(y,l,e,t);g&&(e=g[0],t=g[1])}}}y.push(l)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var v,b,m,w,O=typeof e,S=typeof t,D="undefined"!==O||p&&p.length>0&&p[p.length-1].lhs&&Object.getOwnPropertyDescriptor(p[p.length-1].lhs,l),k="undefined"!==S||p&&p.length>0&&p[p.length-1].rhs&&Object.getOwnPropertyDescriptor(p[p.length-1].rhs,l);if(!D&&k)r.push(new i(y,t));else if(!k&&D)r.push(new a(y,e));else if(c(e)!==c(t))r.push(new o(y,e,t));else if("date"===c(e)&&e-t!=0)r.push(new o(y,e,t));else if("object"===O&&null!==e&&null!==t){for(v=p.length-1;v>-1;--v)if(p[v].lhs===e){w=!0;break}if(w)e!==t&&r.push(new o(y,e,t));else{if(p.push({lhs:e,rhs:t}),Array.isArray(e)){for(h&&(e.sort(function(e,t){return f(e)-f(t)}),t.sort(function(e,t){return f(e)-f(t)})),v=t.length-1,b=e.length-1;v>b;)r.push(new u(y,v,new i(void 0,t[v--])));for(;b>v;)r.push(new u(y,b,new a(void 0,e[b--])));for(;v>=0;--v)d(e[v],t[v],r,n,y,v,p,h)}else{var C=Object.keys(e),_=Object.keys(t);for(v=0;v<C.length;++v)m=C[v],(w=_.indexOf(m))>=0?(d(e[m],t[m],r,n,y,m,p,h),_[w]=null):d(e[m],void 0,r,n,y,m,p,h);for(v=0;v<_.length;++v)(m=_[v])&&d(void 0,t[m],r,n,y,m,p,h)}p.length=p.length-1}}else e!==t&&("number"===O&&isNaN(e)&&isNaN(t)||r.push(new o(y,e,t)))}function p(e,t,r,n,o){var i=[];if(d(e,t,i,n,null,null,null,o),r)for(var a=0;a<i.length;++a)r(i[a]);return i}function h(e,t,r,n){var o=p(e,t,n?function(e){e&&n.push(e)}:void 0,r);return n||(o.length?o:void 0)}function y(e,r,n){if(void 0===n&&r&&~t.indexOf(r.kind)&&(n=r),e&&n&&n.kind){for(var o=e,i=-1,a=n.path?n.path.length-1:0;++i<a;)void 0===o[n.path[i]]&&(o[n.path[i]]=void 0!==n.path[i+1]&&"number"==typeof n.path[i+1]?[]:{}),o=o[n.path[i]];switch(n.kind){case"A":n.path&&void 0===o[n.path[i]]&&(o[n.path[i]]=[]),function e(t,r,n){if(n.path&&n.path.length){var o,i=t[r],a=n.path.length-1;for(o=0;o<a;o++)i=i[n.path[o]];switch(n.kind){case"A":e(i[n.path[o]],n.index,n.item);break;case"D":delete i[n.path[o]];break;case"E":case"N":i[n.path[o]]=n.rhs}}else switch(n.kind){case"A":e(t[r],n.index,n.item);break;case"D":t=s(t,r);break;case"E":case"N":t[r]=n.rhs}return t}(n.path?o[n.path[i]]:o,n.index,n.item);break;case"D":delete o[n.path[i]];break;case"E":case"N":o[n.path[i]]=n.rhs}}}return r(o,n),r(i,n),r(a,n),r(u,n),Object.defineProperties(h,{diff:{value:h,enumerable:!0},orderIndependentDiff:{value:function(e,t,r,n){var o=p(e,t,n?function(e){e&&n.push(e)}:void 0,r,!0);return n||(o.length?o:void 0)},enumerable:!0},observableDiff:{value:p,enumerable:!0},orderIndependentObservableDiff:{value:function(e,t,r,n,o,i,a){return d(e,t,r,n,o,i,a,!0)},enumerable:!0},orderIndepHash:{value:f,enumerable:!0},applyDiff:{value:function(e,t,r){e&&t&&p(e,t,function(n){r&&!r(e,t,n)||y(e,t,n)})},enumerable:!0},applyChange:{value:y,enumerable:!0},revertChange:{value:function(e,t,r){if(e&&t&&r&&r.kind){var n,o,i=e;for(o=r.path.length-1,n=0;n<o;n++)void 0===i[r.path[n]]&&(i[r.path[n]]={}),i=i[r.path[n]];switch(r.kind){case"A":!function e(t,r,n){if(n.path&&n.path.length){var o,i=t[r],a=n.path.length-1;for(o=0;o<a;o++)i=i[n.path[o]];switch(n.kind){case"A":e(i[n.path[o]],n.index,n.item);break;case"D":case"E":i[n.path[o]]=n.lhs;break;case"N":delete i[n.path[o]]}}else switch(n.kind){case"A":e(t[r],n.index,n.item);break;case"D":case"E":t[r]=n.lhs;break;case"N":t=s(t,r)}return t}(i[r.path[n]],r.index,r.item);break;case"D":case"E":i[r.path[n]]=r.lhs;break;case"N":delete i[r.path[n]]}}},enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof $conflict},enumerable:!0}}),h.DeepDiff=h,e.DeepDiff=h,h}(this),void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)},function(e,t,r){"use strict";function n(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}r.d(t,"a",function(){return n})},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),i=r(3),a=r(1),u=r.n(a),s=r(22),c=r(48),l=r.n(c);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var d="abcdefgh".split("");function p(e){return"string"==typeof e}function h(e){if(!y(e))return!1;for(var t=(e=e.replace(/ .+$/,"")).split("/"),r={},n=8,o=0;o<8;o++){for(var i=t[o].split(""),a=0,u=0;u<i.length;u++)-1!==i[u].search(/[1-8]/)?a+=parseInt(i[u],10):(r[d[a]+n]=(s=i[u]).toLowerCase()===s?"b"+s.toUpperCase():"w"+s.toUpperCase(),a+=1);n-=1}var s;return r}function y(e){if(!p(e))return!1;var t=(e=function(e){return e.replace(/8/g,"11111111").replace(/7/g,"1111111").replace(/6/g,"111111").replace(/5/g,"11111").replace(/4/g,"1111").replace(/3/g,"111").replace(/2/g,"11")}(e=e.replace(/ .+$/,""))).split("/");if(8!==t.length)return!1;for(var r=0;r<8;r++)if(8!==t[r].length||-1!==t[r].search(/[^kqrnbpKQRNBP1]/))return!1;return!0}function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O=function(e){var t=e.dropTarget,r=e.square,n=e.targetSquare,i=e.waitForTransition,a=e.getSquareCoordinates,u=e.piece,s=e.width,c=e.pieces,l=e.transitionDuration,f=e.isDragging,d=e.sourceSquare,p=e.onPieceClick,h=e.allowDrag,y=e.customDragLayerStyles,g=void 0===y?{}:y,v=e.phantomPieceStyles,b=void 0===v?{}:v,m={squareWidth:s/8,isDragging:f,droppedPiece:t&&t.piece,targetSquare:t&&t.target,sourceSquare:t&&t.source};return o.a.createElement("div",{"data-testid":"".concat(u,"-").concat(r),onClick:function(){return p(u)},style:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){w(e,t,r[t])})}return e}({},C({isDragging:f,transitionDuration:l,waitForTransition:i,square:r,targetSquare:n,sourceSquare:d,getSquareCoordinates:a,getTranslation:k,piece:u,allowDrag:h}),b,g)},"function"==typeof c[u]?c[u](m):o.a.createElement("svg",{viewBox:"1 1 43 43",width:s/8,height:s/8},o.a.createElement("g",null,c[u])))},S=function(e){function t(){return function(e,r){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),e=this,!(r=b(t).apply(this,arguments))||"object"!==g(r)&&"function"!=typeof r?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):r;var e,r}var r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(t,n.Component),r=t,(o=[{key:"shouldComponentUpdate",value:function(e){return!(null===e.dropTarget&&!e.isDragging&&!this.props.isDragging&&this.props.sourceSquare===e.sourceSquare&&this.props.waitForTransition===e.waitForTransition&&this.props.width===e.width)}},{key:"componentDidMount",value:function(){window.addEventListener("touchstart",this.props.setTouchState),this.props.connectDragPreview(Object(s.getEmptyImage)(),{captureDraggingState:!0})}},{key:"componentWillUnmount",value:function(){window.removeEventListener("touchstart",this.props.setTouchState)}},{key:"render",value:function(){var e=this.props,t=e.square,r=e.targetSquare,n=e.waitForTransition,o=e.getSquareCoordinates,i=e.piece,a=e.width,u=e.pieces,s=e.transitionDuration,c=e.isDragging,l=e.connectDragSource,f=e.sourceSquare,d=e.dropTarget,p=e.onPieceClick,h=e.allowDrag;return l(O({square:t,targetSquare:r,waitForTransition:n,getSquareCoordinates:o,piece:i,width:a,pieces:u,transitionDuration:s,isDragging:c,sourceSquare:f,dropTarget:d,onPieceClick:p,allowDrag:h}))}}])&&v(r.prototype,o),t}();S.propTypes={piece:u.a.string,square:u.a.string,id:u.a.oneOfType([u.a.string,u.a.number]),width:u.a.number,connectDragSource:u.a.func,isDragging:u.a.bool,connectDragPreview:u.a.func,dropOffBoard:u.a.string,getSquareCoordinates:u.a.func,onDrop:u.a.oneOfType([u.a.bool,u.a.func]),transitionDuration:u.a.number,pieces:u.a.object,sourceSquare:u.a.string,targetSquare:u.a.string,waitForTransition:u.a.bool,setTouchState:u.a.func,onPieceClick:u.a.func,wasSquareClicked:u.a.func,allowDrag:u.a.func};var D=Object(i.DragSource)("piece",{canDrag:function(e){return e.draggable&&e.allowDrag({piece:e.piece,sourceSquare:e.square})},beginDrag:function(e){return{piece:e.piece,source:e.square,board:e.id}},endDrag:function(e,t){var r=e.setPosition,n=e.dropOffBoard,o=e.piece,i=e.square,a=e.onDrop,u=e.wasManuallyDropped,s=e.wasSquareClicked,c=t.getDropResult(),l=t.didDrop();if(!l&&"trash"===n)return r({sourceSquare:i,piece:o});if(t.getItem().board===(c&&c.board)&&l){if(a.length)return u(!0),"spare"!==i&&s(!1),a({sourceSquare:i,targetSquare:c.target,piece:o});r({sourceSquare:i,targetSquare:c.target,piece:o})}}},function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging(),dropTarget:t.getDropResult()}})(S),k=function(e){var t=e.waitForTransition,r=e.square,n=e.targetSquare,o=e.sourceSquare,i=e.getSquareCoordinates;return function(e,t){return t&&t===e}(r,n)&&t&&function(e){var t=(0,e.getSquareCoordinates)(e.sourceSq,e.targetSq),r=t.sourceSquare,n=t.targetSquare;return"translate(".concat(r.x-n.x,"px, ").concat(r.y-n.y,"px)")}({getSquareCoordinates:i,sourceSq:o,targetSq:n})},C=function(e){var t=e.isDragging,r=e.transitionDuration,n=e.waitForTransition,o=e.square,i=e.targetSquare,a=e.sourceSquare,u=e.getSquareCoordinates,s=e.getTranslation,c=e.piece,l=e.allowDrag;return{opacity:t?0:1,transform:s({waitForTransition:n,square:o,targetSquare:i,sourceSquare:a,getSquareCoordinates:u}),transition:"transform ".concat(r,"ms"),zIndex:5,cursor:t?"-webkit-grabbing":l({piece:c,sourceSquare:o})?"-webkit-grab":"not-allowed"}};function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){T(e,t,r[t])})}return e}function T(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function P(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var L=function(e){function t(){var e,r,n;!function(e,r){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return P(n,(r=n=P(this,(e=M(t)).call.apply(e,[this].concat(i))),n.onClick=function(){n.props.wasSquareClicked(!0),n.props.onSquareClick(n.props.square)},r))}var r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)}(t,n.Component),r=t,(i=[{key:"componentDidMount",value:function(){var e=this.props,t=e.square,r=e.setSquareCoordinates,n=e.width;(0,e.roughSquare)({squareElement:this.roughSquareSvg,squareWidth:n/8});var o=this[t].getBoundingClientRect();r(o.x,o.y,t)}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.screenWidth,n=t.screenHeight,o=t.square,i=t.setSquareCoordinates;if(e.screenWidth!==r||e.screenHeight!==n){var a=this[o].getBoundingClientRect();i(a.x,a.y,o)}}},{key:"render",value:function(){var e=this,t=this.props,r=t.connectDropTarget,n=t.width,i=t.squareColor,a=t.children,u=t.square,s=t.roughSquare,c=t.onMouseOverSquare,l=t.onMouseOutSquare,f=t.squareStyles,d=t.onDragOverSquare,p=t.onSquareRightClick;return r(o.a.createElement("div",{"data-testid":"".concat(i,"-square"),"data-squareid":u,ref:function(t){return e[u]=t},style:R(this.props),onMouseOver:function(){return c(u)},onMouseOut:function(){return l(u)},onDragEnter:function(){return d(u)},onClick:function(){return e.onClick()},onContextMenu:function(e){e.preventDefault(),p(u)}},o.a.createElement("div",{style:E({},N(n),q,f[u]&&f[u])},s.length?o.a.createElement("div",{style:q},a,o.a.createElement("svg",{style:E({},N(n),{position:"absolute",display:"block"}),ref:function(t){return e.roughSquareSvg=t}})):a)))}}])&&j(r.prototype,i),t}();L.propTypes={connectDropTarget:u.a.func,width:u.a.number,squareColor:u.a.oneOf(["white","black"]),children:u.a.oneOfType([u.a.array,u.a.node]),isOver:u.a.bool,square:u.a.string,setSquareCoordinates:u.a.func,lightSquareStyle:u.a.object,darkSquareStyle:u.a.object,roughSquare:u.a.func,onMouseOverSquare:u.a.func,onMouseOutSquare:u.a.func,dropSquareStyle:u.a.object,screenWidth:u.a.number,screenHeight:u.a.number,squareStyles:u.a.object,onDragOverSquare:u.a.func,onSquareClick:u.a.func,wasSquareClicked:u.a.func,onSquareRightClick:u.a.func};var I=Object(i.DropTarget)("piece",{drop:function(e,t){return{target:e.square,board:e.id,piece:t.getItem().piece,source:t.getItem().source}}},function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver()}})(L),R=function(e){var t=e.width,r=e.squareColor,n=e.isOver,o=e.darkSquareStyle,i=e.lightSquareStyle,a=e.dropSquareStyle;return E({},E({},N(t),q,"