react-dnd-html5-backend
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -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(27),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(52);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(6)(Object,"create");t.exports=n},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},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(95),o=r(88);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},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(28),o=r(26);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(0).Symbol;t.exports=n},function(t,e,r){var n=r(10),o=r(93),i=r(92),a="[object Null]",s="[object Undefined]",u=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?s:a:u&&u in Object(t)?o(t):i(t)}},function(t,e,r){var n=r(29),o=r(101),i=r(99);t.exports=function(t,e){return i(o(t,e,n),t+"")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(36);e.isFirefox=n(()=>/firefox/i.test(navigator.userAgent)),e.isSafari=n(()=>Boolean(window.safari))},function(t,e,r){var n=r(8),o=r(4);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(46);t.exports=function(t,e){return!(null==t||!t.length)&&n(t,e,0)>-1}},function(t,e,r){var n=r(67),o=r(53),i=r(51),a=r(50),s=r(49);function u(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])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,r){var n=r(19),o=r(48),i=r(47);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){t.exports=function(t){return function(e){return 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){var r=Array.isArray;t.exports=r},function(t,e,r){var n=r(82),o=r(4),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return o(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},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){var r=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r(94))},function(t,e,r){var n=r(11),o=r(5),i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(t){if(!o(t))return!1;var e=n(t);return e==a||e==s||e==i||e==u}},function(t,e){t.exports=function(t){return t}},function(t,e,r){"use strict";let 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 s=Object.prototype.hasOwnProperty.bind(e),u=0;u<i.length;u++){var c=i[u];if(!s(c))return!1;var f=t[c],d=e[c];if(!1===(o=r?r.call(n,f,d,c):void 0)||void 0===o&&f!==d)return!1}return!0}},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=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});const o=n(r(7));function i(t,e,r){const n=e.reduce((e,r)=>e||t.getData(r),null);return null!=n?n:r}const a={[o.FILE]:{exposeProperty:"files",matchesTypes:["Files"],getData:t=>Array.prototype.slice.call(t.files)},[o.URL]:{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:(t,e)=>i(t,e,"").split("\n")},[o.TEXT]:{exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:(t,e)=>i(t,e,"")}};e.createNativeDragSource=function(t){const{exposeProperty:e,matchesTypes:r,getData:n}=a[t];return class{constructor(){this.item={get[e](){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}}}mutateItemByReadingDataTransfer(t){delete this.item[e],this.item[e]=n(t,r)}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,e){return e===t.getSourceId()}endDrag(){}}},e.matchNativeItemType=function(t){const e=Array.prototype.slice.call(t.types||[]);return Object.keys(a).filter(t=>{const{matchesTypes:r}=a[t];return r.some(t=>e.indexOf(t)>-1)})[0]||null}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=class{constructor(t,e){const{length:r}=t,n=[];for(let t=0;t<r;t++)n.push(t);n.sort((e,r)=>t[e]<t[r]?-1:1);const o=[],i=[],a=[];let s,u;for(let n=0;n<r-1;n++)s=t[n+1]-t[n],u=e[n+1]-e[n],i.push(s),o.push(u),a.push(u/s);const c=[a[0]];for(let t=0;t<i.length-1;t++){const e=a[t],r=a[t+1];if(e*r<=0)c.push(0);else{s=i[t];const n=i[t+1],o=s+n;c.push(3*o/((o+n)/e+(o+s)/r))}}c.push(a[a.length-1]);const f=[],d=[];let l;for(let t=0;t<c.length-1;t++){l=a[t];const e=c[t],r=1/i[t],n=e+c[t+1]-l-l;f.push((l-e-n)*r),d.push(n*r*r)}this.xs=t,this.ys=e,this.c1s=c,this.c2s=f,this.c3s=d}interpolate(t){const{xs:e,ys:r,c1s:n,c2s:o,c3s:i}=this;let a=e.length-1;if(t===e[a])return r[a];let s,u=0,c=i.length-1;for(;u<=c;){const n=e[s=Math.floor(.5*(u+c))];if(n<t)u=s+1;else{if(!(n>t))return r[s];c=s-1}}const f=t-e[a=Math.max(0,c)],d=f*f;return r[a]+n[a]*f+o[a]*d+i[a]*f*d}}},function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=r(13),i=n(r(34)),a=1;function s(t){const e=t.nodeType===a?t:t.parentElement;if(!e)return null;const{top:r,left:n}=e.getBoundingClientRect();return{x:n,y:r}}e.getNodeClientOffset=s,e.getEventClientOffset=function(t){return{x:t.clientX,y:t.clientY}},e.getDragPreviewOffset=function(t,e,r,n,a){const u="IMG"===(c=e).nodeName&&(o.isFirefox()||!document.documentElement.contains(c));var c;const f=s(u?t:e),d={x:r.x-f.x,y:r.y-f.y},{offsetWidth:l,offsetHeight:p}=t,{anchorX:h,anchorY:g}=n,{dragPreviewWidth:v,dragPreviewHeight:y}=function(t,e,r,n){let i=t?e.width:r,a=t?e.height:n;return o.isSafari()&&t&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}(u,e,l,p),{offsetX:m,offsetY:D}=a,_=0===D||D;return{x:0===m||m?m:new i.default([0,.5,1],[d.x,d.x/l*v,d.x+v-l]).interpolate(h),y:_?D:(()=>{let t=new i.default([0,.5,1],[d.y,d.y/p*y,d.y+y-p]).interpolate(g);return o.isSafari()&&u&&(t+=(window.devicePixelRatio-1)*y),t})()}}},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){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(20),o=r(18),i=r(17),a=r(37),s=r(21),u=r(16),c=200;t.exports=function(t,e,r,f){var d=-1,l=o,p=!0,h=t.length,g=[],v=e.length;if(!h)return g;r&&(e=a(e,s(r))),f?(l=i,p=!1):e.length>=c&&(l=u,p=!1,e=new n(e));t:for(;++d<h;){var y=t[d],m=null==r?y:r(y);if(y=f||0!==y?y:0,p&&m==m){for(var D=v;D--;)if(e[D]===m)continue t;g.push(y)}else l(e,m,f)||g.push(y)}return g}},function(t,e,r){var n=r(38),o=r(12),i=r(14),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(6)(r(0),"Set");t.exports=n},function(t,e,r){var n=r(41),o=r(40),i=r(15),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(45),o=r(44),i=r(43);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(6)(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(59),o=r(58),i=r(57),a=r(56),s=r(55);function u(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])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},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(65),o=r(64),i=r(63),a=r(62),s=r(61);function u(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])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,r){var n=r(66),o=r(60),i=r(54);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(20),o=r(18),i=r(17),a=r(16),s=r(42),u=r(15),c=200;t.exports=function(t,e,r){var f=-1,d=o,l=t.length,p=!0,h=[],g=h;if(r)p=!1,d=i;else if(l>=c){var v=e?null:s(t);if(v)return u(v);p=!1,d=a,g=new n}else g=e?[]:h;t:for(;++f<l;){var y=t[f],m=e?e(y):y;if(y=r||0!==y?y:0,p&&m==m){for(var D=g.length;D--;)if(g[D]===m)continue t;e&&g.push(m),h.push(y)}else d(g,m,r)||(g!==h&&g.push(m),h.push(y))}return h}},function(t,e,r){var n=r(10),o=r(24),i=r(23),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(70),o=r(69);t.exports=function t(e,r,i,a,s){var u=-1,c=e.length;for(i||(i=o),s||(s=[]);++u<c;){var f=e[u];r>0&&i(f)?r>1?t(f,r-1,i,a,s):n(s,f):a||(s[s.length]=f)}return s}},function(t,e,r){var n=r(71),o=r(12),i=r(68),a=r(14),s=o(function(t){return i(n(t,1,a,!0))});t.exports=s},function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=n(r(72)),i=n(r(39));e.default=class{constructor(){this.entered=[]}enter(t){const e=this.entered.length;return this.entered=o.default(this.entered.filter(e=>document.documentElement.contains(e)&&(!e.contains||e.contains(t))),[t]),0===e&&this.entered.length>0}leave(t){const e=this.entered.length;return this.entered=i.default(this.entered.filter(t=>document.documentElement.contains(t)),t),e>0&&0===this.entered.length}reset(){this.entered=[]}}},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(5),o=r(75),i=r(74),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=o(t),r=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&r.push(s);return r}},function(t,e,r){(function(t){var n=r(27),o="object"==typeof e&&e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&n.process,s=function(){try{return a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(this,r(22)(t))},function(t,e,r){var n=r(11),o=r(26),i=r(4),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(78),o=r(21),i=r(77),a=i&&i.isTypedArray,s=a?o(a):n;t.exports=s},function(t,e){t.exports=function(){return!1}},function(t,e,r){(function(t){var n=r(0),o=r(80),i="object"==typeof e&&e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||o;t.exports=u}).call(this,r(22)(t))},function(t,e,r){var n=r(11),o=r(4),i="[object Arguments]";t.exports=function(t){return o(t)&&n(t)==i}},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(83),o=r(24),i=r(23),a=r(81),s=r(25),u=r(79),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=i(t),f=!r&&o(t),d=!r&&!f&&a(t),l=!r&&!f&&!d&&u(t),p=r||f||d||l,h=p?n(t.length,String):[],g=h.length;for(var v in t)!e&&!c.call(t,v)||p&&("length"==v||d&&("offset"==v||"parent"==v)||l&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,g))||h.push(v);return h}},function(t,e,r){var n=r(84),o=r(76),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(25),a=r(5);t.exports=function(t,e,r){if(!a(r))return!1;var s=typeof e;return!!("number"==s?o(r)&&i(e,r.length):"string"==s&&e in r)&&n(r[e],t)}},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(),s=n-(a-i);if(i=a,s>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(90),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){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n=r(10),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,s),r=t[s];try{t[s]=void 0;var n=!0}catch(t){}var o=a.call(t);return n&&(e?t[s]=r:delete t[s]),o}},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(28),o=r(91),i=r(5),a=r(89),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,f=u.toString,d=c.hasOwnProperty,l=RegExp("^"+f.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(n(t)?l:s).test(a(t))}},function(t,e,r){var n=r(6),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(97),o=r(96),i=r(29),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(98),o=r(87)(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(100),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,s=o(i.length-e,0),u=Array(s);++a<s;)u[a]=i[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=i[a];return c[e]=r(u),n(t,this,c)}}},function(t,e,r){var n=r(12),o=r(9),i=r(86),a=r(85),s=Object.prototype,u=s.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],d=a(f),l=-1,p=d.length;++l<p;){var h=d[l],g=t[h];(void 0===g||o(g,s[h])&&!u.call(t,h))&&(t[h]=f[h])}return t});t.exports=c},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 s=t.length-1;s>=0;s--)(o=t[s])&&(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},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});const a=o(r(102)),s=o(r(73)),u=r(13),c=r(35),f=r(33),d=i(r(7)),l=o(r(32)),p=r(31);class h{constructor(t){this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.sourceNodes={},this.sourceNodeOptions={},this.enterLeaveCounter=new s.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()}get window(){return this.context&&this.context.window?this.context.window:"undefined"!=typeof window?window:void 0}setup(){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)}}teardown(){void 0!==this.window&&(this.window.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.window),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&this.window.cancelAnimationFrame(this.asyncEndDragFrameId))}connectDragPreview(t,e,r){return this.sourcePreviewNodeOptions[t]=r,this.sourcePreviewNodes[t]=e,()=>{delete this.sourcePreviewNodes[t],delete this.sourcePreviewNodeOptions[t]}}connectDragSource(t,e,r){this.sourceNodes[t]=e,this.sourceNodeOptions[t]=r;const n=e=>this.handleDragStart(e,t),o=t=>this.handleSelectStart(t);return e.setAttribute("draggable",!0),e.addEventListener("dragstart",n),e.addEventListener("selectstart",o),()=>{delete this.sourceNodes[t],delete this.sourceNodeOptions[t],e.removeEventListener("dragstart",n),e.removeEventListener("selectstart",o),e.setAttribute("draggable",!1)}}connectDropTarget(t,e){const r=e=>this.handleDragEnter(e,t),n=e=>this.handleDragOver(e,t),o=e=>this.handleDrop(e,t);return e.addEventListener("dragenter",r),e.addEventListener("dragover",n),e.addEventListener("drop",o),()=>{e.removeEventListener("dragenter",r),e.removeEventListener("dragover",n),e.removeEventListener("drop",o)}}addEventListeners(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))}removeEventListeners(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))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),e=this.sourceNodeOptions[t];return a.default(e||{},{dropEffect:this.altKeyPressed?"copy":"move"})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),e=this.sourcePreviewNodeOptions[t];return a.default(e||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})}getSourceClientOffset(t){return c.getNodeClientOffset(this.sourceNodes[t])}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(d).some(e=>d[e]===t)}beginDragNativeItem(t){this.clearCurrentDragSourceNode();const e=f.createNativeDragSource(t);this.currentNativeSource=new e,this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}asyncEndDragNativeItem(){this.window&&(this.asyncEndDragFrameId=this.window.requestAnimationFrame(this.endDragNativeItem))}endDragNativeItem(){this.isDraggingNativeItem()&&(this.actions.endDrag(),this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)}isNodeInDocument(t){return!!document&&document.body.contains(t)||!!this.window&&this.window.document.body.contains(t)}endDragIfSourceWasRemovedFromDOM(){const t=this.currentDragSourceNode;this.isNodeInDocument(t)||this.clearCurrentDragSourceNode()&&this.actions.endDrag()}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t,this.currentDragSourceNodeOffset=c.getNodeClientOffset(t),this.currentDragSourceNodeOffsetChanged=!1;this.mouseMoveTimeoutTimer=setTimeout(()=>(this.mouseMoveTimeoutId=null,this.window&&this.window.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),1e3)}clearCurrentDragSourceNode(){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)}checkIfCurrentDragSourceRectChanged(){const t=this.currentDragSourceNode;return!!t&&(!!this.currentDragSourceNodeOffsetChanged||(this.currentDragSourceNodeOffsetChanged=!p(c.getNodeClientOffset(t),this.currentDragSourceNodeOffset),this.currentDragSourceNodeOffsetChanged))}handleTopDragStartCapture(){this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]}handleDragStart(t,e){this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(e)}handleTopDragStart(t){const{dragStartSourceIds:e}=this;this.dragStartSourceIds=null;const r=c.getEventClientOffset(t);this.monitor.isDragging()&&this.actions.endDrag(),this.actions.beginDrag(e||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:n}=t,o=f.matchNativeItemType(n);if(this.monitor.isDragging()){if("function"==typeof n.setDragImage){const t=this.monitor.getSourceId(),e=this.sourceNodes[t],o=this.sourcePreviewNodes[t]||e,{anchorX:i,anchorY:a,offsetX:s,offsetY:u}=this.getCurrentSourcePreviewNodeOptions(),f={anchorX:i,anchorY:a},d={offsetX:s,offsetY:u},l=c.getDragPreviewOffset(e,o,r,f,d);n.setDragImage(o,l.x,l.y)}try{n.setData("application/json",{})}catch(t){}this.setCurrentDragSourceNode(t.target);const{captureDraggingState:e}=this.getCurrentSourcePreviewNodeOptions();e?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(o)this.beginDragNativeItem(o);else{if(!(n.types||t.target.hasAttribute&&t.target.hasAttribute("draggable")))return;t.preventDefault()}}handleTopDragEndCapture(){this.clearCurrentDragSourceNode()&&this.actions.endDrag()}handleTopDragEnterCapture(t){if(this.dragEnterTargetIds=[],!this.enterLeaveCounter.enter(t.target)||this.monitor.isDragging())return;const{dataTransfer:e}=t,r=f.matchNativeItemType(e);r&&this.beginDragNativeItem(r)}handleDragEnter(t,e){this.dragEnterTargetIds.unshift(e)}handleTopDragEnter(t){const{dragEnterTargetIds:e}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=t.altKey,u.isFirefox()||this.actions.hover(e,{clientOffset:c.getEventClientOffset(t)}),e.some(t=>this.monitor.canDropOnTarget(t))&&(t.preventDefault(),t.dataTransfer.dropEffect=this.getCurrentDropEffect()))}handleTopDragOverCapture(){this.dragOverTargetIds=[]}handleDragOver(t,e){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(e)}handleTopDragOver(t){const{dragOverTargetIds:e}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return t.preventDefault(),void(t.dataTransfer.dropEffect="none");this.altKeyPressed=t.altKey,this.actions.hover(e||[],{clientOffset:c.getEventClientOffset(t)}),(e||[]).some(t=>this.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")}handleTopDragLeaveCapture(t){this.isDraggingNativeItem()&&t.preventDefault(),this.enterLeaveCounter.leave(t.target)&&this.isDraggingNativeItem()&&this.endDragNativeItem()}handleTopDropCapture(t){this.dropTargetIds=[],t.preventDefault(),this.isDraggingNativeItem()&&this.currentNativeSource.mutateItemByReadingDataTransfer(t.dataTransfer),this.enterLeaveCounter.reset()}handleDrop(t,e){this.dropTargetIds.unshift(e)}handleTopDrop(t){const{dropTargetIds:e}=this;this.dropTargetIds=[],this.actions.hover(e,{clientOffset:c.getEventClientOffset(t)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.endDragIfSourceWasRemovedFromDOM()}handleSelectStart(t){const{target:e}=t;"function"==typeof e.dragDrop&&("INPUT"===e.tagName||"SELECT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable||(t.preventDefault(),e.dragDrop()))}}n([l.default],h.prototype,"getSourceClientOffset",null),n([l.default],h.prototype,"asyncEndDragNativeItem",null),n([l.default],h.prototype,"endDragNativeItem",null),n([l.default],h.prototype,"isNodeInDocument",null),n([l.default],h.prototype,"endDragIfSourceWasRemovedFromDOM",null),n([l.default],h.prototype,"handleTopDragStartCapture",null),n([l.default],h.prototype,"handleTopDragStart",null),n([l.default],h.prototype,"handleTopDragEndCapture",null),n([l.default],h.prototype,"handleTopDragEnterCapture",null),n([l.default],h.prototype,"handleTopDragEnter",null),n([l.default],h.prototype,"handleTopDragOverCapture",null),n([l.default],h.prototype,"handleTopDragOver",null),n([l.default],h.prototype,"handleTopDragLeaveCapture",null),n([l.default],h.prototype,"handleTopDropCapture",null),n([l.default],h.prototype,"handleTopDrop",null),n([l.default],h.prototype,"handleSelectStart",null),e.default=h},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(104));const i=n(r(103)),a=n(r(30));e.getEmptyImage=a.default;const s=o(r(7));e.NativeTypes=s,e.default=function(t){return new i.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,{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(27),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(52);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(6)(Object,"create");t.exports=n},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},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(95),o=r(88);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},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(28),o=r(26);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(0).Symbol;t.exports=n},function(t,e,r){var n=r(10),o=r(93),i=r(92),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(29),o=r(101),i=r(99);t.exports=function(t,e){return i(o(t,e,n),t+"")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(36);e.isFirefox=n(function(){return/firefox/i.test(navigator.userAgent)}),e.isSafari=n(function(){return Boolean(window.safari)})},function(t,e,r){var n=r(8),o=r(4);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(46);t.exports=function(t,e){return!(null==t||!t.length)&&n(t,e,0)>-1}},function(t,e,r){var n=r(67),o=r(53),i=r(51),a=r(50),u=r(49);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(19),o=r(48),i=r(47);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){t.exports=function(t){return function(e){return 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){var r=Array.isArray;t.exports=r},function(t,e,r){var n=r(82),o=r(4),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=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){var r=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r(94))},function(t,e,r){var n=r(11),o=r(5),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,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,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=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var o=n(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,u=((a={})[o.FILE]={exposeProperty:"files",matchesTypes:["Files"],getData:function(t){return Array.prototype.slice.call(t.files)}},a[o.URL]={exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(t,e){return i(t,e,"").split("\n")}},a[o.TEXT]={exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(t,e){return i(t,e,"")}},a);e.createNativeDragSource=function(t){var e=u[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(u).filter(function(t){return u[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";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(13),i=n(r(34)),a=1;function u(t){var e=t.nodeType===a?t:t.parentElement;if(!e)return null;var r=e.getBoundingClientRect(),n=r.top;return{x:r.left,y:n}}e.getNodeClientOffset=u,e.getEventClientOffset=function(t){return{x:t.clientX,y:t.clientY}},e.getDragPreviewOffset=function(t,e,r,n,a){var s,c,f="IMG"===(s=e).nodeName&&(o.isFirefox()||!document.documentElement.contains(s)),p=u(f?t:e),d={x:r.x-p.x,y:r.y-p.y},l=t.offsetWidth,h=t.offsetHeight,v=n.anchorX,g=n.anchorY,y=function(t,e,r,n){var i=t?e.width:r,a=t?e.height:n;return o.isSafari()&&t&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}(f,e,l,h),m=y.dragPreviewWidth,D=y.dragPreviewHeight,b=a.offsetX,_=a.offsetY,O=0===_||_;return{x:0===b||b?b:new i.default([0,.5,1],[d.x,d.x/l*m,d.x+m-l]).interpolate(v),y:O?_:(c=new i.default([0,.5,1],[d.y,d.y/h*D,d.y+D-h]).interpolate(g),o.isSafari()&&f&&(c+=(window.devicePixelRatio-1)*D),c)}}},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){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(20),o=r(18),i=r(17),a=r(37),u=r(21),s=r(16),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(38),o=r(12),i=r(14),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(6)(r(0),"Set");t.exports=n},function(t,e,r){var n=r(41),o=r(40),i=r(15),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(45),o=r(44),i=r(43);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(6)(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(59),o=r(58),i=r(57),a=r(56),u=r(55);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(65),o=r(64),i=r(63),a=r(62),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(66),o=r(60),i=r(54);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(20),o=r(18),i=r(17),a=r(16),u=r(42),s=r(15),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,r){var n=r(10),o=r(24),i=r(23),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(70),o=r(69);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(71),o=r(12),i=r(68),a=r(14),u=o(function(t){return i(n(t,1,a,!0))});t.exports=u},function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(r(72)),i=n(r(39)),a=function(){function t(){this.entered=[]}return t.prototype.enter=function(t){var e=this.entered.length;return this.entered=o.default(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=i.default(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=a},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(5),o=r(75),i=r(74),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(27),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{return a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u}).call(this,r(22)(t))},function(t,e,r){var n=r(11),o=r(26),i=r(4),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(78),o=r(21),i=r(77),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(80),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(22)(t))},function(t,e,r){var n=r(11),o=r(4),i="[object Arguments]";t.exports=function(t){return o(t)&&n(t)==i}},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(83),o=r(24),i=r(23),a=r(81),u=r(25),s=r(79),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(84),o=r(76),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(25),a=r(5);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){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(90),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){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n=r(10),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;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(28),o=r(91),i=r(5),a=r(89),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(6),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(97),o=r(96),i=r(29),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(98),o=r(87)(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(100),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,r){var n=r(12),o=r(9),i=r(86),a=r(85),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";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},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var a=o(r(102)),u=o(r(73)),s=r(13),c=r(35),f=r(33),p=i(r(7)),d=o(r(32)),l=r(31),h=function(){function t(t){this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.sourceNodes={},this.sourceNodeOptions={},this.enterLeaveCounter=new u.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[t]=r,this.sourcePreviewNodes[t]=e,function(){delete n.sourcePreviewNodes[t],delete n.sourcePreviewNodeOptions[t]}},t.prototype.connectDragSource=function(t,e,r){var n=this;this.sourceNodes[t]=e,this.sourceNodeOptions[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(){delete n.sourceNodes[t],delete n.sourceNodeOptions[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[t];return a.default(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[t];return a.default(e||{},{anchorX:.5,anchorY:.5,captureDraggingState:!1})},t.prototype.getSourceClientOffset=function(t){return c.getNodeClientOffset(this.sourceNodes[t])},t.prototype.isDraggingNativeItem=function(){var t=this.monitor.getItemType();return Object.keys(p).some(function(e){return p[e]===t})},t.prototype.beginDragNativeItem=function(t){this.clearCurrentDragSourceNode();var e=f.createNativeDragSource(t);this.currentNativeSource=new e,this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])},t.prototype.asyncEndDragNativeItem=function(){this.window&&(this.asyncEndDragFrameId=this.window.requestAnimationFrame(this.endDragNativeItem))},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=c.getNodeClientOffset(t),this.currentDragSourceNodeOffsetChanged=!1;this.mouseMoveTimeoutTimer=setTimeout(function(){return e.mouseMoveTimeoutId=null,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=!l(c.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=c.getEventClientOffset(t);this.monitor.isDragging()&&this.actions.endDrag(),this.actions.beginDrag(r||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});var o=t.dataTransfer,i=f.matchNativeItemType(o);if(this.monitor.isDragging()){if("function"==typeof o.setDragImage){var a=this.monitor.getSourceId(),u=this.sourceNodes[a],s=this.sourcePreviewNodes[a]||u,p=this.getCurrentSourcePreviewNodeOptions(),d={anchorX:p.anchorX,anchorY:p.anchorY},l={offsetX:p.offsetX,offsetY:p.offsetY},h=c.getDragPreviewOffset(u,s,n,d,l);o.setDragImage(s,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=f.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,s.isFirefox()||this.actions.hover(r,{clientOffset:c.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:c.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:c.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([d.default],t.prototype,"getSourceClientOffset",null),n([d.default],t.prototype,"asyncEndDragNativeItem",null),n([d.default],t.prototype,"endDragNativeItem",null),n([d.default],t.prototype,"isNodeInDocument",null),n([d.default],t.prototype,"endDragIfSourceWasRemovedFromDOM",null),n([d.default],t.prototype,"handleTopDragStartCapture",null),n([d.default],t.prototype,"handleTopDragStart",null),n([d.default],t.prototype,"handleTopDragEndCapture",null),n([d.default],t.prototype,"handleTopDragEnterCapture",null),n([d.default],t.prototype,"handleTopDragEnter",null),n([d.default],t.prototype,"handleTopDragOverCapture",null),n([d.default],t.prototype,"handleTopDragOver",null),n([d.default],t.prototype,"handleTopDragLeaveCapture",null),n([d.default],t.prototype,"handleTopDropCapture",null),n([d.default],t.prototype,"handleTopDrop",null),n([d.default],t.prototype,"handleSelectStart",null),t}();e.default=h},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(104));var i=n(r(103)),a=n(r(30));e.getEmptyImage=a.default;var u=o(r(7));e.NativeTypes=u,e.default=function(t){return new i.default(t)}}])}); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const memoize = require('lodash/memoize'); | ||
exports.isFirefox = memoize(() => /firefox/i.test(navigator.userAgent)); | ||
exports.isSafari = memoize(() => Boolean(window.safari)); | ||
var memoize = require('lodash/memoize'); | ||
exports.isFirefox = memoize(function () { return /firefox/i.test(navigator.userAgent); }); | ||
exports.isSafari = memoize(function () { return Boolean(window.safari); }); | ||
//# sourceMappingURL=BrowserDetector.js.map |
@@ -6,25 +6,28 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const union_1 = __importDefault(require("lodash/union")); | ||
const without_1 = __importDefault(require("lodash/without")); | ||
class EnterLeaveCounter { | ||
constructor() { | ||
var union_1 = __importDefault(require("lodash/union")); | ||
var without_1 = __importDefault(require("lodash/without")); | ||
var EnterLeaveCounter = /** @class */ (function () { | ||
function EnterLeaveCounter() { | ||
this.entered = []; | ||
} | ||
enter(enteringNode) { | ||
const previousLength = this.entered.length; | ||
const isNodeEntered = (node) => document.documentElement.contains(node) && | ||
(!node.contains || node.contains(enteringNode)); | ||
EnterLeaveCounter.prototype.enter = function (enteringNode) { | ||
var previousLength = this.entered.length; | ||
var isNodeEntered = function (node) { | ||
return document.documentElement.contains(node) && | ||
(!node.contains || node.contains(enteringNode)); | ||
}; | ||
this.entered = union_1.default(this.entered.filter(isNodeEntered), [enteringNode]); | ||
return previousLength === 0 && this.entered.length > 0; | ||
} | ||
leave(leavingNode) { | ||
const previousLength = this.entered.length; | ||
this.entered = without_1.default(this.entered.filter(node => document.documentElement.contains(node)), leavingNode); | ||
}; | ||
EnterLeaveCounter.prototype.leave = function (leavingNode) { | ||
var previousLength = this.entered.length; | ||
this.entered = without_1.default(this.entered.filter(function (node) { return document.documentElement.contains(node); }), leavingNode); | ||
return previousLength > 0 && this.entered.length === 0; | ||
} | ||
reset() { | ||
}; | ||
EnterLeaveCounter.prototype.reset = function () { | ||
this.entered = []; | ||
} | ||
} | ||
}; | ||
return EnterLeaveCounter; | ||
}()); | ||
exports.default = EnterLeaveCounter; | ||
//# sourceMappingURL=EnterLeaveCounter.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
let emptyImage; | ||
var emptyImage; | ||
function getEmptyImage() { | ||
@@ -5,0 +5,0 @@ if (!emptyImage) { |
@@ -20,12 +20,12 @@ "use strict"; | ||
/* eslint-disable no-underscore-dangle */ | ||
const defaults_1 = __importDefault(require("lodash/defaults")); | ||
const EnterLeaveCounter_1 = __importDefault(require("./EnterLeaveCounter")); | ||
const BrowserDetector_1 = require("./BrowserDetector"); | ||
const OffsetUtils_1 = require("./OffsetUtils"); | ||
const NativeDragSources_1 = require("./NativeDragSources"); | ||
const NativeTypes = __importStar(require("./NativeTypes")); | ||
const autobind_decorator_1 = __importDefault(require("autobind-decorator")); | ||
const shallowEqual = require('shallowequal'); | ||
class HTML5Backend { | ||
constructor(manager) { | ||
var defaults_1 = __importDefault(require("lodash/defaults")); | ||
var EnterLeaveCounter_1 = __importDefault(require("./EnterLeaveCounter")); | ||
var BrowserDetector_1 = require("./BrowserDetector"); | ||
var OffsetUtils_1 = require("./OffsetUtils"); | ||
var NativeDragSources_1 = require("./NativeDragSources"); | ||
var NativeTypes = __importStar(require("./NativeTypes")); | ||
var autobind_decorator_1 = __importDefault(require("autobind-decorator")); | ||
var shallowEqual = require('shallowequal'); | ||
var HTML5Backend = /** @class */ (function () { | ||
function HTML5Backend(manager) { | ||
this.sourcePreviewNodes = {}; | ||
@@ -53,13 +53,17 @@ this.sourcePreviewNodeOptions = {}; | ||
} | ||
// public for test | ||
get window() { | ||
if (this.context && this.context.window) { | ||
return this.context.window; | ||
} | ||
else if (typeof window !== 'undefined') { | ||
return window; | ||
} | ||
return undefined; | ||
} | ||
setup() { | ||
Object.defineProperty(HTML5Backend.prototype, "window", { | ||
// public for test | ||
get: function () { | ||
if (this.context && this.context.window) { | ||
return this.context.window; | ||
} | ||
else if (typeof window !== 'undefined') { | ||
return window; | ||
} | ||
return undefined; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
HTML5Backend.prototype.setup = function () { | ||
if (this.window === undefined) { | ||
@@ -73,4 +77,4 @@ return; | ||
this.addEventListeners(this.window); | ||
} | ||
teardown() { | ||
}; | ||
HTML5Backend.prototype.teardown = function () { | ||
if (this.window === undefined) { | ||
@@ -85,22 +89,24 @@ return; | ||
} | ||
} | ||
connectDragPreview(sourceId, node, options) { | ||
}; | ||
HTML5Backend.prototype.connectDragPreview = function (sourceId, node, options) { | ||
var _this = this; | ||
this.sourcePreviewNodeOptions[sourceId] = options; | ||
this.sourcePreviewNodes[sourceId] = node; | ||
return () => { | ||
delete this.sourcePreviewNodes[sourceId]; | ||
delete this.sourcePreviewNodeOptions[sourceId]; | ||
return function () { | ||
delete _this.sourcePreviewNodes[sourceId]; | ||
delete _this.sourcePreviewNodeOptions[sourceId]; | ||
}; | ||
} | ||
connectDragSource(sourceId, node, options) { | ||
}; | ||
HTML5Backend.prototype.connectDragSource = function (sourceId, node, options) { | ||
var _this = this; | ||
this.sourceNodes[sourceId] = node; | ||
this.sourceNodeOptions[sourceId] = options; | ||
const handleDragStart = (e) => this.handleDragStart(e, sourceId); | ||
const handleSelectStart = (e) => this.handleSelectStart(e); | ||
var handleDragStart = function (e) { return _this.handleDragStart(e, sourceId); }; | ||
var handleSelectStart = function (e) { return _this.handleSelectStart(e); }; | ||
node.setAttribute('draggable', true); | ||
node.addEventListener('dragstart', handleDragStart); | ||
node.addEventListener('selectstart', handleSelectStart); | ||
return () => { | ||
delete this.sourceNodes[sourceId]; | ||
delete this.sourceNodeOptions[sourceId]; | ||
return function () { | ||
delete _this.sourceNodes[sourceId]; | ||
delete _this.sourceNodeOptions[sourceId]; | ||
node.removeEventListener('dragstart', handleDragStart); | ||
@@ -110,11 +116,12 @@ node.removeEventListener('selectstart', handleSelectStart); | ||
}; | ||
} | ||
connectDropTarget(targetId, node) { | ||
const handleDragEnter = (e) => this.handleDragEnter(e, targetId); | ||
const handleDragOver = (e) => this.handleDragOver(e, targetId); | ||
const handleDrop = (e) => this.handleDrop(e, targetId); | ||
}; | ||
HTML5Backend.prototype.connectDropTarget = function (targetId, node) { | ||
var _this = this; | ||
var handleDragEnter = function (e) { return _this.handleDragEnter(e, targetId); }; | ||
var handleDragOver = function (e) { return _this.handleDragOver(e, targetId); }; | ||
var handleDrop = function (e) { return _this.handleDrop(e, targetId); }; | ||
node.addEventListener('dragenter', handleDragEnter); | ||
node.addEventListener('dragover', handleDragOver); | ||
node.addEventListener('drop', handleDrop); | ||
return () => { | ||
return function () { | ||
node.removeEventListener('dragenter', handleDragEnter); | ||
@@ -124,4 +131,4 @@ node.removeEventListener('dragover', handleDragOver); | ||
}; | ||
} | ||
addEventListeners(target) { | ||
}; | ||
HTML5Backend.prototype.addEventListeners = function (target) { | ||
// SSR Fix (https://github.com/react-dnd/react-dnd/pull/813 | ||
@@ -141,4 +148,4 @@ if (!target.addEventListener) { | ||
target.addEventListener('drop', this.handleTopDropCapture, true); | ||
} | ||
removeEventListeners(target) { | ||
}; | ||
HTML5Backend.prototype.removeEventListeners = function (target) { | ||
// SSR Fix (https://github.com/react-dnd/react-dnd/pull/813 | ||
@@ -158,11 +165,11 @@ if (!target.removeEventListener) { | ||
target.removeEventListener('drop', this.handleTopDropCapture, true); | ||
} | ||
getCurrentSourceNodeOptions() { | ||
const sourceId = this.monitor.getSourceId(); | ||
const sourceNodeOptions = this.sourceNodeOptions[sourceId]; | ||
}; | ||
HTML5Backend.prototype.getCurrentSourceNodeOptions = function () { | ||
var sourceId = this.monitor.getSourceId(); | ||
var sourceNodeOptions = this.sourceNodeOptions[sourceId]; | ||
return defaults_1.default(sourceNodeOptions || {}, { | ||
dropEffect: this.altKeyPressed ? 'copy' : 'move', | ||
}); | ||
} | ||
getCurrentDropEffect() { | ||
}; | ||
HTML5Backend.prototype.getCurrentDropEffect = function () { | ||
if (this.isDraggingNativeItem()) { | ||
@@ -173,6 +180,6 @@ // It makes more sense to default to 'copy' for native resources | ||
return this.getCurrentSourceNodeOptions().dropEffect; | ||
} | ||
getCurrentSourcePreviewNodeOptions() { | ||
const sourceId = this.monitor.getSourceId(); | ||
const sourcePreviewNodeOptions = this.sourcePreviewNodeOptions[sourceId]; | ||
}; | ||
HTML5Backend.prototype.getCurrentSourcePreviewNodeOptions = function () { | ||
var sourceId = this.monitor.getSourceId(); | ||
var sourcePreviewNodeOptions = this.sourcePreviewNodeOptions[sourceId]; | ||
return defaults_1.default(sourcePreviewNodeOptions || {}, { | ||
@@ -183,23 +190,23 @@ anchorX: 0.5, | ||
}); | ||
} | ||
getSourceClientOffset(sourceId) { | ||
}; | ||
HTML5Backend.prototype.getSourceClientOffset = function (sourceId) { | ||
return OffsetUtils_1.getNodeClientOffset(this.sourceNodes[sourceId]); | ||
} | ||
isDraggingNativeItem() { | ||
const itemType = this.monitor.getItemType(); | ||
return Object.keys(NativeTypes).some((key) => NativeTypes[key] === itemType); | ||
} | ||
beginDragNativeItem(type) { | ||
}; | ||
HTML5Backend.prototype.isDraggingNativeItem = function () { | ||
var itemType = this.monitor.getItemType(); | ||
return Object.keys(NativeTypes).some(function (key) { return NativeTypes[key] === itemType; }); | ||
}; | ||
HTML5Backend.prototype.beginDragNativeItem = function (type) { | ||
this.clearCurrentDragSourceNode(); | ||
const SourceType = NativeDragSources_1.createNativeDragSource(type); | ||
var SourceType = NativeDragSources_1.createNativeDragSource(type); | ||
this.currentNativeSource = new SourceType(); | ||
this.currentNativeHandle = this.registry.addSource(type, this.currentNativeSource); | ||
this.actions.beginDrag([this.currentNativeHandle]); | ||
} | ||
asyncEndDragNativeItem() { | ||
}; | ||
HTML5Backend.prototype.asyncEndDragNativeItem = function () { | ||
if (this.window) { | ||
this.asyncEndDragFrameId = this.window.requestAnimationFrame(this.endDragNativeItem); | ||
} | ||
} | ||
endDragNativeItem() { | ||
}; | ||
HTML5Backend.prototype.endDragNativeItem = function () { | ||
if (!this.isDraggingNativeItem()) { | ||
@@ -212,10 +219,10 @@ return; | ||
this.currentNativeSource = null; | ||
} | ||
isNodeInDocument(node) { | ||
}; | ||
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))); | ||
} | ||
endDragIfSourceWasRemovedFromDOM() { | ||
const node = this.currentDragSourceNode; | ||
}; | ||
HTML5Backend.prototype.endDragIfSourceWasRemovedFromDOM = function () { | ||
var node = this.currentDragSourceNode; | ||
if (this.isNodeInDocument(node)) { | ||
@@ -227,4 +234,5 @@ return; | ||
} | ||
} | ||
setCurrentDragSourceNode(node) { | ||
}; | ||
HTML5Backend.prototype.setCurrentDragSourceNode = function (node) { | ||
var _this = this; | ||
this.clearCurrentDragSourceNode(); | ||
@@ -238,3 +246,3 @@ this.currentDragSourceNode = node; | ||
// * https://github.com/react-dnd/react-dnd/issues/869 | ||
const MOUSE_MOVE_TIMEOUT = 1000; | ||
var MOUSE_MOVE_TIMEOUT = 1000; | ||
// Receiving a mouse event in the middle of a dragging operation | ||
@@ -252,9 +260,9 @@ // means it has ended and the drag source node disappeared from DOM, | ||
// | ||
this.mouseMoveTimeoutTimer = setTimeout(() => { | ||
this.mouseMoveTimeoutId = null; | ||
return (this.window && | ||
this.window.addEventListener('mousemove', this.endDragIfSourceWasRemovedFromDOM, true)); | ||
this.mouseMoveTimeoutTimer = setTimeout(function () { | ||
_this.mouseMoveTimeoutId = null; | ||
return (_this.window && | ||
_this.window.addEventListener('mousemove', _this.endDragIfSourceWasRemovedFromDOM, true)); | ||
}, MOUSE_MOVE_TIMEOUT); | ||
} | ||
clearCurrentDragSourceNode() { | ||
}; | ||
HTML5Backend.prototype.clearCurrentDragSourceNode = function () { | ||
if (this.currentDragSourceNode) { | ||
@@ -272,5 +280,5 @@ this.currentDragSourceNode = null; | ||
return false; | ||
} | ||
checkIfCurrentDragSourceRectChanged() { | ||
const node = this.currentDragSourceNode; | ||
}; | ||
HTML5Backend.prototype.checkIfCurrentDragSourceRectChanged = function () { | ||
var node = this.currentDragSourceNode; | ||
if (!node) { | ||
@@ -284,8 +292,8 @@ return false; | ||
return this.currentDragSourceNodeOffsetChanged; | ||
} | ||
handleTopDragStartCapture() { | ||
}; | ||
HTML5Backend.prototype.handleTopDragStartCapture = function () { | ||
this.clearCurrentDragSourceNode(); | ||
this.dragStartSourceIds = []; | ||
} | ||
handleDragStart(e, sourceId) { | ||
}; | ||
HTML5Backend.prototype.handleDragStart = function (e, sourceId) { | ||
if (!this.dragStartSourceIds) { | ||
@@ -295,7 +303,8 @@ this.dragStartSourceIds = []; | ||
this.dragStartSourceIds.unshift(sourceId); | ||
} | ||
handleTopDragStart(e) { | ||
const { dragStartSourceIds } = this; | ||
}; | ||
HTML5Backend.prototype.handleTopDragStart = function (e) { | ||
var _this = this; | ||
var dragStartSourceIds = this.dragStartSourceIds; | ||
this.dragStartSourceIds = null; | ||
const clientOffset = OffsetUtils_1.getEventClientOffset(e); | ||
var clientOffset = OffsetUtils_1.getEventClientOffset(e); | ||
// Avoid crashing if we missed a drop event or our previous drag died | ||
@@ -309,6 +318,6 @@ if (this.monitor.isDragging()) { | ||
getSourceClientOffset: this.getSourceClientOffset, | ||
clientOffset, | ||
clientOffset: clientOffset, | ||
}); | ||
const { dataTransfer } = e; | ||
const nativeType = NativeDragSources_1.matchNativeItemType(dataTransfer); | ||
var dataTransfer = e.dataTransfer; | ||
var nativeType = NativeDragSources_1.matchNativeItemType(dataTransfer); | ||
if (this.monitor.isDragging()) { | ||
@@ -319,9 +328,9 @@ if (typeof dataTransfer.setDragImage === 'function') { | ||
// use parent's node as drag image. Neither works in IE though. | ||
const sourceId = this.monitor.getSourceId(); | ||
const sourceNode = this.sourceNodes[sourceId]; | ||
const dragPreview = this.sourcePreviewNodes[sourceId] || sourceNode; | ||
const { anchorX, anchorY, offsetX, offsetY, } = this.getCurrentSourcePreviewNodeOptions(); | ||
const anchorPoint = { anchorX, anchorY }; | ||
const offsetPoint = { offsetX, offsetY }; | ||
const dragPreviewOffset = OffsetUtils_1.getDragPreviewOffset(sourceNode, dragPreview, clientOffset, anchorPoint, offsetPoint); | ||
var sourceId = this.monitor.getSourceId(); | ||
var sourceNode = this.sourceNodes[sourceId]; | ||
var dragPreview = this.sourcePreviewNodes[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); | ||
@@ -340,3 +349,3 @@ } | ||
// Now we are ready to publish the drag source.. or are we not? | ||
const { captureDraggingState } = this.getCurrentSourcePreviewNodeOptions(); | ||
var captureDraggingState = this.getCurrentSourcePreviewNodeOptions().captureDraggingState; | ||
if (!captureDraggingState) { | ||
@@ -348,3 +357,3 @@ // Usually we want to publish it in the next tick so that browser | ||
// in the same tick for the source element, and browser freaks out. | ||
setTimeout(() => this.actions.publishDragSource(), 0); | ||
setTimeout(function () { return _this.actions.publishDragSource(); }, 0); | ||
} | ||
@@ -380,4 +389,4 @@ else { | ||
} | ||
} | ||
handleTopDragEndCapture() { | ||
}; | ||
HTML5Backend.prototype.handleTopDragEndCapture = function () { | ||
if (this.clearCurrentDragSourceNode()) { | ||
@@ -389,11 +398,11 @@ // Firefox can dispatch this event in an infinite loop | ||
} | ||
} | ||
handleTopDragEnterCapture(e) { | ||
}; | ||
HTML5Backend.prototype.handleTopDragEnterCapture = function (e) { | ||
this.dragEnterTargetIds = []; | ||
const isFirstEnter = this.enterLeaveCounter.enter(e.target); | ||
var isFirstEnter = this.enterLeaveCounter.enter(e.target); | ||
if (!isFirstEnter || this.monitor.isDragging()) { | ||
return; | ||
} | ||
const { dataTransfer } = e; | ||
const nativeType = NativeDragSources_1.matchNativeItemType(dataTransfer); | ||
var dataTransfer = e.dataTransfer; | ||
var nativeType = NativeDragSources_1.matchNativeItemType(dataTransfer); | ||
if (nativeType) { | ||
@@ -403,8 +412,9 @@ // A native item (such as file or URL) dragged from outside the document | ||
} | ||
} | ||
handleDragEnter(e, targetId) { | ||
}; | ||
HTML5Backend.prototype.handleDragEnter = function (e, targetId) { | ||
this.dragEnterTargetIds.unshift(targetId); | ||
} | ||
handleTopDragEnter(e) { | ||
const { dragEnterTargetIds } = this; | ||
}; | ||
HTML5Backend.prototype.handleTopDragEnter = function (e) { | ||
var _this = this; | ||
var dragEnterTargetIds = this.dragEnterTargetIds; | ||
this.dragEnterTargetIds = []; | ||
@@ -425,3 +435,5 @@ if (!this.monitor.isDragging()) { | ||
} | ||
const canDrop = dragEnterTargetIds.some(targetId => this.monitor.canDropOnTarget(targetId)); | ||
var canDrop = dragEnterTargetIds.some(function (targetId) { | ||
return _this.monitor.canDropOnTarget(targetId); | ||
}); | ||
if (canDrop) { | ||
@@ -432,7 +444,7 @@ // IE requires this to fire dragover events | ||
} | ||
} | ||
handleTopDragOverCapture() { | ||
}; | ||
HTML5Backend.prototype.handleTopDragOverCapture = function () { | ||
this.dragOverTargetIds = []; | ||
} | ||
handleDragOver(e, targetId) { | ||
}; | ||
HTML5Backend.prototype.handleDragOver = function (e, targetId) { | ||
if (this.dragOverTargetIds === null) { | ||
@@ -442,5 +454,6 @@ this.dragOverTargetIds = []; | ||
this.dragOverTargetIds.unshift(targetId); | ||
} | ||
handleTopDragOver(e) { | ||
const { dragOverTargetIds } = this; | ||
}; | ||
HTML5Backend.prototype.handleTopDragOver = function (e) { | ||
var _this = this; | ||
var dragOverTargetIds = this.dragOverTargetIds; | ||
this.dragOverTargetIds = []; | ||
@@ -458,3 +471,5 @@ if (!this.monitor.isDragging()) { | ||
}); | ||
const canDrop = (dragOverTargetIds || []).some(targetId => this.monitor.canDropOnTarget(targetId)); | ||
var canDrop = (dragOverTargetIds || []).some(function (targetId) { | ||
return _this.monitor.canDropOnTarget(targetId); | ||
}); | ||
if (canDrop) { | ||
@@ -477,8 +492,8 @@ // Show user-specified drop effect. | ||
} | ||
} | ||
handleTopDragLeaveCapture(e) { | ||
}; | ||
HTML5Backend.prototype.handleTopDragLeaveCapture = function (e) { | ||
if (this.isDraggingNativeItem()) { | ||
e.preventDefault(); | ||
} | ||
const isLastLeave = this.enterLeaveCounter.leave(e.target); | ||
var isLastLeave = this.enterLeaveCounter.leave(e.target); | ||
if (!isLastLeave) { | ||
@@ -490,4 +505,4 @@ return; | ||
} | ||
} | ||
handleTopDropCapture(e) { | ||
}; | ||
HTML5Backend.prototype.handleTopDropCapture = function (e) { | ||
this.dropTargetIds = []; | ||
@@ -499,8 +514,8 @@ e.preventDefault(); | ||
this.enterLeaveCounter.reset(); | ||
} | ||
handleDrop(e, targetId) { | ||
}; | ||
HTML5Backend.prototype.handleDrop = function (e, targetId) { | ||
this.dropTargetIds.unshift(targetId); | ||
} | ||
handleTopDrop(e) { | ||
const { dropTargetIds } = this; | ||
}; | ||
HTML5Backend.prototype.handleTopDrop = function (e) { | ||
var dropTargetIds = this.dropTargetIds; | ||
this.dropTargetIds = []; | ||
@@ -517,5 +532,5 @@ this.actions.hover(dropTargetIds, { | ||
} | ||
} | ||
handleSelectStart(e) { | ||
const { target } = e; | ||
}; | ||
HTML5Backend.prototype.handleSelectStart = function (e) { | ||
var target = e.target; | ||
// Only IE requires us to explicitly say | ||
@@ -537,53 +552,54 @@ // we want drag drop operation to start | ||
target.dragDrop(); | ||
} | ||
} | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "getSourceClientOffset", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "asyncEndDragNativeItem", 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); | ||
}; | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "getSourceClientOffset", null); | ||
__decorate([ | ||
autobind_decorator_1.default | ||
], HTML5Backend.prototype, "asyncEndDragNativeItem", 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; | ||
//# sourceMappingURL=HTML5Backend.js.map |
@@ -13,6 +13,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const HTML5Backend_1 = __importDefault(require("./HTML5Backend")); | ||
const getEmptyImage_1 = __importDefault(require("./getEmptyImage")); | ||
var HTML5Backend_1 = __importDefault(require("./HTML5Backend")); | ||
var getEmptyImage_1 = __importDefault(require("./getEmptyImage")); | ||
exports.getEmptyImage = getEmptyImage_1.default; | ||
const NativeTypes = __importStar(require("./NativeTypes")); | ||
var NativeTypes = __importStar(require("./NativeTypes")); | ||
exports.NativeTypes = NativeTypes; | ||
@@ -19,0 +19,0 @@ function createHTML5Backend(manager) { |
@@ -9,3 +9,3 @@ "use strict"; | ||
// | ||
const isArray_1 = __importDefault(require("lodash/isArray")); | ||
var isArray_1 = __importDefault(require("lodash/isArray")); | ||
function matchesType(targetType, draggedItemType) { | ||
@@ -16,3 +16,3 @@ if (draggedItemType === null) { | ||
return isArray_1.default(targetType) | ||
? targetType.some(t => t === draggedItemType) | ||
? targetType.some(function (t) { return t === draggedItemType; }) | ||
: targetType === draggedItemType; | ||
@@ -19,0 +19,0 @@ } |
@@ -7,18 +7,18 @@ "use strict"; | ||
*/ | ||
class MonotonicInterpolant { | ||
constructor(xs, ys) { | ||
const { length } = xs; | ||
var MonotonicInterpolant = /** @class */ (function () { | ||
function MonotonicInterpolant(xs, ys) { | ||
var length = xs.length; | ||
// Rearrange xs and ys so that xs is sorted | ||
const indexes = []; | ||
for (let i = 0; i < length; i++) { | ||
var indexes = []; | ||
for (var i = 0; i < length; i++) { | ||
indexes.push(i); | ||
} | ||
indexes.sort((a, b) => (xs[a] < xs[b] ? -1 : 1)); | ||
indexes.sort(function (a, b) { return (xs[a] < xs[b] ? -1 : 1); }); | ||
// Get consecutive differences and slopes | ||
const dys = []; | ||
const dxs = []; | ||
const ms = []; | ||
let dx; | ||
let dy; | ||
for (let i = 0; i < length - 1; i++) { | ||
var dys = []; | ||
var dxs = []; | ||
var ms = []; | ||
var dx; | ||
var dy; | ||
for (var i = 0; i < length - 1; i++) { | ||
dx = xs[i + 1] - xs[i]; | ||
@@ -31,6 +31,6 @@ dy = ys[i + 1] - ys[i]; | ||
// Get degree-1 coefficients | ||
const c1s = [ms[0]]; | ||
for (let i = 0; i < dxs.length - 1; i++) { | ||
const m2 = ms[i]; | ||
const mNext = ms[i + 1]; | ||
var c1s = [ms[0]]; | ||
for (var i = 0; i < dxs.length - 1; i++) { | ||
var m2 = ms[i]; | ||
var mNext = ms[i + 1]; | ||
if (m2 * mNext <= 0) { | ||
@@ -41,4 +41,4 @@ c1s.push(0); | ||
dx = dxs[i]; | ||
const dxNext = dxs[i + 1]; | ||
const common = dx + dxNext; | ||
var dxNext = dxs[i + 1]; | ||
var common = dx + dxNext; | ||
c1s.push(3 * common / ((common + dxNext) / m2 + (common + dx) / mNext)); | ||
@@ -49,10 +49,10 @@ } | ||
// Get degree-2 and degree-3 coefficients | ||
const c2s = []; | ||
const c3s = []; | ||
let m; | ||
for (let i = 0; i < c1s.length - 1; i++) { | ||
var c2s = []; | ||
var c3s = []; | ||
var m; | ||
for (var i = 0; i < c1s.length - 1; i++) { | ||
m = ms[i]; | ||
const c1 = c1s[i]; | ||
const invDx = 1 / dxs[i]; | ||
const common = c1 + c1s[i + 1] - m - m; | ||
var c1 = c1s[i]; | ||
var invDx = 1 / dxs[i]; | ||
var common = c1 + c1s[i + 1] - m - m; | ||
c2s.push((m - c1 - common) * invDx); | ||
@@ -67,6 +67,6 @@ c3s.push(common * invDx * invDx); | ||
} | ||
interpolate(x) { | ||
const { xs, ys, c1s, c2s, c3s } = this; | ||
MonotonicInterpolant.prototype.interpolate = function (x) { | ||
var _a = this, xs = _a.xs, ys = _a.ys, c1s = _a.c1s, c2s = _a.c2s, c3s = _a.c3s; | ||
// The rightmost point in the dataset should give an exact result | ||
let i = xs.length - 1; | ||
var i = xs.length - 1; | ||
if (x === xs[i]) { | ||
@@ -76,8 +76,8 @@ return ys[i]; | ||
// Search for the interval x is in, returning the corresponding y if x is one of the original xs | ||
let low = 0; | ||
let high = c3s.length - 1; | ||
let mid; | ||
var low = 0; | ||
var high = c3s.length - 1; | ||
var mid; | ||
while (low <= high) { | ||
mid = Math.floor(0.5 * (low + high)); | ||
const xHere = xs[mid]; | ||
var xHere = xs[mid]; | ||
if (xHere < x) { | ||
@@ -95,8 +95,9 @@ low = mid + 1; | ||
// Interpolate | ||
const diff = x - xs[i]; | ||
const diffSq = diff * diff; | ||
var diff = x - xs[i]; | ||
var diffSq = diff * diff; | ||
return ys[i] + c1s[i] * diff + c2s[i] * diffSq + c3s[i] * diff * diffSq; | ||
} | ||
} | ||
}; | ||
return MonotonicInterpolant; | ||
}()); | ||
exports.default = MonotonicInterpolant; | ||
//# sourceMappingURL=MonotonicInterpolant.js.map |
@@ -10,5 +10,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const NativeTypes = __importStar(require("./NativeTypes")); | ||
var NativeTypes = __importStar(require("./NativeTypes")); | ||
function getDataFromDataTransfer(dataTransfer, typesToTry, defaultValue) { | ||
const result = typesToTry.reduce((resultSoFar, typeToTry) => resultSoFar || dataTransfer.getData(typeToTry), null); | ||
var result = typesToTry.reduce(function (resultSoFar, typeToTry) { return resultSoFar || dataTransfer.getData(typeToTry); }, null); | ||
return result != null // eslint-disable-line eqeqeq | ||
@@ -18,58 +18,71 @@ ? result | ||
} | ||
const nativeTypesConfig = { | ||
[NativeTypes.FILE]: { | ||
var nativeTypesConfig = (_a = {}, | ||
_a[NativeTypes.FILE] = { | ||
exposeProperty: 'files', | ||
matchesTypes: ['Files'], | ||
getData: (dataTransfer) => Array.prototype.slice.call(dataTransfer.files), | ||
getData: function (dataTransfer) { | ||
return Array.prototype.slice.call(dataTransfer.files); | ||
}, | ||
}, | ||
[NativeTypes.URL]: { | ||
_a[NativeTypes.URL] = { | ||
exposeProperty: 'urls', | ||
matchesTypes: ['Url', 'text/uri-list'], | ||
getData: (dataTransfer, matchesTypes) => getDataFromDataTransfer(dataTransfer, matchesTypes, '').split('\n'), | ||
getData: function (dataTransfer, matchesTypes) { | ||
return getDataFromDataTransfer(dataTransfer, matchesTypes, '').split('\n'); | ||
}, | ||
}, | ||
[NativeTypes.TEXT]: { | ||
_a[NativeTypes.TEXT] = { | ||
exposeProperty: 'text', | ||
matchesTypes: ['Text', 'text/plain'], | ||
getData: (dataTransfer, matchesTypes) => getDataFromDataTransfer(dataTransfer, matchesTypes, ''), | ||
getData: function (dataTransfer, matchesTypes) { | ||
return getDataFromDataTransfer(dataTransfer, matchesTypes, ''); | ||
}, | ||
}, | ||
}; | ||
_a); | ||
function createNativeDragSource(type) { | ||
const { exposeProperty, matchesTypes, getData } = nativeTypesConfig[type]; | ||
return class NativeDragSource { | ||
constructor() { | ||
this.item = { | ||
get [exposeProperty]() { | ||
// tslint:disable-next-line no-console | ||
console.warn(`Browser doesn't allow reading "${exposeProperty}" until the drop event.`); | ||
return null; | ||
}, | ||
}; | ||
var _a = nativeTypesConfig[type], exposeProperty = _a.exposeProperty, matchesTypes = _a.matchesTypes, getData = _a.getData; | ||
return /** @class */ (function () { | ||
function NativeDragSource() { | ||
this.item = (_a = {}, | ||
Object.defineProperty(_a, exposeProperty, { | ||
get: function () { | ||
// tslint:disable-next-line no-console | ||
console.warn("Browser doesn't allow reading \"" + exposeProperty + "\" until the drop event."); | ||
return null; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}), | ||
_a); | ||
var _a; | ||
} | ||
mutateItemByReadingDataTransfer(dataTransfer) { | ||
NativeDragSource.prototype.mutateItemByReadingDataTransfer = function (dataTransfer) { | ||
delete this.item[exposeProperty]; | ||
this.item[exposeProperty] = getData(dataTransfer, matchesTypes); | ||
} | ||
canDrag() { | ||
}; | ||
NativeDragSource.prototype.canDrag = function () { | ||
return true; | ||
} | ||
beginDrag() { | ||
}; | ||
NativeDragSource.prototype.beginDrag = function () { | ||
return this.item; | ||
} | ||
isDragging(monitor, handle) { | ||
}; | ||
NativeDragSource.prototype.isDragging = function (monitor, handle) { | ||
return handle === monitor.getSourceId(); | ||
} | ||
endDrag() { | ||
}; | ||
NativeDragSource.prototype.endDrag = function () { | ||
// empty | ||
} | ||
}; | ||
}; | ||
return NativeDragSource; | ||
}()); | ||
} | ||
exports.createNativeDragSource = createNativeDragSource; | ||
function matchNativeItemType(dataTransfer) { | ||
const dataTransferTypes = Array.prototype.slice.call(dataTransfer.types || []); | ||
return (Object.keys(nativeTypesConfig).filter(nativeItemType => { | ||
const { matchesTypes } = nativeTypesConfig[nativeItemType]; | ||
return matchesTypes.some(t => dataTransferTypes.indexOf(t) > -1); | ||
var dataTransferTypes = Array.prototype.slice.call(dataTransfer.types || []); | ||
return (Object.keys(nativeTypesConfig).filter(function (nativeItemType) { | ||
var matchesTypes = nativeTypesConfig[nativeItemType].matchesTypes; | ||
return matchesTypes.some(function (t) { return dataTransferTypes.indexOf(t) > -1; }); | ||
})[0] || null); | ||
} | ||
exports.matchNativeItemType = matchNativeItemType; | ||
var _a; | ||
//# sourceMappingURL=NativeDragSources.js.map |
@@ -6,11 +6,11 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const BrowserDetector_1 = require("./BrowserDetector"); | ||
const MonotonicInterpolant_1 = __importDefault(require("./MonotonicInterpolant")); | ||
const ELEMENT_NODE = 1; | ||
var BrowserDetector_1 = require("./BrowserDetector"); | ||
var MonotonicInterpolant_1 = __importDefault(require("./MonotonicInterpolant")); | ||
var ELEMENT_NODE = 1; | ||
function getNodeClientOffset(node) { | ||
const el = node.nodeType === ELEMENT_NODE ? node : node.parentElement; | ||
var el = node.nodeType === ELEMENT_NODE ? node : node.parentElement; | ||
if (!el) { | ||
return null; | ||
} | ||
const { top, left } = el.getBoundingClientRect(); | ||
var _a = el.getBoundingClientRect(), top = _a.top, left = _a.left; | ||
return { x: left, y: top }; | ||
@@ -31,4 +31,4 @@ } | ||
function getDragPreviewSize(isImage, dragPreview, sourceWidth, sourceHeight) { | ||
let dragPreviewWidth = isImage ? dragPreview.width : sourceWidth; | ||
let dragPreviewHeight = isImage ? dragPreview.height : sourceHeight; | ||
var dragPreviewWidth = isImage ? dragPreview.width : sourceWidth; | ||
var dragPreviewHeight = isImage ? dragPreview.height : sourceHeight; | ||
// Work around @2x coordinate discrepancies in browsers | ||
@@ -39,3 +39,3 @@ if (BrowserDetector_1.isSafari() && isImage) { | ||
} | ||
return { dragPreviewWidth, dragPreviewHeight }; | ||
return { dragPreviewWidth: dragPreviewWidth, dragPreviewHeight: dragPreviewHeight }; | ||
} | ||
@@ -45,14 +45,14 @@ function getDragPreviewOffset(sourceNode, dragPreview, clientOffset, anchorPoint, offsetPoint) { | ||
// Firefox only cares if it's an image, but WebKit also wants it to be detached. | ||
const isImage = isImageNode(dragPreview); | ||
const dragPreviewNode = isImage ? sourceNode : dragPreview; | ||
const dragPreviewNodeOffsetFromClient = getNodeClientOffset(dragPreviewNode); | ||
const offsetFromDragPreview = { | ||
var isImage = isImageNode(dragPreview); | ||
var dragPreviewNode = isImage ? sourceNode : dragPreview; | ||
var dragPreviewNodeOffsetFromClient = getNodeClientOffset(dragPreviewNode); | ||
var offsetFromDragPreview = { | ||
x: clientOffset.x - dragPreviewNodeOffsetFromClient.x, | ||
y: clientOffset.y - dragPreviewNodeOffsetFromClient.y, | ||
}; | ||
const { offsetWidth: sourceWidth, offsetHeight: sourceHeight } = sourceNode; | ||
const { anchorX, anchorY } = anchorPoint; | ||
const { dragPreviewWidth, dragPreviewHeight } = getDragPreviewSize(isImage, dragPreview, sourceWidth, sourceHeight); | ||
const calculateYOffset = () => { | ||
const interpolantY = new MonotonicInterpolant_1.default([0, 0.5, 1], [ | ||
var sourceWidth = sourceNode.offsetWidth, sourceHeight = sourceNode.offsetHeight; | ||
var anchorX = anchorPoint.anchorX, anchorY = anchorPoint.anchorY; | ||
var _a = getDragPreviewSize(isImage, dragPreview, sourceWidth, sourceHeight), dragPreviewWidth = _a.dragPreviewWidth, dragPreviewHeight = _a.dragPreviewHeight; | ||
var calculateYOffset = function () { | ||
var interpolantY = new MonotonicInterpolant_1.default([0, 0.5, 1], [ | ||
// Dock to the top | ||
@@ -65,3 +65,3 @@ offsetFromDragPreview.y, | ||
]); | ||
let y = interpolantY.interpolate(anchorY); | ||
var y = interpolantY.interpolate(anchorY); | ||
// Work around Safari 8 positioning bug | ||
@@ -74,6 +74,6 @@ if (BrowserDetector_1.isSafari() && isImage) { | ||
}; | ||
const calculateXOffset = () => { | ||
var calculateXOffset = function () { | ||
// Interpolate coordinates depending on anchor point | ||
// If you know a simpler way to do this, let me know | ||
const interpolantX = new MonotonicInterpolant_1.default([0, 0.5, 1], [ | ||
var interpolantX = new MonotonicInterpolant_1.default([0, 0.5, 1], [ | ||
// Dock to the left | ||
@@ -89,5 +89,5 @@ offsetFromDragPreview.x, | ||
// Force offsets if specified in the options. | ||
const { offsetX, offsetY } = offsetPoint; | ||
const isManualOffsetX = offsetX === 0 || offsetX; | ||
const isManualOffsetY = offsetY === 0 || offsetY; | ||
var offsetX = offsetPoint.offsetX, offsetY = offsetPoint.offsetY; | ||
var isManualOffsetX = offsetX === 0 || offsetX; | ||
var isManualOffsetY = offsetY === 0 || offsetY; | ||
return { | ||
@@ -94,0 +94,0 @@ x: isManualOffsetX ? offsetX : calculateXOffset(), |
{ | ||
"name": "react-dnd-html5-backend", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "HTML5 backend for React DnD", | ||
@@ -26,4 +26,4 @@ "main": "lib/index.js", | ||
"npm-run-all": "^4.1.2", | ||
"react-dnd": "^3.0.1", | ||
"react-dnd-test-backend": "^3.0.1", | ||
"react-dnd": "^3.0.2", | ||
"react-dnd-test-backend": "^3.0.2", | ||
"rimraf": "^2.6.2", | ||
@@ -36,3 +36,3 @@ "ts-loader": "^4.2.0", | ||
"autobind-decorator": "^2.1.0", | ||
"dnd-core": "^3.0.1", | ||
"dnd-core": "^3.0.2", | ||
"lodash": "^4.2.0", | ||
@@ -39,0 +39,0 @@ "shallowequal": "^1.0.2" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
305957
3390
0
Updateddnd-core@^3.0.2