Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

draggable-helper

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

draggable-helper - npm Package Compare versions

Comparing version 5.0.3 to 5.0.4

5

dist/cjs/index.d.ts

@@ -24,4 +24,7 @@ import { EventPosition, MouseOrTouchEvent } from 'drag-event-service';

beforeFirstMove?: (store: Store, opt: Options) => boolean | undefined;
afterFirstMove?: (store: Store, opt: Options) => void;
beforeMove?: (store: Store, opt: Options) => boolean | undefined;
afterMove?: (store: Store, opt: Options) => void;
beforeDrop?: (store: Store, opt: Options) => boolean | undefined;
afterDrop?: (store: Store, opt: Options) => void;
preventTextSelection?: boolean;

@@ -32,2 +35,4 @@ edgeScroll?: boolean;

edgeScrollTriggerMode?: 'top_left_corner' | 'mouse';
edgeScrollSpecifiedContainerX?: HTMLElement | ((store: Store, opt: Options) => HTMLElement);
edgeScrollSpecifiedContainerY?: HTMLElement | ((store: Store, opt: Options) => HTMLElement);
onmousedown?: (e: MouseEvent) => void;

@@ -34,0 +39,0 @@ onmousemove?: (e: MouseEvent) => void;

101

dist/cjs/index.js
/*!
* draggable-helper v5.0.3
* draggable-helper v5.0.4
* (c) phphe <phphe@outlook.com> (https://github.com/phphe)

@@ -311,2 +311,4 @@ * Homepage: undefined

_edgeScroll.afterFirstMove(store, opt);
opt.afterFirstMove && opt.afterFirstMove(store, opt);
} // Not the first move

@@ -340,2 +342,3 @@ // 非第一次移动

store.movedCount++;
opt.afterMove && opt.afterMove(store, opt);
}; // define the event listener of mouseup and touchend

@@ -393,2 +396,4 @@ // 定义mouseup和touchend事件监听器

_edgeScroll.afterDrop(store, opt);
opt.afterDrop && opt.afterDrop(store, opt);
}; // define the destroy function

@@ -456,9 +461,27 @@ // 定义销毁/退出的方法

};
} // find the scrollable parent elements
// 寻找可滚动的父系元素
} //
var foundHorizontal, foundVertical, prevElement, horizontalDir, verticalDir;
var findInElements;
var cachedElementsFromPoint; // find x container
var _iterator2 = _createForOfIteratorHelper(hp.elementsFromPoint(triggerPoint.x, triggerPoint.y)),
var minScrollableDisplacement = 10;
if (opt.edgeScrollSpecifiedContainerX) {
var containerX;
if (typeof opt.edgeScrollSpecifiedContainerX === 'function') {
containerX = opt.edgeScrollSpecifiedContainerX(store, opt);
} else {
containerX = opt.edgeScrollSpecifiedContainerX;
}
findInElements = [containerX];
} else {
findInElements = hp.elementsFromPoint(triggerPoint.x, triggerPoint.y);
cachedElementsFromPoint = findInElements;
}
var _iterator2 = _createForOfIteratorHelper(findInElements),
_step2;

@@ -468,4 +491,3 @@

for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var itemEl0 = _step2.value;
var itemEl = itemEl0;
var itemEl = _step2.value;

@@ -478,3 +500,3 @@ if (prevElement && !hp.isDescendantOf(prevElement, itemEl)) {

var t = 10; // min scrollable displacement. 最小可滚动距离, 小于此距离不触发滚动.
var t = minScrollableDisplacement; // min scrollable displacement. 最小可滚动距离, 小于此距离不触发滚动.

@@ -499,14 +521,57 @@ if (!foundHorizontal) {

if (foundHorizontal) {
break;
}
prevElement = itemEl;
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
prevElement = null; // find y container
if (opt.edgeScrollSpecifiedContainerY) {
var containerY;
if (typeof opt.edgeScrollSpecifiedContainerY === 'function') {
containerY = opt.edgeScrollSpecifiedContainerY(store, opt);
} else {
containerY = opt.edgeScrollSpecifiedContainerY;
}
findInElements = [containerY];
} else {
findInElements = cachedElementsFromPoint || hp.elementsFromPoint(triggerPoint.x, triggerPoint.y);
}
var _iterator3 = _createForOfIteratorHelper(findInElements),
_step3;
try {
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
var _itemEl = _step3.value;
if (prevElement && !hp.isDescendantOf(prevElement, _itemEl)) {
// itemEl is being covered by other elements
// itemEl被其他元素遮挡
continue;
}
var _t = minScrollableDisplacement; // min scrollable displacement. 最小可滚动距离, 小于此距离不触发滚动.
if (!foundVertical) {
if (itemEl.scrollHeight > itemEl.clientHeight) {
var _vp2 = fixedGetViewportPosition(itemEl);
if (_itemEl.scrollHeight > _itemEl.clientHeight) {
var _vp2 = fixedGetViewportPosition(_itemEl);
if (triggerPoint.y <= _vp2.top + margin) {
if (scrollableDisplacement(itemEl, 'up') > t && isScrollable(itemEl, 'y')) {
foundVertical = itemEl;
if (scrollableDisplacement(_itemEl, 'up') > _t && isScrollable(_itemEl, 'y')) {
foundVertical = _itemEl;
verticalDir = 'up';
}
} else if (triggerPoint.y >= _vp2.top + itemEl.clientHeight - margin) {
if (scrollableDisplacement(itemEl, 'down') > t && isScrollable(itemEl, 'y')) {
foundVertical = itemEl;
} else if (triggerPoint.y >= _vp2.top + _itemEl.clientHeight - margin) {
if (scrollableDisplacement(_itemEl, 'down') > _t && isScrollable(_itemEl, 'y')) {
foundVertical = _itemEl;
verticalDir = 'down';

@@ -518,13 +583,13 @@ }

if (foundHorizontal && foundVertical) {
if (foundVertical) {
break;
}
prevElement = itemEl;
prevElement = _itemEl;
} // scroll
} catch (err) {
_iterator2.e(err);
_iterator3.e(err);
} finally {
_iterator2.f();
_iterator3.f();
}

@@ -531,0 +596,0 @@

@@ -24,4 +24,7 @@ import { EventPosition, MouseOrTouchEvent } from 'drag-event-service';

beforeFirstMove?: (store: Store, opt: Options) => boolean | undefined;
afterFirstMove?: (store: Store, opt: Options) => void;
beforeMove?: (store: Store, opt: Options) => boolean | undefined;
afterMove?: (store: Store, opt: Options) => void;
beforeDrop?: (store: Store, opt: Options) => boolean | undefined;
afterDrop?: (store: Store, opt: Options) => void;
preventTextSelection?: boolean;

@@ -32,2 +35,4 @@ edgeScroll?: boolean;

edgeScrollTriggerMode?: 'top_left_corner' | 'mouse';
edgeScrollSpecifiedContainerX?: HTMLElement | ((store: Store, opt: Options) => HTMLElement);
edgeScrollSpecifiedContainerY?: HTMLElement | ((store: Store, opt: Options) => HTMLElement);
onmousedown?: (e: MouseEvent) => void;

@@ -34,0 +39,0 @@ onmousemove?: (e: MouseEvent) => void;

/*!
* draggable-helper v5.0.3
* draggable-helper v5.0.4
* (c) phphe <phphe@outlook.com> (https://github.com/phphe)

@@ -305,2 +305,4 @@ * Homepage: undefined

_edgeScroll.afterFirstMove(store, opt);
opt.afterFirstMove && opt.afterFirstMove(store, opt);
} // Not the first move

@@ -334,2 +336,3 @@ // 非第一次移动

store.movedCount++;
opt.afterMove && opt.afterMove(store, opt);
}; // define the event listener of mouseup and touchend

@@ -387,2 +390,4 @@ // 定义mouseup和touchend事件监听器

_edgeScroll.afterDrop(store, opt);
opt.afterDrop && opt.afterDrop(store, opt);
}; // define the destroy function

@@ -450,9 +455,27 @@ // 定义销毁/退出的方法

};
} // find the scrollable parent elements
// 寻找可滚动的父系元素
} //
var foundHorizontal, foundVertical, prevElement, horizontalDir, verticalDir;
var findInElements;
var cachedElementsFromPoint; // find x container
var _iterator2 = _createForOfIteratorHelper(elementsFromPoint(triggerPoint.x, triggerPoint.y)),
var minScrollableDisplacement = 10;
if (opt.edgeScrollSpecifiedContainerX) {
var containerX;
if (typeof opt.edgeScrollSpecifiedContainerX === 'function') {
containerX = opt.edgeScrollSpecifiedContainerX(store, opt);
} else {
containerX = opt.edgeScrollSpecifiedContainerX;
}
findInElements = [containerX];
} else {
findInElements = elementsFromPoint(triggerPoint.x, triggerPoint.y);
cachedElementsFromPoint = findInElements;
}
var _iterator2 = _createForOfIteratorHelper(findInElements),
_step2;

@@ -462,4 +485,3 @@

for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var itemEl0 = _step2.value;
var itemEl = itemEl0;
var itemEl = _step2.value;

@@ -472,3 +494,3 @@ if (prevElement && !isDescendantOf(prevElement, itemEl)) {

var t = 10; // min scrollable displacement. 最小可滚动距离, 小于此距离不触发滚动.
var t = minScrollableDisplacement; // min scrollable displacement. 最小可滚动距离, 小于此距离不触发滚动.

@@ -493,14 +515,57 @@ if (!foundHorizontal) {

if (foundHorizontal) {
break;
}
prevElement = itemEl;
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
prevElement = null; // find y container
if (opt.edgeScrollSpecifiedContainerY) {
var containerY;
if (typeof opt.edgeScrollSpecifiedContainerY === 'function') {
containerY = opt.edgeScrollSpecifiedContainerY(store, opt);
} else {
containerY = opt.edgeScrollSpecifiedContainerY;
}
findInElements = [containerY];
} else {
findInElements = cachedElementsFromPoint || elementsFromPoint(triggerPoint.x, triggerPoint.y);
}
var _iterator3 = _createForOfIteratorHelper(findInElements),
_step3;
try {
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
var _itemEl = _step3.value;
if (prevElement && !isDescendantOf(prevElement, _itemEl)) {
// itemEl is being covered by other elements
// itemEl被其他元素遮挡
continue;
}
var _t = minScrollableDisplacement; // min scrollable displacement. 最小可滚动距离, 小于此距离不触发滚动.
if (!foundVertical) {
if (itemEl.scrollHeight > itemEl.clientHeight) {
var _vp2 = fixedGetViewportPosition(itemEl);
if (_itemEl.scrollHeight > _itemEl.clientHeight) {
var _vp2 = fixedGetViewportPosition(_itemEl);
if (triggerPoint.y <= _vp2.top + margin) {
if (scrollableDisplacement(itemEl, 'up') > t && isScrollable(itemEl, 'y')) {
foundVertical = itemEl;
if (scrollableDisplacement(_itemEl, 'up') > _t && isScrollable(_itemEl, 'y')) {
foundVertical = _itemEl;
verticalDir = 'up';
}
} else if (triggerPoint.y >= _vp2.top + itemEl.clientHeight - margin) {
if (scrollableDisplacement(itemEl, 'down') > t && isScrollable(itemEl, 'y')) {
foundVertical = itemEl;
} else if (triggerPoint.y >= _vp2.top + _itemEl.clientHeight - margin) {
if (scrollableDisplacement(_itemEl, 'down') > _t && isScrollable(_itemEl, 'y')) {
foundVertical = _itemEl;
verticalDir = 'down';

@@ -512,13 +577,13 @@ }

if (foundHorizontal && foundVertical) {
if (foundVertical) {
break;
}
prevElement = itemEl;
prevElement = _itemEl;
} // scroll
} catch (err) {
_iterator2.e(err);
_iterator3.e(err);
} finally {
_iterator2.f();
_iterator3.f();
}

@@ -525,0 +590,0 @@

@@ -24,4 +24,7 @@ import { EventPosition, MouseOrTouchEvent } from 'drag-event-service';

beforeFirstMove?: (store: Store, opt: Options) => boolean | undefined;
afterFirstMove?: (store: Store, opt: Options) => void;
beforeMove?: (store: Store, opt: Options) => boolean | undefined;
afterMove?: (store: Store, opt: Options) => void;
beforeDrop?: (store: Store, opt: Options) => boolean | undefined;
afterDrop?: (store: Store, opt: Options) => void;
preventTextSelection?: boolean;

@@ -32,2 +35,4 @@ edgeScroll?: boolean;

edgeScrollTriggerMode?: 'top_left_corner' | 'mouse';
edgeScrollSpecifiedContainerX?: HTMLElement | ((store: Store, opt: Options) => HTMLElement);
edgeScrollSpecifiedContainerY?: HTMLElement | ((store: Store, opt: Options) => HTMLElement);
onmousedown?: (e: MouseEvent) => void;

@@ -34,0 +39,0 @@ onmousemove?: (e: MouseEvent) => void;

8

dist/umd-min/index.js
/*!
* draggable-helper v5.0.3
* draggable-helper v5.0.4
* (c) phphe <phphe@outlook.com> (https://github.com/phphe)

@@ -7,3 +7,3 @@ * Homepage: undefined

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).draggableHelper={})}(this,(function(e){"use strict";function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=t((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}));var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e};t((function(e){function t(n,o,i){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=t=Reflect.get:e.exports=t=function(e,t,n){var o=r(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}},t(n,o,i||n)}e.exports=t})),t((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t})),t((function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t}));var o=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r};var i=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}};t((function(e){var t=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n,r){var o=t&&t.prototype instanceof s?t:s,i=Object.create(o.prototype),a=new x(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return T()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=E(a,n);if(c){if(c===u)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=l(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===u)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u={};function s(){}function f(){}function p(){}var d={};d[o]=function(){return this};var h=Object.getPrototypeOf,m=h&&h(h(S([])));m&&m!==t&&n.call(m,o)&&(d=m);var v=p.prototype=s.prototype=Object.create(d);function g(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function y(e,t){var r;this._invoke=function(o,i){function a(){return new t((function(r,a){!function r(o,i,a,c){var u=l(e[o],e,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function E(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function b(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return f.prototype=v.constructor=p,p.constructor=f,p[a]=f.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(y.prototype),y.prototype[i]=function(){return this},e.AsyncIterator=y,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new y(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(v),v[a]="Generator",v[o]=function(){return this},v.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),b(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;b(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));var a=function(e){if(Array.isArray(e))return o(e)};var c=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)};var l=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var u=function(e){return a(e)||c(e)||i(e)||l()};
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).draggableHelper={})}(this,(function(e){"use strict";function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=t((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}));var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e};t((function(e){function t(n,o,i){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=t=Reflect.get:e.exports=t=function(e,t,n){var o=r(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}},t(n,o,i||n)}e.exports=t})),t((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t})),t((function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t}));var o=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r};var i=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}};t((function(e){var t=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new x(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return T()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=E(a,n);if(c){if(c===u)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var f=l(e,t,n);if("normal"===f.type){if(r=n.done?"completed":"suspendedYield",f.arg===u)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(r="completed",n.method="throw",n.arg=f.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u={};function f(){}function s(){}function p(){}var d={};d[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==t&&n.call(v,o)&&(d=v);var g=p.prototype=f.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function y(e,t){var r;this._invoke=function(o,i){function a(){return new t((function(r,a){!function r(o,i,a,c){var u=l(e[o],e,i);if("throw"!==u.type){var f=u.arg,s=f.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(s).then((function(e){f.value=e,a(f)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function E(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function b(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return s.prototype=g.constructor=p,p.constructor=s,p[a]=s.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===s||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},m(y.prototype),y.prototype[i]=function(){return this},e.AsyncIterator=y,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new y(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(g),g[a]="Generator",g[o]=function(){return this},g.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),b(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;b(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));var a=function(e){if(Array.isArray(e))return o(e)};var c=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)};var l=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var u=function(e){return a(e)||c(e)||i(e)||l()};
/*!

@@ -14,3 +14,3 @@ * helper-js v2.0.0

* Released under the MIT License.
*/function s(e){return t=e,"[object Array]"===Object.prototype.toString.call(t)?e:[e];var t}function f(e,t){Object.keys(t).forEach((function(n){null==e[n]&&(e[n]=t[n])}))}function p(e,t){for(;;){if(null==e.parentElement)return!1;if(e.parentElement===t)return!0;e=e.parentElement}}function d(e){var t=e.getBoundingClientRect(),n=t.top-document.documentElement.clientTop,r=t.bottom,o=t.left-document.documentElement.clientLeft,i=t.right;return{top:n,right:i,bottom:r,left:o,width:t.width||i-o,height:t.height||r-n,x:o,y:n}}var h=d;function m(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n&&n.withSelf?e:e.parentElement;r;){var o=t(r);if("break"===o)return;if(o)return r;r=r.parentElement}}function v(e,t){e["original_".concat(t)]=e.getAttribute(t)}function g(e,t){var n=e["original_".concat(t)];null==n?e.removeAttribute(t):e.setAttribute(t,n)}function y(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}function E(e,t){y(e,t)||(e.classList?e.classList.add(t):e.className+=" "+t)}function w(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];e.addEventListener?e.addEventListener.apply(e,[t,n].concat(o)):e.attachEvent&&e.attachEvent.apply(e,["on".concat(t),n].concat(o))}function b(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];e.removeEventListener?e.removeEventListener.apply(e,[t,n].concat(o)):e.detachEvent&&e.detachEvent.apply(e,["on".concat(t),n].concat(o))}function x(e){e.element||(e.element=document.scrollingElement||document.documentElement),null==e.duration&&(e.duration=0);var t,n=e.x,r=e.y,o=e.duration,i=e.element,a=0,c=i.scrollTop,l=r-c,u=i.scrollLeft,s=n-u,f=+new Date;return function d(){if(!e.beforeEveryFrame||!1!==e.beforeEveryFrame(a)){var h=(new Date).getTime()-f;null!=r&&(i.scrollTop=parseInt(p(c,l,h,o))),null!=n&&(i.scrollLeft=parseInt(p(u,s,h,o))),h<o?t=requestAnimationFrame(d):(null!=r&&(i.scrollTop=r),null!=n&&(i.scrollLeft=n)),a++}}(),function(){cancelAnimationFrame(t)};function p(e,t,n,r){return e+t*(n/r)}}
*/function f(e){return t=e,"[object Array]"===Object.prototype.toString.call(t)?e:[e];var t}function s(e,t){Object.keys(t).forEach((function(n){null==e[n]&&(e[n]=t[n])}))}function p(e,t){for(;;){if(null==e.parentElement)return!1;if(e.parentElement===t)return!0;e=e.parentElement}}function d(e){var t=e.getBoundingClientRect(),n=t.top-document.documentElement.clientTop,r=t.bottom,o=t.left-document.documentElement.clientLeft,i=t.right;return{top:n,right:i,bottom:r,left:o,width:t.width||i-o,height:t.height||r-n,x:o,y:n}}var h=d;function v(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n&&n.withSelf?e:e.parentElement;r;){var o=t(r);if("break"===o)return;if(o)return r;r=r.parentElement}}function g(e,t){e["original_".concat(t)]=e.getAttribute(t)}function m(e,t){var n=e["original_".concat(t)];null==n?e.removeAttribute(t):e.setAttribute(t,n)}function y(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}function E(e,t){y(e,t)||(e.classList?e.classList.add(t):e.className+=" "+t)}function w(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];e.addEventListener?e.addEventListener.apply(e,[t,n].concat(o)):e.attachEvent&&e.attachEvent.apply(e,["on".concat(t),n].concat(o))}function b(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];e.removeEventListener?e.removeEventListener.apply(e,[t,n].concat(o)):e.detachEvent&&e.detachEvent.apply(e,["on".concat(t),n].concat(o))}function x(e,t){var n=[e,t];return(document.elementsFromPoint||document.msElementsFromPoint||function(e,t){var n=[],r=void 0;do{r!==document.elementFromPoint(e,t)?(r=document.elementFromPoint(e,t),n.push(r),r.style.pointerEvents="none"):r=!1}while(r);return n.forEach((function(e){return e.style.pointerEvents="all"})),n}).apply(document,n)}function S(e){e.element||(e.element=document.scrollingElement||document.documentElement),null==e.duration&&(e.duration=0);var t,n=e.x,r=e.y,o=e.duration,i=e.element,a=0,c=i.scrollTop,l=r-c,u=i.scrollLeft,f=n-u,s=+new Date;return function d(){if(!e.beforeEveryFrame||!1!==e.beforeEveryFrame(a)){var h=(new Date).getTime()-s;null!=r&&(i.scrollTop=parseInt(p(c,l,h,o))),null!=n&&(i.scrollLeft=parseInt(p(u,f,h,o))),h<o?t=requestAnimationFrame(d):(null!=r&&(i.scrollTop=r),null!=n&&(i.scrollLeft=n)),a++}}(),function(){cancelAnimationFrame(t)};function p(e,t,n,r){return e+t*(n/r)}}
/*!

@@ -21,2 +21,2 @@ * drag-event-service v1.1.7

* Released under the MIT License.
*/var S={start:["mousedown","touchstart"],move:["mousemove","touchmove"],end:["mouseup","touchend"]},T={isTouch:function(e){return e.type&&e.type.startsWith("touch")},_getStore:function(e){return e._wrapperStore||(e._wrapperStore=[]),e._wrapperStore},on:function(e,t,n,r){var o,i,a=O(r),c=a.args,l=a.mouseArgs,s=a.touchArgs,f=this._getStore(e),p=this,d=function(e){var r;if(p.isTouch(e))r={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,screenX:e.changedTouches[0].screenX,screenY:e.changedTouches[0].screenY};else if(r={x:e.pageX,y:e.pageY,pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY},"start"===t&&1!==e.which)return;return n.call(this,e,r)};f.push({handler:n,wrapper:d}),(o=w).call.apply(o,[null,e,S[t][0],d].concat([].concat(u(c),u(l)))),(i=w).call.apply(i,[null,e,S[t][1],d].concat([].concat(u(c),u(s))))},off:function(e,t,n,r){for(var o=O(r),i=o.args,a=o.mouseArgs,c=this._getStore(e),l=c.length-1;l>=0;l--){var s,f,p=c[l],d=p.handler,h=p.wrapper;if(n===d)(s=b).call.apply(s,[null,e,S[t][0],h].concat([].concat(u(i),u(a)))),(f=b).call.apply(f,[null,e,S[t][1],h].concat([].concat(u(i),u(a)))),c.splice(l,1)}}};function O(e){return e||(e={}),{args:e.args||[],mouseArgs:e.mouseArgs||[],touchArgs:e.touchArgs||[]}}function L(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,i=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _={afterFirstMove:function(e,t){},afterMove:function(e,t){},afterDrop:function(e,t){}};var A,j,C={ingoreTags:["INPUT","TEXTAREA","SELECT","OPTGROUP","OPTION"],undraggableClassName:"undraggable",minDisplacement:10,draggingClassName:"dragging",clone:!1,updateMovedElementStyleManually:!1,preventTextSelection:!0,edgeScrollTriggerMargin:50,edgeScrollSpeed:.35,edgeScrollTriggerMode:"top_left_corner"},P={movedCount:0};function N(){A&&(A(),A=null),j&&(j(),j=null)}_.afterMove=function(e,t){if(t.edgeScroll){var n=t.edgeScrollTriggerMargin;N();var r,o,i,a,c,l={x:e.mouse.clientX,y:e.mouse.clientY};if("top_left_corner"===t.edgeScrollTriggerMode){var u=h(e.movedElement);l={x:u.x,y:u.y}}var s,f,d,m,v=L((f=l.x,d=l.y,m=[f,d],(document.elementsFromPoint||document.msElementsFromPoint||function(e,t){var n=[],r=void 0;do{r!==document.elementFromPoint(e,t)?(r=document.elementFromPoint(e,t),n.push(r),r.style.pointerEvents="none"):r=!1}while(r);return n.forEach((function(e){return e.style.pointerEvents="all"})),n}).apply(document,m)));try{for(v.s();!(s=v.n()).done;){var g=s.value;if(!i||p(i,g)){if(!r&&g.scrollWidth>g.clientWidth){var y=S(g);l.x<=y.left+n?b(g,"left")>10&&w(g,"x")&&(r=g,a="left"):l.x>=y.left+g.clientWidth-n&&b(g,"right")>10&&w(g,"x")&&(r=g,a="right")}if(!o&&g.scrollHeight>g.clientHeight){var E=S(g);l.y<=E.top+n?b(g,"up")>10&&w(g,"y")&&(o=g,c="up"):l.y>=E.top+g.clientHeight-n&&b(g,"down")>10&&w(g,"y")&&(o=g,c="down")}if(r&&o)break;i=g}}}catch(e){v.e(e)}finally{v.f()}r&&(A=x("left"===a?{x:0,element:r,duration:b(r,"left")/t.edgeScrollSpeed}:{x:r.scrollWidth-r.clientWidth,element:r,duration:b(r,"right")/t.edgeScrollSpeed})),o&&(j=x("up"===c?{y:0,element:o,duration:b(o,"up")/t.edgeScrollSpeed}:{y:o.scrollHeight-o.clientHeight,element:o,duration:b(o,"down")/t.edgeScrollSpeed}))}function w(e,t){var n=getComputedStyle(e),r="overflow-".concat(t);return e===(document.scrollingElement||document.documentElement)?"visible"===n[r]||"auto"===n[r]||"scroll"===n[r]:"auto"===n[r]||"scroll"===n[r]}function b(e,t){return"up"===t?e.scrollTop:"down"===t?e.scrollHeight-e.scrollTop-e.clientHeight:"left"===t?e.scrollLeft:"right"===t?e.scrollWidth-e.scrollLeft-e.clientWidth:void 0}function S(e){var t=h(e);return e===(document.scrollingElement||document.documentElement)&&(t.top=0,t.left=0),t}},_.afterDrop=function(e,t){t.edgeScroll&&N()},e.default=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(n,C);var r=function(r,a){T.isTouch(r)?n.ontouchstart&&n.ontouchstart(r):n.onmousedown&&n.onmousedown(r);var c=r.target;if(!n.ingoreTags.includes(c.tagName)&&(!y(c,n.undraggableClassName)&&!m(c,(function(t){return!!y(t,n.undraggableClassName)||(t===e?"break":void 0)})))){(t=JSON.parse(JSON.stringify(P))).startEvent=r,t.listenerElement=e,t.directTriggerElement=c,t.initialMouse=Object.assign({},a);var l=!1;if(n.getTriggerElement){var u=n.getTriggerElement(t.directTriggerElement,t);if(!u)return;t.triggerElement=u}else if(n.triggerClassName){var f,p,d=L(s(n.triggerClassName));try{var h=function(){var n=p.value;if(f=m(t.directTriggerElement,(function(t){return!!y(t,n)||(t===e?"break":void 0)}),{withSelf:!0}))return"break"};for(d.s();!(p=d.n()).done;){if("break"===h())break}}catch(e){d.e(e)}finally{d.f()}if(!f)return;t.triggerElement=f}else l=!0;t.movedOrClonedElement=n.getMovedOrClonedElement?n.getMovedOrClonedElement(t.directTriggerElement,t,n):e,t.movedOrClonedElement&&(l&&(t.triggerElement=t.movedOrClonedElement),n.triggerBySelf&&t.triggerElement!==t.directTriggerElement||(T.isTouch(r)||n.preventTextSelection&&r.preventDefault(),T.on(document,"move",o,{touchArgs:[{passive:!1}]}),T.on(window,"end",i)))}};T.on(e,"start",r);var o=function(e,r){T.isTouch(e)?n.ontouchmove&&n.ontouchmove(e):n.onmousemove&&n.onmousemove(e);var o=t.movedOrClonedElement,i=t.move={x:r.clientX-t.initialMouse.clientX,y:r.clientY-t.initialMouse.clientY};if(t.moveEvent=e,t.mouse=r,(T.isTouch(e)||n.preventTextSelection)&&e.preventDefault(),0===t.movedCount){if(n.minDisplacement){var a=Math.pow(i.x,2),c=Math.pow(i.y,2);if(Math.pow(a+c,.5)<n.minDisplacement)return}var l=n.clone?o.cloneNode(!0):o,u=h(o);t.movedOrClonedElement=o,t.movedElement=l,t.initialPositionRelativeToViewport=u,t.initialPosition=u;if(t.updateMovedElementStyle=function(){n.clone&&t.movedOrClonedElement.parentElement.appendChild(l);var e=d(l),r={width:"".concat(Math.ceil(e.width),"px"),height:"".concat(Math.ceil(e.height),"px"),zIndex:9999,opacity:.8,position:"fixed",left:u.x+"px",top:u.y+"px",pointerEvents:"none"};for(var o in v(l,"style"),r)l.style[o]=r[o];v(l,"class"),E(l,n.draggingClassName);var i=h(l);i.x!==u.x&&(u.x=u.x-(i.x-u.x),u.y=u.y-(i.y-u.y),l.style.left=u.x+"px",l.style.top=u.y+"px")},n.beforeFirstMove&&!1===n.beforeFirstMove(t,n))return;if(n.beforeMove&&!1===n.beforeMove(t,n))return;n.updateMovedElementStyleManually||t.updateMovedElementStyle(),_.afterFirstMove(t,n)}else{if(t.updateMovedElementStyle=function(){Object.assign(t.movedElement.style,{left:t.initialPosition.x+i.x+"px",top:t.initialPosition.y+i.y+"px"})},n.beforeMove&&!1===n.beforeMove(t,n))return;n.updateMovedElementStyleManually||t.updateMovedElementStyle()}_.afterMove(t,n),t.movedCount++},i=function e(r){if(T.isTouch(r)?n.ontouchend&&n.ontouchend(r):n.onmousedown&&n.onmousedown(r),T.off(document,"move",o,{touchArgs:[{passive:!1}]}),T.off(window,"end",e),0!==t.movedCount){t.endEvent=r;var i=t.movedElement,a=function(){g(i,"style"),g(i,"class"),n.clone&&i.parentElement.removeChild(i)};t.updateMovedElementStyle=a,n.beforeDrop&&!1===n.beforeDrop(t,n)||(n.updateMovedElementStyleManually||a(),_.afterDrop(t,n))}},a=function(){T.off(e,"start",r),T.on(document,"move",o,{touchArgs:[{passive:!1}]}),T.on(window,"end",i)};return{destroy:a,options:n}},e.defaultOptions=C,e.initialStore=P,Object.defineProperty(e,"__esModule",{value:!0})}));
*/var T={start:["mousedown","touchstart"],move:["mousemove","touchmove"],end:["mouseup","touchend"]},O={isTouch:function(e){return e.type&&e.type.startsWith("touch")},_getStore:function(e){return e._wrapperStore||(e._wrapperStore=[]),e._wrapperStore},on:function(e,t,n,r){var o,i,a=M(r),c=a.args,l=a.mouseArgs,f=a.touchArgs,s=this._getStore(e),p=this,d=function(e){var r;if(p.isTouch(e))r={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,screenX:e.changedTouches[0].screenX,screenY:e.changedTouches[0].screenY};else if(r={x:e.pageX,y:e.pageY,pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY},"start"===t&&1!==e.which)return;return n.call(this,e,r)};s.push({handler:n,wrapper:d}),(o=w).call.apply(o,[null,e,T[t][0],d].concat([].concat(u(c),u(l)))),(i=w).call.apply(i,[null,e,T[t][1],d].concat([].concat(u(c),u(f))))},off:function(e,t,n,r){for(var o=M(r),i=o.args,a=o.mouseArgs,c=this._getStore(e),l=c.length-1;l>=0;l--){var f,s,p=c[l],d=p.handler,h=p.wrapper;if(n===d)(f=b).call.apply(f,[null,e,T[t][0],h].concat([].concat(u(i),u(a)))),(s=b).call.apply(s,[null,e,T[t][1],h].concat([].concat(u(i),u(a)))),c.splice(l,1)}}};function M(e){return e||(e={}),{args:e.args||[],mouseArgs:e.mouseArgs||[],touchArgs:e.touchArgs||[]}}function L(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,i=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var A={afterFirstMove:function(e,t){},afterMove:function(e,t){},afterDrop:function(e,t){}};var C,j,P={ingoreTags:["INPUT","TEXTAREA","SELECT","OPTGROUP","OPTION"],undraggableClassName:"undraggable",minDisplacement:10,draggingClassName:"dragging",clone:!1,updateMovedElementStyleManually:!1,preventTextSelection:!0,edgeScrollTriggerMargin:50,edgeScrollSpeed:.35,edgeScrollTriggerMode:"top_left_corner"},N={movedCount:0};function Y(){C&&(C(),C=null),j&&(j(),j=null)}A.afterMove=function(e,t){if(t.edgeScroll){var n=t.edgeScrollTriggerMargin;Y();var r,o,i,a,c,l,u,f={x:e.mouse.clientX,y:e.mouse.clientY};if("top_left_corner"===t.edgeScrollTriggerMode){var s=h(e.movedElement);f={x:s.x,y:s.y}}if(t.edgeScrollSpecifiedContainerX)l=["function"==typeof t.edgeScrollSpecifiedContainerX?t.edgeScrollSpecifiedContainerX(e,t):t.edgeScrollSpecifiedContainerX];else u=l=x(f.x,f.y);var d,v=L(l);try{for(v.s();!(d=v.n()).done;){var g=d.value;if(!i||p(i,g)){if(!r&&g.scrollWidth>g.clientWidth){var m=M(g);f.x<=m.left+n?O(g,"left")>10&&T(g,"x")&&(r=g,a="left"):f.x>=m.left+g.clientWidth-n&&O(g,"right")>10&&T(g,"x")&&(r=g,a="right")}if(r)break;i=g}}}catch(e){v.e(e)}finally{v.f()}if(i=null,t.edgeScrollSpecifiedContainerY)l=["function"==typeof t.edgeScrollSpecifiedContainerY?t.edgeScrollSpecifiedContainerY(e,t):t.edgeScrollSpecifiedContainerY];else l=u||x(f.x,f.y);var y,E=L(l);try{for(E.s();!(y=E.n()).done;){var w=y.value;if(!i||p(i,w)){if(!o&&w.scrollHeight>w.clientHeight){var b=M(w);f.y<=b.top+n?O(w,"up")>10&&T(w,"y")&&(o=w,c="up"):f.y>=b.top+w.clientHeight-n&&O(w,"down")>10&&T(w,"y")&&(o=w,c="down")}if(o)break;i=w}}}catch(e){E.e(e)}finally{E.f()}r&&(C=S("left"===a?{x:0,element:r,duration:O(r,"left")/t.edgeScrollSpeed}:{x:r.scrollWidth-r.clientWidth,element:r,duration:O(r,"right")/t.edgeScrollSpeed})),o&&(j=S("up"===c?{y:0,element:o,duration:O(o,"up")/t.edgeScrollSpeed}:{y:o.scrollHeight-o.clientHeight,element:o,duration:O(o,"down")/t.edgeScrollSpeed}))}function T(e,t){var n=getComputedStyle(e),r="overflow-".concat(t);return e===(document.scrollingElement||document.documentElement)?"visible"===n[r]||"auto"===n[r]||"scroll"===n[r]:"auto"===n[r]||"scroll"===n[r]}function O(e,t){return"up"===t?e.scrollTop:"down"===t?e.scrollHeight-e.scrollTop-e.clientHeight:"left"===t?e.scrollLeft:"right"===t?e.scrollWidth-e.scrollLeft-e.clientWidth:void 0}function M(e){var t=h(e);return e===(document.scrollingElement||document.documentElement)&&(t.top=0,t.left=0),t}},A.afterDrop=function(e,t){t.edgeScroll&&Y()},e.default=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(n,P);var r=function(r,a){O.isTouch(r)?n.ontouchstart&&n.ontouchstart(r):n.onmousedown&&n.onmousedown(r);var c=r.target;if(!n.ingoreTags.includes(c.tagName)&&(!y(c,n.undraggableClassName)&&!v(c,(function(t){return!!y(t,n.undraggableClassName)||(t===e?"break":void 0)})))){(t=JSON.parse(JSON.stringify(N))).startEvent=r,t.listenerElement=e,t.directTriggerElement=c,t.initialMouse=Object.assign({},a);var l=!1;if(n.getTriggerElement){var u=n.getTriggerElement(t.directTriggerElement,t);if(!u)return;t.triggerElement=u}else if(n.triggerClassName){var s,p,d=L(f(n.triggerClassName));try{var h=function(){var n=p.value;if(s=v(t.directTriggerElement,(function(t){return!!y(t,n)||(t===e?"break":void 0)}),{withSelf:!0}))return"break"};for(d.s();!(p=d.n()).done;){if("break"===h())break}}catch(e){d.e(e)}finally{d.f()}if(!s)return;t.triggerElement=s}else l=!0;t.movedOrClonedElement=n.getMovedOrClonedElement?n.getMovedOrClonedElement(t.directTriggerElement,t,n):e,t.movedOrClonedElement&&(l&&(t.triggerElement=t.movedOrClonedElement),n.triggerBySelf&&t.triggerElement!==t.directTriggerElement||(O.isTouch(r)||n.preventTextSelection&&r.preventDefault(),O.on(document,"move",o,{touchArgs:[{passive:!1}]}),O.on(window,"end",i)))}};O.on(e,"start",r);var o=function(e,r){O.isTouch(e)?n.ontouchmove&&n.ontouchmove(e):n.onmousemove&&n.onmousemove(e);var o=t.movedOrClonedElement,i=t.move={x:r.clientX-t.initialMouse.clientX,y:r.clientY-t.initialMouse.clientY};if(t.moveEvent=e,t.mouse=r,(O.isTouch(e)||n.preventTextSelection)&&e.preventDefault(),0===t.movedCount){if(n.minDisplacement){var a=Math.pow(i.x,2),c=Math.pow(i.y,2);if(Math.pow(a+c,.5)<n.minDisplacement)return}var l=n.clone?o.cloneNode(!0):o,u=h(o);t.movedOrClonedElement=o,t.movedElement=l,t.initialPositionRelativeToViewport=u,t.initialPosition=u;if(t.updateMovedElementStyle=function(){n.clone&&t.movedOrClonedElement.parentElement.appendChild(l);var e=d(l),r={width:"".concat(Math.ceil(e.width),"px"),height:"".concat(Math.ceil(e.height),"px"),zIndex:9999,opacity:.8,position:"fixed",left:u.x+"px",top:u.y+"px",pointerEvents:"none"};for(var o in g(l,"style"),r)l.style[o]=r[o];g(l,"class"),E(l,n.draggingClassName);var i=h(l);i.x!==u.x&&(u.x=u.x-(i.x-u.x),u.y=u.y-(i.y-u.y),l.style.left=u.x+"px",l.style.top=u.y+"px")},n.beforeFirstMove&&!1===n.beforeFirstMove(t,n))return;if(n.beforeMove&&!1===n.beforeMove(t,n))return;n.updateMovedElementStyleManually||t.updateMovedElementStyle(),A.afterFirstMove(t,n),n.afterFirstMove&&n.afterFirstMove(t,n)}else{if(t.updateMovedElementStyle=function(){Object.assign(t.movedElement.style,{left:t.initialPosition.x+i.x+"px",top:t.initialPosition.y+i.y+"px"})},n.beforeMove&&!1===n.beforeMove(t,n))return;n.updateMovedElementStyleManually||t.updateMovedElementStyle()}A.afterMove(t,n),t.movedCount++,n.afterMove&&n.afterMove(t,n)},i=function e(r){if(O.isTouch(r)?n.ontouchend&&n.ontouchend(r):n.onmousedown&&n.onmousedown(r),O.off(document,"move",o,{touchArgs:[{passive:!1}]}),O.off(window,"end",e),0!==t.movedCount){t.endEvent=r;var i=t.movedElement,a=function(){m(i,"style"),m(i,"class"),n.clone&&i.parentElement.removeChild(i)};t.updateMovedElementStyle=a,n.beforeDrop&&!1===n.beforeDrop(t,n)||(n.updateMovedElementStyleManually||a(),A.afterDrop(t,n),n.afterDrop&&n.afterDrop(t,n))}},a=function(){O.off(e,"start",r),O.on(document,"move",o,{touchArgs:[{passive:!1}]}),O.on(window,"end",i)};return{destroy:a,options:n}},e.defaultOptions=P,e.initialStore=N,Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -24,4 +24,7 @@ import { EventPosition, MouseOrTouchEvent } from 'drag-event-service';

