react-dnd-html5-backend
Advanced tools
Comparing version 5.0.1 to 6.0.0
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ReactDnDHTML5Backend=e():t.ReactDnDHTML5Backend=e()}(window,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=105)}([function(t,e,r){var n=r(29),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},function(t,e,r){var n=r(65);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e,r){var n=r(9);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e,r){var n=r(5)(Object,"create");t.exports=n},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){var n=r(87),o=r(83);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FILE="__NATIVE_FILE__",e.URL="__NATIVE_URL__",e.TEXT="__NATIVE_TEXT__"},function(t,e,r){var n=r(25),o=r(17);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(26),o=r(93),i=r(91);t.exports=function(t,e){return i(o(t,e,n),t+"")}},function(t,e,r){var n=r(12),o=r(95),i=r(94),a="[object Null]",u="[object Undefined]",s=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?u:a:s&&s in Object(t)?o(t):i(t)}},function(t,e,r){var n=r(0).Symbol;t.exports=n},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){var r=9007199254740991,n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var o=typeof t;return!!(e=null==e?r:e)&&("number"==o||"symbol"!=o&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(49);e.isFirefox=n(function(){return/firefox/i.test(navigator.userAgent)}),e.isSafari=n(function(){return Boolean(window.safari)})},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e){var r=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}},function(t,e,r){var n=r(8),o=r(6);t.exports=function(t){return o(t)&&n(t)}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e){t.exports=function(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}},function(t,e,r){var n=r(59);t.exports=function(t,e){return!(null==t||!t.length)&&n(t,e,0)>-1}},function(t,e,r){var n=r(80),o=r(66),i=r(64),a=r(63),u=r(62);function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,t.exports=s},function(t,e,r){var n=r(23),o=r(61),i=r(60);function a(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},function(t,e,r){var n=r(11),o=r(4),i="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",s="[object Proxy]";t.exports=function(t){if(!o(t))return!1;var e=n(t);return e==a||e==u||e==i||e==s}},function(t,e){t.exports=function(t){return t}},function(t,e){var r=Array.isArray;t.exports=r},function(t,e,r){var n=r(96),o=r(6),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(t){return o(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=s},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r(97))},function(t,e,r){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return n||((n=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),n}},function(t,e){t.exports=function(t,e,r,n){var o=r?r.call(n,t,e):void 0;if(void 0!==o)return!!o;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(e),s=0;s<i.length;s++){var c=i[s];if(!u(c))return!1;var f=t[c],p=e[c];if(!1===(o=r?r.call(n,f,p,c):void 0)||void 0===o&&f!==p)return!1}return!0}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e,r){var n=r(4),o=r(33),i=r(32),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=o(t),r=[];for(var u in t)("constructor"!=u||!e&&a.call(t,u))&&r.push(u);return r}},function(t,e,r){(function(t){var n=r(29),o="object"==typeof e&&e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&n.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u}).call(this,r(13)(t))},function(t,e,r){var n=r(11),o=r(17),i=r(6),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[n(t)]}},function(t,e,r){var n=r(36),o=r(16),i=r(35),a=i&&i.isTypedArray,u=a?o(a):n;t.exports=u},function(t,e){t.exports=function(){return!1}},function(t,e,r){(function(t){var n=r(0),o=r(38),i="object"==typeof e&&e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,u=a&&a.exports===i?n.Buffer:void 0,s=(u?u.isBuffer:void 0)||o;t.exports=s}).call(this,r(13)(t))},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e,r){var n=r(40),o=r(28),i=r(27),a=r(39),u=r(14),s=r(37),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=i(t),f=!r&&o(t),p=!r&&!f&&a(t),d=!r&&!f&&!p&&s(t),l=r||f||p||d,h=l?n(t.length,String):[],v=h.length;for(var g in t)!e&&!c.call(t,g)||l&&("length"==g||p&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,v))||h.push(g);return h}},function(t,e,r){var n=r(41),o=r(34),i=r(8);t.exports=function(t){return i(t)?n(t,!0):o(t)}},function(t,e,r){var n=r(9),o=r(8),i=r(14),a=r(4);t.exports=function(t,e,r){if(!a(r))return!1;var u=typeof e;return!!("number"==u?o(r)&&i(e,r.length):"string"==u&&e in r)&&n(r[e],t)}},function(t,e,r){var n=r(10),o=r(9),i=r(43),a=r(42),u=Object.prototype,s=u.hasOwnProperty,c=n(function(t,e){t=Object(t);var r=-1,n=e.length,c=n>2?e[2]:void 0;for(c&&i(e[0],e[1],c)&&(n=1);++r<n;)for(var f=e[r],p=a(f),d=-1,l=p.length;++d<l;){var h=p[d],v=t[h];(void 0===v||o(v,u[h])&&!s.call(t,h))&&(t[h]=f[h])}return t});t.exports=c},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function o(t,e,r){var o=r.value;if("function"!=typeof o)throw new Error("@autobind decorator can only be applied to methods not: "+(void 0===o?"undefined":n(o)));var i=!1;return{configurable:!0,get:function(){if(i||this===t.prototype||this.hasOwnProperty(e)||"function"!=typeof o)return o;var r=o.bind(this);return i=!0,Object.defineProperty(this,e,{configurable:!0,get:function(){return r},set:function(t){o=t,delete this[e]}}),i=!1,r},set:function(t){o=t}}}e.default=function(){return 1===arguments.length?function(t){var e=void 0;"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?e=Reflect.ownKeys(t.prototype):(e=Object.getOwnPropertyNames(t.prototype),"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(t.prototype))));return e.forEach(function(e){if("constructor"!==e){var r=Object.getOwnPropertyDescriptor(t.prototype,e);"function"==typeof r.value&&Object.defineProperty(t.prototype,e,o(t,e,r))}}),t}.apply(void 0,arguments):o.apply(void 0,arguments)}},function(t,e,r){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0});var o=r(7);function i(t,e,r){var n=e.reduce(function(e,r){return e||t.getData(r)},null);return null!=n?n:r}var a=((n={})[o.FILE]={exposeProperty:"files",matchesTypes:["Files"],getData:function(t){return Array.prototype.slice.call(t.files)}},n[o.URL]={exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(t,e){return i(t,e,"").split("\n")}},n[o.TEXT]={exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(t,e){return i(t,e,"")}},n);e.createNativeDragSource=function(t){var e=a[t],r=e.exposeProperty,n=e.matchesTypes,o=e.getData;return function(){function t(){var t;this.item=(t={},Object.defineProperty(t,r,{get:function(){return console.warn("Browser doesn't allow reading \""+r+'" until the drop event.'),null},enumerable:!0,configurable:!0}),t)}return t.prototype.mutateItemByReadingDataTransfer=function(t){delete this.item[r],this.item[r]=o(t,n)},t.prototype.canDrag=function(){return!0},t.prototype.beginDrag=function(){return this.item},t.prototype.isDragging=function(t,e){return e===t.getSourceId()},t.prototype.endDrag=function(){},t}()},e.matchNativeItemType=function(t){var e=Array.prototype.slice.call(t.types||[]);return Object.keys(a).filter(function(t){return a[t].matchesTypes.some(function(t){return e.indexOf(t)>-1})})[0]||null}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=t.length,n=[],o=0;o<r;o++)n.push(o);n.sort(function(e,r){return t[e]<t[r]?-1:1});var i,a,u=[],s=[],c=[];for(o=0;o<r-1;o++)i=t[o+1]-t[o],a=e[o+1]-e[o],s.push(i),u.push(a),c.push(a/i);var f=[c[0]];for(o=0;o<s.length-1;o++){var p=c[o],d=c[o+1];if(p*d<=0)f.push(0);else{i=s[o];var l=s[o+1],h=i+l;f.push(3*h/((h+l)/p+(h+i)/d))}}f.push(c[c.length-1]);var v,g=[],y=[];for(o=0;o<f.length-1;o++){v=c[o];var m=f[o],D=1/s[o];h=m+f[o+1]-v-v;g.push((v-m-h)*D),y.push(h*D*D)}this.xs=t,this.ys=e,this.c1s=f,this.c2s=g,this.c3s=y}return t.prototype.interpolate=function(t){var e=this,r=e.xs,n=e.ys,o=e.c1s,i=e.c2s,a=e.c3s,u=r.length-1;if(t===r[u])return n[u];for(var s,c=0,f=a.length-1;c<=f;){var p=r[s=Math.floor(.5*(c+f))];if(p<t)c=s+1;else{if(!(p>t))return n[s];f=s-1}}var d=t-r[u=Math.max(0,f)],l=d*d;return n[u]+o[u]*d+i[u]*l+a[u]*d*l},t}();e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(15),o=r(47),i=1;function a(t){var e=t.nodeType===i?t:t.parentElement;if(!e)return null;var r=e.getBoundingClientRect(),n=r.top;return{x:r.left,y:n}}e.getNodeClientOffset=a,e.getEventClientOffset=function(t){return{x:t.clientX,y:t.clientY}},e.getDragPreviewOffset=function(t,e,r,i,u){var s,c,f="IMG"===(s=e).nodeName&&(n.isFirefox()||!document.documentElement.contains(s)),p=a(f?t:e),d={x:r.x-p.x,y:r.y-p.y},l=t.offsetWidth,h=t.offsetHeight,v=i.anchorX,g=i.anchorY,y=function(t,e,r,o){var i=t?e.width:r,a=t?e.height:o;return n.isSafari()&&t&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}(f,e,l,h),m=y.dragPreviewWidth,D=y.dragPreviewHeight,b=u.offsetX,x=u.offsetY,O=0===x||x;return{x:0===b||b?b:new o.default([0,.5,1],[d.x,d.x/l*m,d.x+m-l]).interpolate(v),y:O?x:(c=new o.default([0,.5,1],[d.y,d.y/h*D,d.y+D-h]).interpolate(g),n.isSafari()&&f&&(c+=(window.devicePixelRatio-1)*D),c)}}},function(t,e,r){var n=r(23),o="Expected a function";function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(o);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}},function(t,e,r){var n=r(24),o=r(22),i=r(21),a=r(50),u=r(16),s=r(20),c=200;t.exports=function(t,e,r,f){var p=-1,d=o,l=!0,h=t.length,v=[],g=e.length;if(!h)return v;r&&(e=a(e,u(r))),f?(d=i,l=!1):e.length>=c&&(d=s,l=!1,e=new n(e));t:for(;++p<h;){var y=t[p],m=null==r?y:r(y);if(y=f||0!==y?y:0,l&&m==m){for(var D=g;D--;)if(e[D]===m)continue t;v.push(y)}else d(e,m,f)||v.push(y)}return v}},function(t,e,r){var n=r(51),o=r(10),i=r(18),a=o(function(t,e){return i(t)?n(t,e):[]});t.exports=a},function(t,e){t.exports=function(){}},function(t,e,r){var n=r(5)(r(0),"Set");t.exports=n},function(t,e,r){var n=r(54),o=r(53),i=r(19),a=n&&1/i(new n([,-0]))[1]==1/0?function(t){return new n(t)}:o;t.exports=a},function(t,e){t.exports=function(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}},function(t,e,r){var n=r(58),o=r(57),i=r(56);t.exports=function(t,e,r){return e==e?i(t,e,r):n(t,o,r)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){var r="__lodash_hash_undefined__";t.exports=function(t){return this.__data__.set(t,r),this}},function(t,e,r){var n=r(1);t.exports=function(t,e){var r=n(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}},function(t,e,r){var n=r(1);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(1);t.exports=function(t){return n(this,t).get(t)}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(1);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e,r){var n=r(5)(r(0),"Map");t.exports=n},function(t,e,r){var n=r(2);t.exports=function(t,e){var r=this.__data__,o=n(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}},function(t,e,r){var n=r(2);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(2);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(2),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():o.call(e,r,1),--this.size,0))}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(72),o=r(71),i=r(70),a=r(69),u=r(68);function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,t.exports=s},function(t,e,r){var n=r(3),o="__lodash_hash_undefined__";t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?o:e,this}},function(t,e,r){var n=r(3),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},function(t,e,r){var n=r(3),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return r===o?void 0:r}return i.call(e,t)?e[t]:void 0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(3);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e,r){var n=r(78),o=r(77),i=r(76),a=r(75),u=r(74);function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,t.exports=s},function(t,e,r){var n=r(79),o=r(73),i=r(67);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},function(t,e,r){var n=r(24),o=r(22),i=r(21),a=r(20),u=r(55),s=r(19),c=200;t.exports=function(t,e,r){var f=-1,p=o,d=t.length,l=!0,h=[],v=h;if(r)l=!1,p=i;else if(d>=c){var g=e?null:u(t);if(g)return s(g);l=!1,p=a,v=new n}else v=e?[]:h;t:for(;++f<d;){var y=t[f],m=e?e(y):y;if(y=r||0!==y?y:0,l&&m==m){for(var D=v.length;D--;)if(v[D]===m)continue t;e&&v.push(m),h.push(y)}else p(v,m,r)||(v!==h&&v.push(m),h.push(y))}return h}},function(t,e){var r=800,n=16,o=Date.now;t.exports=function(t){var e=0,i=0;return function(){var a=o(),u=n-(a-i);if(i=a,u>0){if(++e>=r)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,r){var n=r(0)["__core-js_shared__"];t.exports=n},function(t,e,r){var n,o=r(85),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!i&&i in t}},function(t,e,r){var n=r(25),o=r(86),i=r(4),a=r(84),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,f=s.toString,p=c.hasOwnProperty,d=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(n(t)?d:u).test(a(t))}},function(t,e,r){var n=r(5),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,r){var n=r(89),o=r(88),i=r(26),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:i;t.exports=a},function(t,e,r){var n=r(90),o=r(82)(n);t.exports=o},function(t,e){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},function(t,e,r){var n=r(92),o=Math.max;t.exports=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,u=o(i.length-e,0),s=Array(u);++a<u;)s[a]=i[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=i[a];return c[e]=r(s),n(t,this,c)}}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n=r(12),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var o=a.call(t);return n&&(e?t[u]=r:delete t[u]),o}},function(t,e,r){var n=r(11),o=r(6),i="[object Arguments]";t.exports=function(t){return o(t)&&n(t)==i}},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(12),o=r(28),i=r(27),a=n?n.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(a&&t&&t[a])}},function(t,e){t.exports=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}},function(t,e,r){var n=r(99),o=r(98);t.exports=function t(e,r,i,a,u){var s=-1,c=e.length;for(i||(i=o),u||(u=[]);++s<c;){var f=e[s];r>0&&i(f)?r>1?t(f,r-1,i,a,u):n(u,f):a||(u[u.length]=f)}return u}},function(t,e,r){var n=r(100),o=r(10),i=r(81),a=r(18),u=o(function(t){return i(n(t,1,a,!0))});t.exports=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(101),o=r(52),i=function(){function t(){this.entered=[]}return t.prototype.enter=function(t){var e=this.entered.length;return this.entered=n(this.entered.filter(function(e){return document.documentElement.contains(e)&&(!e.contains||e.contains(t))}),[t]),0===e&&this.entered.length>0},t.prototype.leave=function(t){var e=this.entered.length;return this.entered=o(this.entered.filter(function(t){return document.documentElement.contains(t)}),t),e>0&&0===this.entered.length},t.prototype.reset=function(){this.entered=[]},t}();e.default=i},function(t,e,r){"use strict";var n=this&&this.__decorate||function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a};Object.defineProperty(e,"__esModule",{value:!0});var o=r(102),i=r(15),a=r(48),u=r(46),s=r(7),c=r(45),f=r(44),p=r(31),d=function(){function t(t){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.enterLeaveCounter=new o.default,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.context=t.getContext()}return Object.defineProperty(t.prototype,"window",{get:function(){return this.context&&this.context.window?this.context.window:"undefined"!=typeof window?window:void 0},enumerable:!0,configurable:!0}),t.prototype.setup=function(){if(void 0!==this.window){if(this.window.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.window.__isReactDndBackendSetUp=!0,this.addEventListeners(this.window)}},t.prototype.teardown=function(){void 0!==this.window&&(this.window.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.window),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&this.window.cancelAnimationFrame(this.asyncEndDragFrameId))},t.prototype.connectDragPreview=function(t,e,r){var n=this;return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,e),function(){n.sourcePreviewNodes.delete(t),n.sourcePreviewNodeOptions.delete(t)}},t.prototype.connectDragSource=function(t,e,r){var n=this;this.sourceNodes.set(t,e),this.sourceNodeOptions.set(t,r);var o=function(e){return n.handleDragStart(e,t)},i=function(t){return n.handleSelectStart(t)};return e.setAttribute("draggable",!0),e.addEventListener("dragstart",o),e.addEventListener("selectstart",i),function(){n.sourceNodes.delete(t),n.sourceNodeOptions.delete(t),e.removeEventListener("dragstart",o),e.removeEventListener("selectstart",i),e.setAttribute("draggable",!1)}},t.prototype.connectDropTarget=function(t,e){var r=this,n=function(e){return r.handleDragEnter(e,t)},o=function(e){return r.handleDragOver(e,t)},i=function(e){return r.handleDrop(e,t)};return e.addEventListener("dragenter",n),e.addEventListener("dragover",o),e.addEventListener("drop",i),function(){e.removeEventListener("dragenter",n),e.removeEventListener("dragover",o),e.removeEventListener("drop",i)}},t.prototype.addEventListeners=function(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))},t.prototype.removeEventListeners=function(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))},t.prototype.getCurrentSourceNodeOptions=function(){var t=this.monitor.getSourceId(),e=this.sourceNodeOptions.get(t);return f(e||{},{dropEffect:this.altKeyPressed?"copy":"move"})},t.prototype.getCurrentDropEffect=function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect},t.prototype.getCurrentSourcePreviewNodeOptions=function(){var t=this.monitor.getSourceId(),e=this.sourcePreviewNodeOptions.get(t);return f(e||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})},t.prototype.getSourceClientOffset=function(t){return a.getNodeClientOffset(this.sourceNodes.get(t))},t.prototype.isDraggingNativeItem=function(){var t=this.monitor.getItemType();return Object.keys(s).some(function(e){return s[e]===t})},t.prototype.beginDragNativeItem=function(t){this.clearCurrentDragSourceNode();var e=u.createNativeDragSource(t);this.currentNativeSource=new e,this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])},t.prototype.endDragNativeItem=function(){this.isDraggingNativeItem()&&(this.actions.endDrag(),this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},t.prototype.isNodeInDocument=function(t){return!!document&&document.body.contains(t)||!!this.window&&this.window.document.body.contains(t)},t.prototype.endDragIfSourceWasRemovedFromDOM=function(){var t=this.currentDragSourceNode;this.isNodeInDocument(t)||this.clearCurrentDragSourceNode()&&this.actions.endDrag()},t.prototype.setCurrentDragSourceNode=function(t){var e=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t,this.currentDragSourceNodeOffset=a.getNodeClientOffset(t),this.currentDragSourceNodeOffsetChanged=!1;this.mouseMoveTimeoutTimer=setTimeout(function(){return e.window&&e.window.addEventListener("mousemove",e.endDragIfSourceWasRemovedFromDOM,!0)},1e3)},t.prototype.clearCurrentDragSourceNode=function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.currentDragSourceNodeOffset=null,this.currentDragSourceNodeOffsetChanged=!1,this.window&&(this.window.clearTimeout(this.mouseMoveTimeoutTimer),this.window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)},t.prototype.checkIfCurrentDragSourceRectChanged=function(){var t=this.currentDragSourceNode;return!!t&&(!!this.currentDragSourceNodeOffsetChanged||(this.currentDragSourceNodeOffsetChanged=!p(a.getNodeClientOffset(t),this.currentDragSourceNodeOffset),this.currentDragSourceNodeOffsetChanged))},t.prototype.handleTopDragStartCapture=function(){this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},t.prototype.handleDragStart=function(t,e){this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(e)},t.prototype.handleTopDragStart=function(t){var e=this,r=this.dragStartSourceIds;this.dragStartSourceIds=null;var n=a.getEventClientOffset(t);this.monitor.isDragging()&&this.actions.endDrag(),this.actions.beginDrag(r||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});var o=t.dataTransfer,i=u.matchNativeItemType(o);if(this.monitor.isDragging()){if("function"==typeof o.setDragImage){var s=this.monitor.getSourceId(),c=this.sourceNodes.get(s),f=this.sourcePreviewNodes.get(s)||c,p=this.getCurrentSourcePreviewNodeOptions(),d={anchorX:p.anchorX,anchorY:p.anchorY},l={offsetX:p.offsetX,offsetY:p.offsetY},h=a.getDragPreviewOffset(c,f,n,d,l);o.setDragImage(f,h.x,h.y)}try{o.setData("application/json",{})}catch(t){}this.setCurrentDragSourceNode(t.target),this.getCurrentSourcePreviewNodeOptions().captureDraggingState?this.actions.publishDragSource():setTimeout(function(){return e.actions.publishDragSource()},0)}else if(i)this.beginDragNativeItem(i);else{if(!(o.types||t.target.hasAttribute&&t.target.hasAttribute("draggable")))return;t.preventDefault()}},t.prototype.handleTopDragEndCapture=function(){this.clearCurrentDragSourceNode()&&this.actions.endDrag()},t.prototype.handleTopDragEnterCapture=function(t){if(this.dragEnterTargetIds=[],this.enterLeaveCounter.enter(t.target)&&!this.monitor.isDragging()){var e=t.dataTransfer,r=u.matchNativeItemType(e);r&&this.beginDragNativeItem(r)}},t.prototype.handleDragEnter=function(t,e){this.dragEnterTargetIds.unshift(e)},t.prototype.handleTopDragEnter=function(t){var e=this,r=this.dragEnterTargetIds;(this.dragEnterTargetIds=[],this.monitor.isDragging())&&(this.altKeyPressed=t.altKey,i.isFirefox()||this.actions.hover(r,{clientOffset:a.getEventClientOffset(t)}),r.some(function(t){return e.monitor.canDropOnTarget(t)})&&(t.preventDefault(),t.dataTransfer.dropEffect=this.getCurrentDropEffect()))},t.prototype.handleTopDragOverCapture=function(){this.dragOverTargetIds=[]},t.prototype.handleDragOver=function(t,e){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(e)},t.prototype.handleTopDragOver=function(t){var e=this,r=this.dragOverTargetIds;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return t.preventDefault(),void(t.dataTransfer.dropEffect="none");this.altKeyPressed=t.altKey,this.actions.hover(r||[],{clientOffset:a.getEventClientOffset(t)}),(r||[]).some(function(t){return e.monitor.canDropOnTarget(t)})?(t.preventDefault(),t.dataTransfer.dropEffect=this.getCurrentDropEffect()):this.isDraggingNativeItem()?(t.preventDefault(),t.dataTransfer.dropEffect="none"):this.checkIfCurrentDragSourceRectChanged()&&(t.preventDefault(),t.dataTransfer.dropEffect="move")},t.prototype.handleTopDragLeaveCapture=function(t){this.isDraggingNativeItem()&&t.preventDefault(),this.enterLeaveCounter.leave(t.target)&&this.isDraggingNativeItem()&&this.endDragNativeItem()},t.prototype.handleTopDropCapture=function(t){this.dropTargetIds=[],t.preventDefault(),this.isDraggingNativeItem()&&this.currentNativeSource.mutateItemByReadingDataTransfer(t.dataTransfer),this.enterLeaveCounter.reset()},t.prototype.handleDrop=function(t,e){this.dropTargetIds.unshift(e)},t.prototype.handleTopDrop=function(t){var e=this.dropTargetIds;this.dropTargetIds=[],this.actions.hover(e,{clientOffset:a.getEventClientOffset(t)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.endDragIfSourceWasRemovedFromDOM()},t.prototype.handleSelectStart=function(t){var e=t.target;"function"==typeof e.dragDrop&&("INPUT"===e.tagName||"SELECT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable||(t.preventDefault(),e.dragDrop()))},n([c.default],t.prototype,"getSourceClientOffset",null),n([c.default],t.prototype,"endDragNativeItem",null),n([c.default],t.prototype,"isNodeInDocument",null),n([c.default],t.prototype,"endDragIfSourceWasRemovedFromDOM",null),n([c.default],t.prototype,"handleTopDragStartCapture",null),n([c.default],t.prototype,"handleTopDragStart",null),n([c.default],t.prototype,"handleTopDragEndCapture",null),n([c.default],t.prototype,"handleTopDragEnterCapture",null),n([c.default],t.prototype,"handleTopDragEnter",null),n([c.default],t.prototype,"handleTopDragOverCapture",null),n([c.default],t.prototype,"handleTopDragOver",null),n([c.default],t.prototype,"handleTopDragLeaveCapture",null),n([c.default],t.prototype,"handleTopDropCapture",null),n([c.default],t.prototype,"handleTopDrop",null),n([c.default],t.prototype,"handleSelectStart",null),t}();e.default=d},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(104));var n=r(103),o=r(30);e.getEmptyImage=o.default;var i=r(7);e.NativeTypes=i,e.default=function(t){return new n.default(t)}}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ReactDnDHTML5Backend=e():t.ReactDnDHTML5Backend=e()}(window,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=30)}([function(t,e,r){var n=r(13),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,r){var n=r(48),o=r(52);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){var n=r(2)(Object,"create");t.exports=n},function(t,e,r){var n=r(10);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e,r){var n=r(70);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e,r){var n=r(0).Symbol;t.exports=n},function(t,e,r){var n=r(7),o=r(40),i=r(41),a="[object Null]",u="[object Undefined]",s=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?u:a:s&&s in Object(t)?o(t):i(t)}},function(t,e,r){var n=r(16),o=r(42),i=r(44);t.exports=function(t,e){return i(o(t,e,n),t+"")}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(17),o=r(25);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FILE="__NATIVE_FILE__",e.URL="__NATIVE_URL__",e.TEXT="__NATIVE_TEXT__"},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r(38))},function(t,e,r){var n=r(39),o=r(1),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(t){return o(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=s},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){t.exports=function(t){return t}},function(t,e,r){var n=r(8),o=r(3),i="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",s="[object Proxy]";t.exports=function(t){if(!o(t))return!1;var e=n(t);return e==a||e==u||e==i||e==s}},function(t,e,r){var n=r(19),o=r(74),i=r(75);function a(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},function(t,e,r){var n=r(55),o=r(69),i=r(71),a=r(72),u=r(73);function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,t.exports=s},function(t,e,r){var n=r(76);t.exports=function(t,e){return!(null==t||!t.length)&&n(t,e,0)>-1}},function(t,e){t.exports=function(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},function(t,e,r){var n=r(11),o=r(1);t.exports=function(t){return o(t)&&n(t)}},function(t,e){var r=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(86);e.isFirefox=n(function(){return/firefox/i.test(navigator.userAgent)}),e.isSafari=n(function(){return Boolean(window.safari)})},function(t,e){var r=9007199254740991,n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var o=typeof t;return!!(e=null==e?r:e)&&("number"==o||"symbol"!=o&&n.test(t))&&t>-1&&t%1==0&&t<e}},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,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(31));var n=r(32),o=r(103);e.getEmptyImage=o.default;var i=r(12);e.NativeTypes=i,e.default=function(t){return new n.default(t)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(33),o=r(27),i=r(87),a=r(89),u=r(12),s=r(90),c=function(){function t(t){var e=this;this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.getSourceClientOffset=function(t){return i.getNodeClientOffset(e.sourceNodes.get(t))},this.endDragNativeItem=function(){e.isDraggingNativeItem()&&(e.actions.endDrag(),e.registry.removeSource(e.currentNativeHandle),e.currentNativeHandle=null,e.currentNativeSource=null)},this.isNodeInDocument=function(t){return!!document&&document.body.contains(t)||!!e.window&&e.window.document.body.contains(t)},this.endDragIfSourceWasRemovedFromDOM=function(){var t=e.currentDragSourceNode;e.isNodeInDocument(t)||e.clearCurrentDragSourceNode()&&e.actions.endDrag()},this.handleTopDragStartCapture=function(){e.clearCurrentDragSourceNode(),e.dragStartSourceIds=[]},this.handleTopDragStart=function(t){var r=e.dragStartSourceIds;e.dragStartSourceIds=null;var n=i.getEventClientOffset(t);e.monitor.isDragging()&&e.actions.endDrag(),e.actions.initCoords(r||[],{getSourceClientOffset:e.getSourceClientOffset,clientOffset:n}),e.actions.beginDrag(r||[],{publishSource:!1,getSourceClientOffset:e.getSourceClientOffset,clientOffset:n});var o=t.dataTransfer,u=a.matchNativeItemType(o);if(e.monitor.isDragging()){if("function"==typeof o.setDragImage){var s=e.monitor.getSourceId(),c=e.sourceNodes.get(s),f=e.sourcePreviewNodes.get(s)||c,p=e.getCurrentSourcePreviewNodeOptions(),d={anchorX:p.anchorX,anchorY:p.anchorY},l={offsetX:p.offsetX,offsetY:p.offsetY},v=i.getDragPreviewOffset(c,f,n,d,l);o.setDragImage(f,v.x,v.y)}try{o.setData("application/json",{})}catch(t){}e.setCurrentDragSourceNode(t.target),e.getCurrentSourcePreviewNodeOptions().captureDraggingState?e.actions.publishDragSource():setTimeout(function(){return e.actions.publishDragSource()},0)}else if(u)e.beginDragNativeItem(u);else{if(!(o.types||t.target.hasAttribute&&t.target.hasAttribute("draggable")))return;t.preventDefault()}},this.handleTopDragEndCapture=function(){e.clearCurrentDragSourceNode()&&e.actions.endDrag()},this.handleTopDragEnterCapture=function(t){if(e.dragEnterTargetIds=[],e.enterLeaveCounter.enter(t.target)&&!e.monitor.isDragging()){var r=t.dataTransfer,n=a.matchNativeItemType(r);n&&e.beginDragNativeItem(n)}},this.handleTopDragEnter=function(t){var r=e.dragEnterTargetIds;(e.dragEnterTargetIds=[],e.monitor.isDragging())&&(e.altKeyPressed=t.altKey,o.isFirefox()||e.actions.hover(r,{clientOffset:i.getEventClientOffset(t)}),r.some(function(t){return e.monitor.canDropOnTarget(t)})&&(t.preventDefault(),t.dataTransfer.dropEffect=e.getCurrentDropEffect()))},this.handleTopDragOverCapture=function(){e.dragOverTargetIds=[]},this.handleTopDragOver=function(t){var r=e.dragOverTargetIds;if(e.dragOverTargetIds=[],!e.monitor.isDragging())return t.preventDefault(),void(t.dataTransfer.dropEffect="none");e.altKeyPressed=t.altKey,e.actions.hover(r||[],{clientOffset:i.getEventClientOffset(t)}),(r||[]).some(function(t){return e.monitor.canDropOnTarget(t)})?(t.preventDefault(),t.dataTransfer.dropEffect=e.getCurrentDropEffect()):(e.isDraggingNativeItem(),t.preventDefault(),t.dataTransfer.dropEffect="none")},this.handleTopDragLeaveCapture=function(t){e.isDraggingNativeItem()&&t.preventDefault(),e.enterLeaveCounter.leave(t.target)&&e.isDraggingNativeItem()&&e.endDragNativeItem()},this.handleTopDropCapture=function(t){e.dropTargetIds=[],t.preventDefault(),e.isDraggingNativeItem()&&e.currentNativeSource.mutateItemByReadingDataTransfer(t.dataTransfer),e.enterLeaveCounter.reset()},this.handleTopDrop=function(t){var r=e.dropTargetIds;e.dropTargetIds=[],e.actions.hover(r,{clientOffset:i.getEventClientOffset(t)}),e.actions.drop({dropEffect:e.getCurrentDropEffect()}),e.isDraggingNativeItem()?e.endDragNativeItem():e.endDragIfSourceWasRemovedFromDOM()},this.handleSelectStart=function(t){var e=t.target;"function"==typeof e.dragDrop&&("INPUT"===e.tagName||"SELECT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable||(t.preventDefault(),e.dragDrop()))},this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.context=t.getContext(),this.enterLeaveCounter=new n.default(this.isNodeInDocument)}return Object.defineProperty(t.prototype,"window",{get:function(){return this.context&&this.context.window?this.context.window:"undefined"!=typeof window?window:void 0},enumerable:!0,configurable:!0}),t.prototype.setup=function(){if(void 0!==this.window){if(this.window.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.window.__isReactDndBackendSetUp=!0,this.addEventListeners(this.window)}},t.prototype.teardown=function(){void 0!==this.window&&(this.window.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.window),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&this.window.cancelAnimationFrame(this.asyncEndDragFrameId))},t.prototype.connectDragPreview=function(t,e,r){var n=this;return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,e),function(){n.sourcePreviewNodes.delete(t),n.sourcePreviewNodeOptions.delete(t)}},t.prototype.connectDragSource=function(t,e,r){var n=this;this.sourceNodes.set(t,e),this.sourceNodeOptions.set(t,r);var o=function(e){return n.handleDragStart(e,t)},i=function(t){return n.handleSelectStart(t)};return e.setAttribute("draggable",!0),e.addEventListener("dragstart",o),e.addEventListener("selectstart",i),function(){n.sourceNodes.delete(t),n.sourceNodeOptions.delete(t),e.removeEventListener("dragstart",o),e.removeEventListener("selectstart",i),e.setAttribute("draggable",!1)}},t.prototype.connectDropTarget=function(t,e){var r=this,n=function(e){return r.handleDragEnter(e,t)},o=function(e){return r.handleDragOver(e,t)},i=function(e){return r.handleDrop(e,t)};return e.addEventListener("dragenter",n),e.addEventListener("dragover",o),e.addEventListener("drop",i),function(){e.removeEventListener("dragenter",n),e.removeEventListener("dragover",o),e.removeEventListener("drop",i)}},t.prototype.addEventListeners=function(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))},t.prototype.removeEventListeners=function(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))},t.prototype.getCurrentSourceNodeOptions=function(){var t=this.monitor.getSourceId(),e=this.sourceNodeOptions.get(t);return s(e||{},{dropEffect:this.altKeyPressed?"copy":"move"})},t.prototype.getCurrentDropEffect=function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect},t.prototype.getCurrentSourcePreviewNodeOptions=function(){var t=this.monitor.getSourceId(),e=this.sourcePreviewNodeOptions.get(t);return s(e||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})},t.prototype.isDraggingNativeItem=function(){var t=this.monitor.getItemType();return Object.keys(u).some(function(e){return u[e]===t})},t.prototype.beginDragNativeItem=function(t){this.clearCurrentDragSourceNode();var e=a.createNativeDragSource(t);this.currentNativeSource=new e,this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])},t.prototype.setCurrentDragSourceNode=function(t){var e=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;this.mouseMoveTimeoutTimer=setTimeout(function(){return e.window&&e.window.addEventListener("mousemove",e.endDragIfSourceWasRemovedFromDOM,!0)},1e3)},t.prototype.clearCurrentDragSourceNode=function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.window&&(this.window.clearTimeout(this.mouseMoveTimeoutTimer),this.window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)},t.prototype.handleDragStart=function(t,e){this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(e)},t.prototype.handleDragEnter=function(t,e){this.dragEnterTargetIds.unshift(e)},t.prototype.handleDragOver=function(t,e){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(e)},t.prototype.handleDrop=function(t,e){this.dropTargetIds.unshift(e)},t}();e.default=c},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(34),o=r(83),i=function(){function t(t){this.entered=[],this.isNodeInDocument=t}return t.prototype.enter=function(t){var e=this,r=this.entered.length;return this.entered=n(this.entered.filter(function(r){return e.isNodeInDocument(r)&&(!r.contains||r.contains(t))}),[t]),0===r&&this.entered.length>0},t.prototype.leave=function(t){var e=this.entered.length;return this.entered=o(this.entered.filter(this.isNodeInDocument),t),e>0&&0===this.entered.length},t.prototype.reset=function(){this.entered=[]},t}();e.default=i},function(t,e,r){var n=r(35),o=r(9),i=r(54),a=r(24),u=o(function(t){return i(n(t,1,a,!0))});t.exports=u},function(t,e,r){var n=r(36),o=r(37);t.exports=function t(e,r,i,a,u){var s=-1,c=e.length;for(i||(i=o),u||(u=[]);++s<c;){var f=e[s];r>0&&i(f)?r>1?t(f,r-1,i,a,u):n(u,f):a||(u[u.length]=f)}return u}},function(t,e){t.exports=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}},function(t,e,r){var n=r(7),o=r(14),i=r(15),a=n?n.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(a&&t&&t[a])}},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(8),o=r(1),i="[object Arguments]";t.exports=function(t){return o(t)&&n(t)==i}},function(t,e,r){var n=r(7),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var o=a.call(t);return n&&(e?t[u]=r:delete t[u]),o}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n=r(43),o=Math.max;t.exports=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,u=o(i.length-e,0),s=Array(u);++a<u;)s[a]=i[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=i[a];return c[e]=r(s),n(t,this,c)}}},function(t,e){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},function(t,e,r){var n=r(45),o=r(53)(n);t.exports=o},function(t,e,r){var n=r(46),o=r(47),i=r(16),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:i;t.exports=a},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,r){var n=r(2),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,r){var n=r(17),o=r(49),i=r(3),a=r(51),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,f=s.toString,p=c.hasOwnProperty,d=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(n(t)?d:u).test(a(t))}},function(t,e,r){var n=r(50),o=function(){var t=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=function(t){return!!o&&o in t}},function(t,e,r){var n=r(0)["__core-js_shared__"];t.exports=n},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e){var r=800,n=16,o=Date.now;t.exports=function(t){var e=0,i=0;return function(){var a=o(),u=n-(a-i);if(i=a,u>0){if(++e>=r)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,r){var n=r(18),o=r(20),i=r(21),a=r(22),u=r(80),s=r(23),c=200;t.exports=function(t,e,r){var f=-1,p=o,d=t.length,l=!0,v=[],h=v;if(r)l=!1,p=i;else if(d>=c){var g=e?null:u(t);if(g)return s(g);l=!1,p=a,h=new n}else h=e?[]:v;t:for(;++f<d;){var y=t[f],m=e?e(y):y;if(y=r||0!==y?y:0,l&&m==m){for(var D=h.length;D--;)if(h[D]===m)continue t;e&&h.push(m),v.push(y)}else p(h,m,r)||(h!==v&&h.push(m),v.push(y))}return v}},function(t,e,r){var n=r(56),o=r(62),i=r(68);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},function(t,e,r){var n=r(57),o=r(58),i=r(59),a=r(60),u=r(61);function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,t.exports=s},function(t,e,r){var n=r(4);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(4),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return r===o?void 0:r}return i.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(4),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},function(t,e,r){var n=r(4),o="__lodash_hash_undefined__";t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?o:e,this}},function(t,e,r){var n=r(63),o=r(64),i=r(65),a=r(66),u=r(67);function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,t.exports=s},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(5),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():o.call(e,r,1),--this.size,0))}},function(t,e,r){var n=r(5);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(5);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(5);t.exports=function(t,e){var r=this.__data__,o=n(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}},function(t,e,r){var n=r(2)(r(0),"Map");t.exports=n},function(t,e,r){var n=r(6);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(6);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(6);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(6);t.exports=function(t,e){var r=n(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}},function(t,e){var r="__lodash_hash_undefined__";t.exports=function(t){return this.__data__.set(t,r),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(77),o=r(78),i=r(79);t.exports=function(t,e,r){return e==e?i(t,e,r):n(t,o,r)}},function(t,e){t.exports=function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}},function(t,e,r){var n=r(81),o=r(82),i=r(23),a=n&&1/i(new n([,-0]))[1]==1/0?function(t){return new n(t)}:o;t.exports=a},function(t,e,r){var n=r(2)(r(0),"Set");t.exports=n},function(t,e){t.exports=function(){}},function(t,e,r){var n=r(84),o=r(9),i=r(24),a=o(function(t,e){return i(t)?n(t,e):[]});t.exports=a},function(t,e,r){var n=r(18),o=r(20),i=r(21),a=r(85),u=r(26),s=r(22),c=200;t.exports=function(t,e,r,f){var p=-1,d=o,l=!0,v=t.length,h=[],g=e.length;if(!v)return h;r&&(e=a(e,u(r))),f?(d=i,l=!1):e.length>=c&&(d=s,l=!1,e=new n(e));t:for(;++p<v;){var y=t[p],m=null==r?y:r(y);if(y=f||0!==y?y:0,l&&m==m){for(var D=g;D--;)if(e[D]===m)continue t;h.push(y)}else d(e,m,f)||h.push(y)}return h}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}},function(t,e,r){var n=r(19),o="Expected a function";function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(o);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(27),o=r(88),i=1;function a(t){var e=t.nodeType===i?t:t.parentElement;if(!e)return null;var r=e.getBoundingClientRect(),n=r.top;return{x:r.left,y:n}}e.getNodeClientOffset=a,e.getEventClientOffset=function(t){return{x:t.clientX,y:t.clientY}},e.getDragPreviewOffset=function(t,e,r,i,u){var s=function(t){return"IMG"===t.nodeName&&(n.isFirefox()||!document.documentElement.contains(t))}(e),c=a(s?t:e),f={x:r.x-c.x,y:r.y-c.y},p=t.offsetWidth,d=t.offsetHeight,l=i.anchorX,v=i.anchorY,h=function(t,e,r,o){var i=t?e.width:r,a=t?e.height:o;return n.isSafari()&&t&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}(s,e,p,d),g=h.dragPreviewWidth,y=h.dragPreviewHeight,m=u.offsetX,D=u.offsetY,x=0===D||D;return{x:0===m||m?m:new o.default([0,.5,1],[f.x,f.x/p*g,f.x+g-p]).interpolate(l),y:x?D:function(){var t=new o.default([0,.5,1],[f.y,f.y/d*y,f.y+y-d]).interpolate(v);return n.isSafari()&&s&&(t+=(window.devicePixelRatio-1)*y),t}()}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=t.length,n=[],o=0;o<r;o++)n.push(o);n.sort(function(e,r){return t[e]<t[r]?-1:1});var i,a,u=[],s=[],c=[];for(o=0;o<r-1;o++)i=t[o+1]-t[o],a=e[o+1]-e[o],s.push(i),u.push(a),c.push(a/i);var f=[c[0]];for(o=0;o<s.length-1;o++){var p=c[o],d=c[o+1];if(p*d<=0)f.push(0);else{i=s[o];var l=s[o+1],v=i+l;f.push(3*v/((v+l)/p+(v+i)/d))}}f.push(c[c.length-1]);var h,g=[],y=[];for(o=0;o<f.length-1;o++){h=c[o];var m=f[o],D=1/s[o];v=m+f[o+1]-h-h;g.push((h-m-v)*D),y.push(v*D*D)}this.xs=t,this.ys=e,this.c1s=f,this.c2s=g,this.c3s=y}return t.prototype.interpolate=function(t){var e=this,r=e.xs,n=e.ys,o=e.c1s,i=e.c2s,a=e.c3s,u=r.length-1;if(t===r[u])return n[u];for(var s,c=0,f=a.length-1;c<=f;){var p=r[s=Math.floor(.5*(c+f))];if(p<t)c=s+1;else{if(!(p>t))return n[s];f=s-1}}var d=t-r[u=Math.max(0,f)],l=d*d;return n[u]+o[u]*d+i[u]*l+a[u]*d*l},t}();e.default=n},function(t,e,r){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0});var o=r(12);function i(t,e,r){var n=e.reduce(function(e,r){return e||t.getData(r)},null);return null!=n?n:r}var a=((n={})[o.FILE]={exposeProperty:"files",matchesTypes:["Files"],getData:function(t){return Array.prototype.slice.call(t.files)}},n[o.URL]={exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(t,e){return i(t,e,"").split("\n")}},n[o.TEXT]={exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(t,e){return i(t,e,"")}},n);e.createNativeDragSource=function(t){var e=a[t],r=e.exposeProperty,n=e.matchesTypes,o=e.getData;return function(){function t(){var t;this.item=(t={},Object.defineProperty(t,r,{get:function(){return console.warn("Browser doesn't allow reading \""+r+'" until the drop event.'),null},enumerable:!0,configurable:!0}),t)}return t.prototype.mutateItemByReadingDataTransfer=function(t){delete this.item[r],this.item[r]=o(t,n)},t.prototype.canDrag=function(){return!0},t.prototype.beginDrag=function(){return this.item},t.prototype.isDragging=function(t,e){return e===t.getSourceId()},t.prototype.endDrag=function(){},t}()},e.matchNativeItemType=function(t){var e=Array.prototype.slice.call(t.types||[]);return Object.keys(a).filter(function(t){return a[t].matchesTypes.some(function(t){return e.indexOf(t)>-1})})[0]||null}},function(t,e,r){var n=r(9),o=r(10),i=r(91),a=r(92),u=Object.prototype,s=u.hasOwnProperty,c=n(function(t,e){t=Object(t);var r=-1,n=e.length,c=n>2?e[2]:void 0;for(c&&i(e[0],e[1],c)&&(n=1);++r<n;)for(var f=e[r],p=a(f),d=-1,l=p.length;++d<l;){var v=p[d],h=t[v];(void 0===h||o(h,u[v])&&!s.call(t,v))&&(t[v]=f[v])}return t});t.exports=c},function(t,e,r){var n=r(10),o=r(11),i=r(28),a=r(3);t.exports=function(t,e,r){if(!a(r))return!1;var u=typeof e;return!!("number"==u?o(r)&&i(e,r.length):"string"==u&&e in r)&&n(r[e],t)}},function(t,e,r){var n=r(93),o=r(100),i=r(11);t.exports=function(t){return i(t)?n(t,!0):o(t)}},function(t,e,r){var n=r(94),o=r(14),i=r(15),a=r(95),u=r(28),s=r(97),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=i(t),f=!r&&o(t),p=!r&&!f&&a(t),d=!r&&!f&&!p&&s(t),l=r||f||p||d,v=l?n(t.length,String):[],h=v.length;for(var g in t)!e&&!c.call(t,g)||l&&("length"==g||p&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,h))||v.push(g);return v}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e,r){(function(t){var n=r(0),o=r(96),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,u=a&&a.exports===i?n.Buffer:void 0,s=(u?u.isBuffer:void 0)||o;t.exports=s}).call(this,r(29)(t))},function(t,e){t.exports=function(){return!1}},function(t,e,r){var n=r(98),o=r(26),i=r(99),a=i&&i.isTypedArray,u=a?o(a):n;t.exports=u},function(t,e,r){var n=r(8),o=r(25),i=r(1),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[n(t)]}},function(t,e,r){(function(t){var n=r(13),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&n.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u}).call(this,r(29)(t))},function(t,e,r){var n=r(3),o=r(101),i=r(102),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=o(t),r=[];for(var u in t)("constructor"!=u||!e&&a.call(t,u))&&r.push(u);return r}},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},function(t,e,r){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return n||((n=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),n}}])}); |
@@ -0,3 +1,6 @@ | ||
declare type NodePredicate = (node: any) => boolean; | ||
export default class EnterLeaveCounter { | ||
private entered; | ||
private isNodeInDocument; | ||
constructor(isNodeInDocument: NodePredicate); | ||
enter(enteringNode: any): boolean; | ||
@@ -7,1 +10,2 @@ leave(leavingNode: any): boolean; | ||
} | ||
export {}; |
@@ -6,9 +6,11 @@ "use strict"; | ||
var EnterLeaveCounter = /** @class */ (function () { | ||
function EnterLeaveCounter() { | ||
function EnterLeaveCounter(isNodeInDocument) { | ||
this.entered = []; | ||
this.isNodeInDocument = isNodeInDocument; | ||
} | ||
EnterLeaveCounter.prototype.enter = function (enteringNode) { | ||
var _this = this; | ||
var previousLength = this.entered.length; | ||
var isNodeEntered = function (node) { | ||
return document.documentElement.contains(node) && | ||
return _this.isNodeInDocument(node) && | ||
(!node.contains || node.contains(enteringNode)); | ||
@@ -21,3 +23,3 @@ }; | ||
var previousLength = this.entered.length; | ||
this.entered = without(this.entered.filter(function (node) { return document.documentElement.contains(node); }), leavingNode); | ||
this.entered = without(this.entered.filter(this.isNodeInDocument), leavingNode); | ||
return previousLength > 0 && this.entered.length === 0; | ||
@@ -24,0 +26,0 @@ }; |
@@ -12,2 +12,3 @@ import { Backend, DragDropManager } from 'dnd-core'; | ||
private context; | ||
private enterLeaveCounter; | ||
private sourcePreviewNodes; | ||
@@ -17,3 +18,2 @@ private sourcePreviewNodeOptions; | ||
private sourceNodeOptions; | ||
private enterLeaveCounter; | ||
private dragStartSourceIds; | ||
@@ -25,4 +25,2 @@ private dropTargetIds; | ||
private currentDragSourceNode; | ||
private currentDragSourceNodeOffset; | ||
private currentDragSourceNodeOffsetChanged; | ||
private altKeyPressed; | ||
@@ -52,3 +50,2 @@ private mouseMoveTimeoutTimer; | ||
private clearCurrentDragSourceNode; | ||
private checkIfCurrentDragSourceRectChanged; | ||
private handleTopDragStartCapture; | ||
@@ -55,0 +52,0 @@ private handleDragStart; |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -14,7 +8,6 @@ var EnterLeaveCounter_1 = require("./EnterLeaveCounter"); | ||
var NativeTypes = require("./NativeTypes"); | ||
var autobind_decorator_1 = require("autobind-decorator"); | ||
var defaults = require('lodash/defaults'); | ||
var shallowEqual = require('shallowequal'); | ||
var HTML5Backend = /** @class */ (function () { | ||
function HTML5Backend(manager) { | ||
var _this = this; | ||
this.sourcePreviewNodes = new Map(); | ||
@@ -24,3 +17,2 @@ this.sourcePreviewNodeOptions = new Map(); | ||
this.sourceNodeOptions = new Map(); | ||
this.enterLeaveCounter = new EnterLeaveCounter_1.default(); | ||
this.dragStartSourceIds = null; | ||
@@ -32,4 +24,2 @@ this.dropTargetIds = []; | ||
this.currentDragSourceNode = null; | ||
this.currentDragSourceNodeOffset = null; | ||
this.currentDragSourceNodeOffsetChanged = false; | ||
this.altKeyPressed = false; | ||
@@ -39,2 +29,253 @@ this.mouseMoveTimeoutTimer = null; | ||
this.dragOverTargetIds = null; | ||
this.getSourceClientOffset = function (sourceId) { | ||
return OffsetUtils_1.getNodeClientOffset(_this.sourceNodes.get(sourceId)); | ||
}; | ||
this.endDragNativeItem = function () { | ||
if (!_this.isDraggingNativeItem()) { | ||
return; | ||
} | ||
_this.actions.endDrag(); | ||
_this.registry.removeSource(_this.currentNativeHandle); | ||
_this.currentNativeHandle = null; | ||
_this.currentNativeSource = null; | ||
}; | ||
this.isNodeInDocument = function (node) { | ||
// Check the node either in the main document or in the current context | ||
return ((!!document && document.body.contains(node)) || | ||
(!!_this.window && _this.window.document.body.contains(node))); | ||
}; | ||
this.endDragIfSourceWasRemovedFromDOM = function () { | ||
var node = _this.currentDragSourceNode; | ||
if (_this.isNodeInDocument(node)) { | ||
return; | ||
} | ||
if (_this.clearCurrentDragSourceNode()) { | ||
_this.actions.endDrag(); | ||
} | ||
}; | ||
this.handleTopDragStartCapture = function () { | ||
_this.clearCurrentDragSourceNode(); | ||
_this.dragStartSourceIds = []; | ||
}; | ||
this.handleTopDragStart = function (e) { | ||
var dragStartSourceIds = _this.dragStartSourceIds; | ||
_this.dragStartSourceIds = null; | ||
var clientOffset = OffsetUtils_1.getEventClientOffset(e); | ||
// Avoid crashing if we missed a drop event or our previous drag died | ||
if (_this.monitor.isDragging()) { | ||
_this.actions.endDrag(); | ||
} | ||
// Fire off the initial coordinates | ||
_this.actions.initCoords(dragStartSourceIds || [], { | ||
getSourceClientOffset: _this.getSourceClientOffset, | ||
clientOffset: clientOffset, | ||
}); | ||
// Don't publish the source just yet (see why below) | ||
_this.actions.beginDrag(dragStartSourceIds || [], { | ||
publishSource: false, | ||
getSourceClientOffset: _this.getSourceClientOffset, | ||
clientOffset: clientOffset, | ||
}); | ||
var dataTransfer = e.dataTransfer; | ||
var nativeType = NativeDragSources_1.matchNativeItemType(dataTransfer); | ||
if (_this.monitor.isDragging()) { | ||
if (typeof dataTransfer.setDragImage === 'function') { | ||
// Use custom drag image if user specifies it. | ||
// If child drag source refuses drag but parent agrees, | ||
// use parent's node as drag image. Neither works in IE though. | ||
var sourceId = _this.monitor.getSourceId(); | ||
var sourceNode = _this.sourceNodes.get(sourceId); | ||
var dragPreview = _this.sourcePreviewNodes.get(sourceId) || sourceNode; | ||
var _a = _this.getCurrentSourcePreviewNodeOptions(), anchorX = _a.anchorX, anchorY = _a.anchorY, offsetX = _a.offsetX, offsetY = _a.offsetY; | ||
var anchorPoint = { anchorX: anchorX, anchorY: anchorY }; | ||
var offsetPoint = { offsetX: offsetX, offsetY: offsetY }; | ||
var dragPreviewOffset = OffsetUtils_1.getDragPreviewOffset(sourceNode, dragPreview, clientOffset, anchorPoint, offsetPoint); | ||
dataTransfer.setDragImage(dragPreview, dragPreviewOffset.x, dragPreviewOffset.y); | ||
} | ||
try { | ||
// Firefox won't drag without setting data | ||
dataTransfer.setData('application/json', {}); | ||
} | ||
catch (err) { | ||
// IE doesn't support MIME types in setData | ||
} | ||
// Store drag source node so we can check whether | ||
// it is removed from DOM and trigger endDrag manually. | ||
_this.setCurrentDragSourceNode(e.target); | ||
// Now we are ready to publish the drag source.. or are we not? | ||
var captureDraggingState = _this.getCurrentSourcePreviewNodeOptions().captureDraggingState; | ||
if (!captureDraggingState) { | ||
// Usually we want to publish it in the next tick so that browser | ||
// is able to screenshot the current (not yet dragging) state. | ||
// | ||
// It also neatly avoids a situation where render() returns null | ||
// in the same tick for the source element, and browser freaks out. | ||
setTimeout(function () { return _this.actions.publishDragSource(); }, 0); | ||
} | ||
else { | ||
// In some cases the user may want to override this behavior, e.g. | ||
// to work around IE not supporting custom drag previews. | ||
// | ||
// When using a custom drag layer, the only way to prevent | ||
// the default drag preview from drawing in IE is to screenshot | ||
// the dragging state in which the node itself has zero opacity | ||
// and height. In this case, though, returning null from render() | ||
// will abruptly end the dragging, which is not obvious. | ||
// | ||
// This is the reason such behavior is strictly opt-in. | ||
_this.actions.publishDragSource(); | ||
} | ||
} | ||
else if (nativeType) { | ||
// A native item (such as URL) dragged from inside the document | ||
_this.beginDragNativeItem(nativeType); | ||
} | ||
else if (!dataTransfer.types && | ||
(!e.target.hasAttribute || !e.target.hasAttribute('draggable'))) { | ||
// Looks like a Safari bug: dataTransfer.types is null, but there was no draggable. | ||
// Just let it drag. It's a native type (URL or text) and will be picked up in | ||
// dragenter handler. | ||
return; | ||
} | ||
else { | ||
// If by this time no drag source reacted, tell browser not to drag. | ||
e.preventDefault(); | ||
} | ||
}; | ||
this.handleTopDragEndCapture = function () { | ||
if (_this.clearCurrentDragSourceNode()) { | ||
// Firefox can dispatch this event in an infinite loop | ||
// if dragend handler does something like showing an alert. | ||
// Only proceed if we have not handled it already. | ||
_this.actions.endDrag(); | ||
} | ||
}; | ||
this.handleTopDragEnterCapture = function (e) { | ||
_this.dragEnterTargetIds = []; | ||
var isFirstEnter = _this.enterLeaveCounter.enter(e.target); | ||
if (!isFirstEnter || _this.monitor.isDragging()) { | ||
return; | ||
} | ||
var dataTransfer = e.dataTransfer; | ||
var nativeType = NativeDragSources_1.matchNativeItemType(dataTransfer); | ||
if (nativeType) { | ||
// A native item (such as file or URL) dragged from outside the document | ||
_this.beginDragNativeItem(nativeType); | ||
} | ||
}; | ||
this.handleTopDragEnter = function (e) { | ||
var dragEnterTargetIds = _this.dragEnterTargetIds; | ||
_this.dragEnterTargetIds = []; | ||
if (!_this.monitor.isDragging()) { | ||
// This is probably a native item type we don't understand. | ||
return; | ||
} | ||
_this.altKeyPressed = e.altKey; | ||
if (!BrowserDetector_1.isFirefox()) { | ||
// Don't emit hover in `dragenter` on Firefox due to an edge case. | ||
// If the target changes position as the result of `dragenter`, Firefox | ||
// will still happily dispatch `dragover` despite target being no longer | ||
// there. The easy solution is to only fire `hover` in `dragover` on FF. | ||
_this.actions.hover(dragEnterTargetIds, { | ||
clientOffset: OffsetUtils_1.getEventClientOffset(e), | ||
}); | ||
} | ||
var canDrop = dragEnterTargetIds.some(function (targetId) { | ||
return _this.monitor.canDropOnTarget(targetId); | ||
}); | ||
if (canDrop) { | ||
// IE requires this to fire dragover events | ||
e.preventDefault(); | ||
e.dataTransfer.dropEffect = _this.getCurrentDropEffect(); | ||
} | ||
}; | ||
this.handleTopDragOverCapture = function () { | ||
_this.dragOverTargetIds = []; | ||
}; | ||
this.handleTopDragOver = function (e) { | ||
var dragOverTargetIds = _this.dragOverTargetIds; | ||
_this.dragOverTargetIds = []; | ||
if (!_this.monitor.isDragging()) { | ||
// This is probably a native item type we don't understand. | ||
// Prevent default "drop and blow away the whole document" action. | ||
e.preventDefault(); | ||
e.dataTransfer.dropEffect = 'none'; | ||
return; | ||
} | ||
_this.altKeyPressed = e.altKey; | ||
_this.actions.hover(dragOverTargetIds || [], { | ||
clientOffset: OffsetUtils_1.getEventClientOffset(e), | ||
}); | ||
var canDrop = (dragOverTargetIds || []).some(function (targetId) { | ||
return _this.monitor.canDropOnTarget(targetId); | ||
}); | ||
if (canDrop) { | ||
// Show user-specified drop effect. | ||
e.preventDefault(); | ||
e.dataTransfer.dropEffect = _this.getCurrentDropEffect(); | ||
} | ||
else if (_this.isDraggingNativeItem()) { | ||
// Don't show a nice cursor but still prevent default | ||
// "drop and blow away the whole document" action. | ||
e.preventDefault(); | ||
e.dataTransfer.dropEffect = 'none'; | ||
} | ||
else { | ||
e.preventDefault(); | ||
e.dataTransfer.dropEffect = 'none'; | ||
} | ||
}; | ||
this.handleTopDragLeaveCapture = function (e) { | ||
if (_this.isDraggingNativeItem()) { | ||
e.preventDefault(); | ||
} | ||
var isLastLeave = _this.enterLeaveCounter.leave(e.target); | ||
if (!isLastLeave) { | ||
return; | ||
} | ||
if (_this.isDraggingNativeItem()) { | ||
_this.endDragNativeItem(); | ||
} | ||
}; | ||
this.handleTopDropCapture = function (e) { | ||
_this.dropTargetIds = []; | ||
e.preventDefault(); | ||
if (_this.isDraggingNativeItem()) { | ||
_this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer); | ||
} | ||
_this.enterLeaveCounter.reset(); | ||
}; | ||
this.handleTopDrop = function (e) { | ||
var dropTargetIds = _this.dropTargetIds; | ||
_this.dropTargetIds = []; | ||
_this.actions.hover(dropTargetIds, { | ||
clientOffset: OffsetUtils_1.getEventClientOffset(e), | ||
}); | ||
_this.actions.drop({ dropEffect: _this.getCurrentDropEffect() }); | ||
if (_this.isDraggingNativeItem()) { | ||
_this.endDragNativeItem(); | ||
} | ||
else { | ||
_this.endDragIfSourceWasRemovedFromDOM(); | ||
} | ||
}; | ||
this.handleSelectStart = function (e) { | ||
var target = e.target; | ||
// Only IE requires us to explicitly say | ||
// we want drag drop operation to start | ||
if (typeof target.dragDrop !== 'function') { | ||
return; | ||
} | ||
// Inputs and textareas should be selectable | ||
if (target.tagName === 'INPUT' || | ||
target.tagName === 'SELECT' || | ||
target.tagName === 'TEXTAREA' || | ||
target.isContentEditable) { | ||
return; | ||
} | ||
// For other targets, ask IE | ||
// to enable drag and drop | ||
e.preventDefault(); | ||
target.dragDrop(); | ||
}; | ||
this.actions = manager.getActions(); | ||
@@ -44,2 +285,3 @@ this.monitor = manager.getMonitor(); | ||
this.context = manager.getContext(); | ||
this.enterLeaveCounter = new EnterLeaveCounter_1.default(this.isNodeInDocument); | ||
} | ||
@@ -176,5 +418,2 @@ Object.defineProperty(HTML5Backend.prototype, "window", { | ||
}; | ||
HTML5Backend.prototype.getSourceClientOffset = function (sourceId) { | ||
return OffsetUtils_1.getNodeClientOffset(this.sourceNodes.get(sourceId)); | ||
}; | ||
HTML5Backend.prototype.isDraggingNativeItem = function () { | ||
@@ -191,25 +430,2 @@ var itemType = this.monitor.getItemType(); | ||
}; | ||
HTML5Backend.prototype.endDragNativeItem = function () { | ||
if (!this.isDraggingNativeItem()) { | ||
return; | ||
} | ||
this.actions.endDrag(); | ||
this.registry.removeSource(this.currentNativeHandle); | ||
this.currentNativeHandle = null; | ||
this.currentNativeSource = null; | ||
}; | ||
HTML5Backend.prototype.isNodeInDocument = function (node) { | ||
// Check the node either in the main document or in the current context | ||
return ((!!document && document.body.contains(node)) || | ||
(!!this.window && this.window.document.body.contains(node))); | ||
}; | ||
HTML5Backend.prototype.endDragIfSourceWasRemovedFromDOM = function () { | ||
var node = this.currentDragSourceNode; | ||
if (this.isNodeInDocument(node)) { | ||
return; | ||
} | ||
if (this.clearCurrentDragSourceNode()) { | ||
this.actions.endDrag(); | ||
} | ||
}; | ||
HTML5Backend.prototype.setCurrentDragSourceNode = function (node) { | ||
@@ -219,4 +435,2 @@ var _this = this; | ||
this.currentDragSourceNode = node; | ||
this.currentDragSourceNodeOffset = OffsetUtils_1.getNodeClientOffset(node); | ||
this.currentDragSourceNodeOffsetChanged = false; | ||
// A timeout of > 0 is necessary to resolve Firefox issue referenced | ||
@@ -247,4 +461,2 @@ // See: | ||
this.currentDragSourceNode = null; | ||
this.currentDragSourceNodeOffset = null; | ||
this.currentDragSourceNodeOffsetChanged = false; | ||
if (this.window) { | ||
@@ -259,17 +471,2 @@ this.window.clearTimeout(this.mouseMoveTimeoutTimer); | ||
}; | ||
HTML5Backend.prototype.checkIfCurrentDragSourceRectChanged = function () { | ||
var node = this.currentDragSourceNode; | ||
if (!node) { | ||
return false; | ||
} | ||
if (this.currentDragSourceNodeOffsetChanged) { | ||
return true; | ||
} | ||
this.currentDragSourceNodeOffsetChanged = !shallowEqual(OffsetUtils_1.getNodeClientOffset(node), this.currentDragSourceNodeOffset); | ||
return this.currentDragSourceNodeOffsetChanged; | ||
}; | ||
HTML5Backend.prototype.handleTopDragStartCapture = function () { | ||
this.clearCurrentDragSourceNode(); | ||
this.dragStartSourceIds = []; | ||
}; | ||
HTML5Backend.prototype.handleDragStart = function (e, sourceId) { | ||
@@ -281,137 +478,5 @@ if (!this.dragStartSourceIds) { | ||
}; | ||
HTML5Backend.prototype.handleTopDragStart = function (e) { | ||
var _this = this; | ||
var dragStartSourceIds = this.dragStartSourceIds; | ||
this.dragStartSourceIds = null; | ||
var clientOffset = OffsetUtils_1.getEventClientOffset(e); | ||
// Avoid crashing if we missed a drop event or our previous drag died | ||
if (this.monitor.isDragging()) { | ||
this.actions.endDrag(); | ||
} | ||
// Don't publish the source just yet (see why below) | ||
this.actions.beginDrag(dragStartSourceIds || [], { | ||
publishSource: false, | ||
getSourceClientOffset: this.getSourceClientOffset, | ||
clientOffset: clientOffset, | ||
}); | ||
var dataTransfer = e.dataTransfer; | ||
var nativeType = NativeDragSources_1.matchNativeItemType(dataTransfer); | ||
if (this.monitor.isDragging()) { | ||
if (typeof dataTransfer.setDragImage === 'function') { | ||
// Use custom drag image if user specifies it. | ||
// If child drag source refuses drag but parent agrees, | ||
// use parent's node as drag image. Neither works in IE though. | ||
var sourceId = this.monitor.getSourceId(); | ||
var sourceNode = this.sourceNodes.get(sourceId); | ||
var dragPreview = this.sourcePreviewNodes.get(sourceId) || sourceNode; | ||
var _a = this.getCurrentSourcePreviewNodeOptions(), anchorX = _a.anchorX, anchorY = _a.anchorY, offsetX = _a.offsetX, offsetY = _a.offsetY; | ||
var anchorPoint = { anchorX: anchorX, anchorY: anchorY }; | ||
var offsetPoint = { offsetX: offsetX, offsetY: offsetY }; | ||
var dragPreviewOffset = OffsetUtils_1.getDragPreviewOffset(sourceNode, dragPreview, clientOffset, anchorPoint, offsetPoint); | ||
dataTransfer.setDragImage(dragPreview, dragPreviewOffset.x, dragPreviewOffset.y); | ||
} | ||
try { | ||
// Firefox won't drag without setting data | ||
dataTransfer.setData('application/json', {}); | ||
} | ||
catch (err) { | ||
// IE doesn't support MIME types in setData | ||
} | ||
// Store drag source node so we can check whether | ||
// it is removed from DOM and trigger endDrag manually. | ||
this.setCurrentDragSourceNode(e.target); | ||
// Now we are ready to publish the drag source.. or are we not? | ||
var captureDraggingState = this.getCurrentSourcePreviewNodeOptions().captureDraggingState; | ||
if (!captureDraggingState) { | ||
// Usually we want to publish it in the next tick so that browser | ||
// is able to screenshot the current (not yet dragging) state. | ||
// | ||
// It also neatly avoids a situation where render() returns null | ||
// in the same tick for the source element, and browser freaks out. | ||
setTimeout(function () { return _this.actions.publishDragSource(); }, 0); | ||
} | ||
else { | ||
// In some cases the user may want to override this behavior, e.g. | ||
// to work around IE not supporting custom drag previews. | ||
// | ||
// When using a custom drag layer, the only way to prevent | ||
// the default drag preview from drawing in IE is to screenshot | ||
// the dragging state in which the node itself has zero opacity | ||
// and height. In this case, though, returning null from render() | ||
// will abruptly end the dragging, which is not obvious. | ||
// | ||
// This is the reason such behavior is strictly opt-in. | ||
this.actions.publishDragSource(); | ||
} | ||
} | ||
else if (nativeType) { | ||
// A native item (such as URL) dragged from inside the document | ||
this.beginDragNativeItem(nativeType); | ||
} | ||
else if (!dataTransfer.types && | ||
(!e.target.hasAttribute || !e.target.hasAttribute('draggable'))) { | ||
// Looks like a Safari bug: dataTransfer.types is null, but there was no draggable. | ||
// Just let it drag. It's a native type (URL or text) and will be picked up in | ||
// dragenter handler. | ||
return; | ||
} | ||
else { | ||
// If by this time no drag source reacted, tell browser not to drag. | ||
e.preventDefault(); | ||
} | ||
}; | ||
HTML5Backend.prototype.handleTopDragEndCapture = function () { | ||
if (this.clearCurrentDragSourceNode()) { | ||
// Firefox can dispatch this event in an infinite loop | ||
// if dragend handler does something like showing an alert. | ||
// Only proceed if we have not handled it already. | ||
this.actions.endDrag(); | ||
} | ||
}; | ||
HTML5Backend.prototype.handleTopDragEnterCapture = function (e) { | ||
this.dragEnterTargetIds = []; | ||
var isFirstEnter = this.enterLeaveCounter.enter(e.target); | ||
if (!isFirstEnter || this.monitor.isDragging()) { | ||
return; | ||
} | ||
var dataTransfer = e.dataTransfer; | ||
var nativeType = NativeDragSources_1.matchNativeItemType(dataTransfer); | ||
if (nativeType) { | ||
// A native item (such as file or URL) dragged from outside the document | ||
this.beginDragNativeItem(nativeType); | ||
} | ||
}; | ||
HTML5Backend.prototype.handleDragEnter = function (e, targetId) { | ||
this.dragEnterTargetIds.unshift(targetId); | ||
}; | ||
HTML5Backend.prototype.handleTopDragEnter = function (e) { | ||
var _this = this; | ||
var dragEnterTargetIds = this.dragEnterTargetIds; | ||
this.dragEnterTargetIds = []; | ||
if (!this.monitor.isDragging()) { | ||
// This is probably a native item type we don't understand. | ||
return; | ||
} | ||
this.altKeyPressed = e.altKey; | ||
if (!BrowserDetector_1.isFirefox()) { | ||
// Don't emit hover in `dragenter` on Firefox due to an edge case. | ||
// If the target changes position as the result of `dragenter`, Firefox | ||
// will still happily dispatch `dragover` despite target being no longer | ||
// there. The easy solution is to only fire `hover` in `dragover` on FF. | ||
this.actions.hover(dragEnterTargetIds, { | ||
clientOffset: OffsetUtils_1.getEventClientOffset(e), | ||
}); | ||
} | ||
var canDrop = dragEnterTargetIds.some(function (targetId) { | ||
return _this.monitor.canDropOnTarget(targetId); | ||
}); | ||
if (canDrop) { | ||
// IE requires this to fire dragover events | ||
e.preventDefault(); | ||
e.dataTransfer.dropEffect = this.getCurrentDropEffect(); | ||
} | ||
}; | ||
HTML5Backend.prototype.handleTopDragOverCapture = function () { | ||
this.dragOverTargetIds = []; | ||
}; | ||
HTML5Backend.prototype.handleDragOver = function (e, targetId) { | ||
@@ -423,141 +488,7 @@ if (this.dragOverTargetIds === null) { | ||
}; | ||
HTML5Backend.prototype.handleTopDragOver = function (e) { | ||
var _this = this; | ||
var dragOverTargetIds = this.dragOverTargetIds; | ||
this.dragOverTargetIds = []; | ||
if (!this.monitor.isDragging()) { | ||
// This is probably a native item type we don't understand. | ||
// Prevent default "drop and blow away the whole document" action. | ||
e.preventDefault(); | ||
e.dataTransfer.dropEffect = 'none'; | ||
return; | ||
} | ||
this.altKeyPressed = e.altKey; | ||
this.actions.hover(dragOverTargetIds || [], { | ||
clientOffset: OffsetUtils_1.getEventClientOffset(e), | ||
}); | ||
var canDrop = (dragOverTargetIds || []).some(function (targetId) { | ||
return _this.monitor.canDropOnTarget(targetId); | ||
}); | ||
if (canDrop) { | ||
// Show user-specified drop effect. | ||
e.preventDefault(); | ||
e.dataTransfer.dropEffect = this.getCurrentDropEffect(); | ||
} | ||
else if (this.isDraggingNativeItem()) { | ||
// Don't show a nice cursor but still prevent default | ||
// "drop and blow away the whole document" action. | ||
e.preventDefault(); | ||
e.dataTransfer.dropEffect = 'none'; | ||
} | ||
else if (this.checkIfCurrentDragSourceRectChanged()) { | ||
// Prevent animating to incorrect position. | ||
// Drop effect must be other than 'none' to prevent animation. | ||
e.preventDefault(); | ||
e.dataTransfer.dropEffect = 'move'; | ||
} | ||
}; | ||
HTML5Backend.prototype.handleTopDragLeaveCapture = function (e) { | ||
if (this.isDraggingNativeItem()) { | ||
e.preventDefault(); | ||
} | ||
var isLastLeave = this.enterLeaveCounter.leave(e.target); | ||
if (!isLastLeave) { | ||
return; | ||
} | ||
if (this.isDraggingNativeItem()) { | ||
this.endDragNativeItem(); | ||
} | ||
}; | ||
HTML5Backend.prototype.handleTopDropCapture = function (e) { | ||
this.dropTargetIds = []; | ||
e.preventDefault(); | ||
if (this.isDraggingNativeItem()) { | ||
this.currentNativeSource.mutateItemByReadingDataTransfer(e.dataTransfer); | ||
} | ||
this.enterLeaveCounter.reset(); | ||
}; | ||
HTML5Backend.prototype.handleDrop = function (e, targetId) { | ||
this.dropTargetIds.unshift(targetId); | ||
}; | ||
HTML5Backend.prototype.handleTopDrop = function (e) { | ||
var dropTargetIds = this.dropTargetIds; | ||
this.dropTargetIds = []; | ||
this.actions.hover(dropTargetIds, { | ||
clientOffset: OffsetUtils_1.getEventClientOffset(e), | ||
}); | ||
this.actions.drop({ dropEffect: this.getCurrentDropEffect() }); | ||
if (this.isDraggingNativeItem()) { | ||
this.endDragNativeItem(); | ||
} | ||
else { | ||
this.endDragIfSourceWasRemovedFromDOM(); | ||
} | ||
}; | ||
HTML5Backend.prototype.handleSelectStart = function (e) { | ||
var target = e.target; | ||
// Only IE requires us to explicitly say | ||
// we want drag drop operation to start | ||
if (typeof target.dragDrop !== 'function') { | ||
return; | ||
} | ||
// Inputs and textareas should be selectable | ||
if (target.tagName === 'INPUT' || | ||
target.tagName === 'SELECT' || | ||
target.tagName === 'TEXTAREA' || | ||
target.isContentEditable) { | ||
return; | ||
} | ||
// For other targets, ask IE | ||
// to enable drag and drop | ||
e.preventDefault(); | ||
target.dragDrop(); | ||
}; | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "getSourceClientOffset", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "endDragNativeItem", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "isNodeInDocument", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "endDragIfSourceWasRemovedFromDOM", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "handleTopDragStartCapture", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "handleTopDragStart", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "handleTopDragEndCapture", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "handleTopDragEnterCapture", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "handleTopDragEnter", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "handleTopDragOverCapture", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "handleTopDragOver", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "handleTopDragLeaveCapture", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "handleTopDropCapture", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "handleTopDrop", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "handleSelectStart", null); | ||
return HTML5Backend; | ||
}()); | ||
exports.default = HTML5Backend; |
@@ -54,3 +54,3 @@ "use strict"; | ||
// Align at the center | ||
offsetFromDragPreview.y / sourceHeight * dragPreviewHeight, | ||
(offsetFromDragPreview.y / sourceHeight) * dragPreviewHeight, | ||
// Dock to the bottom | ||
@@ -74,3 +74,3 @@ offsetFromDragPreview.y + dragPreviewHeight - sourceHeight, | ||
// Align at the center | ||
offsetFromDragPreview.x / sourceWidth * dragPreviewWidth, | ||
(offsetFromDragPreview.x / sourceWidth) * dragPreviewWidth, | ||
// Dock to the right | ||
@@ -77,0 +77,0 @@ offsetFromDragPreview.x + dragPreviewWidth - sourceWidth, |
{ | ||
"name": "react-dnd-html5-backend", | ||
"version": "5.0.1", | ||
"version": "6.0.0", | ||
"description": "HTML5 backend for React DnD", | ||
@@ -23,19 +23,17 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"autobind-decorator": "^2.1.0", | ||
"dnd-core": "^4.0.5", | ||
"lodash": "^4.17.10", | ||
"shallowequal": "^1.0.2" | ||
"dnd-core": "^6.0.0", | ||
"lodash": "^4.17.11" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "10.3.2", | ||
"@types/react": "^16.3.16", | ||
"@types/shallowequal": "^0.2.2", | ||
"npm-run-all": "^4.1.2", | ||
"react": "^16.4.0", | ||
"react-dnd-test-backend": "^5.0.1", | ||
"@types/react": "^16.4.18", | ||
"npm-run-all": "^4.1.3", | ||
"react": "^16.6.0", | ||
"react-dnd-test-backend": "^6.0.0", | ||
"rimraf": "^2.6.2", | ||
"ts-loader": "^4.2.0", | ||
"typescript": "^2.9.1", | ||
"webpack": "^4.6.0" | ||
} | ||
"ts-loader": "^5.3.0", | ||
"typescript": "^3.1.6", | ||
"webpack": "^4.23.1", | ||
"webpack-cli": "^3.1.2" | ||
}, | ||
"gitHead": "21b878d2c66f020aa5248b085f4438b59e9c935b" | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
242479
2
9
2227
+ Addeddnd-core@6.0.0(transitive)
- Removedautobind-decorator@^2.1.0
- Removedshallowequal@^1.0.2
- Removedautobind-decorator@2.4.0(transitive)
- Removeddnd-core@4.0.5(transitive)
- Removedshallowequal@1.1.0(transitive)
Updateddnd-core@^6.0.0
Updatedlodash@^4.17.11