beforeFirstMove?: (store: Store, opt: Options) => boolean | undefined;
afterFirstMove?: (store: Store, opt: Options) => void;
beforeMove?: (store: Store, opt: Options) => boolean | undefined;
afterMove?: (store: Store, opt: Options) => void;
beforeDrop?: (store: Store, opt: Options) => boolean | undefined;
afterDrop?: (store: Store, opt: Options) => void;
preventTextSelection?: boolean;

@@ -32,2 +35,4 @@ edgeScroll?: boolean;

edgeScrollTriggerMode?: 'top_left_corner' | 'mouse';
edgeScrollSpecifiedContainerX?: HTMLElement | ((store: Store, opt: Options) => HTMLElement);
edgeScrollSpecifiedContainerY?: HTMLElement | ((store: Store, opt: Options) => HTMLElement);
onmousedown?: (e: MouseEvent) => void;

@@ -34,0 +39,0 @@ onmousemove?: (e: MouseEvent) => void;

/*!
* draggable-helper v5.0.3
* draggable-helper v5.0.4
* (c) phphe <phphe@outlook.com> (https://github.com/phphe)

@@ -1543,2 +1543,4 @@ * Homepage: undefined

_edgeScroll.afterFirstMove(store, opt);
opt.afterFirstMove && opt.afterFirstMove(store, opt);
} // Not the first move

@@ -1572,2 +1574,3 @@ // 非第一次移动

store.movedCount++;
opt.afterMove && opt.afterMove(store, opt);
}; // define the event listener of mouseup and touchend

@@ -1625,2 +1628,4 @@ // 定义mouseup和touchend事件监听器

_edgeScroll.afterDrop(store, opt);
opt.afterDrop && opt.afterDrop(store, opt);
}; // define the destroy function

@@ -1688,9 +1693,27 @@ // 定义销毁/退出的方法

};
} // find the scrollable parent elements
// 寻找可滚动的父系元素
} //
var foundHorizontal, foundVertical, prevElement, horizontalDir, verticalDir;
var findInElements;
var cachedElementsFromPoint; // find x container
var _iterator2 = _createForOfIteratorHelper(elementsFromPoint(triggerPoint.x, triggerPoint.y)),
var minScrollableDisplacement = 10;
if (opt.edgeScrollSpecifiedContainerX) {
var containerX;
if (typeof opt.edgeScrollSpecifiedContainerX === 'function') {
containerX = opt.edgeScrollSpecifiedContainerX(store, opt);
} else {
containerX = opt.edgeScrollSpecifiedContainerX;
}
findInElements = [containerX];
} else {
findInElements = elementsFromPoint(triggerPoint.x, triggerPoint.y);
cachedElementsFromPoint = findInElements;
}
var _iterator2 = _createForOfIteratorHelper(findInElements),
_step2;

@@ -1700,4 +1723,3 @@

for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var itemEl0 = _step2.value;
var itemEl = itemEl0;
var itemEl = _step2.value;

@@ -1710,3 +1732,3 @@ if (prevElement && !isDescendantOf(prevElement, itemEl)) {

var t = 10; // min scrollable displacement. 最小可滚动距离, 小于此距离不触发滚动.
var t = minScrollableDisplacement; // min scrollable displacement. 最小可滚动距离, 小于此距离不触发滚动.

@@ -1731,14 +1753,57 @@ if (!foundHorizontal) {

if (foundHorizontal) {
break;
}
prevElement = itemEl;
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
prevElement = null; // find y container
if (opt.edgeScrollSpecifiedContainerY) {
var containerY;
if (typeof opt.edgeScrollSpecifiedContainerY === 'function') {
containerY = opt.edgeScrollSpecifiedContainerY(store, opt);
} else {
containerY = opt.edgeScrollSpecifiedContainerY;
}
findInElements = [containerY];
} else {
findInElements = cachedElementsFromPoint || elementsFromPoint(triggerPoint.x, triggerPoint.y);
}
var _iterator3 = _createForOfIteratorHelper(findInElements),
_step3;
try {
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
var _itemEl = _step3.value;
if (prevElement && !isDescendantOf(prevElement, _itemEl)) {
// itemEl is being covered by other elements
// itemEl被其他元素遮挡
continue;
}
var _t = minScrollableDisplacement; // min scrollable displacement. 最小可滚动距离, 小于此距离不触发滚动.
if (!foundVertical) {
if (itemEl.scrollHeight > itemEl.clientHeight) {
var _vp2 = fixedGetViewportPosition(itemEl);
if (_itemEl.scrollHeight > _itemEl.clientHeight) {
var _vp2 = fixedGetViewportPosition(_itemEl);
if (triggerPoint.y <= _vp2.top + margin) {
if (scrollableDisplacement(itemEl, 'up') > t && isScrollable(itemEl, 'y')) {
foundVertical = itemEl;
if (scrollableDisplacement(_itemEl, 'up') > _t && isScrollable(_itemEl, 'y')) {
foundVertical = _itemEl;
verticalDir = 'up';
}
} else if (triggerPoint.y >= _vp2.top + itemEl.clientHeight - margin) {
if (scrollableDisplacement(itemEl, 'down') > t && isScrollable(itemEl, 'y')) {
foundVertical = itemEl;
} else if (triggerPoint.y >= _vp2.top + _itemEl.clientHeight - margin) {
if (scrollableDisplacement(_itemEl, 'down') > _t && isScrollable(_itemEl, 'y')) {
foundVertical = _itemEl;
verticalDir = 'down';

@@ -1750,13 +1815,13 @@ }

if (foundHorizontal && foundVertical) {
if (foundVertical) {
break;
}
prevElement = itemEl;
prevElement = _itemEl;
} // scroll
} catch (err) {
_iterator2.e(err);
_iterator3.e(err);
} finally {
_iterator2.f();
_iterator3.f();
}

@@ -1763,0 +1828,0 @@

{
"name": "draggable-helper",
"version": "5.0.3",
"version": "5.0.4",
"description": "To simplify drag and drop.",

@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc